pax_global_header00006660000000000000000000000064145557000450014517gustar00rootroot0000000000000052 comment=ec98e72748f0b8ac72afe260c2552da245ba0e30 golang-github-planetscale-vtprotobuf-0.6.0/000077500000000000000000000000001455570004500207525ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/.github/000077500000000000000000000000001455570004500223125ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/.github/workflows/000077500000000000000000000000001455570004500243475ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/.github/workflows/ci.yml000066400000000000000000000015041455570004500254650ustar00rootroot00000000000000name: CI on: push: pull_request: jobs: ci: name: Build and test runs-on: ubuntu-latest steps: - uses: actions/setup-go@v2 with: go-version: '^1.19' - uses: actions/checkout@v2 - name: Cache protobuf build id: protocache uses: actions/cache@v3 with: path: _vendor/protobuf-21.12 key: protobuf-21.12 - name: Compile protobuf if: steps.protocache.outputs.cache-hit != 'true' run: | sudo apt-get install -y autoconf automake libtool curl make g++ unzip ./protobuf.sh - run: make install && go mod tidy && go mod verify - run: git --no-pager diff --exit-code - run: go vet ./... - run: make genall - run: git --no-pager diff --exit-code - run: make test - run: git --no-pager diff --exit-code golang-github-planetscale-vtprotobuf-0.6.0/.github/workflows/licensing.yml000066400000000000000000000006011455570004500270420ustar00rootroot00000000000000name: Verify dependency licenses on: push: branches: - main pull_request: types: - opened - reopened - synchronize jobs: licensing: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - run: sudo gem install license_finder - run: go get -v ./... - run: license_finder golang-github-planetscale-vtprotobuf-0.6.0/.gitignore000066400000000000000000000000141455570004500227350ustar00rootroot00000000000000bin _vendor golang-github-planetscale-vtprotobuf-0.6.0/CONTRIBUTING.md000066400000000000000000000013321455570004500232020ustar00rootroot00000000000000# Contributing to vtProtobuf ## Workflow For all contributors, we recommend the standard [GitHub flow](https://guides.github.com/introduction/flow/) based on [forking and pull requests](https://guides.github.com/activities/forking/). For significant changes, please [create an issue](https://github.com/planetscale/vtprotobuf/issues) to let everyone know what you're planning to work on, and to track progress and design decisions. ## Development ### Protobuf version upgrade 1. Bump protobuf version in [./protobuf.sh](./protobuf.sh)) (PROTOBUF_VERSION variable). 1. Run `./protobuf.sh` to download and build protobuf. 1. Run `make genall` to regenerate proto files with a new compiler version, including well-known types. golang-github-planetscale-vtprotobuf-0.6.0/LICENSE000066400000000000000000000030741455570004500217630ustar00rootroot00000000000000Copyright (c) 2021, PlanetScale Inc. All rights reserved. Copyright (c) 2013, The GoGo Authors. All rights reserved. Copyright (c) 2018 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must 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. golang-github-planetscale-vtprotobuf-0.6.0/Makefile000066400000000000000000000107161455570004500224170ustar00rootroot00000000000000export GOBIN=$(PWD)/bin export PROTOBUF_ROOT=$(PWD)/_vendor/protobuf-21.12 .PHONY: install test gen-conformance gen-include gen-wkt genall bin/protoc-gen-go bin/protoc-gen-go-vtproto install: bin/protoc-gen-go-vtproto bin/protoc-gen-go bin/protoc-gen-go-vtproto: go install -tags protolegacy ./cmd/protoc-gen-go-vtproto bin/protoc-gen-go: go install -tags protolegacy google.golang.org/protobuf/cmd/protoc-gen-go gen-conformance: install $(PROTOBUF_ROOT)/src/protoc \ --proto_path=$(PROTOBUF_ROOT) \ --go_out=conformance --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ --go-vtproto_out=conformance --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \ -I$(PROTOBUF_ROOT)/src \ --go_opt=Msrc/google/protobuf/test_messages_proto2.proto=internal/conformance \ --go_opt=Msrc/google/protobuf/test_messages_proto3.proto=internal/conformance \ --go_opt=Mconformance/conformance.proto=internal/conformance \ --go-vtproto_opt=Msrc/google/protobuf/test_messages_proto2.proto=internal/conformance \ --go-vtproto_opt=Msrc/google/protobuf/test_messages_proto3.proto=internal/conformance \ --go-vtproto_opt=Mconformance/conformance.proto=internal/conformance \ src/google/protobuf/test_messages_proto2.proto \ src/google/protobuf/test_messages_proto3.proto \ conformance/conformance.proto gen-include: bin/protoc-gen-go $(PROTOBUF_ROOT)/src/protoc \ --proto_path=include \ --go_out=include --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ -I$(PROTOBUF_ROOT)/src \ github.com/planetscale/vtprotobuf/vtproto/ext.proto mv include/github.com/planetscale/vtprotobuf/vtproto/*.go ./vtproto gen-wkt: bin/protoc-gen-go-vtproto $(PROTOBUF_ROOT)/src/protoc \ -I$(PROTOBUF_ROOT)/src \ --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \ --go-vtproto_out=. \ --go-vtproto_opt=module=google.golang.org/protobuf,wrap=true \ $(PROTOBUF_ROOT)/src/google/protobuf/any.proto \ $(PROTOBUF_ROOT)/src/google/protobuf/duration.proto \ $(PROTOBUF_ROOT)/src/google/protobuf/empty.proto \ $(PROTOBUF_ROOT)/src/google/protobuf/field_mask.proto \ $(PROTOBUF_ROOT)/src/google/protobuf/timestamp.proto \ $(PROTOBUF_ROOT)/src/google/protobuf/wrappers.proto \ $(PROTOBUF_ROOT)/src/google/protobuf/struct.proto gen-testproto: get-grpc-testproto gen-wkt-testproto install $(PROTOBUF_ROOT)/src/protoc \ --proto_path=testproto \ --proto_path=include \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ --go-vtproto_out=allow-empty=true:. --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \ -I$(PROTOBUF_ROOT)/src \ testproto/empty/empty.proto \ testproto/pool/pool.proto \ testproto/pool/pool_with_slice_reuse.proto \ testproto/pool/pool_with_oneof.proto \ testproto/proto3opt/opt.proto \ testproto/proto2/scalars.proto \ testproto/unsafe/unsafe.proto \ || exit 1; $(PROTOBUF_ROOT)/src/protoc \ --proto_path=testproto \ --proto_path=include \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ --go-vtproto_opt=paths=source_relative \ --go-vtproto_opt=buildTag=vtprotobuf \ --go-vtproto_out=allow-empty=true:./testproto/buildtag --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \ -I$(PROTOBUF_ROOT)/src \ testproto/empty/empty.proto \ || exit 1; get-grpc-testproto: install $(PROTOBUF_ROOT)/src/protoc \ --proto_path=. \ --proto_path=include \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ --go-vtproto_out=. --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \ -I$(PROTOBUF_ROOT)/src \ -I. \ --go_opt=paths=source_relative \ --go_opt=Mtestproto/grpc/inner/inner.proto=github.com/planetscale/vtprotobuf/testproto/grpc/inner \ --go-vtproto_opt=paths=source_relative \ --go-vtproto_opt=Mtestproto/grpc/inner/inner.proto=github.com/planetscale/vtprotobuf/testproto/grpc/inner \ testproto/grpc/inner/inner.proto \ testproto/grpc/grpc.proto \ || exit 1; gen-wkt-testproto: install $(PROTOBUF_ROOT)/src/protoc \ --proto_path=testproto \ --proto_path=include \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ --go-vtproto_out=allow-empty=true:. --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \ -I$(PROTOBUF_ROOT)/src \ testproto/wkt/wkt.proto \ || exit 1; genall: gen-include gen-conformance gen-testproto gen-wkt test: install gen-conformance go test -short ./... go test -count=1 ./conformance/... GOGC="off" go test -count=1 ./testproto/pool/... golang-github-planetscale-vtprotobuf-0.6.0/README.md000066400000000000000000000341741455570004500222420ustar00rootroot00000000000000# `vtprotobuf`, the Vitess Protocol Buffers compiler This repository provides the `protoc-gen-go-vtproto` plug-in for `protoc`, which is used by Vitess to generate optimized marshall & unmarshal code. The code generated by this compiler is based on the optimized code generated by [`gogo/protobuf`](https://github.com/gogo/protobuf), although this package is not a fork of the original `gogo` compiler, as it has been implemented to support the new ProtoBuf APIv2 packages. ## Available features `vtprotobuf` is implemented as a helper plug-in that must be run **alongside** the upstream `protoc-gen-go` generator, as it generates fully-compatible auxiliary code to speed up (de)serialization of Protocol Buffer messages. The following features can be generated: - `size`: generates a `func (p *YourProto) SizeVT() int` helper that behaves identically to calling `proto.Size(p)` on the message, except the size calculation is fully unrolled and does not use reflection. This helper function can be used directly, and it'll also be used by the `marshal` codegen to ensure the destination buffer is properly sized before ProtoBuf objects are marshalled to it. - `equal`: generates the following helper methods - `func (this *YourProto) EqualVT(that *YourProto) bool`: this function behaves almost identically to calling `proto.Equal(this, that)` on messages, except the equality calculation is fully unrolled and does not use reflection. This helper function can be used directly. - `func (this *YourProto) EqualMessageVT(thatMsg proto.Message) bool`: this function behaves like the above `this.EqualVT(that)`, but allows comparing against arbitrary proto messages. If `thatMsg` is not of type `*YourProto`, false is returned. The uniform signature provided by this method allows accessing this method via type assertions even if the message type is not known at compile time. This allows implementing a generic `func EqualVT(proto.Message, proto.Message) bool` without reflection. - `marshal`: generates the following helper methods - `func (p *YourProto) MarshalVT() ([]byte, error)`: this function behaves identically to calling `proto.Marshal(p)`, except the actual marshalling has been fully unrolled and does not use reflection or allocate memory. This function simply allocates a properly sized buffer by calling `SizeVT` on the message and then uses `MarshalToSizedBufferVT` to marshal to it. - `func (p *YourProto) MarshalToVT(data []byte) (int, error)`: this function can be used to marshal a message to an existing buffer. The buffer must be large enough to hold the marshalled message, otherwise this function will panic. It returns the number of bytes marshalled. This function is useful e.g. when using memory pooling to re-use serialization buffers. - `func (p *YourProto) MarshalToSizedBufferVT(data []byte) (int, error)`: this function behaves like `MarshalTo` but expects that the input buffer has the exact size required to hold the message, otherwise it will panic. - `marshal_strict`: generates the following helper methods - `func (p *YourProto) MarshalVTStrict() ([]byte, error)`: this function behaves like `MarshalVT`, except fields are marshalled in a strict order by field's numbers they were declared in .proto file. - `func (p *YourProto) MarshalToVTStrict(data []byte) (int, error)`: this function behaves like `MarshalToVT`, except fields are marshalled in a strict order by field's numbers they were declared in .proto file. - `func (p *YourProto) MarshalToSizedBufferVTStrict(data []byte) (int, error)`: this function behaves like `MarshalToSizedBufferVT`, except fields are marshalled in a strict order by field's numbers they were declared in .proto file. - `unmarshal`: generates a `func (p *YourProto) UnmarshalVT(data []byte)` that behaves similarly to calling `proto.Unmarshal(data, p)` on the message, except the unmarshalling is performed by unrolled codegen without using reflection and allocating as little memory as possible. If the receiver `p` is **not** fully zeroed-out, the unmarshal call will actually behave like `proto.Merge(data, p)`. This is because the `proto.Unmarshal` in the ProtoBuf API is implemented by resetting the destination message and then calling `proto.Merge` on it. To ensure proper `Unmarshal` semantics, ensure you've called `proto.Reset` on your message before calling `UnmarshalVT`, or that your message has been newly allocated. - `unmarshal_unsafe` generates a `func (p *YourProto) UnmarshalVTUnsafe(data []byte)` that behaves like `UnmarshalVT`, except it unsafely casts slices of data to `bytes` and `string` fields instead of copying them to newly allocated arrays, so that it performs less allocations. **Data received from the wire has to be left untouched for the lifetime of the message.** Otherwise, the message's `bytes` and `string` fields can be corrupted. - `pool`: generates the following helper methods - `func (p *YourProto) ResetVT()`: this function behaves similarly to `proto.Reset(p)`, except it keeps as much memory as possible available on the message, so that further calls to `UnmarshalVT` on the same message will need to allocate less memory. This an API meant to be used with memory pools and does not need to be used directly. - `func (p *YourProto) ReturnToVTPool()`: this function returns message `p` to a local memory pool so it can be reused later. It clears the object properly with `ResetVT` before storing it on the pool. This method should only be used on messages that were obtained from a memory pool by calling `YourProtoFromVTPool`. **Using `p` after calling this method will lead to undefined behavior**. - `func YourProtoFromVTPool() *YourProto`: this function returns a `YourProto` message from a local memory pool, or allocates a new one if the pool is currently empty. The returned message is always empty and ready to be used (e.g. by calling `UnmarshalVT` on it). Once the message has been processed, it must be returned to the memory pool by calling `ReturnToVTPool()` on it. Returning the message to the pool is not mandatory (it does not leak memory), but if you don't return it, that defeats the whole point of memory pooling. - `clone`: generates the following helper methods - `func (p *YourProto) CloneVT() *YourProto`: this function behaves similarly to calling `proto.Clone(p)` on the message, except the cloning is performed by unrolled codegen without using reflection. If the receiver `p` is `nil` a typed `nil` is returned. - `func (p *YourProto) CloneMessageVT() proto.Message`: this function behaves like the above `p.CloneVT()`, but provides a uniform signature in order to be accessible via type assertions even if the type is not known at compile time. This allows implementing a generic `func CloneVT(proto.Message)` without reflection. If the receiver `p` is `nil`, a typed `nil` pointer of the message type will be returned inside a `proto.Message` interface. ## Usage 1. Install `protoc-gen-go-vtproto`: ``` go install github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto@latest ``` 2. Ensure your project is already using the ProtoBuf v2 API (i.e. `google.golang.org/protobuf`). The `vtprotobuf` compiler is not compatible with APIv1 generated code. 3. Update your `protoc` generator to use the new plug-in. Example from Vitess: ``` for name in $(PROTO_SRC_NAMES); do \ $(VTROOT)/bin/protoc \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ --go-grpc_out=. --plugin protoc-gen-go-grpc="${GOBIN}/protoc-gen-go-grpc" \ --go-vtproto_out=. --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \ --go-vtproto_opt=features=marshal+unmarshal+size \ proto/$${name}.proto; \ done ``` Note that the `vtproto` compiler runs like an auxiliary plug-in to the `protoc-gen-go` in APIv2, just like the new GRPC compiler plug-in, `protoc-gen-go-grpc`. You need to run it alongside the upstream generator, not as a replacement. 4. (Optional) Pass the features that you want to generate as `--go-vtproto_opt`. If no features are given, all the codegen steps will be performed. 5. (Optional) If you have enabled the `pool` option, you need to manually specify which ProtoBuf objects will be pooled. - You can tag messages explicitly in the `.proto` files with `option (vtproto.mempool)`: ```proto syntax = "proto3"; package app; option go_package = "app"; import "github.com/planetscale/vtprotobuf/vtproto/ext.proto"; message SampleMessage { option (vtproto.mempool) = true; // Enable memory pooling string name = 1; optional string project_id = 2; // ... } ``` - Alternatively, you can enumerate the pooled objects with `--go-vtproto_opt=pool=.` flags passed via the CLI: ``` $(VTROOT)/bin/protoc ... \ --go-vtproto_opt=features=marshal+unmarshal+size+pool \ --go-vtproto_opt=pool=vitess.io/vitess/go/vt/proto/query.Row \ --go-vtproto_opt=pool=vitess.io/vitess/go/vt/proto/binlogdata.VStreamRowsResponse \ ``` 6. (Optional) if you want to selectively compile the generate `vtprotobuf` files, the `--vtproto_opt=buildTag=` can be used. When using this option, the generated code will only be compiled in if a build tag is provided. It is recommended, but not required, to use `vtprotobuf` as the build tag if this is desired, especially if your project is imported by others. This will reduce the number of build tags a user will need to configure if they are importing multiple libraries following this pattern. When using this option, it is strongly recommended to make your code compile with and without the build tag. This can be done with type assertions before using `vtprotobuf` generated methods. The `grpc.Codec{}` object (discussed below) shows an example. 7. Compile the `.proto` files in your project. You should see `_vtproto.pb.go` files next to the `.pb.go` and `_grpc.pb.go` files that were already being generated. 8. (Optional) Switch your RPC framework to use the optimized helpers (see following sections) ## `vtprotobuf` package and well-known types Your generated `_vtproto.pb.go` files will have a dependency on this Go package to access some helper functions as well as the optimized code for ProtoBuf [well-known types](https://protobuf.dev/reference/protobuf/google.protobuf/). `vtprotobuf` will detect these types embedded in your own Messages and generate optimized code to marshal and unmarshal them. ## Using the optimized code with RPC frameworks The `protoc-gen-go-vtproto` compiler does not overwrite any of the default marshalling or unmarshalling code for your ProtoBuf objects. Instead, it generates helper methods that can be called explicitly to opt-in to faster (de)serialization. ### `vtprotobuf` with GRPC To use `vtprotobuf` with the new versions of GRPC, you need to register the codec provided by the `github.com/planetscale/vtprotobuf/codec/grpc` package. ```go package servenv import ( "github.com/planetscale/vtprotobuf/codec/grpc" "google.golang.org/grpc/encoding" _ "google.golang.org/grpc/encoding/proto" ) func init() { encoding.RegisterCodec(grpc.Codec{}) } ``` Note that we perform a blank import `_ "google.golang.org/grpc/encoding/proto"` of the default `proto` coded that ships with GRPC to ensure it's being replaced by us afterwards. The provided Codec will serialize & deserialize all ProtoBuf messages using the optimized codegen. #### Mixing ProtoBuf implementations with GRPC If you're running a complex GRPC service, you may need to support serializing ProtoBuf messages from different sources, including from external packages that will not have optimized `vtprotobuf` marshalling code. This is perfectly doable by implementing a custom codec in your own project that serializes messages based on their type. The Vitess project [implements a custom codec](https://github.com/vitessio/vitess/blob/main/go/vt/servenv/grpc_codec.go) to support ProtoBuf messages from Vitess itself and those generated by the `etcd` API -- you can use it as a reference. ### Twirp Twirp does not support customizing the Marshalling/Unmarshalling codec by default. In order to support `vtprotobuf`, you'll need to perform a search & replace on the generated Twirp files after running `protoc`. Here's an example: ```sh for twirp in $${dir}/*.twirp.go; \ do \ echo 'Updating' $${twirp}; \ sed -i '' -e 's/respBytes, err := proto.Marshal(respContent)/respBytes, err := respContent.MarshalVT()/g' $${twirp}; \ sed -i '' -e 's/if err = proto.Unmarshal(buf, reqContent); err != nil {/if err = reqContent.UnmarshalVT(buf); err != nil {/g' $${twirp}; \ done; \ ``` ### DRPC To use `vtprotobuf` as a DRPC encoding, simply pass `github.com/planetscale/vtprotobuf/codec/drpc` as the `protolib` flag in your `protoc-gen-go-drpc` invocation. Example: ``` protoc --go_out=. --go-vtproto_out=. --go-drpc_out=. --go-drpc_opt=protolib=github.com/planetscale/vtprotobuf/codec/drpc ``` ### Connect To use `vtprotobuf` with Connect simply pass in `connect.WithCodec(grpc.Codec{})` as a connect option to the client and handler constructors. ```go package main import ( "net/http" "github.com/bufbuild/connect-go" "github.com/foo/bar/pingv1connect" "github.com/planetscale/vtprotobuf/codec/grpc" ) func main() { mux := http.NewServeMux() mux.Handle(pingv1connect.NewPingServiceHandler( &PingServer{}, connect.WithCodec(grpc.Codec{}), // Add connect option to handler. )) // handler serving ... client := pingv1connect.NewPingServiceClient( http.DefaultClient, "http://localhost:8080", connect.WithCodec(grpc.Codec{}), // Add connect option to client. ) /// client code here ... } ``` ## Integrating with [`buf`](http://github.com/bufbuild/buf) `vtprotobuf` generation can be easily automated if your project's Protocol Buffers are managed with `buf`. Simply install `protoc-gen-go-vtproto` (see _Usage_ section) and add it as a plug-in to your `buf.gen.yaml` configuration: ```yaml version: v1 managed: enabled: true # ... plugins: - plugin: buf.build/protocolbuffers/go out: ./ opt: paths=source_relative - plugin: go-vtproto out: ./ opt: paths=source_relative ``` Running `buf generate` will now also include the `vtprotobuf` optimized helpers. golang-github-planetscale-vtprotobuf-0.6.0/cmd/000077500000000000000000000000001455570004500215155ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/cmd/protoc-gen-go-vtproto/000077500000000000000000000000001455570004500257105ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/cmd/protoc-gen-go-vtproto/main.go000066400000000000000000000026101455570004500271620ustar00rootroot00000000000000package main import ( "flag" "strings" _ "github.com/planetscale/vtprotobuf/features/clone" _ "github.com/planetscale/vtprotobuf/features/equal" _ "github.com/planetscale/vtprotobuf/features/grpc" _ "github.com/planetscale/vtprotobuf/features/marshal" _ "github.com/planetscale/vtprotobuf/features/pool" _ "github.com/planetscale/vtprotobuf/features/size" _ "github.com/planetscale/vtprotobuf/features/unmarshal" "github.com/planetscale/vtprotobuf/generator" "google.golang.org/protobuf/compiler/protogen" ) func main() { var cfg generator.Config var features string var f flag.FlagSet f.BoolVar(&cfg.AllowEmpty, "allow-empty", false, "allow generation of empty files") cfg.Poolable = generator.NewObjectSet() cfg.PoolableExclude = generator.NewObjectSet() f.Var(&cfg.Poolable, "pool", "use memory pooling for this object") f.Var(&cfg.PoolableExclude, "pool-exclude", "do not use memory pooling for this object") f.BoolVar(&cfg.Wrap, "wrap", false, "generate wrapper types") f.StringVar(&features, "features", "all", "list of features to generate (separated by '+')") f.StringVar(&cfg.BuildTag, "buildTag", "", "the go:build tag to set on generated files") protogen.Options{ParamFunc: f.Set}.Run(func(plugin *protogen.Plugin) error { gen, err := generator.NewGenerator(plugin, strings.Split(features, "+"), &cfg) if err != nil { return err } gen.Generate() return nil }) } golang-github-planetscale-vtprotobuf-0.6.0/codec/000077500000000000000000000000001455570004500220275ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/codec/drpc/000077500000000000000000000000001455570004500227575ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/codec/drpc/drpc_codec.go000066400000000000000000000011411455570004500253700ustar00rootroot00000000000000package drpc import ( "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) type vtprotoMessage interface { MarshalVT() ([]byte, error) UnmarshalVT([]byte) error } func Marshal(msg interface{}) ([]byte, error) { return msg.(vtprotoMessage).MarshalVT() } func Unmarshal(buf []byte, msg interface{}) error { return msg.(vtprotoMessage).UnmarshalVT(buf) } func JSONMarshal(msg interface{}) ([]byte, error) { return protojson.Marshal(msg.(proto.Message)) } func JSONUnmarshal(buf []byte, msg interface{}) error { return protojson.Unmarshal(buf, msg.(proto.Message)) } golang-github-planetscale-vtprotobuf-0.6.0/codec/grpc/000077500000000000000000000000001455570004500227625ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/codec/grpc/grpc_codec.go000066400000000000000000000012771455570004500254100ustar00rootroot00000000000000package grpc import "fmt" // Name is the name registered for the proto compressor. const Name = "proto" type Codec struct{} type vtprotoMessage interface { MarshalVT() ([]byte, error) UnmarshalVT([]byte) error } func (Codec) Marshal(v interface{}) ([]byte, error) { vt, ok := v.(vtprotoMessage) if !ok { return nil, fmt.Errorf("failed to marshal, message is %T (missing vtprotobuf helpers)", v) } return vt.MarshalVT() } func (Codec) Unmarshal(data []byte, v interface{}) error { vt, ok := v.(vtprotoMessage) if !ok { return fmt.Errorf("failed to unmarshal, message is %T (missing vtprotobuf helpers)", v) } return vt.UnmarshalVT(data) } func (Codec) Name() string { return Name } golang-github-planetscale-vtprotobuf-0.6.0/conformance/000077500000000000000000000000001455570004500232445ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/conformance/conformance_test.go000066400000000000000000000201031455570004500271200ustar00rootroot00000000000000// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package conformance_test import ( "bytes" "encoding/binary" "encoding/hex" "flag" "fmt" "io" "log" "math" "os" "os/exec" "path/filepath" "testing" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/proto" pb "github.com/planetscale/vtprotobuf/conformance/internal/conformance" ) func init() { // When the environment variable RUN_AS_CONFORMANCE_PLUGIN is set, // we skip running the tests and instead act as a conformance plugin. // This allows the binary to pass itself to conformance. if os.Getenv("RUN_AS_CONFORMANCE_PLUGIN") == "1" { main() os.Exit(0) } } var ( execute = flag.Bool("execute", true, "execute the conformance test") protoRoot = flag.String("protoroot", os.Getenv("PROTOBUF_ROOT"), "The root of the protobuf source tree.") ) func Test(t *testing.T) { if !*execute || testing.Short() { t.SkipNow() } binPath := filepath.Join(*protoRoot, "conformance", "conformance-test-runner") cmd := exec.Command(binPath, // "--failure_list", "failing_tests.txt", "--text_format_failure_list", "failing_tests_text_format.txt", "--enforce_recommended", os.Args[0]) cmd.Env = append(os.Environ(), "RUN_AS_CONFORMANCE_PLUGIN=1") out, err := cmd.CombinedOutput() if err != nil { t.Fatalf("execution error: %v\n\n%s", err, out) } } var marshalDifflog io.WriteCloser func conformanceUnmarshal(b []byte, msg proto.Message) error { expected := proto.Clone(msg) if err := proto.Unmarshal(b, expected); err != nil { return err } type unmarshalvt interface { UnmarshalVT(b []byte) error } u := msg.(unmarshalvt) if err := u.UnmarshalVT(b); err != nil { return err } if !proto.Equal(expected, msg) { fmt.Fprintf(marshalDifflog, "UNMARSHAL\n") fmt.Fprintf(marshalDifflog, "expected:\n%s\n\n", prototext.Format(expected)) fmt.Fprintf(marshalDifflog, "got:\n%s\n\n", prototext.Format(msg)) fmt.Fprintf(marshalDifflog, "raw: %#v\n\n", b) fmt.Fprintf(marshalDifflog, "==============\n\n") } return nil } func conformanceMarshal(msg proto.Message) ([]byte, error) { var expected, got []byte var err error defer func() { if r := recover(); r != nil { fmt.Fprintf(marshalDifflog, "MARSHAL\n") fmt.Fprintf(marshalDifflog, "message:\n%s\n\n", prototext.Format(msg)) fmt.Fprintf(marshalDifflog, "expected:\n%s\n\n", hex.Dump(expected)) fmt.Fprintf(marshalDifflog, "CRASH:\n%s\n\n", r) fmt.Fprintf(marshalDifflog, "golang:\n%#v\n\n", msg) fmt.Fprintf(marshalDifflog, "==============\n\n") } else if err != nil { // do nothing } else if got != nil && !bytes.Equal(expected, got) { fmt.Fprintf(marshalDifflog, "MARSHAL\n") fmt.Fprintf(marshalDifflog, "message:\n%s\n\n", prototext.Format(msg)) fmt.Fprintf(marshalDifflog, "expected:\n%s\n\n", hex.Dump(expected)) fmt.Fprintf(marshalDifflog, "got:\n%s\n\n", hex.Dump(got)) fmt.Fprintf(marshalDifflog, "golang:\n%#v\n\n", msg) fmt.Fprintf(marshalDifflog, "==============\n\n") } }() if expected, err = proto.Marshal(msg); err != nil { return nil, err } type marshalvt interface { MarshalVT() ([]byte, error) } m := msg.(marshalvt) if got, err = m.MarshalVT(); err != nil { return nil, err } return got, nil } func conformanceEqual(msg proto.Message) (err error) { isNaN := func(w interface{}) bool { f32, ok32 := w.(float32) f64, ok64 := w.(float64) return (ok32 && math.IsNaN(float64(f32))) || (ok64 && math.IsNaN(f64)) } switch msg := msg.(type) { case *pb.TestAllTypesProto2: cloned := proto.Clone(msg).(*pb.TestAllTypesProto2) eq := interface{}(msg).(interface { EqualVT(*pb.TestAllTypesProto2) bool }) if !eq.EqualVT(cloned) { return fmt.Errorf("msg %#v is not EqualVT() to itself %#v", msg, cloned) } pb.MutateFields(cloned) if cloned.EqualVT(msg) || msg.EqualVT(cloned) { return fmt.Errorf("these %T should not be equal:\nmsg = %+v\ncloned = %+v", msg, msg, cloned) } case *pb.TestAllTypesProto3: cloned := proto.Clone(msg).(*pb.TestAllTypesProto3) eq := interface{}(msg).(interface { EqualVT(*pb.TestAllTypesProto3) bool }) same := eq.EqualVT(cloned) if pb.VisitWithPredicate(msg, isNaN) { if same { return fmt.Errorf("msg %T %+v contains NaN thus should not EqualVT() to itself %+v", msg, msg, cloned) } } else { if !same { return fmt.Errorf("msg %#v is not EqualVT() to itself %#v", msg, cloned) } } pb.MutateFields(cloned) if cloned.EqualVT(msg) || msg.EqualVT(cloned) { return fmt.Errorf("these %T should not be equal:\nmsg = %+v\ncloned = %+v", msg, msg, cloned) } default: return fmt.Errorf("unhandled %T", msg) } return nil } func main() { var err error if marshalDifflog, err = os.Create("marshal.log"); err != nil { log.Fatalf("failed to init: %v", err) } defer marshalDifflog.Close() var sizeBuf [4]byte inbuf := make([]byte, 0, 4096) for { _, err := io.ReadFull(os.Stdin, sizeBuf[:]) if err == io.EOF { break } if err != nil { log.Fatalf("conformance: read request: %v", err) } size := binary.LittleEndian.Uint32(sizeBuf[:]) if int(size) > cap(inbuf) { inbuf = make([]byte, size) } inbuf = inbuf[:size] if _, err := io.ReadFull(os.Stdin, inbuf); err != nil { log.Fatalf("conformance: read request: %v", err) } req := &pb.ConformanceRequest{} if err := conformanceUnmarshal(inbuf, req); err != nil { log.Fatalf("conformance: parse request: %v", err) } res := handle(req) out, err := conformanceMarshal(res) if err != nil { log.Fatalf("conformance: marshal response: %v", err) } binary.LittleEndian.PutUint32(sizeBuf[:], uint32(len(out))) if _, err := os.Stdout.Write(sizeBuf[:]); err != nil { log.Fatalf("conformance: write response: %v", err) } if _, err := os.Stdout.Write(out); err != nil { log.Fatalf("conformance: write response: %v", err) } } } func handle(req *pb.ConformanceRequest) (res *pb.ConformanceResponse) { var msg proto.Message = &pb.TestAllTypesProto2{} if req.GetMessageType() == "protobuf_test_messages.proto3.TestAllTypesProto3" { msg = &pb.TestAllTypesProto3{} } // Unmarshal the test message. var err error switch p := req.Payload.(type) { case *pb.ConformanceRequest_ProtobufPayload: err = conformanceUnmarshal(p.ProtobufPayload, msg) case *pb.ConformanceRequest_JsonPayload: err = protojson.UnmarshalOptions{ DiscardUnknown: req.TestCategory == pb.TestCategory_JSON_IGNORE_UNKNOWN_PARSING_TEST, }.Unmarshal([]byte(p.JsonPayload), msg) case *pb.ConformanceRequest_TextPayload: err = prototext.Unmarshal([]byte(p.TextPayload), msg) default: return &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_RuntimeError{ RuntimeError: "unknown request payload type", }, } } if err != nil { return &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_ParseError{ ParseError: err.Error(), }, } } if err = conformanceEqual(msg); err != nil { return &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_RuntimeError{ RuntimeError: err.Error(), }, } } // Marshal the test message. var b []byte switch req.RequestedOutputFormat { case pb.WireFormat_PROTOBUF: b, err = conformanceMarshal(msg) res = &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_ProtobufPayload{ ProtobufPayload: b, }, } case pb.WireFormat_JSON: b, err = protojson.Marshal(msg) res = &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_JsonPayload{ JsonPayload: string(b), }, } case pb.WireFormat_TEXT_FORMAT: b, err = prototext.MarshalOptions{ EmitUnknown: req.PrintUnknownFields, }.Marshal(msg) res = &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_TextPayload{ TextPayload: string(b), }, } default: return &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_RuntimeError{ RuntimeError: "unknown output format", }, } } if err != nil { return &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_SerializeError{ SerializeError: err.Error(), }, } } return res } golang-github-planetscale-vtprotobuf-0.6.0/conformance/failing_tests_text_format.txt000066400000000000000000000006531455570004500312600ustar00rootroot00000000000000Recommended.Proto3.ProtobufInput.MessageUnknownFields_Print.TextFormatOutput Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairBytes Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairString Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortBytes Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortString golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/000077500000000000000000000000001455570004500250605ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance/000077500000000000000000000000001455570004500273525ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance/clonevt_test.go000066400000000000000000000125321455570004500324150ustar00rootroot00000000000000package conformance import ( "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/wrapperspb" ) func TestCloneVTNil(t *testing.T) { var a *TestAllTypesProto2 b := a.CloneVT() require.Nil(t, b) } func TestCloneVT2(t *testing.T) { stringPtr := func(x string) *string { return &x } float32Ptr := func(x float32) *float32 { return &x } float64Ptr := func(x float64) *float64 { return &x } msgs := []*TestAllTypesProto2{ {OptionalString: stringPtr("bla")}, {OptionalDouble: float64Ptr(1.7976931348623157e+308)}, {OptionalFloat: float32Ptr(-0.0)}, {OptionalBytes: []byte{}}, {MapStringBytes: map[string][]byte{"": {}}}, {OneofField: &TestAllTypesProto2_OneofBool{OneofBool: false}}, {MapStringNestedMessage: map[string]*TestAllTypesProto2_NestedMessage{"": {}}}, {MapStringNestedMessage: map[string]*TestAllTypesProto2_NestedMessage{"eh": {}}}, } for _, msg := range msgs { t.Run(fmt.Sprintf("%+v", msg), func(t *testing.T) { orig := proto.Clone(msg).(*TestAllTypesProto2) clone := orig.CloneVT() require.Truef(t, clone.EqualVT(msg), "cloning %T returned modified message:\nmsg = %+v\nclone = %+v\n", msg, msg, clone) require.Truef(t, orig.EqualVT(msg), "cloning %T modified original message:\nmsg = %+v\nafter clone = %+v\n", msg, msg, clone) MutateFields(clone) require.False(t, clone.EqualVT(msg), "cloned message unchanged after mutation") require.True(t, orig.EqualVT(msg), "mutating cloned %T mutated original:\nmsg = %+v\nafter clone = %+v\n", msg, msg, orig) }) } } func TestCloneVT3(t *testing.T) { msg := &TestAllTypesProto3{ OneofField: &TestAllTypesProto3_OneofNullValue{OneofNullValue: structpb.NullValue_NULL_VALUE}, OptionalBoolWrapper: wrapperspb.Bool(true), OptionalInt32Wrapper: wrapperspb.Int32(1), OptionalInt64Wrapper: wrapperspb.Int64(1), OptionalUint32Wrapper: wrapperspb.UInt32(1), OptionalUint64Wrapper: wrapperspb.UInt64(1), OptionalFloatWrapper: wrapperspb.Float(1), OptionalDoubleWrapper: wrapperspb.Double(1), OptionalStringWrapper: wrapperspb.String("blip"), OptionalBytesWrapper: wrapperspb.Bytes([]byte("blop")), RepeatedBoolWrapper: []*wrapperspb.BoolValue{wrapperspb.Bool(true)}, RepeatedInt32Wrapper: []*wrapperspb.Int32Value{wrapperspb.Int32(1)}, RepeatedInt64Wrapper: []*wrapperspb.Int64Value{wrapperspb.Int64(1)}, RepeatedUint32Wrapper: []*wrapperspb.UInt32Value{wrapperspb.UInt32(1)}, RepeatedUint64Wrapper: []*wrapperspb.UInt64Value{wrapperspb.UInt64(1)}, RepeatedFloatWrapper: []*wrapperspb.FloatValue{wrapperspb.Float(1)}, RepeatedDoubleWrapper: []*wrapperspb.DoubleValue{wrapperspb.Double(1)}, RepeatedStringWrapper: []*wrapperspb.StringValue{wrapperspb.String("blip")}, RepeatedBytesWrapper: []*wrapperspb.BytesValue{wrapperspb.Bytes([]byte("blop"))}, // OptionalDuration: *durationpb.Duration // OptionalTimestamp: *timestamppb.Timestamp // OptionalFieldMask: *fieldmaskpb.FieldMask // OptionalStruct: *structpb.Struct // OptionalAny: *anypb.Any OptionalValue: structpb.NewNumberValue(42), // OptionalNullValue: structpb.NullValue // repeated google.protobuf.Duration repeated_duration // repeated google.protobuf.Timestamp repeated_timestamp // repeated google.protobuf.FieldMask repeated_fieldmask // repeated google.protobuf.Struct repeated_struct // repeated google.protobuf.Any repeated_any // repeated google.protobuf.Value repeated_value RepeatedValue: []*structpb.Value{structpb.NewNumberValue(42)}, // repeated google.protobuf.ListValue repeated_list_value } orig := proto.Clone(msg).(*TestAllTypesProto3) clone := orig.CloneVT() require.Truef(t, clone.EqualVT(msg), "cloning %T returned modified message:\nmsg = %+v\nclone = %+v\n", msg, msg, clone) require.Truef(t, orig.EqualVT(msg), "cloning %T modified original message:\nmsg = %+v\nafter clone = %+v\n", msg, msg, clone) MutateFields(clone) require.False(t, clone.EqualVT(msg), "cloned message unchanged after mutation") require.True(t, orig.EqualVT(msg), "mutating cloned %T mutated original:\nmsg = %+v\nafter clone = %+v\n", msg, msg, orig) } func TestCloneVT_UnknownFields(t *testing.T) { msg := &TestAllTypesProto3{ OptionalInt32: 42, } const unknownFieldNumber = 1337 require.Nil(t, msg.ProtoReflect().Descriptor().Fields().ByNumber(unknownFieldNumber), "if this assertion fails, please change the above constant to a field number not used in the proto") data, err := msg.MarshalVT() require.NoError(t, err) data = protowire.AppendTag(data, unknownFieldNumber, protowire.BytesType) data = protowire.AppendString(data, "foo bar baz") unmarshaled := new(TestAllTypesProto3) require.NoError(t, unmarshaled.UnmarshalVT(data), "unmarshaling should succeed") cloned := unmarshaled.CloneVT() assert.Truef(t, proto.Equal(unmarshaled, cloned), "expected %T to be equal:\nunmarshaled = %+v\ncloned = %+v\n", unmarshaled, unmarshaled, cloned) protoCloned := proto.Clone(unmarshaled).(*TestAllTypesProto3) require.True(t, proto.Equal(unmarshaled, protoCloned), "proto.Clone is misbehaving") assert.Truef(t, proto.Equal(cloned, protoCloned), "expected %T to be equal:\ncloned = %+v\nprotoCloned = %+v\n", cloned, cloned, protoCloned) } golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance/conformance.pb.go000066400000000000000000001001511455570004500325710ustar00rootroot00000000000000// 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. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: conformance/conformance.proto package conformance import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type WireFormat int32 const ( WireFormat_UNSPECIFIED WireFormat = 0 WireFormat_PROTOBUF WireFormat = 1 WireFormat_JSON WireFormat = 2 WireFormat_JSPB WireFormat = 3 // Google internal only. Opensource testees just skip it. WireFormat_TEXT_FORMAT WireFormat = 4 ) // Enum value maps for WireFormat. var ( WireFormat_name = map[int32]string{ 0: "UNSPECIFIED", 1: "PROTOBUF", 2: "JSON", 3: "JSPB", 4: "TEXT_FORMAT", } WireFormat_value = map[string]int32{ "UNSPECIFIED": 0, "PROTOBUF": 1, "JSON": 2, "JSPB": 3, "TEXT_FORMAT": 4, } ) func (x WireFormat) Enum() *WireFormat { p := new(WireFormat) *p = x return p } func (x WireFormat) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (WireFormat) Descriptor() protoreflect.EnumDescriptor { return file_conformance_conformance_proto_enumTypes[0].Descriptor() } func (WireFormat) Type() protoreflect.EnumType { return &file_conformance_conformance_proto_enumTypes[0] } func (x WireFormat) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use WireFormat.Descriptor instead. func (WireFormat) EnumDescriptor() ([]byte, []int) { return file_conformance_conformance_proto_rawDescGZIP(), []int{0} } type TestCategory int32 const ( TestCategory_UNSPECIFIED_TEST TestCategory = 0 TestCategory_BINARY_TEST TestCategory = 1 // Test binary wire format. TestCategory_JSON_TEST TestCategory = 2 // Test json wire format. // Similar to JSON_TEST. However, during parsing json, testee should ignore // unknown fields. This feature is optional. Each implementation can decide // whether to support it. See // https://developers.google.com/protocol-buffers/docs/proto3#json_options // for more detail. TestCategory_JSON_IGNORE_UNKNOWN_PARSING_TEST TestCategory = 3 // Test jspb wire format. Google internal only. Opensource testees just skip it. TestCategory_JSPB_TEST TestCategory = 4 // Test text format. For cpp, java and python, testees can already deal with // this type. Testees of other languages can simply skip it. TestCategory_TEXT_FORMAT_TEST TestCategory = 5 ) // Enum value maps for TestCategory. var ( TestCategory_name = map[int32]string{ 0: "UNSPECIFIED_TEST", 1: "BINARY_TEST", 2: "JSON_TEST", 3: "JSON_IGNORE_UNKNOWN_PARSING_TEST", 4: "JSPB_TEST", 5: "TEXT_FORMAT_TEST", } TestCategory_value = map[string]int32{ "UNSPECIFIED_TEST": 0, "BINARY_TEST": 1, "JSON_TEST": 2, "JSON_IGNORE_UNKNOWN_PARSING_TEST": 3, "JSPB_TEST": 4, "TEXT_FORMAT_TEST": 5, } ) func (x TestCategory) Enum() *TestCategory { p := new(TestCategory) *p = x return p } func (x TestCategory) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TestCategory) Descriptor() protoreflect.EnumDescriptor { return file_conformance_conformance_proto_enumTypes[1].Descriptor() } func (TestCategory) Type() protoreflect.EnumType { return &file_conformance_conformance_proto_enumTypes[1] } func (x TestCategory) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use TestCategory.Descriptor instead. func (TestCategory) EnumDescriptor() ([]byte, []int) { return file_conformance_conformance_proto_rawDescGZIP(), []int{1} } // The conformance runner will request a list of failures as the first request. // This will be known by message_type == "conformance.FailureSet", a conformance // test should return a serialized FailureSet in protobuf_payload. type FailureSet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Failure []string `protobuf:"bytes,1,rep,name=failure,proto3" json:"failure,omitempty"` } func (x *FailureSet) Reset() { *x = FailureSet{} if protoimpl.UnsafeEnabled { mi := &file_conformance_conformance_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FailureSet) String() string { return protoimpl.X.MessageStringOf(x) } func (*FailureSet) ProtoMessage() {} func (x *FailureSet) ProtoReflect() protoreflect.Message { mi := &file_conformance_conformance_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FailureSet.ProtoReflect.Descriptor instead. func (*FailureSet) Descriptor() ([]byte, []int) { return file_conformance_conformance_proto_rawDescGZIP(), []int{0} } func (x *FailureSet) GetFailure() []string { if x != nil { return x.Failure } return nil } // Represents a single test case's input. The testee should: // // 1. parse this proto (which should always succeed) // 2. parse the protobuf or JSON payload in "payload" (which may fail) // 3. if the parse succeeded, serialize the message in the requested format. type ConformanceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The payload (whether protobuf of JSON) is always for a // protobuf_test_messages.proto3.TestAllTypes proto (as defined in // src/google/protobuf/proto3_test_messages.proto). // // TODO(haberman): if/when we expand the conformance tests to support proto2, // we will want to include a field that lets the payload/response be a // protobuf_test_messages.google.protobuf.TestAllTypes message instead. // // Types that are assignable to Payload: // // *ConformanceRequest_ProtobufPayload // *ConformanceRequest_JsonPayload // *ConformanceRequest_JspbPayload // *ConformanceRequest_TextPayload Payload isConformanceRequest_Payload `protobuf_oneof:"payload"` // Which format should the testee serialize its message to? RequestedOutputFormat WireFormat `protobuf:"varint,3,opt,name=requested_output_format,json=requestedOutputFormat,proto3,enum=conformance.WireFormat" json:"requested_output_format,omitempty"` // The full name for the test message to use; for the moment, either: // protobuf_test_messages.proto3.TestAllTypesProto3 or // protobuf_test_messages.google.protobuf.TestAllTypesProto2. MessageType string `protobuf:"bytes,4,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` // Each test is given a specific test category. Some category may need // specific support in testee programs. Refer to the definition of TestCategory // for more information. TestCategory TestCategory `protobuf:"varint,5,opt,name=test_category,json=testCategory,proto3,enum=conformance.TestCategory" json:"test_category,omitempty"` // Specify details for how to encode jspb. JspbEncodingOptions *JspbEncodingConfig `protobuf:"bytes,6,opt,name=jspb_encoding_options,json=jspbEncodingOptions,proto3" json:"jspb_encoding_options,omitempty"` // This can be used in json and text format. If true, testee should print // unknown fields instead of ignore. This feature is optional. PrintUnknownFields bool `protobuf:"varint,9,opt,name=print_unknown_fields,json=printUnknownFields,proto3" json:"print_unknown_fields,omitempty"` } func (x *ConformanceRequest) Reset() { *x = ConformanceRequest{} if protoimpl.UnsafeEnabled { mi := &file_conformance_conformance_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ConformanceRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ConformanceRequest) ProtoMessage() {} func (x *ConformanceRequest) ProtoReflect() protoreflect.Message { mi := &file_conformance_conformance_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ConformanceRequest.ProtoReflect.Descriptor instead. func (*ConformanceRequest) Descriptor() ([]byte, []int) { return file_conformance_conformance_proto_rawDescGZIP(), []int{1} } func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload { if m != nil { return m.Payload } return nil } func (x *ConformanceRequest) GetProtobufPayload() []byte { if x, ok := x.GetPayload().(*ConformanceRequest_ProtobufPayload); ok { return x.ProtobufPayload } return nil } func (x *ConformanceRequest) GetJsonPayload() string { if x, ok := x.GetPayload().(*ConformanceRequest_JsonPayload); ok { return x.JsonPayload } return "" } func (x *ConformanceRequest) GetJspbPayload() string { if x, ok := x.GetPayload().(*ConformanceRequest_JspbPayload); ok { return x.JspbPayload } return "" } func (x *ConformanceRequest) GetTextPayload() string { if x, ok := x.GetPayload().(*ConformanceRequest_TextPayload); ok { return x.TextPayload } return "" } func (x *ConformanceRequest) GetRequestedOutputFormat() WireFormat { if x != nil { return x.RequestedOutputFormat } return WireFormat_UNSPECIFIED } func (x *ConformanceRequest) GetMessageType() string { if x != nil { return x.MessageType } return "" } func (x *ConformanceRequest) GetTestCategory() TestCategory { if x != nil { return x.TestCategory } return TestCategory_UNSPECIFIED_TEST } func (x *ConformanceRequest) GetJspbEncodingOptions() *JspbEncodingConfig { if x != nil { return x.JspbEncodingOptions } return nil } func (x *ConformanceRequest) GetPrintUnknownFields() bool { if x != nil { return x.PrintUnknownFields } return false } type isConformanceRequest_Payload interface { isConformanceRequest_Payload() } type ConformanceRequest_ProtobufPayload struct { ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` } type ConformanceRequest_JsonPayload struct { JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"` } type ConformanceRequest_JspbPayload struct { // Google internal only. Opensource testees just skip it. JspbPayload string `protobuf:"bytes,7,opt,name=jspb_payload,json=jspbPayload,proto3,oneof"` } type ConformanceRequest_TextPayload struct { TextPayload string `protobuf:"bytes,8,opt,name=text_payload,json=textPayload,proto3,oneof"` } func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {} func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {} func (*ConformanceRequest_JspbPayload) isConformanceRequest_Payload() {} func (*ConformanceRequest_TextPayload) isConformanceRequest_Payload() {} // Represents a single test case's output. type ConformanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Result: // // *ConformanceResponse_ParseError // *ConformanceResponse_SerializeError // *ConformanceResponse_RuntimeError // *ConformanceResponse_ProtobufPayload // *ConformanceResponse_JsonPayload // *ConformanceResponse_Skipped // *ConformanceResponse_JspbPayload // *ConformanceResponse_TextPayload Result isConformanceResponse_Result `protobuf_oneof:"result"` } func (x *ConformanceResponse) Reset() { *x = ConformanceResponse{} if protoimpl.UnsafeEnabled { mi := &file_conformance_conformance_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ConformanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ConformanceResponse) ProtoMessage() {} func (x *ConformanceResponse) ProtoReflect() protoreflect.Message { mi := &file_conformance_conformance_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ConformanceResponse.ProtoReflect.Descriptor instead. func (*ConformanceResponse) Descriptor() ([]byte, []int) { return file_conformance_conformance_proto_rawDescGZIP(), []int{2} } func (m *ConformanceResponse) GetResult() isConformanceResponse_Result { if m != nil { return m.Result } return nil } func (x *ConformanceResponse) GetParseError() string { if x, ok := x.GetResult().(*ConformanceResponse_ParseError); ok { return x.ParseError } return "" } func (x *ConformanceResponse) GetSerializeError() string { if x, ok := x.GetResult().(*ConformanceResponse_SerializeError); ok { return x.SerializeError } return "" } func (x *ConformanceResponse) GetRuntimeError() string { if x, ok := x.GetResult().(*ConformanceResponse_RuntimeError); ok { return x.RuntimeError } return "" } func (x *ConformanceResponse) GetProtobufPayload() []byte { if x, ok := x.GetResult().(*ConformanceResponse_ProtobufPayload); ok { return x.ProtobufPayload } return nil } func (x *ConformanceResponse) GetJsonPayload() string { if x, ok := x.GetResult().(*ConformanceResponse_JsonPayload); ok { return x.JsonPayload } return "" } func (x *ConformanceResponse) GetSkipped() string { if x, ok := x.GetResult().(*ConformanceResponse_Skipped); ok { return x.Skipped } return "" } func (x *ConformanceResponse) GetJspbPayload() string { if x, ok := x.GetResult().(*ConformanceResponse_JspbPayload); ok { return x.JspbPayload } return "" } func (x *ConformanceResponse) GetTextPayload() string { if x, ok := x.GetResult().(*ConformanceResponse_TextPayload); ok { return x.TextPayload } return "" } type isConformanceResponse_Result interface { isConformanceResponse_Result() } type ConformanceResponse_ParseError struct { // This string should be set to indicate parsing failed. The string can // provide more information about the parse error if it is available. // // Setting this string does not necessarily mean the testee failed the // test. Some of the test cases are intentionally invalid input. ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"` } type ConformanceResponse_SerializeError struct { // If the input was successfully parsed but errors occurred when // serializing it to the requested output format, set the error message in // this field. SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"` } type ConformanceResponse_RuntimeError struct { // This should be set if some other error occurred. This will always // indicate that the test failed. The string can provide more information // about the failure. RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"` } type ConformanceResponse_ProtobufPayload struct { // If the input was successfully parsed and the requested output was // protobuf, serialize it to protobuf and set it in this field. ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` } type ConformanceResponse_JsonPayload struct { // If the input was successfully parsed and the requested output was JSON, // serialize to JSON and set it in this field. JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"` } type ConformanceResponse_Skipped struct { // For when the testee skipped the test, likely because a certain feature // wasn't supported, like JSON input/output. Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"` } type ConformanceResponse_JspbPayload struct { // If the input was successfully parsed and the requested output was JSPB, // serialize to JSPB and set it in this field. JSPB is google internal only // format. Opensource testees can just skip it. JspbPayload string `protobuf:"bytes,7,opt,name=jspb_payload,json=jspbPayload,proto3,oneof"` } type ConformanceResponse_TextPayload struct { // If the input was successfully parsed and the requested output was // TEXT_FORMAT, serialize to TEXT_FORMAT and set it in this field. TextPayload string `protobuf:"bytes,8,opt,name=text_payload,json=textPayload,proto3,oneof"` } func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {} func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {} func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {} func (*ConformanceResponse_JspbPayload) isConformanceResponse_Result() {} func (*ConformanceResponse_TextPayload) isConformanceResponse_Result() {} // Encoding options for jspb format. type JspbEncodingConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Encode the value field of Any as jspb array if true, otherwise binary. UseJspbArrayAnyFormat bool `protobuf:"varint,1,opt,name=use_jspb_array_any_format,json=useJspbArrayAnyFormat,proto3" json:"use_jspb_array_any_format,omitempty"` } func (x *JspbEncodingConfig) Reset() { *x = JspbEncodingConfig{} if protoimpl.UnsafeEnabled { mi := &file_conformance_conformance_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *JspbEncodingConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*JspbEncodingConfig) ProtoMessage() {} func (x *JspbEncodingConfig) ProtoReflect() protoreflect.Message { mi := &file_conformance_conformance_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use JspbEncodingConfig.ProtoReflect.Descriptor instead. func (*JspbEncodingConfig) Descriptor() ([]byte, []int) { return file_conformance_conformance_proto_rawDescGZIP(), []int{3} } func (x *JspbEncodingConfig) GetUseJspbArrayAnyFormat() bool { if x != nil { return x.UseJspbArrayAnyFormat } return false } var File_conformance_conformance_proto protoreflect.FileDescriptor var file_conformance_conformance_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x26, 0x0a, 0x0a, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x22, 0xf6, 0x03, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6a, 0x73, 0x70, 0x62, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6a, 0x73, 0x70, 0x62, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x4f, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x53, 0x0a, 0x15, 0x6a, 0x73, 0x70, 0x62, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x4a, 0x73, 0x70, 0x62, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x6a, 0x73, 0x70, 0x62, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xcc, 0x02, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2b, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6a, 0x73, 0x70, 0x62, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6a, 0x73, 0x70, 0x62, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4e, 0x0a, 0x12, 0x4a, 0x73, 0x70, 0x62, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x19, 0x75, 0x73, 0x65, 0x5f, 0x6a, 0x73, 0x70, 0x62, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x61, 0x6e, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x73, 0x65, 0x4a, 0x73, 0x70, 0x62, 0x41, 0x72, 0x72, 0x61, 0x79, 0x41, 0x6e, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2a, 0x50, 0x0a, 0x0a, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x50, 0x42, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x10, 0x04, 0x2a, 0x8f, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x50, 0x42, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x05, 0x42, 0x21, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_conformance_conformance_proto_rawDescOnce sync.Once file_conformance_conformance_proto_rawDescData = file_conformance_conformance_proto_rawDesc ) func file_conformance_conformance_proto_rawDescGZIP() []byte { file_conformance_conformance_proto_rawDescOnce.Do(func() { file_conformance_conformance_proto_rawDescData = protoimpl.X.CompressGZIP(file_conformance_conformance_proto_rawDescData) }) return file_conformance_conformance_proto_rawDescData } var file_conformance_conformance_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_conformance_conformance_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_conformance_conformance_proto_goTypes = []interface{}{ (WireFormat)(0), // 0: conformance.WireFormat (TestCategory)(0), // 1: conformance.TestCategory (*FailureSet)(nil), // 2: conformance.FailureSet (*ConformanceRequest)(nil), // 3: conformance.ConformanceRequest (*ConformanceResponse)(nil), // 4: conformance.ConformanceResponse (*JspbEncodingConfig)(nil), // 5: conformance.JspbEncodingConfig } var file_conformance_conformance_proto_depIdxs = []int32{ 0, // 0: conformance.ConformanceRequest.requested_output_format:type_name -> conformance.WireFormat 1, // 1: conformance.ConformanceRequest.test_category:type_name -> conformance.TestCategory 5, // 2: conformance.ConformanceRequest.jspb_encoding_options:type_name -> conformance.JspbEncodingConfig 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name } func init() { file_conformance_conformance_proto_init() } func file_conformance_conformance_proto_init() { if File_conformance_conformance_proto != nil { return } if !protoimpl.UnsafeEnabled { file_conformance_conformance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FailureSet); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_conformance_conformance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConformanceRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_conformance_conformance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConformanceResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_conformance_conformance_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JspbEncodingConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_conformance_conformance_proto_msgTypes[1].OneofWrappers = []interface{}{ (*ConformanceRequest_ProtobufPayload)(nil), (*ConformanceRequest_JsonPayload)(nil), (*ConformanceRequest_JspbPayload)(nil), (*ConformanceRequest_TextPayload)(nil), } file_conformance_conformance_proto_msgTypes[2].OneofWrappers = []interface{}{ (*ConformanceResponse_ParseError)(nil), (*ConformanceResponse_SerializeError)(nil), (*ConformanceResponse_RuntimeError)(nil), (*ConformanceResponse_ProtobufPayload)(nil), (*ConformanceResponse_JsonPayload)(nil), (*ConformanceResponse_Skipped)(nil), (*ConformanceResponse_JspbPayload)(nil), (*ConformanceResponse_TextPayload)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_conformance_conformance_proto_rawDesc, NumEnums: 2, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_conformance_conformance_proto_goTypes, DependencyIndexes: file_conformance_conformance_proto_depIdxs, EnumInfos: file_conformance_conformance_proto_enumTypes, MessageInfos: file_conformance_conformance_proto_msgTypes, }.Build() File_conformance_conformance_proto = out.File file_conformance_conformance_proto_rawDesc = nil file_conformance_conformance_proto_goTypes = nil file_conformance_conformance_proto_depIdxs = nil } conformance_vtproto.pb.go000066400000000000000000002242541455570004500343220ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: conformance/conformance.proto package conformance import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *FailureSet) CloneVT() *FailureSet { if m == nil { return (*FailureSet)(nil) } r := new(FailureSet) if rhs := m.Failure; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.Failure = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *FailureSet) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *ConformanceRequest) CloneVT() *ConformanceRequest { if m == nil { return (*ConformanceRequest)(nil) } r := new(ConformanceRequest) r.RequestedOutputFormat = m.RequestedOutputFormat r.MessageType = m.MessageType r.TestCategory = m.TestCategory r.JspbEncodingOptions = m.JspbEncodingOptions.CloneVT() r.PrintUnknownFields = m.PrintUnknownFields if m.Payload != nil { r.Payload = m.Payload.(interface { CloneVT() isConformanceRequest_Payload }).CloneVT() } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *ConformanceRequest) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *ConformanceRequest_ProtobufPayload) CloneVT() isConformanceRequest_Payload { if m == nil { return (*ConformanceRequest_ProtobufPayload)(nil) } r := new(ConformanceRequest_ProtobufPayload) if rhs := m.ProtobufPayload; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.ProtobufPayload = tmpBytes } return r } func (m *ConformanceRequest_JsonPayload) CloneVT() isConformanceRequest_Payload { if m == nil { return (*ConformanceRequest_JsonPayload)(nil) } r := new(ConformanceRequest_JsonPayload) r.JsonPayload = m.JsonPayload return r } func (m *ConformanceRequest_JspbPayload) CloneVT() isConformanceRequest_Payload { if m == nil { return (*ConformanceRequest_JspbPayload)(nil) } r := new(ConformanceRequest_JspbPayload) r.JspbPayload = m.JspbPayload return r } func (m *ConformanceRequest_TextPayload) CloneVT() isConformanceRequest_Payload { if m == nil { return (*ConformanceRequest_TextPayload)(nil) } r := new(ConformanceRequest_TextPayload) r.TextPayload = m.TextPayload return r } func (m *ConformanceResponse) CloneVT() *ConformanceResponse { if m == nil { return (*ConformanceResponse)(nil) } r := new(ConformanceResponse) if m.Result != nil { r.Result = m.Result.(interface { CloneVT() isConformanceResponse_Result }).CloneVT() } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *ConformanceResponse) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *ConformanceResponse_ParseError) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_ParseError)(nil) } r := new(ConformanceResponse_ParseError) r.ParseError = m.ParseError return r } func (m *ConformanceResponse_SerializeError) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_SerializeError)(nil) } r := new(ConformanceResponse_SerializeError) r.SerializeError = m.SerializeError return r } func (m *ConformanceResponse_RuntimeError) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_RuntimeError)(nil) } r := new(ConformanceResponse_RuntimeError) r.RuntimeError = m.RuntimeError return r } func (m *ConformanceResponse_ProtobufPayload) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_ProtobufPayload)(nil) } r := new(ConformanceResponse_ProtobufPayload) if rhs := m.ProtobufPayload; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.ProtobufPayload = tmpBytes } return r } func (m *ConformanceResponse_JsonPayload) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_JsonPayload)(nil) } r := new(ConformanceResponse_JsonPayload) r.JsonPayload = m.JsonPayload return r } func (m *ConformanceResponse_Skipped) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_Skipped)(nil) } r := new(ConformanceResponse_Skipped) r.Skipped = m.Skipped return r } func (m *ConformanceResponse_JspbPayload) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_JspbPayload)(nil) } r := new(ConformanceResponse_JspbPayload) r.JspbPayload = m.JspbPayload return r } func (m *ConformanceResponse_TextPayload) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_TextPayload)(nil) } r := new(ConformanceResponse_TextPayload) r.TextPayload = m.TextPayload return r } func (m *JspbEncodingConfig) CloneVT() *JspbEncodingConfig { if m == nil { return (*JspbEncodingConfig)(nil) } r := new(JspbEncodingConfig) r.UseJspbArrayAnyFormat = m.UseJspbArrayAnyFormat if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *JspbEncodingConfig) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *FailureSet) EqualVT(that *FailureSet) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Failure) != len(that.Failure) { return false } for i, vx := range this.Failure { vy := that.Failure[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *FailureSet) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*FailureSet) if !ok { return false } return this.EqualVT(that) } func (this *ConformanceRequest) EqualVT(that *ConformanceRequest) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Payload == nil && that.Payload != nil { return false } else if this.Payload != nil { if that.Payload == nil { return false } if !this.Payload.(interface { EqualVT(isConformanceRequest_Payload) bool }).EqualVT(that.Payload) { return false } } if this.RequestedOutputFormat != that.RequestedOutputFormat { return false } if this.MessageType != that.MessageType { return false } if this.TestCategory != that.TestCategory { return false } if !this.JspbEncodingOptions.EqualVT(that.JspbEncodingOptions) { return false } if this.PrintUnknownFields != that.PrintUnknownFields { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *ConformanceRequest) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*ConformanceRequest) if !ok { return false } return this.EqualVT(that) } func (this *ConformanceRequest_ProtobufPayload) EqualVT(thatIface isConformanceRequest_Payload) bool { that, ok := thatIface.(*ConformanceRequest_ProtobufPayload) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if string(this.ProtobufPayload) != string(that.ProtobufPayload) { return false } return true } func (this *ConformanceRequest_JsonPayload) EqualVT(thatIface isConformanceRequest_Payload) bool { that, ok := thatIface.(*ConformanceRequest_JsonPayload) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.JsonPayload != that.JsonPayload { return false } return true } func (this *ConformanceRequest_JspbPayload) EqualVT(thatIface isConformanceRequest_Payload) bool { that, ok := thatIface.(*ConformanceRequest_JspbPayload) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.JspbPayload != that.JspbPayload { return false } return true } func (this *ConformanceRequest_TextPayload) EqualVT(thatIface isConformanceRequest_Payload) bool { that, ok := thatIface.(*ConformanceRequest_TextPayload) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.TextPayload != that.TextPayload { return false } return true } func (this *ConformanceResponse) EqualVT(that *ConformanceResponse) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Result == nil && that.Result != nil { return false } else if this.Result != nil { if that.Result == nil { return false } if !this.Result.(interface { EqualVT(isConformanceResponse_Result) bool }).EqualVT(that.Result) { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *ConformanceResponse) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*ConformanceResponse) if !ok { return false } return this.EqualVT(that) } func (this *ConformanceResponse_ParseError) EqualVT(thatIface isConformanceResponse_Result) bool { that, ok := thatIface.(*ConformanceResponse_ParseError) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.ParseError != that.ParseError { return false } return true } func (this *ConformanceResponse_RuntimeError) EqualVT(thatIface isConformanceResponse_Result) bool { that, ok := thatIface.(*ConformanceResponse_RuntimeError) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.RuntimeError != that.RuntimeError { return false } return true } func (this *ConformanceResponse_ProtobufPayload) EqualVT(thatIface isConformanceResponse_Result) bool { that, ok := thatIface.(*ConformanceResponse_ProtobufPayload) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if string(this.ProtobufPayload) != string(that.ProtobufPayload) { return false } return true } func (this *ConformanceResponse_JsonPayload) EqualVT(thatIface isConformanceResponse_Result) bool { that, ok := thatIface.(*ConformanceResponse_JsonPayload) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.JsonPayload != that.JsonPayload { return false } return true } func (this *ConformanceResponse_Skipped) EqualVT(thatIface isConformanceResponse_Result) bool { that, ok := thatIface.(*ConformanceResponse_Skipped) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.Skipped != that.Skipped { return false } return true } func (this *ConformanceResponse_SerializeError) EqualVT(thatIface isConformanceResponse_Result) bool { that, ok := thatIface.(*ConformanceResponse_SerializeError) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.SerializeError != that.SerializeError { return false } return true } func (this *ConformanceResponse_JspbPayload) EqualVT(thatIface isConformanceResponse_Result) bool { that, ok := thatIface.(*ConformanceResponse_JspbPayload) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.JspbPayload != that.JspbPayload { return false } return true } func (this *ConformanceResponse_TextPayload) EqualVT(thatIface isConformanceResponse_Result) bool { that, ok := thatIface.(*ConformanceResponse_TextPayload) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.TextPayload != that.TextPayload { return false } return true } func (this *JspbEncodingConfig) EqualVT(that *JspbEncodingConfig) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.UseJspbArrayAnyFormat != that.UseJspbArrayAnyFormat { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *JspbEncodingConfig) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*JspbEncodingConfig) if !ok { return false } return this.EqualVT(that) } func (m *FailureSet) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FailureSet) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *FailureSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Failure) > 0 { for iNdEx := len(m.Failure) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Failure[iNdEx]) copy(dAtA[i:], m.Failure[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Failure[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *ConformanceRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ConformanceRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if vtmsg, ok := m.Payload.(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size } if m.PrintUnknownFields { i-- if m.PrintUnknownFields { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x48 } if m.JspbEncodingOptions != nil { size, err := m.JspbEncodingOptions.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } if m.TestCategory != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TestCategory)) i-- dAtA[i] = 0x28 } if len(m.MessageType) > 0 { i -= len(m.MessageType) copy(dAtA[i:], m.MessageType) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MessageType))) i-- dAtA[i] = 0x22 } if m.RequestedOutputFormat != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RequestedOutputFormat)) i-- dAtA[i] = 0x18 } return len(dAtA) - i, nil } func (m *ConformanceRequest_ProtobufPayload) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceRequest_ProtobufPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.ProtobufPayload) copy(dAtA[i:], m.ProtobufPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProtobufPayload))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *ConformanceRequest_JsonPayload) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceRequest_JsonPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.JsonPayload) copy(dAtA[i:], m.JsonPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JsonPayload))) i-- dAtA[i] = 0x12 return len(dAtA) - i, nil } func (m *ConformanceRequest_JspbPayload) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceRequest_JspbPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.JspbPayload) copy(dAtA[i:], m.JspbPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JspbPayload))) i-- dAtA[i] = 0x3a return len(dAtA) - i, nil } func (m *ConformanceRequest_TextPayload) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceRequest_TextPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.TextPayload) copy(dAtA[i:], m.TextPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TextPayload))) i-- dAtA[i] = 0x42 return len(dAtA) - i, nil } func (m *ConformanceResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ConformanceResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if vtmsg, ok := m.Result.(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *ConformanceResponse_ParseError) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse_ParseError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.ParseError) copy(dAtA[i:], m.ParseError) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParseError))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *ConformanceResponse_RuntimeError) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse_RuntimeError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.RuntimeError) copy(dAtA[i:], m.RuntimeError) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RuntimeError))) i-- dAtA[i] = 0x12 return len(dAtA) - i, nil } func (m *ConformanceResponse_ProtobufPayload) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse_ProtobufPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.ProtobufPayload) copy(dAtA[i:], m.ProtobufPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProtobufPayload))) i-- dAtA[i] = 0x1a return len(dAtA) - i, nil } func (m *ConformanceResponse_JsonPayload) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse_JsonPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.JsonPayload) copy(dAtA[i:], m.JsonPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JsonPayload))) i-- dAtA[i] = 0x22 return len(dAtA) - i, nil } func (m *ConformanceResponse_Skipped) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse_Skipped) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.Skipped) copy(dAtA[i:], m.Skipped) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Skipped))) i-- dAtA[i] = 0x2a return len(dAtA) - i, nil } func (m *ConformanceResponse_SerializeError) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse_SerializeError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.SerializeError) copy(dAtA[i:], m.SerializeError) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SerializeError))) i-- dAtA[i] = 0x32 return len(dAtA) - i, nil } func (m *ConformanceResponse_JspbPayload) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse_JspbPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.JspbPayload) copy(dAtA[i:], m.JspbPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JspbPayload))) i-- dAtA[i] = 0x3a return len(dAtA) - i, nil } func (m *ConformanceResponse_TextPayload) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ConformanceResponse_TextPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.TextPayload) copy(dAtA[i:], m.TextPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TextPayload))) i-- dAtA[i] = 0x42 return len(dAtA) - i, nil } func (m *JspbEncodingConfig) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *JspbEncodingConfig) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *JspbEncodingConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.UseJspbArrayAnyFormat { i-- if m.UseJspbArrayAnyFormat { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *FailureSet) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FailureSet) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *FailureSet) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Failure) > 0 { for iNdEx := len(m.Failure) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Failure[iNdEx]) copy(dAtA[i:], m.Failure[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Failure[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *ConformanceRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ConformanceRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.PrintUnknownFields { i-- if m.PrintUnknownFields { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x48 } if msg, ok := m.Payload.(*ConformanceRequest_TextPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Payload.(*ConformanceRequest_JspbPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if m.JspbEncodingOptions != nil { size, err := m.JspbEncodingOptions.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } if m.TestCategory != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TestCategory)) i-- dAtA[i] = 0x28 } if len(m.MessageType) > 0 { i -= len(m.MessageType) copy(dAtA[i:], m.MessageType) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MessageType))) i-- dAtA[i] = 0x22 } if m.RequestedOutputFormat != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RequestedOutputFormat)) i-- dAtA[i] = 0x18 } if msg, ok := m.Payload.(*ConformanceRequest_JsonPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Payload.(*ConformanceRequest_ProtobufPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *ConformanceRequest_ProtobufPayload) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceRequest_ProtobufPayload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.ProtobufPayload) copy(dAtA[i:], m.ProtobufPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProtobufPayload))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *ConformanceRequest_JsonPayload) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceRequest_JsonPayload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.JsonPayload) copy(dAtA[i:], m.JsonPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JsonPayload))) i-- dAtA[i] = 0x12 return len(dAtA) - i, nil } func (m *ConformanceRequest_JspbPayload) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceRequest_JspbPayload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.JspbPayload) copy(dAtA[i:], m.JspbPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JspbPayload))) i-- dAtA[i] = 0x3a return len(dAtA) - i, nil } func (m *ConformanceRequest_TextPayload) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceRequest_TextPayload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.TextPayload) copy(dAtA[i:], m.TextPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TextPayload))) i-- dAtA[i] = 0x42 return len(dAtA) - i, nil } func (m *ConformanceResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ConformanceResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if msg, ok := m.Result.(*ConformanceResponse_TextPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Result.(*ConformanceResponse_JspbPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Result.(*ConformanceResponse_SerializeError); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Result.(*ConformanceResponse_Skipped); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Result.(*ConformanceResponse_JsonPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Result.(*ConformanceResponse_ProtobufPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Result.(*ConformanceResponse_RuntimeError); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Result.(*ConformanceResponse_ParseError); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *ConformanceResponse_ParseError) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse_ParseError) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.ParseError) copy(dAtA[i:], m.ParseError) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParseError))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *ConformanceResponse_RuntimeError) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse_RuntimeError) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.RuntimeError) copy(dAtA[i:], m.RuntimeError) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RuntimeError))) i-- dAtA[i] = 0x12 return len(dAtA) - i, nil } func (m *ConformanceResponse_ProtobufPayload) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse_ProtobufPayload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.ProtobufPayload) copy(dAtA[i:], m.ProtobufPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProtobufPayload))) i-- dAtA[i] = 0x1a return len(dAtA) - i, nil } func (m *ConformanceResponse_JsonPayload) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse_JsonPayload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.JsonPayload) copy(dAtA[i:], m.JsonPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JsonPayload))) i-- dAtA[i] = 0x22 return len(dAtA) - i, nil } func (m *ConformanceResponse_Skipped) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse_Skipped) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.Skipped) copy(dAtA[i:], m.Skipped) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Skipped))) i-- dAtA[i] = 0x2a return len(dAtA) - i, nil } func (m *ConformanceResponse_SerializeError) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse_SerializeError) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.SerializeError) copy(dAtA[i:], m.SerializeError) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SerializeError))) i-- dAtA[i] = 0x32 return len(dAtA) - i, nil } func (m *ConformanceResponse_JspbPayload) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse_JspbPayload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.JspbPayload) copy(dAtA[i:], m.JspbPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JspbPayload))) i-- dAtA[i] = 0x3a return len(dAtA) - i, nil } func (m *ConformanceResponse_TextPayload) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ConformanceResponse_TextPayload) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.TextPayload) copy(dAtA[i:], m.TextPayload) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TextPayload))) i-- dAtA[i] = 0x42 return len(dAtA) - i, nil } func (m *JspbEncodingConfig) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *JspbEncodingConfig) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *JspbEncodingConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.UseJspbArrayAnyFormat { i-- if m.UseJspbArrayAnyFormat { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *FailureSet) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Failure) > 0 { for _, s := range m.Failure { l = len(s) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *ConformanceRequest) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if vtmsg, ok := m.Payload.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } if m.RequestedOutputFormat != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.RequestedOutputFormat)) } l = len(m.MessageType) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.TestCategory != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.TestCategory)) } if m.JspbEncodingOptions != nil { l = m.JspbEncodingOptions.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.PrintUnknownFields { n += 2 } n += len(m.unknownFields) return n } func (m *ConformanceRequest_ProtobufPayload) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.ProtobufPayload) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceRequest_JsonPayload) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.JsonPayload) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceRequest_JspbPayload) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.JspbPayload) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceRequest_TextPayload) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.TextPayload) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceResponse) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if vtmsg, ok := m.Result.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } n += len(m.unknownFields) return n } func (m *ConformanceResponse_ParseError) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.ParseError) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceResponse_RuntimeError) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.RuntimeError) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceResponse_ProtobufPayload) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.ProtobufPayload) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceResponse_JsonPayload) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.JsonPayload) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceResponse_Skipped) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Skipped) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceResponse_SerializeError) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.SerializeError) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceResponse_JspbPayload) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.JspbPayload) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *ConformanceResponse_TextPayload) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.TextPayload) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *JspbEncodingConfig) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.UseJspbArrayAnyFormat { n += 2 } n += len(m.unknownFields) return n } func (m *FailureSet) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: FailureSet: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FailureSet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Failure", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Failure = append(m.Failure, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ConformanceRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ConformanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ConformanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtobufPayload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := make([]byte, postIndex-iNdEx) copy(v, dAtA[iNdEx:postIndex]) m.Payload = &ConformanceRequest_ProtobufPayload{ProtobufPayload: v} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JsonPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Payload = &ConformanceRequest_JsonPayload{JsonPayload: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequestedOutputFormat", wireType) } m.RequestedOutputFormat = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RequestedOutputFormat |= WireFormat(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MessageType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.MessageType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TestCategory", wireType) } m.TestCategory = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TestCategory |= TestCategory(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JspbEncodingOptions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.JspbEncodingOptions == nil { m.JspbEncodingOptions = &JspbEncodingConfig{} } if err := m.JspbEncodingOptions.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JspbPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Payload = &ConformanceRequest_JspbPayload{JspbPayload: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TextPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Payload = &ConformanceRequest_TextPayload{TextPayload: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PrintUnknownFields", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PrintUnknownFields = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ConformanceResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ConformanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ConformanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParseError", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Result = &ConformanceResponse_ParseError{ParseError: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RuntimeError", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Result = &ConformanceResponse_RuntimeError{RuntimeError: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtobufPayload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := make([]byte, postIndex-iNdEx) copy(v, dAtA[iNdEx:postIndex]) m.Result = &ConformanceResponse_ProtobufPayload{ProtobufPayload: v} iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JsonPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Result = &ConformanceResponse_JsonPayload{JsonPayload: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Skipped", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Result = &ConformanceResponse_Skipped{Skipped: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SerializeError", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Result = &ConformanceResponse_SerializeError{SerializeError: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JspbPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Result = &ConformanceResponse_JspbPayload{JspbPayload: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TextPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Result = &ConformanceResponse_TextPayload{TextPayload: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *JspbEncodingConfig) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: JspbEncodingConfig: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JspbEncodingConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UseJspbArrayAnyFormat", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UseJspbArrayAnyFormat = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FailureSet) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: FailureSet: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FailureSet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Failure", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Failure = append(m.Failure, stringValue) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ConformanceRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ConformanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ConformanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtobufPayload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := dAtA[iNdEx:postIndex] m.Payload = &ConformanceRequest_ProtobufPayload{ProtobufPayload: v} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JsonPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Payload = &ConformanceRequest_JsonPayload{JsonPayload: stringValue} iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequestedOutputFormat", wireType) } m.RequestedOutputFormat = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RequestedOutputFormat |= WireFormat(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MessageType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.MessageType = stringValue iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TestCategory", wireType) } m.TestCategory = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TestCategory |= TestCategory(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JspbEncodingOptions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.JspbEncodingOptions == nil { m.JspbEncodingOptions = &JspbEncodingConfig{} } if err := m.JspbEncodingOptions.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JspbPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Payload = &ConformanceRequest_JspbPayload{JspbPayload: stringValue} iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TextPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Payload = &ConformanceRequest_TextPayload{TextPayload: stringValue} iNdEx = postIndex case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PrintUnknownFields", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PrintUnknownFields = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ConformanceResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ConformanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ConformanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParseError", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Result = &ConformanceResponse_ParseError{ParseError: stringValue} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RuntimeError", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Result = &ConformanceResponse_RuntimeError{RuntimeError: stringValue} iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtobufPayload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := dAtA[iNdEx:postIndex] m.Result = &ConformanceResponse_ProtobufPayload{ProtobufPayload: v} iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JsonPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Result = &ConformanceResponse_JsonPayload{JsonPayload: stringValue} iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Skipped", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Result = &ConformanceResponse_Skipped{Skipped: stringValue} iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SerializeError", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Result = &ConformanceResponse_SerializeError{SerializeError: stringValue} iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JspbPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Result = &ConformanceResponse_JspbPayload{JspbPayload: stringValue} iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TextPayload", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Result = &ConformanceResponse_TextPayload{TextPayload: stringValue} iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *JspbEncodingConfig) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: JspbEncodingConfig: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JspbEncodingConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UseJspbArrayAnyFormat", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UseJspbArrayAnyFormat = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance/equalvt_test.go000066400000000000000000000255731455570004500324350ustar00rootroot00000000000000package conformance import ( "fmt" "testing" "github.com/planetscale/vtprotobuf/testproto/proto3opt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/wrapperspb" ) func TestEquaVTNonNilButOtherwiseEmptyMessages(t *testing.T) { plusPrint := func(x *TestAllTypesProto2) string { return fmt.Sprintf("%+v", x) } poundPrint := func(x *TestAllTypesProto2) string { return fmt.Sprintf("%#v", x) } var same bool a := &TestAllTypesProto2{MapStringNestedMessage: map[string]*TestAllTypesProto2_NestedMessage{"": {}}} b := &TestAllTypesProto2{MapStringNestedMessage: map[string]*TestAllTypesProto2_NestedMessage{"": {}}} require.Equal(t, plusPrint(a), plusPrint(b)) require.NotEqual(t, poundPrint(a), poundPrint(b)) same = a.EqualVT(b) require.True(t, same) c := proto.Clone(a).(*TestAllTypesProto2) require.Equal(t, plusPrint(a), plusPrint(c)) require.NotEqual(t, poundPrint(a), poundPrint(c)) same = a.EqualVT(c) require.True(t, same) same = b.EqualVT(c) require.True(t, same) d := &TestAllTypesProto2{ MapStringNestedMessage: map[string]*TestAllTypesProto2_NestedMessage{"": (*TestAllTypesProto2_NestedMessage)(nil)}, // } require.Equal(t, plusPrint(a), plusPrint(d)) require.NotEqual(t, poundPrint(a), poundPrint(d)) same = a.EqualVT(d) require.True(t, same) same = b.EqualVT(d) require.True(t, same) same = c.EqualVT(d) require.True(t, same) } func TestEqualVT2(t *testing.T) { stringPtr := func(x string) *string { return &x } float32Ptr := func(x float32) *float32 { return &x } float64Ptr := func(x float64) *float64 { return &x } msgs := []*TestAllTypesProto2{ {OptionalString: stringPtr("bla")}, {OptionalDouble: float64Ptr(1.7976931348623157e+308)}, {OptionalFloat: float32Ptr(-0.0)}, {OptionalBytes: []byte{}}, {MapStringBytes: map[string][]byte{"": {}}}, {OneofField: &TestAllTypesProto2_OneofBool{OneofBool: false}}, {MapStringNestedMessage: map[string]*TestAllTypesProto2_NestedMessage{"": {}}}, {MapStringNestedMessage: map[string]*TestAllTypesProto2_NestedMessage{"eh": {}}}, } for _, msg := range msgs { t.Run(fmt.Sprintf("%+v", msg), func(t *testing.T) { original := proto.Clone(msg).(*TestAllTypesProto2) msgData, err := protojson.Marshal(msg) require.NoError(t, err) originalData, err := protojson.Marshal(original) require.NoError(t, err) eq := interface{}(msg).(interface { EqualVT(*TestAllTypesProto2) bool }) if !eq.EqualVT(original) { assert.JSONEq(t, string(originalData), string(msgData)) err := fmt.Errorf("msg %#v is not EqualVT() to itself %#v", msg, original) require.NoError(t, err) } MutateFields(msg) msgData, err = protojson.Marshal(msg) require.NoError(t, err) originalData, err = protojson.Marshal(original) require.NoError(t, err) if original.EqualVT(msg) || msg.EqualVT(original) { assert.JSONEq(t, string(originalData), string(msgData)) err = fmt.Errorf("these %T should not be equal:\nmsg = %+v\noriginal = %+v", msg, msg, original) require.NoError(t, err) } }) } } func TestEqualVT3(t *testing.T) { msg := &TestAllTypesProto3{ OneofField: &TestAllTypesProto3_OneofNullValue{OneofNullValue: structpb.NullValue_NULL_VALUE}, OptionalBoolWrapper: wrapperspb.Bool(true), OptionalInt32Wrapper: wrapperspb.Int32(1), OptionalInt64Wrapper: wrapperspb.Int64(1), OptionalUint32Wrapper: wrapperspb.UInt32(1), OptionalUint64Wrapper: wrapperspb.UInt64(1), OptionalFloatWrapper: wrapperspb.Float(1), OptionalDoubleWrapper: wrapperspb.Double(1), OptionalStringWrapper: wrapperspb.String("blip"), OptionalBytesWrapper: wrapperspb.Bytes([]byte("blop")), RepeatedBoolWrapper: []*wrapperspb.BoolValue{wrapperspb.Bool(true)}, RepeatedInt32Wrapper: []*wrapperspb.Int32Value{wrapperspb.Int32(1)}, RepeatedInt64Wrapper: []*wrapperspb.Int64Value{wrapperspb.Int64(1)}, RepeatedUint32Wrapper: []*wrapperspb.UInt32Value{wrapperspb.UInt32(1)}, RepeatedUint64Wrapper: []*wrapperspb.UInt64Value{wrapperspb.UInt64(1)}, RepeatedFloatWrapper: []*wrapperspb.FloatValue{wrapperspb.Float(1)}, RepeatedDoubleWrapper: []*wrapperspb.DoubleValue{wrapperspb.Double(1)}, RepeatedStringWrapper: []*wrapperspb.StringValue{wrapperspb.String("blip")}, RepeatedBytesWrapper: []*wrapperspb.BytesValue{wrapperspb.Bytes([]byte("blop"))}, // OptionalDuration: *durationpb.Duration // OptionalTimestamp: *timestamppb.Timestamp // OptionalFieldMask: *fieldmaskpb.FieldMask // OptionalStruct: *structpb.Struct // OptionalAny: *anypb.Any OptionalValue: structpb.NewNumberValue(42), // OptionalNullValue: structpb.NullValue // repeated google.protobuf.Duration repeated_duration // repeated google.protobuf.Timestamp repeated_timestamp // repeated google.protobuf.FieldMask repeated_fieldmask // repeated google.protobuf.Struct repeated_struct // repeated google.protobuf.Any repeated_any // repeated google.protobuf.Value repeated_value RepeatedValue: []*structpb.Value{structpb.NewNumberValue(42)}, // repeated google.protobuf.ListValue repeated_list_value } original := proto.Clone(msg).(*TestAllTypesProto3) msgData, err := protojson.Marshal(msg) require.NoError(t, err) originalData, err := protojson.Marshal(original) require.NoError(t, err) eq := interface{}(msg).(interface { EqualVT(*TestAllTypesProto3) bool }) if !eq.EqualVT(original) { assert.JSONEq(t, string(originalData), string(msgData)) err := fmt.Errorf("msg %#v is not EqualVT() to itself %#v", msg, original) require.NoError(t, err) } MutateFields(msg) msgData, err = protojson.Marshal(msg) require.NoError(t, err) originalData, err = protojson.Marshal(original) require.NoError(t, err) if original.EqualVT(msg) || msg.EqualVT(original) { assert.JSONEq(t, string(originalData), string(msgData)) err = fmt.Errorf("these %T should not be equal:\nmsg = %+v\noriginal = %+v", msg, msg, original) require.NoError(t, err) } } func TestEqualVT_Map_AbsenceVsZeroValue(t *testing.T) { a := &TestAllTypesProto3{ MapInt32Int32: map[int32]int32{ 1: 0, 2: 37, }, } b := &TestAllTypesProto3{ MapInt32Int32: map[int32]int32{ 2: 37, 3: 42, }, } aJson, err := protojson.Marshal(a) require.NoError(t, err) bJson, err := protojson.Marshal(b) require.NoError(t, err) if a.EqualVT(b) { assert.JSONEq(t, string(aJson), string(bJson)) err := fmt.Errorf("these %T should not be equal:\nmsg = %+v\noriginal = %+v", a, a, b) require.NoError(t, err) } } func TestEqualVT_Oneof_AbsenceVsZeroValue(t *testing.T) { a := &TestAllTypesProto3{ OneofField: &TestAllTypesProto3_OneofUint32{ OneofUint32: 0, }, } b := &TestAllTypesProto3{ OneofField: &TestAllTypesProto3_OneofString{ OneofString: "", }, } aJson, err := protojson.Marshal(a) require.NoError(t, err) bJson, err := protojson.Marshal(b) require.NoError(t, err) if a.EqualVT(b) { assert.JSONEq(t, string(aJson), string(bJson)) err := fmt.Errorf("these %T should not be equal:\nmsg = %+v\noriginal = %+v", a, a, b) require.NoError(t, err) } } func TestEqualVT_Proto2_BytesPresence(t *testing.T) { a := &TestAllTypesProto2{ OptionalBytes: nil, } b := &TestAllTypesProto2{ OptionalBytes: []byte{}, } require.False(t, proto.Equal(a, b)) aJson, err := protojson.Marshal(a) require.NoError(t, err) bJson, err := protojson.Marshal(b) require.NoError(t, err) if a.EqualVT(b) { assert.JSONEq(t, string(aJson), string(bJson)) err := fmt.Errorf("these %T should not be equal:\nmsg = %+v\noriginal = %+v", a, a, b) require.NoError(t, err) } } func TestEqualVT_Proto3_BytesPresence(t *testing.T) { a := &proto3opt.OptionalFieldInProto3{ OptionalBytes: nil, } b := &proto3opt.OptionalFieldInProto3{ OptionalBytes: []byte{}, } require.False(t, proto.Equal(a, b)) aJson, err := protojson.Marshal(a) require.NoError(t, err) bJson, err := protojson.Marshal(b) require.NoError(t, err) if a.EqualVT(b) { assert.JSONEq(t, string(aJson), string(bJson)) err := fmt.Errorf("these %T should not be equal:\nmsg = %+v\noriginal = %+v", a, a, b) require.NoError(t, err) } } func TestEqualVT_Proto2_BytesNoPresence(t *testing.T) { a := &TestAllTypesProto2{ RepeatedBytes: [][]byte{nil}, OneofField: &TestAllTypesProto2_OneofBytes{ OneofBytes: nil, }, } b := &TestAllTypesProto2{ RepeatedBytes: [][]byte{{}}, OneofField: &TestAllTypesProto2_OneofBytes{ OneofBytes: []byte{}, }, } require.True(t, proto.Equal(a, b)) if !a.EqualVT(b) { err := fmt.Errorf("these %T should be equal:\nmsg = %+v\noriginal = %+v", a, a, b) require.NoError(t, err) } } func TestEqualVT_Proto3_BytesNoPresence(t *testing.T) { a := &TestAllTypesProto3{ RepeatedBytes: [][]byte{nil}, OneofField: &TestAllTypesProto3_OneofBytes{ OneofBytes: nil, }, OptionalBytes: nil, } b := &TestAllTypesProto3{ RepeatedBytes: [][]byte{{}}, OneofField: &TestAllTypesProto3_OneofBytes{ OneofBytes: []byte{}, }, OptionalBytes: []byte{}, } require.True(t, proto.Equal(a, b)) if !a.EqualVT(b) { err := fmt.Errorf("these %T should not be equal:\nmsg = %+v\noriginal = %+v", a, a, b) require.NoError(t, err) } } func TestEqualVT_NilVsEmpty(t *testing.T) { cases := map[string][2]*TestAllTypesProto3{ "nil and empty should not be equal": { &TestAllTypesProto3{}, (*TestAllTypesProto3)(nil), }, "nil and empty message field should not be equal": { &TestAllTypesProto3{ OptionalNestedMessage: &TestAllTypesProto3_NestedMessage{}, }, &TestAllTypesProto3{ OptionalNestedMessage: nil, }, }, "nil and empty message should be equal in slice": { &TestAllTypesProto3{ RepeatedNestedMessage: []*TestAllTypesProto3_NestedMessage{{}}, }, &TestAllTypesProto3{ RepeatedNestedMessage: []*TestAllTypesProto3_NestedMessage{nil}, }, }, "nil and empty message should be equal in map value": { &TestAllTypesProto3{ MapStringNestedMessage: map[string]*TestAllTypesProto3_NestedMessage{ "": {}, }, }, &TestAllTypesProto3{ MapStringNestedMessage: map[string]*TestAllTypesProto3_NestedMessage{ "": nil, }, }, }, "nil and empty message should be equal in oneof": { &TestAllTypesProto3{ OneofField: &TestAllTypesProto3_OneofNestedMessage{ OneofNestedMessage: &TestAllTypesProto3_NestedMessage{}, }, }, &TestAllTypesProto3{ OneofField: &TestAllTypesProto3_OneofNestedMessage{ OneofNestedMessage: nil, }, }, }, } for name, c := range cases { cc := c // avoid loop closure bug t.Run(name, func(t *testing.T) { if proto.Equal(cc[0], cc[1]) { assert.Truef(t, cc[0].EqualVT(cc[1]), "these %T should be equal:\nfirst = %+v\nsecond = %+v\n", cc[0], cc[0], cc[1]) } else { assert.Falsef(t, cc[0].EqualVT(cc[1]), "these %T should not be equal:\nfirst = %+v\nsecond = %+v\n", cc[0], cc[0], cc[1]) } }) } } golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance/mutate_fields.go000066400000000000000000000065721455570004500325400ustar00rootroot00000000000000// Copyright (c) 2022 PlanetScale Inc. All rights reserved. package conformance import "reflect" // MutateFields modifies the value of each field of structs recursively. func MutateFields(x interface{}) { mut(reflect.TypeOf(x), reflect.ValueOf(x)) } func mut(t reflect.Type, v reflect.Value) { switch t.Kind() { case reflect.String: v.SetString("blip blop") case reflect.Uint, reflect.Uint64: v.SetUint(v.Uint() + 1) case reflect.Uint8: v.SetUint(uint64(v.Uint() + 1)) case reflect.Uint16: v.SetUint(uint64(v.Uint() + 1)) case reflect.Uint32: v.SetUint(uint64(v.Uint() + 1)) case reflect.Int, reflect.Int64: v.SetInt(v.Int() + 1) case reflect.Int8: v.SetInt(int64(v.Int() + 1)) case reflect.Int16: v.SetInt(int64(v.Int() + 1)) case reflect.Int32: v.SetInt(int64(v.Int() + 1)) case reflect.Float32, reflect.Float64: if x := v.Float(); x != 0.0 && x != -0.0 { v.SetFloat(-1 * x) return } v.SetFloat(1.0) case reflect.Bool: v.SetBool(!v.Bool()) case reflect.Ptr: if v.IsNil() { return } mut(t.Elem(), v.Elem()) case reflect.Array, reflect.Slice: n := v.Len() elemT := t.Elem() for i := 0; i < n; i++ { mut(elemT, v.Index(i)) } if n == 0 { n = 3 for i := 0; i < n; i++ { nv := reflect.New(elemT) mut(elemT, nv.Elem()) v.Set(reflect.Append(reflect.Indirect(v), reflect.Indirect(nv))) } } case reflect.Struct: for i, n := 0, t.NumField(); i < n; i++ { elementT := t.Field(i) elementV := v.Field(i) if elementV.CanSet() || elementT.Anonymous { mut(elementT.Type, elementV) } } case reflect.Map: m := reflect.MakeMap(reflect.MapOf(t.Key(), t.Elem())) for _, mapKey := range v.MapKeys() { mapIndex := reflect.New(t.Key()).Elem() mapIndex.Set(mapKey) mut(t.Key(), mapIndex) mapValue := reflect.New(t.Elem()).Elem() mapValue.Set(v.MapIndex(mapKey)) mut(t.Elem(), mapValue) m.SetMapIndex(mapIndex, mapValue) } v.Set(m) } return } // VisitWithPredicate deep-visits the given struct // and returns whether the predicate holds at least once. func VisitWithPredicate(x interface{}, f func(w interface{}) bool) bool { return vwp(f, false, reflect.TypeOf(x), reflect.ValueOf(x)) } func vwp(f func(w interface{}) bool, acc bool, t reflect.Type, v reflect.Value) bool { switch t.Kind() { case reflect.String: return acc || f(v.String()) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: return acc || f(v.Uint()) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return acc || f(v.Int()) case reflect.Float32, reflect.Float64: return acc || f(v.Float()) case reflect.Bool: return acc || f(v.Bool()) case reflect.Ptr: if v.IsNil() { return acc } return acc || vwp(f, acc, t.Elem(), v.Elem()) case reflect.Array, reflect.Slice: for i, n, elemT := 0, v.Len(), t.Elem(); i < n; i++ { if acc || vwp(f, acc, elemT, v.Index(i)) { return true } } case reflect.Struct: for i, n := 0, t.NumField(); i < n; i++ { elementT := t.Field(i) elementV := v.Field(i) if elementV.CanSet() || elementT.Anonymous { if acc || vwp(f, acc, elementT.Type, elementV) { return true } } } case reflect.Map: iter := v.MapRange() for iter.Next() { if acc || VisitWithPredicate(iter.Key().Interface(), f) || VisitWithPredicate(iter.Value().Interface(), f) { return true } } } return acc } test_messages_proto2.pb.go000066400000000000000000004635301455570004500344100ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance// 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. // // Test schema for proto2 messages. This test schema is used by: // // - conformance tests // // LINT: ALLOW_GROUPS // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: src/google/protobuf/test_messages_proto2.proto package conformance import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type ForeignEnumProto2 int32 const ( ForeignEnumProto2_FOREIGN_FOO ForeignEnumProto2 = 0 ForeignEnumProto2_FOREIGN_BAR ForeignEnumProto2 = 1 ForeignEnumProto2_FOREIGN_BAZ ForeignEnumProto2 = 2 ) // Enum value maps for ForeignEnumProto2. var ( ForeignEnumProto2_name = map[int32]string{ 0: "FOREIGN_FOO", 1: "FOREIGN_BAR", 2: "FOREIGN_BAZ", } ForeignEnumProto2_value = map[string]int32{ "FOREIGN_FOO": 0, "FOREIGN_BAR": 1, "FOREIGN_BAZ": 2, } ) func (x ForeignEnumProto2) Enum() *ForeignEnumProto2 { p := new(ForeignEnumProto2) *p = x return p } func (x ForeignEnumProto2) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ForeignEnumProto2) Descriptor() protoreflect.EnumDescriptor { return file_src_google_protobuf_test_messages_proto2_proto_enumTypes[0].Descriptor() } func (ForeignEnumProto2) Type() protoreflect.EnumType { return &file_src_google_protobuf_test_messages_proto2_proto_enumTypes[0] } func (x ForeignEnumProto2) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *ForeignEnumProto2) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = ForeignEnumProto2(num) return nil } // Deprecated: Use ForeignEnumProto2.Descriptor instead. func (ForeignEnumProto2) EnumDescriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0} } type TestAllTypesProto2_NestedEnum int32 const ( TestAllTypesProto2_FOO TestAllTypesProto2_NestedEnum = 0 TestAllTypesProto2_BAR TestAllTypesProto2_NestedEnum = 1 TestAllTypesProto2_BAZ TestAllTypesProto2_NestedEnum = 2 TestAllTypesProto2_NEG TestAllTypesProto2_NestedEnum = -1 // Intentionally negative. ) // Enum value maps for TestAllTypesProto2_NestedEnum. var ( TestAllTypesProto2_NestedEnum_name = map[int32]string{ 0: "FOO", 1: "BAR", 2: "BAZ", -1: "NEG", } TestAllTypesProto2_NestedEnum_value = map[string]int32{ "FOO": 0, "BAR": 1, "BAZ": 2, "NEG": -1, } ) func (x TestAllTypesProto2_NestedEnum) Enum() *TestAllTypesProto2_NestedEnum { p := new(TestAllTypesProto2_NestedEnum) *p = x return p } func (x TestAllTypesProto2_NestedEnum) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TestAllTypesProto2_NestedEnum) Descriptor() protoreflect.EnumDescriptor { return file_src_google_protobuf_test_messages_proto2_proto_enumTypes[1].Descriptor() } func (TestAllTypesProto2_NestedEnum) Type() protoreflect.EnumType { return &file_src_google_protobuf_test_messages_proto2_proto_enumTypes[1] } func (x TestAllTypesProto2_NestedEnum) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *TestAllTypesProto2_NestedEnum) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = TestAllTypesProto2_NestedEnum(num) return nil } // Deprecated: Use TestAllTypesProto2_NestedEnum.Descriptor instead. func (TestAllTypesProto2_NestedEnum) EnumDescriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0, 0} } type EnumOnlyProto2_Bool int32 const ( EnumOnlyProto2_kFalse EnumOnlyProto2_Bool = 0 EnumOnlyProto2_kTrue EnumOnlyProto2_Bool = 1 ) // Enum value maps for EnumOnlyProto2_Bool. var ( EnumOnlyProto2_Bool_name = map[int32]string{ 0: "kFalse", 1: "kTrue", } EnumOnlyProto2_Bool_value = map[string]int32{ "kFalse": 0, "kTrue": 1, } ) func (x EnumOnlyProto2_Bool) Enum() *EnumOnlyProto2_Bool { p := new(EnumOnlyProto2_Bool) *p = x return p } func (x EnumOnlyProto2_Bool) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (EnumOnlyProto2_Bool) Descriptor() protoreflect.EnumDescriptor { return file_src_google_protobuf_test_messages_proto2_proto_enumTypes[2].Descriptor() } func (EnumOnlyProto2_Bool) Type() protoreflect.EnumType { return &file_src_google_protobuf_test_messages_proto2_proto_enumTypes[2] } func (x EnumOnlyProto2_Bool) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *EnumOnlyProto2_Bool) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = EnumOnlyProto2_Bool(num) return nil } // Deprecated: Use EnumOnlyProto2_Bool.Descriptor instead. func (EnumOnlyProto2_Bool) EnumDescriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{4, 0} } // This proto includes every type of field in both singular and repeated // forms. // // Also, crucially, all messages and enums in this file are eventually // submessages of this message. So for example, a fuzz test of TestAllTypes // could trigger bugs that occur in any message type in this file. We verify // this stays true in a unit test. type TestAllTypesProto2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields // Singular OptionalInt32 *int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32" json:"optional_int32,omitempty"` OptionalInt64 *int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64" json:"optional_int64,omitempty"` OptionalUint32 *uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32" json:"optional_uint32,omitempty"` OptionalUint64 *uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64" json:"optional_uint64,omitempty"` OptionalSint32 *int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32" json:"optional_sint32,omitempty"` OptionalSint64 *int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64" json:"optional_sint64,omitempty"` OptionalFixed32 *uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32" json:"optional_fixed32,omitempty"` OptionalFixed64 *uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64" json:"optional_fixed64,omitempty"` OptionalSfixed32 *int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32" json:"optional_sfixed32,omitempty"` OptionalSfixed64 *int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64" json:"optional_sfixed64,omitempty"` OptionalFloat *float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat" json:"optional_float,omitempty"` OptionalDouble *float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble" json:"optional_double,omitempty"` OptionalBool *bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool" json:"optional_bool,omitempty"` OptionalString *string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString" json:"optional_string,omitempty"` OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes" json:"optional_bytes,omitempty"` OptionalNestedMessage *TestAllTypesProto2_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage" json:"optional_nested_message,omitempty"` OptionalForeignMessage *ForeignMessageProto2 `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage" json:"optional_foreign_message,omitempty"` OptionalNestedEnum *TestAllTypesProto2_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,enum=protobuf_test_messages.proto2.TestAllTypesProto2_NestedEnum" json:"optional_nested_enum,omitempty"` OptionalForeignEnum *ForeignEnumProto2 `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,enum=protobuf_test_messages.proto2.ForeignEnumProto2" json:"optional_foreign_enum,omitempty"` OptionalStringPiece *string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece" json:"optional_string_piece,omitempty"` OptionalCord *string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord" json:"optional_cord,omitempty"` RecursiveMessage *TestAllTypesProto2 `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage" json:"recursive_message,omitempty"` // Repeated RepeatedInt32 []int32 `protobuf:"varint,31,rep,name=repeated_int32,json=repeatedInt32" json:"repeated_int32,omitempty"` RepeatedInt64 []int64 `protobuf:"varint,32,rep,name=repeated_int64,json=repeatedInt64" json:"repeated_int64,omitempty"` RepeatedUint32 []uint32 `protobuf:"varint,33,rep,name=repeated_uint32,json=repeatedUint32" json:"repeated_uint32,omitempty"` RepeatedUint64 []uint64 `protobuf:"varint,34,rep,name=repeated_uint64,json=repeatedUint64" json:"repeated_uint64,omitempty"` RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,name=repeated_sint32,json=repeatedSint32" json:"repeated_sint32,omitempty"` RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,name=repeated_sint64,json=repeatedSint64" json:"repeated_sint64,omitempty"` RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,name=repeated_fixed32,json=repeatedFixed32" json:"repeated_fixed32,omitempty"` RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,name=repeated_fixed64,json=repeatedFixed64" json:"repeated_fixed64,omitempty"` RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,name=repeated_sfixed32,json=repeatedSfixed32" json:"repeated_sfixed32,omitempty"` RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,name=repeated_sfixed64,json=repeatedSfixed64" json:"repeated_sfixed64,omitempty"` RepeatedFloat []float32 `protobuf:"fixed32,41,rep,name=repeated_float,json=repeatedFloat" json:"repeated_float,omitempty"` RepeatedDouble []float64 `protobuf:"fixed64,42,rep,name=repeated_double,json=repeatedDouble" json:"repeated_double,omitempty"` RepeatedBool []bool `protobuf:"varint,43,rep,name=repeated_bool,json=repeatedBool" json:"repeated_bool,omitempty"` RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString" json:"repeated_string,omitempty"` RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes" json:"repeated_bytes,omitempty"` RepeatedNestedMessage []*TestAllTypesProto2_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage" json:"repeated_nested_message,omitempty"` RepeatedForeignMessage []*ForeignMessageProto2 `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage" json:"repeated_foreign_message,omitempty"` RepeatedNestedEnum []TestAllTypesProto2_NestedEnum `protobuf:"varint,51,rep,name=repeated_nested_enum,json=repeatedNestedEnum,enum=protobuf_test_messages.proto2.TestAllTypesProto2_NestedEnum" json:"repeated_nested_enum,omitempty"` RepeatedForeignEnum []ForeignEnumProto2 `protobuf:"varint,52,rep,name=repeated_foreign_enum,json=repeatedForeignEnum,enum=protobuf_test_messages.proto2.ForeignEnumProto2" json:"repeated_foreign_enum,omitempty"` RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece" json:"repeated_string_piece,omitempty"` RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord" json:"repeated_cord,omitempty"` // Packed PackedInt32 []int32 `protobuf:"varint,75,rep,packed,name=packed_int32,json=packedInt32" json:"packed_int32,omitempty"` PackedInt64 []int64 `protobuf:"varint,76,rep,packed,name=packed_int64,json=packedInt64" json:"packed_int64,omitempty"` PackedUint32 []uint32 `protobuf:"varint,77,rep,packed,name=packed_uint32,json=packedUint32" json:"packed_uint32,omitempty"` PackedUint64 []uint64 `protobuf:"varint,78,rep,packed,name=packed_uint64,json=packedUint64" json:"packed_uint64,omitempty"` PackedSint32 []int32 `protobuf:"zigzag32,79,rep,packed,name=packed_sint32,json=packedSint32" json:"packed_sint32,omitempty"` PackedSint64 []int64 `protobuf:"zigzag64,80,rep,packed,name=packed_sint64,json=packedSint64" json:"packed_sint64,omitempty"` PackedFixed32 []uint32 `protobuf:"fixed32,81,rep,packed,name=packed_fixed32,json=packedFixed32" json:"packed_fixed32,omitempty"` PackedFixed64 []uint64 `protobuf:"fixed64,82,rep,packed,name=packed_fixed64,json=packedFixed64" json:"packed_fixed64,omitempty"` PackedSfixed32 []int32 `protobuf:"fixed32,83,rep,packed,name=packed_sfixed32,json=packedSfixed32" json:"packed_sfixed32,omitempty"` PackedSfixed64 []int64 `protobuf:"fixed64,84,rep,packed,name=packed_sfixed64,json=packedSfixed64" json:"packed_sfixed64,omitempty"` PackedFloat []float32 `protobuf:"fixed32,85,rep,packed,name=packed_float,json=packedFloat" json:"packed_float,omitempty"` PackedDouble []float64 `protobuf:"fixed64,86,rep,packed,name=packed_double,json=packedDouble" json:"packed_double,omitempty"` PackedBool []bool `protobuf:"varint,87,rep,packed,name=packed_bool,json=packedBool" json:"packed_bool,omitempty"` PackedNestedEnum []TestAllTypesProto2_NestedEnum `protobuf:"varint,88,rep,packed,name=packed_nested_enum,json=packedNestedEnum,enum=protobuf_test_messages.proto2.TestAllTypesProto2_NestedEnum" json:"packed_nested_enum,omitempty"` // Unpacked UnpackedInt32 []int32 `protobuf:"varint,89,rep,name=unpacked_int32,json=unpackedInt32" json:"unpacked_int32,omitempty"` UnpackedInt64 []int64 `protobuf:"varint,90,rep,name=unpacked_int64,json=unpackedInt64" json:"unpacked_int64,omitempty"` UnpackedUint32 []uint32 `protobuf:"varint,91,rep,name=unpacked_uint32,json=unpackedUint32" json:"unpacked_uint32,omitempty"` UnpackedUint64 []uint64 `protobuf:"varint,92,rep,name=unpacked_uint64,json=unpackedUint64" json:"unpacked_uint64,omitempty"` UnpackedSint32 []int32 `protobuf:"zigzag32,93,rep,name=unpacked_sint32,json=unpackedSint32" json:"unpacked_sint32,omitempty"` UnpackedSint64 []int64 `protobuf:"zigzag64,94,rep,name=unpacked_sint64,json=unpackedSint64" json:"unpacked_sint64,omitempty"` UnpackedFixed32 []uint32 `protobuf:"fixed32,95,rep,name=unpacked_fixed32,json=unpackedFixed32" json:"unpacked_fixed32,omitempty"` UnpackedFixed64 []uint64 `protobuf:"fixed64,96,rep,name=unpacked_fixed64,json=unpackedFixed64" json:"unpacked_fixed64,omitempty"` UnpackedSfixed32 []int32 `protobuf:"fixed32,97,rep,name=unpacked_sfixed32,json=unpackedSfixed32" json:"unpacked_sfixed32,omitempty"` UnpackedSfixed64 []int64 `protobuf:"fixed64,98,rep,name=unpacked_sfixed64,json=unpackedSfixed64" json:"unpacked_sfixed64,omitempty"` UnpackedFloat []float32 `protobuf:"fixed32,99,rep,name=unpacked_float,json=unpackedFloat" json:"unpacked_float,omitempty"` UnpackedDouble []float64 `protobuf:"fixed64,100,rep,name=unpacked_double,json=unpackedDouble" json:"unpacked_double,omitempty"` UnpackedBool []bool `protobuf:"varint,101,rep,name=unpacked_bool,json=unpackedBool" json:"unpacked_bool,omitempty"` UnpackedNestedEnum []TestAllTypesProto2_NestedEnum `protobuf:"varint,102,rep,name=unpacked_nested_enum,json=unpackedNestedEnum,enum=protobuf_test_messages.proto2.TestAllTypesProto2_NestedEnum" json:"unpacked_nested_enum,omitempty"` // Map MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` MapStringNestedMessage map[string]*TestAllTypesProto2_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` MapStringForeignMessage map[string]*ForeignMessageProto2 `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` MapStringNestedEnum map[string]TestAllTypesProto2_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=protobuf_test_messages.proto2.TestAllTypesProto2_NestedEnum"` MapStringForeignEnum map[string]ForeignEnumProto2 `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=protobuf_test_messages.proto2.ForeignEnumProto2"` // Types that are assignable to OneofField: // // *TestAllTypesProto2_OneofUint32 // *TestAllTypesProto2_OneofNestedMessage // *TestAllTypesProto2_OneofString // *TestAllTypesProto2_OneofBytes // *TestAllTypesProto2_OneofBool // *TestAllTypesProto2_OneofUint64 // *TestAllTypesProto2_OneofFloat // *TestAllTypesProto2_OneofDouble // *TestAllTypesProto2_OneofEnum OneofField isTestAllTypesProto2_OneofField `protobuf_oneof:"oneof_field"` Data *TestAllTypesProto2_Data `protobuf:"group,201,opt,name=Data,json=data" json:"data,omitempty"` // default values DefaultInt32 *int32 `protobuf:"varint,241,opt,name=default_int32,json=defaultInt32,def=-123456789" json:"default_int32,omitempty"` DefaultInt64 *int64 `protobuf:"varint,242,opt,name=default_int64,json=defaultInt64,def=-9123456789123456789" json:"default_int64,omitempty"` DefaultUint32 *uint32 `protobuf:"varint,243,opt,name=default_uint32,json=defaultUint32,def=2123456789" json:"default_uint32,omitempty"` DefaultUint64 *uint64 `protobuf:"varint,244,opt,name=default_uint64,json=defaultUint64,def=10123456789123456789" json:"default_uint64,omitempty"` DefaultSint32 *int32 `protobuf:"zigzag32,245,opt,name=default_sint32,json=defaultSint32,def=-123456789" json:"default_sint32,omitempty"` DefaultSint64 *int64 `protobuf:"zigzag64,246,opt,name=default_sint64,json=defaultSint64,def=-9123456789123456789" json:"default_sint64,omitempty"` DefaultFixed32 *uint32 `protobuf:"fixed32,247,opt,name=default_fixed32,json=defaultFixed32,def=2123456789" json:"default_fixed32,omitempty"` DefaultFixed64 *uint64 `protobuf:"fixed64,248,opt,name=default_fixed64,json=defaultFixed64,def=10123456789123456789" json:"default_fixed64,omitempty"` DefaultSfixed32 *int32 `protobuf:"fixed32,249,opt,name=default_sfixed32,json=defaultSfixed32,def=-123456789" json:"default_sfixed32,omitempty"` DefaultSfixed64 *int64 `protobuf:"fixed64,250,opt,name=default_sfixed64,json=defaultSfixed64,def=-9123456789123456789" json:"default_sfixed64,omitempty"` DefaultFloat *float32 `protobuf:"fixed32,251,opt,name=default_float,json=defaultFloat,def=9e+09" json:"default_float,omitempty"` DefaultDouble *float64 `protobuf:"fixed64,252,opt,name=default_double,json=defaultDouble,def=7e+22" json:"default_double,omitempty"` DefaultBool *bool `protobuf:"varint,253,opt,name=default_bool,json=defaultBool,def=1" json:"default_bool,omitempty"` DefaultString *string `protobuf:"bytes,254,opt,name=default_string,json=defaultString,def=Rosebud" json:"default_string,omitempty"` DefaultBytes []byte `protobuf:"bytes,255,opt,name=default_bytes,json=defaultBytes,def=joshua" json:"default_bytes,omitempty"` // Test field-name-to-JSON-name convention. // (protobuf says names can be any valid C/C++ identifier.) Fieldname1 *int32 `protobuf:"varint,401,opt,name=fieldname1" json:"fieldname1,omitempty"` FieldName2 *int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2" json:"field_name2,omitempty"` XFieldName3 *int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3" json:"_field_name3,omitempty"` Field_Name4_ *int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4" json:"field__name4_,omitempty"` Field0Name5 *int32 `protobuf:"varint,405,opt,name=field0name5" json:"field0name5,omitempty"` Field_0Name6 *int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6" json:"field_0_name6,omitempty"` FieldName7 *int32 `protobuf:"varint,407,opt,name=fieldName7" json:"fieldName7,omitempty"` FieldName8 *int32 `protobuf:"varint,408,opt,name=FieldName8" json:"FieldName8,omitempty"` Field_Name9 *int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9" json:"field_Name9,omitempty"` Field_Name10 *int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10" json:"Field_Name10,omitempty"` FIELD_NAME11 *int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11" json:"FIELD_NAME11,omitempty"` FIELDName12 *int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12" json:"FIELD_name12,omitempty"` XFieldName13 *int32 `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13" json:"__field_name13,omitempty"` X_FieldName14 *int32 `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14" json:"__Field_name14,omitempty"` Field_Name15 *int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15" json:"field__name15,omitempty"` Field__Name16 *int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16" json:"field__Name16,omitempty"` FieldName17__ *int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17" json:"field_name17__,omitempty"` FieldName18__ *int32 `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18" json:"Field_name18__,omitempty"` } // Default values for TestAllTypesProto2 fields. const ( Default_TestAllTypesProto2_DefaultInt32 = int32(-123456789) Default_TestAllTypesProto2_DefaultInt64 = int64(-9123456789123456789) Default_TestAllTypesProto2_DefaultUint32 = uint32(2123456789) Default_TestAllTypesProto2_DefaultUint64 = uint64(10123456789123456789) Default_TestAllTypesProto2_DefaultSint32 = int32(-123456789) Default_TestAllTypesProto2_DefaultSint64 = int64(-9123456789123456789) Default_TestAllTypesProto2_DefaultFixed32 = uint32(2123456789) Default_TestAllTypesProto2_DefaultFixed64 = uint64(10123456789123456789) Default_TestAllTypesProto2_DefaultSfixed32 = int32(-123456789) Default_TestAllTypesProto2_DefaultSfixed64 = int64(-9123456789123456789) Default_TestAllTypesProto2_DefaultFloat = float32(8.999999488e+09) Default_TestAllTypesProto2_DefaultDouble = float64(7e+22) Default_TestAllTypesProto2_DefaultBool = bool(true) Default_TestAllTypesProto2_DefaultString = string("Rosebud") ) // Default values for TestAllTypesProto2 fields. var ( Default_TestAllTypesProto2_DefaultBytes = []byte("joshua") ) func (x *TestAllTypesProto2) Reset() { *x = TestAllTypesProto2{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAllTypesProto2) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAllTypesProto2) ProtoMessage() {} func (x *TestAllTypesProto2) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestAllTypesProto2.ProtoReflect.Descriptor instead. func (*TestAllTypesProto2) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0} } func (x *TestAllTypesProto2) GetOptionalInt32() int32 { if x != nil && x.OptionalInt32 != nil { return *x.OptionalInt32 } return 0 } func (x *TestAllTypesProto2) GetOptionalInt64() int64 { if x != nil && x.OptionalInt64 != nil { return *x.OptionalInt64 } return 0 } func (x *TestAllTypesProto2) GetOptionalUint32() uint32 { if x != nil && x.OptionalUint32 != nil { return *x.OptionalUint32 } return 0 } func (x *TestAllTypesProto2) GetOptionalUint64() uint64 { if x != nil && x.OptionalUint64 != nil { return *x.OptionalUint64 } return 0 } func (x *TestAllTypesProto2) GetOptionalSint32() int32 { if x != nil && x.OptionalSint32 != nil { return *x.OptionalSint32 } return 0 } func (x *TestAllTypesProto2) GetOptionalSint64() int64 { if x != nil && x.OptionalSint64 != nil { return *x.OptionalSint64 } return 0 } func (x *TestAllTypesProto2) GetOptionalFixed32() uint32 { if x != nil && x.OptionalFixed32 != nil { return *x.OptionalFixed32 } return 0 } func (x *TestAllTypesProto2) GetOptionalFixed64() uint64 { if x != nil && x.OptionalFixed64 != nil { return *x.OptionalFixed64 } return 0 } func (x *TestAllTypesProto2) GetOptionalSfixed32() int32 { if x != nil && x.OptionalSfixed32 != nil { return *x.OptionalSfixed32 } return 0 } func (x *TestAllTypesProto2) GetOptionalSfixed64() int64 { if x != nil && x.OptionalSfixed64 != nil { return *x.OptionalSfixed64 } return 0 } func (x *TestAllTypesProto2) GetOptionalFloat() float32 { if x != nil && x.OptionalFloat != nil { return *x.OptionalFloat } return 0 } func (x *TestAllTypesProto2) GetOptionalDouble() float64 { if x != nil && x.OptionalDouble != nil { return *x.OptionalDouble } return 0 } func (x *TestAllTypesProto2) GetOptionalBool() bool { if x != nil && x.OptionalBool != nil { return *x.OptionalBool } return false } func (x *TestAllTypesProto2) GetOptionalString() string { if x != nil && x.OptionalString != nil { return *x.OptionalString } return "" } func (x *TestAllTypesProto2) GetOptionalBytes() []byte { if x != nil { return x.OptionalBytes } return nil } func (x *TestAllTypesProto2) GetOptionalNestedMessage() *TestAllTypesProto2_NestedMessage { if x != nil { return x.OptionalNestedMessage } return nil } func (x *TestAllTypesProto2) GetOptionalForeignMessage() *ForeignMessageProto2 { if x != nil { return x.OptionalForeignMessage } return nil } func (x *TestAllTypesProto2) GetOptionalNestedEnum() TestAllTypesProto2_NestedEnum { if x != nil && x.OptionalNestedEnum != nil { return *x.OptionalNestedEnum } return TestAllTypesProto2_FOO } func (x *TestAllTypesProto2) GetOptionalForeignEnum() ForeignEnumProto2 { if x != nil && x.OptionalForeignEnum != nil { return *x.OptionalForeignEnum } return ForeignEnumProto2_FOREIGN_FOO } func (x *TestAllTypesProto2) GetOptionalStringPiece() string { if x != nil && x.OptionalStringPiece != nil { return *x.OptionalStringPiece } return "" } func (x *TestAllTypesProto2) GetOptionalCord() string { if x != nil && x.OptionalCord != nil { return *x.OptionalCord } return "" } func (x *TestAllTypesProto2) GetRecursiveMessage() *TestAllTypesProto2 { if x != nil { return x.RecursiveMessage } return nil } func (x *TestAllTypesProto2) GetRepeatedInt32() []int32 { if x != nil { return x.RepeatedInt32 } return nil } func (x *TestAllTypesProto2) GetRepeatedInt64() []int64 { if x != nil { return x.RepeatedInt64 } return nil } func (x *TestAllTypesProto2) GetRepeatedUint32() []uint32 { if x != nil { return x.RepeatedUint32 } return nil } func (x *TestAllTypesProto2) GetRepeatedUint64() []uint64 { if x != nil { return x.RepeatedUint64 } return nil } func (x *TestAllTypesProto2) GetRepeatedSint32() []int32 { if x != nil { return x.RepeatedSint32 } return nil } func (x *TestAllTypesProto2) GetRepeatedSint64() []int64 { if x != nil { return x.RepeatedSint64 } return nil } func (x *TestAllTypesProto2) GetRepeatedFixed32() []uint32 { if x != nil { return x.RepeatedFixed32 } return nil } func (x *TestAllTypesProto2) GetRepeatedFixed64() []uint64 { if x != nil { return x.RepeatedFixed64 } return nil } func (x *TestAllTypesProto2) GetRepeatedSfixed32() []int32 { if x != nil { return x.RepeatedSfixed32 } return nil } func (x *TestAllTypesProto2) GetRepeatedSfixed64() []int64 { if x != nil { return x.RepeatedSfixed64 } return nil } func (x *TestAllTypesProto2) GetRepeatedFloat() []float32 { if x != nil { return x.RepeatedFloat } return nil } func (x *TestAllTypesProto2) GetRepeatedDouble() []float64 { if x != nil { return x.RepeatedDouble } return nil } func (x *TestAllTypesProto2) GetRepeatedBool() []bool { if x != nil { return x.RepeatedBool } return nil } func (x *TestAllTypesProto2) GetRepeatedString() []string { if x != nil { return x.RepeatedString } return nil } func (x *TestAllTypesProto2) GetRepeatedBytes() [][]byte { if x != nil { return x.RepeatedBytes } return nil } func (x *TestAllTypesProto2) GetRepeatedNestedMessage() []*TestAllTypesProto2_NestedMessage { if x != nil { return x.RepeatedNestedMessage } return nil } func (x *TestAllTypesProto2) GetRepeatedForeignMessage() []*ForeignMessageProto2 { if x != nil { return x.RepeatedForeignMessage } return nil } func (x *TestAllTypesProto2) GetRepeatedNestedEnum() []TestAllTypesProto2_NestedEnum { if x != nil { return x.RepeatedNestedEnum } return nil } func (x *TestAllTypesProto2) GetRepeatedForeignEnum() []ForeignEnumProto2 { if x != nil { return x.RepeatedForeignEnum } return nil } func (x *TestAllTypesProto2) GetRepeatedStringPiece() []string { if x != nil { return x.RepeatedStringPiece } return nil } func (x *TestAllTypesProto2) GetRepeatedCord() []string { if x != nil { return x.RepeatedCord } return nil } func (x *TestAllTypesProto2) GetPackedInt32() []int32 { if x != nil { return x.PackedInt32 } return nil } func (x *TestAllTypesProto2) GetPackedInt64() []int64 { if x != nil { return x.PackedInt64 } return nil } func (x *TestAllTypesProto2) GetPackedUint32() []uint32 { if x != nil { return x.PackedUint32 } return nil } func (x *TestAllTypesProto2) GetPackedUint64() []uint64 { if x != nil { return x.PackedUint64 } return nil } func (x *TestAllTypesProto2) GetPackedSint32() []int32 { if x != nil { return x.PackedSint32 } return nil } func (x *TestAllTypesProto2) GetPackedSint64() []int64 { if x != nil { return x.PackedSint64 } return nil } func (x *TestAllTypesProto2) GetPackedFixed32() []uint32 { if x != nil { return x.PackedFixed32 } return nil } func (x *TestAllTypesProto2) GetPackedFixed64() []uint64 { if x != nil { return x.PackedFixed64 } return nil } func (x *TestAllTypesProto2) GetPackedSfixed32() []int32 { if x != nil { return x.PackedSfixed32 } return nil } func (x *TestAllTypesProto2) GetPackedSfixed64() []int64 { if x != nil { return x.PackedSfixed64 } return nil } func (x *TestAllTypesProto2) GetPackedFloat() []float32 { if x != nil { return x.PackedFloat } return nil } func (x *TestAllTypesProto2) GetPackedDouble() []float64 { if x != nil { return x.PackedDouble } return nil } func (x *TestAllTypesProto2) GetPackedBool() []bool { if x != nil { return x.PackedBool } return nil } func (x *TestAllTypesProto2) GetPackedNestedEnum() []TestAllTypesProto2_NestedEnum { if x != nil { return x.PackedNestedEnum } return nil } func (x *TestAllTypesProto2) GetUnpackedInt32() []int32 { if x != nil { return x.UnpackedInt32 } return nil } func (x *TestAllTypesProto2) GetUnpackedInt64() []int64 { if x != nil { return x.UnpackedInt64 } return nil } func (x *TestAllTypesProto2) GetUnpackedUint32() []uint32 { if x != nil { return x.UnpackedUint32 } return nil } func (x *TestAllTypesProto2) GetUnpackedUint64() []uint64 { if x != nil { return x.UnpackedUint64 } return nil } func (x *TestAllTypesProto2) GetUnpackedSint32() []int32 { if x != nil { return x.UnpackedSint32 } return nil } func (x *TestAllTypesProto2) GetUnpackedSint64() []int64 { if x != nil { return x.UnpackedSint64 } return nil } func (x *TestAllTypesProto2) GetUnpackedFixed32() []uint32 { if x != nil { return x.UnpackedFixed32 } return nil } func (x *TestAllTypesProto2) GetUnpackedFixed64() []uint64 { if x != nil { return x.UnpackedFixed64 } return nil } func (x *TestAllTypesProto2) GetUnpackedSfixed32() []int32 { if x != nil { return x.UnpackedSfixed32 } return nil } func (x *TestAllTypesProto2) GetUnpackedSfixed64() []int64 { if x != nil { return x.UnpackedSfixed64 } return nil } func (x *TestAllTypesProto2) GetUnpackedFloat() []float32 { if x != nil { return x.UnpackedFloat } return nil } func (x *TestAllTypesProto2) GetUnpackedDouble() []float64 { if x != nil { return x.UnpackedDouble } return nil } func (x *TestAllTypesProto2) GetUnpackedBool() []bool { if x != nil { return x.UnpackedBool } return nil } func (x *TestAllTypesProto2) GetUnpackedNestedEnum() []TestAllTypesProto2_NestedEnum { if x != nil { return x.UnpackedNestedEnum } return nil } func (x *TestAllTypesProto2) GetMapInt32Int32() map[int32]int32 { if x != nil { return x.MapInt32Int32 } return nil } func (x *TestAllTypesProto2) GetMapInt64Int64() map[int64]int64 { if x != nil { return x.MapInt64Int64 } return nil } func (x *TestAllTypesProto2) GetMapUint32Uint32() map[uint32]uint32 { if x != nil { return x.MapUint32Uint32 } return nil } func (x *TestAllTypesProto2) GetMapUint64Uint64() map[uint64]uint64 { if x != nil { return x.MapUint64Uint64 } return nil } func (x *TestAllTypesProto2) GetMapSint32Sint32() map[int32]int32 { if x != nil { return x.MapSint32Sint32 } return nil } func (x *TestAllTypesProto2) GetMapSint64Sint64() map[int64]int64 { if x != nil { return x.MapSint64Sint64 } return nil } func (x *TestAllTypesProto2) GetMapFixed32Fixed32() map[uint32]uint32 { if x != nil { return x.MapFixed32Fixed32 } return nil } func (x *TestAllTypesProto2) GetMapFixed64Fixed64() map[uint64]uint64 { if x != nil { return x.MapFixed64Fixed64 } return nil } func (x *TestAllTypesProto2) GetMapSfixed32Sfixed32() map[int32]int32 { if x != nil { return x.MapSfixed32Sfixed32 } return nil } func (x *TestAllTypesProto2) GetMapSfixed64Sfixed64() map[int64]int64 { if x != nil { return x.MapSfixed64Sfixed64 } return nil } func (x *TestAllTypesProto2) GetMapInt32Float() map[int32]float32 { if x != nil { return x.MapInt32Float } return nil } func (x *TestAllTypesProto2) GetMapInt32Double() map[int32]float64 { if x != nil { return x.MapInt32Double } return nil } func (x *TestAllTypesProto2) GetMapBoolBool() map[bool]bool { if x != nil { return x.MapBoolBool } return nil } func (x *TestAllTypesProto2) GetMapStringString() map[string]string { if x != nil { return x.MapStringString } return nil } func (x *TestAllTypesProto2) GetMapStringBytes() map[string][]byte { if x != nil { return x.MapStringBytes } return nil } func (x *TestAllTypesProto2) GetMapStringNestedMessage() map[string]*TestAllTypesProto2_NestedMessage { if x != nil { return x.MapStringNestedMessage } return nil } func (x *TestAllTypesProto2) GetMapStringForeignMessage() map[string]*ForeignMessageProto2 { if x != nil { return x.MapStringForeignMessage } return nil } func (x *TestAllTypesProto2) GetMapStringNestedEnum() map[string]TestAllTypesProto2_NestedEnum { if x != nil { return x.MapStringNestedEnum } return nil } func (x *TestAllTypesProto2) GetMapStringForeignEnum() map[string]ForeignEnumProto2 { if x != nil { return x.MapStringForeignEnum } return nil } func (m *TestAllTypesProto2) GetOneofField() isTestAllTypesProto2_OneofField { if m != nil { return m.OneofField } return nil } func (x *TestAllTypesProto2) GetOneofUint32() uint32 { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofUint32); ok { return x.OneofUint32 } return 0 } func (x *TestAllTypesProto2) GetOneofNestedMessage() *TestAllTypesProto2_NestedMessage { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofNestedMessage); ok { return x.OneofNestedMessage } return nil } func (x *TestAllTypesProto2) GetOneofString() string { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofString); ok { return x.OneofString } return "" } func (x *TestAllTypesProto2) GetOneofBytes() []byte { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofBytes); ok { return x.OneofBytes } return nil } func (x *TestAllTypesProto2) GetOneofBool() bool { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofBool); ok { return x.OneofBool } return false } func (x *TestAllTypesProto2) GetOneofUint64() uint64 { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofUint64); ok { return x.OneofUint64 } return 0 } func (x *TestAllTypesProto2) GetOneofFloat() float32 { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofFloat); ok { return x.OneofFloat } return 0 } func (x *TestAllTypesProto2) GetOneofDouble() float64 { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofDouble); ok { return x.OneofDouble } return 0 } func (x *TestAllTypesProto2) GetOneofEnum() TestAllTypesProto2_NestedEnum { if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofEnum); ok { return x.OneofEnum } return TestAllTypesProto2_FOO } func (x *TestAllTypesProto2) GetData() *TestAllTypesProto2_Data { if x != nil { return x.Data } return nil } func (x *TestAllTypesProto2) GetDefaultInt32() int32 { if x != nil && x.DefaultInt32 != nil { return *x.DefaultInt32 } return Default_TestAllTypesProto2_DefaultInt32 } func (x *TestAllTypesProto2) GetDefaultInt64() int64 { if x != nil && x.DefaultInt64 != nil { return *x.DefaultInt64 } return Default_TestAllTypesProto2_DefaultInt64 } func (x *TestAllTypesProto2) GetDefaultUint32() uint32 { if x != nil && x.DefaultUint32 != nil { return *x.DefaultUint32 } return Default_TestAllTypesProto2_DefaultUint32 } func (x *TestAllTypesProto2) GetDefaultUint64() uint64 { if x != nil && x.DefaultUint64 != nil { return *x.DefaultUint64 } return Default_TestAllTypesProto2_DefaultUint64 } func (x *TestAllTypesProto2) GetDefaultSint32() int32 { if x != nil && x.DefaultSint32 != nil { return *x.DefaultSint32 } return Default_TestAllTypesProto2_DefaultSint32 } func (x *TestAllTypesProto2) GetDefaultSint64() int64 { if x != nil && x.DefaultSint64 != nil { return *x.DefaultSint64 } return Default_TestAllTypesProto2_DefaultSint64 } func (x *TestAllTypesProto2) GetDefaultFixed32() uint32 { if x != nil && x.DefaultFixed32 != nil { return *x.DefaultFixed32 } return Default_TestAllTypesProto2_DefaultFixed32 } func (x *TestAllTypesProto2) GetDefaultFixed64() uint64 { if x != nil && x.DefaultFixed64 != nil { return *x.DefaultFixed64 } return Default_TestAllTypesProto2_DefaultFixed64 } func (x *TestAllTypesProto2) GetDefaultSfixed32() int32 { if x != nil && x.DefaultSfixed32 != nil { return *x.DefaultSfixed32 } return Default_TestAllTypesProto2_DefaultSfixed32 } func (x *TestAllTypesProto2) GetDefaultSfixed64() int64 { if x != nil && x.DefaultSfixed64 != nil { return *x.DefaultSfixed64 } return Default_TestAllTypesProto2_DefaultSfixed64 } func (x *TestAllTypesProto2) GetDefaultFloat() float32 { if x != nil && x.DefaultFloat != nil { return *x.DefaultFloat } return Default_TestAllTypesProto2_DefaultFloat } func (x *TestAllTypesProto2) GetDefaultDouble() float64 { if x != nil && x.DefaultDouble != nil { return *x.DefaultDouble } return Default_TestAllTypesProto2_DefaultDouble } func (x *TestAllTypesProto2) GetDefaultBool() bool { if x != nil && x.DefaultBool != nil { return *x.DefaultBool } return Default_TestAllTypesProto2_DefaultBool } func (x *TestAllTypesProto2) GetDefaultString() string { if x != nil && x.DefaultString != nil { return *x.DefaultString } return Default_TestAllTypesProto2_DefaultString } func (x *TestAllTypesProto2) GetDefaultBytes() []byte { if x != nil && x.DefaultBytes != nil { return x.DefaultBytes } return append([]byte(nil), Default_TestAllTypesProto2_DefaultBytes...) } func (x *TestAllTypesProto2) GetFieldname1() int32 { if x != nil && x.Fieldname1 != nil { return *x.Fieldname1 } return 0 } func (x *TestAllTypesProto2) GetFieldName2() int32 { if x != nil && x.FieldName2 != nil { return *x.FieldName2 } return 0 } func (x *TestAllTypesProto2) GetXFieldName3() int32 { if x != nil && x.XFieldName3 != nil { return *x.XFieldName3 } return 0 } func (x *TestAllTypesProto2) GetField_Name4_() int32 { if x != nil && x.Field_Name4_ != nil { return *x.Field_Name4_ } return 0 } func (x *TestAllTypesProto2) GetField0Name5() int32 { if x != nil && x.Field0Name5 != nil { return *x.Field0Name5 } return 0 } func (x *TestAllTypesProto2) GetField_0Name6() int32 { if x != nil && x.Field_0Name6 != nil { return *x.Field_0Name6 } return 0 } func (x *TestAllTypesProto2) GetFieldName7() int32 { if x != nil && x.FieldName7 != nil { return *x.FieldName7 } return 0 } func (x *TestAllTypesProto2) GetFieldName8() int32 { if x != nil && x.FieldName8 != nil { return *x.FieldName8 } return 0 } func (x *TestAllTypesProto2) GetField_Name9() int32 { if x != nil && x.Field_Name9 != nil { return *x.Field_Name9 } return 0 } func (x *TestAllTypesProto2) GetField_Name10() int32 { if x != nil && x.Field_Name10 != nil { return *x.Field_Name10 } return 0 } func (x *TestAllTypesProto2) GetFIELD_NAME11() int32 { if x != nil && x.FIELD_NAME11 != nil { return *x.FIELD_NAME11 } return 0 } func (x *TestAllTypesProto2) GetFIELDName12() int32 { if x != nil && x.FIELDName12 != nil { return *x.FIELDName12 } return 0 } func (x *TestAllTypesProto2) GetXFieldName13() int32 { if x != nil && x.XFieldName13 != nil { return *x.XFieldName13 } return 0 } func (x *TestAllTypesProto2) GetX_FieldName14() int32 { if x != nil && x.X_FieldName14 != nil { return *x.X_FieldName14 } return 0 } func (x *TestAllTypesProto2) GetField_Name15() int32 { if x != nil && x.Field_Name15 != nil { return *x.Field_Name15 } return 0 } func (x *TestAllTypesProto2) GetField__Name16() int32 { if x != nil && x.Field__Name16 != nil { return *x.Field__Name16 } return 0 } func (x *TestAllTypesProto2) GetFieldName17__() int32 { if x != nil && x.FieldName17__ != nil { return *x.FieldName17__ } return 0 } func (x *TestAllTypesProto2) GetFieldName18__() int32 { if x != nil && x.FieldName18__ != nil { return *x.FieldName18__ } return 0 } type isTestAllTypesProto2_OneofField interface { isTestAllTypesProto2_OneofField() } type TestAllTypesProto2_OneofUint32 struct { OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,oneof"` } type TestAllTypesProto2_OneofNestedMessage struct { OneofNestedMessage *TestAllTypesProto2_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,oneof"` } type TestAllTypesProto2_OneofString struct { OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,oneof"` } type TestAllTypesProto2_OneofBytes struct { OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,oneof"` } type TestAllTypesProto2_OneofBool struct { OneofBool bool `protobuf:"varint,115,opt,name=oneof_bool,json=oneofBool,oneof"` } type TestAllTypesProto2_OneofUint64 struct { OneofUint64 uint64 `protobuf:"varint,116,opt,name=oneof_uint64,json=oneofUint64,oneof"` } type TestAllTypesProto2_OneofFloat struct { OneofFloat float32 `protobuf:"fixed32,117,opt,name=oneof_float,json=oneofFloat,oneof"` } type TestAllTypesProto2_OneofDouble struct { OneofDouble float64 `protobuf:"fixed64,118,opt,name=oneof_double,json=oneofDouble,oneof"` } type TestAllTypesProto2_OneofEnum struct { OneofEnum TestAllTypesProto2_NestedEnum `protobuf:"varint,119,opt,name=oneof_enum,json=oneofEnum,enum=protobuf_test_messages.proto2.TestAllTypesProto2_NestedEnum,oneof"` } func (*TestAllTypesProto2_OneofUint32) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofNestedMessage) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofString) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofBytes) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofBool) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofUint64) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofFloat) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofDouble) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofEnum) isTestAllTypesProto2_OneofField() {} type ForeignMessageProto2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields C *int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"` } func (x *ForeignMessageProto2) Reset() { *x = ForeignMessageProto2{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ForeignMessageProto2) String() string { return protoimpl.X.MessageStringOf(x) } func (*ForeignMessageProto2) ProtoMessage() {} func (x *ForeignMessageProto2) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ForeignMessageProto2.ProtoReflect.Descriptor instead. func (*ForeignMessageProto2) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{1} } func (x *ForeignMessageProto2) GetC() int32 { if x != nil && x.C != nil { return *x.C } return 0 } type UnknownToTestAllTypes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields OptionalInt32 *int32 `protobuf:"varint,1001,opt,name=optional_int32,json=optionalInt32" json:"optional_int32,omitempty"` OptionalString *string `protobuf:"bytes,1002,opt,name=optional_string,json=optionalString" json:"optional_string,omitempty"` NestedMessage *ForeignMessageProto2 `protobuf:"bytes,1003,opt,name=nested_message,json=nestedMessage" json:"nested_message,omitempty"` Optionalgroup *UnknownToTestAllTypes_OptionalGroup `protobuf:"group,1004,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` OptionalBool *bool `protobuf:"varint,1006,opt,name=optional_bool,json=optionalBool" json:"optional_bool,omitempty"` RepeatedInt32 []int32 `protobuf:"varint,1011,rep,name=repeated_int32,json=repeatedInt32" json:"repeated_int32,omitempty"` } func (x *UnknownToTestAllTypes) Reset() { *x = UnknownToTestAllTypes{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnknownToTestAllTypes) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnknownToTestAllTypes) ProtoMessage() {} func (x *UnknownToTestAllTypes) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UnknownToTestAllTypes.ProtoReflect.Descriptor instead. func (*UnknownToTestAllTypes) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{2} } func (x *UnknownToTestAllTypes) GetOptionalInt32() int32 { if x != nil && x.OptionalInt32 != nil { return *x.OptionalInt32 } return 0 } func (x *UnknownToTestAllTypes) GetOptionalString() string { if x != nil && x.OptionalString != nil { return *x.OptionalString } return "" } func (x *UnknownToTestAllTypes) GetNestedMessage() *ForeignMessageProto2 { if x != nil { return x.NestedMessage } return nil } func (x *UnknownToTestAllTypes) GetOptionalgroup() *UnknownToTestAllTypes_OptionalGroup { if x != nil { return x.Optionalgroup } return nil } func (x *UnknownToTestAllTypes) GetOptionalBool() bool { if x != nil && x.OptionalBool != nil { return *x.OptionalBool } return false } func (x *UnknownToTestAllTypes) GetRepeatedInt32() []int32 { if x != nil { return x.RepeatedInt32 } return nil } type NullHypothesisProto2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *NullHypothesisProto2) Reset() { *x = NullHypothesisProto2{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *NullHypothesisProto2) String() string { return protoimpl.X.MessageStringOf(x) } func (*NullHypothesisProto2) ProtoMessage() {} func (x *NullHypothesisProto2) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use NullHypothesisProto2.ProtoReflect.Descriptor instead. func (*NullHypothesisProto2) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{3} } type EnumOnlyProto2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *EnumOnlyProto2) Reset() { *x = EnumOnlyProto2{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EnumOnlyProto2) String() string { return protoimpl.X.MessageStringOf(x) } func (*EnumOnlyProto2) ProtoMessage() {} func (x *EnumOnlyProto2) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use EnumOnlyProto2.ProtoReflect.Descriptor instead. func (*EnumOnlyProto2) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{4} } type OneStringProto2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` } func (x *OneStringProto2) Reset() { *x = OneStringProto2{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OneStringProto2) String() string { return protoimpl.X.MessageStringOf(x) } func (*OneStringProto2) ProtoMessage() {} func (x *OneStringProto2) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OneStringProto2.ProtoReflect.Descriptor instead. func (*OneStringProto2) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{5} } func (x *OneStringProto2) GetData() string { if x != nil && x.Data != nil { return *x.Data } return "" } type TestAllTypesProto2_NestedMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields A *int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` Corecursive *TestAllTypesProto2 `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"` } func (x *TestAllTypesProto2_NestedMessage) Reset() { *x = TestAllTypesProto2_NestedMessage{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAllTypesProto2_NestedMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAllTypesProto2_NestedMessage) ProtoMessage() {} func (x *TestAllTypesProto2_NestedMessage) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestAllTypesProto2_NestedMessage.ProtoReflect.Descriptor instead. func (*TestAllTypesProto2_NestedMessage) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0, 0} } func (x *TestAllTypesProto2_NestedMessage) GetA() int32 { if x != nil && x.A != nil { return *x.A } return 0 } func (x *TestAllTypesProto2_NestedMessage) GetCorecursive() *TestAllTypesProto2 { if x != nil { return x.Corecursive } return nil } // groups type TestAllTypesProto2_Data struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields GroupInt32 *int32 `protobuf:"varint,202,opt,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` GroupUint32 *uint32 `protobuf:"varint,203,opt,name=group_uint32,json=groupUint32" json:"group_uint32,omitempty"` } func (x *TestAllTypesProto2_Data) Reset() { *x = TestAllTypesProto2_Data{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAllTypesProto2_Data) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAllTypesProto2_Data) ProtoMessage() {} func (x *TestAllTypesProto2_Data) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestAllTypesProto2_Data.ProtoReflect.Descriptor instead. func (*TestAllTypesProto2_Data) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0, 20} } func (x *TestAllTypesProto2_Data) GetGroupInt32() int32 { if x != nil && x.GroupInt32 != nil { return *x.GroupInt32 } return 0 } func (x *TestAllTypesProto2_Data) GetGroupUint32() uint32 { if x != nil && x.GroupUint32 != nil { return *x.GroupUint32 } return 0 } // message_set test case. type TestAllTypesProto2_MessageSetCorrect struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields } func (x *TestAllTypesProto2_MessageSetCorrect) Reset() { *x = TestAllTypesProto2_MessageSetCorrect{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAllTypesProto2_MessageSetCorrect) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAllTypesProto2_MessageSetCorrect) ProtoMessage() {} func (x *TestAllTypesProto2_MessageSetCorrect) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestAllTypesProto2_MessageSetCorrect.ProtoReflect.Descriptor instead. func (*TestAllTypesProto2_MessageSetCorrect) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0, 21} } type TestAllTypesProto2_MessageSetCorrectExtension1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Str *string `protobuf:"bytes,25,opt,name=str" json:"str,omitempty"` } func (x *TestAllTypesProto2_MessageSetCorrectExtension1) Reset() { *x = TestAllTypesProto2_MessageSetCorrectExtension1{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAllTypesProto2_MessageSetCorrectExtension1) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAllTypesProto2_MessageSetCorrectExtension1) ProtoMessage() {} func (x *TestAllTypesProto2_MessageSetCorrectExtension1) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestAllTypesProto2_MessageSetCorrectExtension1.ProtoReflect.Descriptor instead. func (*TestAllTypesProto2_MessageSetCorrectExtension1) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0, 22} } func (x *TestAllTypesProto2_MessageSetCorrectExtension1) GetStr() string { if x != nil && x.Str != nil { return *x.Str } return "" } type TestAllTypesProto2_MessageSetCorrectExtension2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields I *int32 `protobuf:"varint,9,opt,name=i" json:"i,omitempty"` } func (x *TestAllTypesProto2_MessageSetCorrectExtension2) Reset() { *x = TestAllTypesProto2_MessageSetCorrectExtension2{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAllTypesProto2_MessageSetCorrectExtension2) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAllTypesProto2_MessageSetCorrectExtension2) ProtoMessage() {} func (x *TestAllTypesProto2_MessageSetCorrectExtension2) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestAllTypesProto2_MessageSetCorrectExtension2.ProtoReflect.Descriptor instead. func (*TestAllTypesProto2_MessageSetCorrectExtension2) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0, 23} } func (x *TestAllTypesProto2_MessageSetCorrectExtension2) GetI() int32 { if x != nil && x.I != nil { return *x.I } return 0 } type UnknownToTestAllTypes_OptionalGroup struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields A *int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` } func (x *UnknownToTestAllTypes_OptionalGroup) Reset() { *x = UnknownToTestAllTypes_OptionalGroup{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnknownToTestAllTypes_OptionalGroup) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnknownToTestAllTypes_OptionalGroup) ProtoMessage() {} func (x *UnknownToTestAllTypes_OptionalGroup) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UnknownToTestAllTypes_OptionalGroup.ProtoReflect.Descriptor instead. func (*UnknownToTestAllTypes_OptionalGroup) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{2, 0} } func (x *UnknownToTestAllTypes_OptionalGroup) GetA() int32 { if x != nil && x.A != nil { return *x.A } return 0 } var file_src_google_protobuf_test_messages_proto2_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*TestAllTypesProto2)(nil), ExtensionType: (*int32)(nil), Field: 120, Name: "protobuf_test_messages.proto2.extension_int32", Tag: "varint,120,opt,name=extension_int32", Filename: "src/google/protobuf/test_messages_proto2.proto", }, { ExtendedType: (*TestAllTypesProto2_MessageSetCorrect)(nil), ExtensionType: (*TestAllTypesProto2_MessageSetCorrectExtension1)(nil), Field: 1547769, Name: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension", Tag: "bytes,1547769,opt,name=message_set_extension", Filename: "src/google/protobuf/test_messages_proto2.proto", }, { ExtendedType: (*TestAllTypesProto2_MessageSetCorrect)(nil), ExtensionType: (*TestAllTypesProto2_MessageSetCorrectExtension2)(nil), Field: 4135312, Name: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension", Tag: "bytes,4135312,opt,name=message_set_extension", Filename: "src/google/protobuf/test_messages_proto2.proto", }, } // Extension fields to TestAllTypesProto2. var ( // optional int32 extension_int32 = 120; E_ExtensionInt32 = &file_src_google_protobuf_test_messages_proto2_proto_extTypes[0] ) // Extension fields to TestAllTypesProto2_MessageSetCorrect. var ( // optional protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1 message_set_extension = 1547769; E_TestAllTypesProto2_MessageSetCorrectExtension1_MessageSetExtension = &file_src_google_protobuf_test_messages_proto2_proto_extTypes[1] // optional protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2 message_set_extension = 4135312; E_TestAllTypesProto2_MessageSetCorrectExtension2_MessageSetExtension = &file_src_google_protobuf_test_messages_proto2_proto_extTypes[2] ) var File_src_google_protobuf_test_messages_proto2_proto protoreflect.FileDescriptor var file_src_google_protobuf_test_messages_proto2_proto_rawDesc = []byte{ 0x0a, 0x2e, 0x73, 0x72, 0x63, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x22, 0xb9, 0x51, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x10, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x6e, 0x0a, 0x14, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x64, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x08, 0x02, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x72, 0x64, 0x12, 0x5e, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x10, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x20, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x22, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x23, 0x20, 0x03, 0x28, 0x11, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x24, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x25, 0x20, 0x03, 0x28, 0x07, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x26, 0x20, 0x03, 0x28, 0x06, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x27, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x28, 0x20, 0x03, 0x28, 0x10, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x29, 0x20, 0x03, 0x28, 0x02, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x2a, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x2c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x2d, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x30, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x31, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x16, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x6e, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x33, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x12, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x64, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x34, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x18, 0x36, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x08, 0x02, 0x52, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x37, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x72, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x4b, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x4c, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x4d, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x4e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x4f, 0x20, 0x03, 0x28, 0x11, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x50, 0x20, 0x03, 0x28, 0x12, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x51, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x52, 0x20, 0x03, 0x28, 0x06, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x53, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x54, 0x20, 0x03, 0x28, 0x10, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x55, 0x20, 0x03, 0x28, 0x02, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x56, 0x20, 0x03, 0x28, 0x01, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x57, 0x20, 0x03, 0x28, 0x08, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x6e, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x58, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x29, 0x0a, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x59, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0d, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x5a, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0d, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x5b, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x5c, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x5d, 0x20, 0x03, 0x28, 0x11, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x5e, 0x20, 0x03, 0x28, 0x12, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2d, 0x0a, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x5f, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2d, 0x0a, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x60, 0x20, 0x03, 0x28, 0x06, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x11, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x61, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x02, 0x10, 0x00, 0x52, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x11, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x62, 0x20, 0x03, 0x28, 0x10, 0x42, 0x02, 0x10, 0x00, 0x52, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x63, 0x20, 0x03, 0x28, 0x02, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0d, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x64, 0x20, 0x03, 0x28, 0x01, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x65, 0x20, 0x03, 0x28, 0x08, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0c, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x72, 0x0a, 0x14, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x66, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x02, 0x10, 0x00, 0x52, 0x12, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x6c, 0x0a, 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x38, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x6c, 0x0a, 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x39, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x3a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x3b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x3c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x3d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x78, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x3e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x78, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x3f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x7e, 0x0a, 0x15, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x40, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x6d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x7e, 0x0a, 0x15, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x41, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x6d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x6c, 0x0a, 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x42, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x6f, 0x0a, 0x10, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x43, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x66, 0x0a, 0x0d, 0x6d, 0x61, 0x70, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x44, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x6d, 0x61, 0x70, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x45, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x6f, 0x0a, 0x10, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x46, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x19, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x47, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x48, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x17, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x49, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x4a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x73, 0x0a, 0x14, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x12, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x71, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x73, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x74, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x21, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x75, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x76, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x5d, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0xf1, 0x01, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x0a, 0x2d, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3a, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0xf2, 0x01, 0x20, 0x01, 0x28, 0x03, 0x3a, 0x14, 0x2d, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x32, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0xf3, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x0a, 0x32, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3c, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0xf4, 0x01, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x14, 0x31, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x32, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0xf5, 0x01, 0x20, 0x01, 0x28, 0x11, 0x3a, 0x0a, 0x2d, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3c, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0xf6, 0x01, 0x20, 0x01, 0x28, 0x12, 0x3a, 0x14, 0x2d, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x34, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0xf7, 0x01, 0x20, 0x01, 0x28, 0x07, 0x3a, 0x0a, 0x32, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x3e, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0xf8, 0x01, 0x20, 0x01, 0x28, 0x06, 0x3a, 0x14, 0x31, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x36, 0x0a, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0xf9, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x3a, 0x0a, 0x2d, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x40, 0x0a, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0xfa, 0x01, 0x20, 0x01, 0x28, 0x10, 0x3a, 0x14, 0x2d, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0xfb, 0x01, 0x20, 0x01, 0x28, 0x02, 0x3a, 0x05, 0x39, 0x65, 0x2b, 0x30, 0x39, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x2d, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0xfc, 0x01, 0x20, 0x01, 0x28, 0x01, 0x3a, 0x05, 0x37, 0x65, 0x2b, 0x32, 0x32, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0xfd, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x2f, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0xfe, 0x01, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x07, 0x52, 0x6f, 0x73, 0x65, 0x62, 0x75, 0x64, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0xff, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x3a, 0x06, 0x6a, 0x6f, 0x73, 0x68, 0x75, 0x61, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x18, 0x91, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x18, 0x92, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x12, 0x21, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x33, 0x18, 0x93, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x33, 0x12, 0x22, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x34, 0x5f, 0x18, 0x94, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x34, 0x12, 0x21, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x30, 0x6e, 0x61, 0x6d, 0x65, 0x35, 0x18, 0x95, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x30, 0x6e, 0x61, 0x6d, 0x65, 0x35, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x30, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x36, 0x18, 0x96, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x30, 0x4e, 0x61, 0x6d, 0x65, 0x36, 0x12, 0x1f, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x37, 0x18, 0x97, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x37, 0x12, 0x1f, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x38, 0x18, 0x98, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x38, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x39, 0x18, 0x99, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x39, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x30, 0x18, 0x9a, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x30, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x31, 0x31, 0x18, 0x9b, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x4e, 0x41, 0x4d, 0x45, 0x31, 0x31, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x32, 0x18, 0x9c, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x32, 0x12, 0x24, 0x0a, 0x0e, 0x5f, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x33, 0x18, 0x9d, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x33, 0x12, 0x24, 0x0a, 0x0e, 0x5f, 0x5f, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x34, 0x18, 0x9e, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x34, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x35, 0x18, 0x9f, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x35, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x36, 0x18, 0xa0, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x36, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x37, 0x5f, 0x5f, 0x18, 0xa1, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x37, 0x12, 0x24, 0x0a, 0x0e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x38, 0x5f, 0x5f, 0x18, 0xa2, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x38, 0x1a, 0x72, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x12, 0x53, 0x0a, 0x0b, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x1a, 0x40, 0x0a, 0x12, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x18, 0x4d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x18, 0x4d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x10, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x4d, 0x61, 0x70, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x8a, 0x01, 0x0a, 0x1b, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x55, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x7f, 0x0a, 0x1c, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x84, 0x01, 0x0a, 0x18, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x52, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x79, 0x0a, 0x19, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0xca, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0xcb, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x1a, 0x21, 0x0a, 0x11, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x2a, 0x08, 0x08, 0x04, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x3a, 0x02, 0x08, 0x01, 0x1a, 0xfa, 0x01, 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x32, 0xc8, 0x01, 0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x18, 0xf9, 0xbb, 0x5e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x52, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0xf7, 0x01, 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x0c, 0x0a, 0x01, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x69, 0x32, 0xc9, 0x01, 0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x18, 0x90, 0xb3, 0xfc, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x52, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x39, 0x0a, 0x0a, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x4f, 0x4f, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x41, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x41, 0x5a, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x45, 0x47, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x2a, 0x05, 0x08, 0x78, 0x10, 0xc9, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x90, 0x4e, 0x22, 0x24, 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x63, 0x22, 0x9e, 0x03, 0x0a, 0x15, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x6f, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x5b, 0x0a, 0x0e, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x0d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x69, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x6f, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0xf3, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x1a, 0x1d, 0x0a, 0x0d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x22, 0x16, 0x0a, 0x14, 0x4e, 0x75, 0x6c, 0x6c, 0x48, 0x79, 0x70, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x22, 0x2f, 0x0a, 0x0e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x6e, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x22, 0x1d, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x0a, 0x0a, 0x06, 0x6b, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x6b, 0x54, 0x72, 0x75, 0x65, 0x10, 0x01, 0x22, 0x25, 0x0a, 0x0f, 0x4f, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x46, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e, 0x5f, 0x46, 0x4f, 0x4f, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e, 0x5f, 0x42, 0x41, 0x52, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e, 0x5f, 0x42, 0x41, 0x5a, 0x10, 0x02, 0x3a, 0x5a, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x18, 0x78, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x2f, 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x48, 0x01, 0xf8, 0x01, 0x01, } var ( file_src_google_protobuf_test_messages_proto2_proto_rawDescOnce sync.Once file_src_google_protobuf_test_messages_proto2_proto_rawDescData = file_src_google_protobuf_test_messages_proto2_proto_rawDesc ) func file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP() []byte { file_src_google_protobuf_test_messages_proto2_proto_rawDescOnce.Do(func() { file_src_google_protobuf_test_messages_proto2_proto_rawDescData = protoimpl.X.CompressGZIP(file_src_google_protobuf_test_messages_proto2_proto_rawDescData) }) return file_src_google_protobuf_test_messages_proto2_proto_rawDescData } var file_src_google_protobuf_test_messages_proto2_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_src_google_protobuf_test_messages_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 31) var file_src_google_protobuf_test_messages_proto2_proto_goTypes = []interface{}{ (ForeignEnumProto2)(0), // 0: protobuf_test_messages.proto2.ForeignEnumProto2 (TestAllTypesProto2_NestedEnum)(0), // 1: protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum (EnumOnlyProto2_Bool)(0), // 2: protobuf_test_messages.proto2.EnumOnlyProto2.Bool (*TestAllTypesProto2)(nil), // 3: protobuf_test_messages.proto2.TestAllTypesProto2 (*ForeignMessageProto2)(nil), // 4: protobuf_test_messages.proto2.ForeignMessageProto2 (*UnknownToTestAllTypes)(nil), // 5: protobuf_test_messages.proto2.UnknownToTestAllTypes (*NullHypothesisProto2)(nil), // 6: protobuf_test_messages.proto2.NullHypothesisProto2 (*EnumOnlyProto2)(nil), // 7: protobuf_test_messages.proto2.EnumOnlyProto2 (*OneStringProto2)(nil), // 8: protobuf_test_messages.proto2.OneStringProto2 (*TestAllTypesProto2_NestedMessage)(nil), // 9: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage nil, // 10: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32Int32Entry nil, // 11: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt64Int64Entry nil, // 12: protobuf_test_messages.proto2.TestAllTypesProto2.MapUint32Uint32Entry nil, // 13: protobuf_test_messages.proto2.TestAllTypesProto2.MapUint64Uint64Entry nil, // 14: protobuf_test_messages.proto2.TestAllTypesProto2.MapSint32Sint32Entry nil, // 15: protobuf_test_messages.proto2.TestAllTypesProto2.MapSint64Sint64Entry nil, // 16: protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed32Fixed32Entry nil, // 17: protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed64Fixed64Entry nil, // 18: protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed32Sfixed32Entry nil, // 19: protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed64Sfixed64Entry nil, // 20: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32FloatEntry nil, // 21: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32DoubleEntry nil, // 22: protobuf_test_messages.proto2.TestAllTypesProto2.MapBoolBoolEntry nil, // 23: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringStringEntry nil, // 24: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringBytesEntry nil, // 25: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry nil, // 26: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry nil, // 27: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry nil, // 28: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry (*TestAllTypesProto2_Data)(nil), // 29: protobuf_test_messages.proto2.TestAllTypesProto2.Data (*TestAllTypesProto2_MessageSetCorrect)(nil), // 30: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect (*TestAllTypesProto2_MessageSetCorrectExtension1)(nil), // 31: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1 (*TestAllTypesProto2_MessageSetCorrectExtension2)(nil), // 32: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2 (*UnknownToTestAllTypes_OptionalGroup)(nil), // 33: protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup } var file_src_google_protobuf_test_messages_proto2_proto_depIdxs = []int32{ 9, // 0: protobuf_test_messages.proto2.TestAllTypesProto2.optional_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage 4, // 1: protobuf_test_messages.proto2.TestAllTypesProto2.optional_foreign_message:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2 1, // 2: protobuf_test_messages.proto2.TestAllTypesProto2.optional_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum 0, // 3: protobuf_test_messages.proto2.TestAllTypesProto2.optional_foreign_enum:type_name -> protobuf_test_messages.proto2.ForeignEnumProto2 3, // 4: protobuf_test_messages.proto2.TestAllTypesProto2.recursive_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2 9, // 5: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage 4, // 6: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_foreign_message:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2 1, // 7: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum 0, // 8: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_foreign_enum:type_name -> protobuf_test_messages.proto2.ForeignEnumProto2 1, // 9: protobuf_test_messages.proto2.TestAllTypesProto2.packed_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum 1, // 10: protobuf_test_messages.proto2.TestAllTypesProto2.unpacked_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum 10, // 11: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_int32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32Int32Entry 11, // 12: protobuf_test_messages.proto2.TestAllTypesProto2.map_int64_int64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt64Int64Entry 12, // 13: protobuf_test_messages.proto2.TestAllTypesProto2.map_uint32_uint32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapUint32Uint32Entry 13, // 14: protobuf_test_messages.proto2.TestAllTypesProto2.map_uint64_uint64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapUint64Uint64Entry 14, // 15: protobuf_test_messages.proto2.TestAllTypesProto2.map_sint32_sint32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSint32Sint32Entry 15, // 16: protobuf_test_messages.proto2.TestAllTypesProto2.map_sint64_sint64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSint64Sint64Entry 16, // 17: protobuf_test_messages.proto2.TestAllTypesProto2.map_fixed32_fixed32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed32Fixed32Entry 17, // 18: protobuf_test_messages.proto2.TestAllTypesProto2.map_fixed64_fixed64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed64Fixed64Entry 18, // 19: protobuf_test_messages.proto2.TestAllTypesProto2.map_sfixed32_sfixed32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed32Sfixed32Entry 19, // 20: protobuf_test_messages.proto2.TestAllTypesProto2.map_sfixed64_sfixed64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed64Sfixed64Entry 20, // 21: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_float:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32FloatEntry 21, // 22: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_double:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32DoubleEntry 22, // 23: protobuf_test_messages.proto2.TestAllTypesProto2.map_bool_bool:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapBoolBoolEntry 23, // 24: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_string:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringStringEntry 24, // 25: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_bytes:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringBytesEntry 25, // 26: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry 26, // 27: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_foreign_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry 27, // 28: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry 28, // 29: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_foreign_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry 9, // 30: protobuf_test_messages.proto2.TestAllTypesProto2.oneof_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage 1, // 31: protobuf_test_messages.proto2.TestAllTypesProto2.oneof_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum 29, // 32: protobuf_test_messages.proto2.TestAllTypesProto2.data:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.Data 4, // 33: protobuf_test_messages.proto2.UnknownToTestAllTypes.nested_message:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2 33, // 34: protobuf_test_messages.proto2.UnknownToTestAllTypes.optionalgroup:type_name -> protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup 3, // 35: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage.corecursive:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2 9, // 36: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry.value:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage 4, // 37: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry.value:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2 1, // 38: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry.value:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum 0, // 39: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry.value:type_name -> protobuf_test_messages.proto2.ForeignEnumProto2 3, // 40: protobuf_test_messages.proto2.extension_int32:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2 30, // 41: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect 30, // 42: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect 31, // 43: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1 32, // 44: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2 45, // [45:45] is the sub-list for method output_type 45, // [45:45] is the sub-list for method input_type 43, // [43:45] is the sub-list for extension type_name 40, // [40:43] is the sub-list for extension extendee 0, // [0:40] is the sub-list for field type_name } func init() { file_src_google_protobuf_test_messages_proto2_proto_init() } func file_src_google_protobuf_test_messages_proto2_proto_init() { if File_src_google_protobuf_test_messages_proto2_proto != nil { return } if !protoimpl.UnsafeEnabled { file_src_google_protobuf_test_messages_proto2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAllTypesProto2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ForeignMessageProto2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnknownToTestAllTypes); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NullHypothesisProto2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumOnlyProto2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneStringProto2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAllTypesProto2_NestedMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAllTypesProto2_Data); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAllTypesProto2_MessageSetCorrect); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields case 3: return &v.extensionFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension1); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnknownToTestAllTypes_OptionalGroup); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_src_google_protobuf_test_messages_proto2_proto_msgTypes[0].OneofWrappers = []interface{}{ (*TestAllTypesProto2_OneofUint32)(nil), (*TestAllTypesProto2_OneofNestedMessage)(nil), (*TestAllTypesProto2_OneofString)(nil), (*TestAllTypesProto2_OneofBytes)(nil), (*TestAllTypesProto2_OneofBool)(nil), (*TestAllTypesProto2_OneofUint64)(nil), (*TestAllTypesProto2_OneofFloat)(nil), (*TestAllTypesProto2_OneofDouble)(nil), (*TestAllTypesProto2_OneofEnum)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_src_google_protobuf_test_messages_proto2_proto_rawDesc, NumEnums: 3, NumMessages: 31, NumExtensions: 3, NumServices: 0, }, GoTypes: file_src_google_protobuf_test_messages_proto2_proto_goTypes, DependencyIndexes: file_src_google_protobuf_test_messages_proto2_proto_depIdxs, EnumInfos: file_src_google_protobuf_test_messages_proto2_proto_enumTypes, MessageInfos: file_src_google_protobuf_test_messages_proto2_proto_msgTypes, ExtensionInfos: file_src_google_protobuf_test_messages_proto2_proto_extTypes, }.Build() File_src_google_protobuf_test_messages_proto2_proto = out.File file_src_google_protobuf_test_messages_proto2_proto_rawDesc = nil file_src_google_protobuf_test_messages_proto2_proto_goTypes = nil file_src_google_protobuf_test_messages_proto2_proto_depIdxs = nil } test_messages_proto2_vtproto.pb.go000066400000000000000000020147771455570004500362140ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: src/google/protobuf/test_messages_proto2.proto package conformance import ( binary "encoding/binary" fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" math "math" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *TestAllTypesProto2_NestedMessage) CloneVT() *TestAllTypesProto2_NestedMessage { if m == nil { return (*TestAllTypesProto2_NestedMessage)(nil) } r := new(TestAllTypesProto2_NestedMessage) r.Corecursive = m.Corecursive.CloneVT() if rhs := m.A; rhs != nil { tmpVal := *rhs r.A = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestAllTypesProto2_NestedMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestAllTypesProto2_Data) CloneVT() *TestAllTypesProto2_Data { if m == nil { return (*TestAllTypesProto2_Data)(nil) } r := new(TestAllTypesProto2_Data) if rhs := m.GroupInt32; rhs != nil { tmpVal := *rhs r.GroupInt32 = &tmpVal } if rhs := m.GroupUint32; rhs != nil { tmpVal := *rhs r.GroupUint32 = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestAllTypesProto2_Data) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestAllTypesProto2_MessageSetCorrect) CloneVT() *TestAllTypesProto2_MessageSetCorrect { if m == nil { return (*TestAllTypesProto2_MessageSetCorrect)(nil) } r := new(TestAllTypesProto2_MessageSetCorrect) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestAllTypesProto2_MessageSetCorrect) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) CloneVT() *TestAllTypesProto2_MessageSetCorrectExtension1 { if m == nil { return (*TestAllTypesProto2_MessageSetCorrectExtension1)(nil) } r := new(TestAllTypesProto2_MessageSetCorrectExtension1) if rhs := m.Str; rhs != nil { tmpVal := *rhs r.Str = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) CloneVT() *TestAllTypesProto2_MessageSetCorrectExtension2 { if m == nil { return (*TestAllTypesProto2_MessageSetCorrectExtension2)(nil) } r := new(TestAllTypesProto2_MessageSetCorrectExtension2) if rhs := m.I; rhs != nil { tmpVal := *rhs r.I = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestAllTypesProto2) CloneVT() *TestAllTypesProto2 { if m == nil { return (*TestAllTypesProto2)(nil) } r := new(TestAllTypesProto2) r.OptionalNestedMessage = m.OptionalNestedMessage.CloneVT() r.OptionalForeignMessage = m.OptionalForeignMessage.CloneVT() r.RecursiveMessage = m.RecursiveMessage.CloneVT() r.Data = m.Data.CloneVT() if rhs := m.OptionalInt32; rhs != nil { tmpVal := *rhs r.OptionalInt32 = &tmpVal } if rhs := m.OptionalInt64; rhs != nil { tmpVal := *rhs r.OptionalInt64 = &tmpVal } if rhs := m.OptionalUint32; rhs != nil { tmpVal := *rhs r.OptionalUint32 = &tmpVal } if rhs := m.OptionalUint64; rhs != nil { tmpVal := *rhs r.OptionalUint64 = &tmpVal } if rhs := m.OptionalSint32; rhs != nil { tmpVal := *rhs r.OptionalSint32 = &tmpVal } if rhs := m.OptionalSint64; rhs != nil { tmpVal := *rhs r.OptionalSint64 = &tmpVal } if rhs := m.OptionalFixed32; rhs != nil { tmpVal := *rhs r.OptionalFixed32 = &tmpVal } if rhs := m.OptionalFixed64; rhs != nil { tmpVal := *rhs r.OptionalFixed64 = &tmpVal } if rhs := m.OptionalSfixed32; rhs != nil { tmpVal := *rhs r.OptionalSfixed32 = &tmpVal } if rhs := m.OptionalSfixed64; rhs != nil { tmpVal := *rhs r.OptionalSfixed64 = &tmpVal } if rhs := m.OptionalFloat; rhs != nil { tmpVal := *rhs r.OptionalFloat = &tmpVal } if rhs := m.OptionalDouble; rhs != nil { tmpVal := *rhs r.OptionalDouble = &tmpVal } if rhs := m.OptionalBool; rhs != nil { tmpVal := *rhs r.OptionalBool = &tmpVal } if rhs := m.OptionalString; rhs != nil { tmpVal := *rhs r.OptionalString = &tmpVal } if rhs := m.OptionalBytes; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.OptionalBytes = tmpBytes } if rhs := m.OptionalNestedEnum; rhs != nil { tmpVal := *rhs r.OptionalNestedEnum = &tmpVal } if rhs := m.OptionalForeignEnum; rhs != nil { tmpVal := *rhs r.OptionalForeignEnum = &tmpVal } if rhs := m.OptionalStringPiece; rhs != nil { tmpVal := *rhs r.OptionalStringPiece = &tmpVal } if rhs := m.OptionalCord; rhs != nil { tmpVal := *rhs r.OptionalCord = &tmpVal } if rhs := m.RepeatedInt32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedInt32 = tmpContainer } if rhs := m.RepeatedInt64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedInt64 = tmpContainer } if rhs := m.RepeatedUint32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedUint32 = tmpContainer } if rhs := m.RepeatedUint64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedUint64 = tmpContainer } if rhs := m.RepeatedSint32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedSint32 = tmpContainer } if rhs := m.RepeatedSint64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedSint64 = tmpContainer } if rhs := m.RepeatedFixed32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedFixed32 = tmpContainer } if rhs := m.RepeatedFixed64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedFixed64 = tmpContainer } if rhs := m.RepeatedSfixed32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedSfixed32 = tmpContainer } if rhs := m.RepeatedSfixed64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedSfixed64 = tmpContainer } if rhs := m.RepeatedFloat; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedFloat = tmpContainer } if rhs := m.RepeatedDouble; rhs != nil { tmpContainer := make([]float64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedDouble = tmpContainer } if rhs := m.RepeatedBool; rhs != nil { tmpContainer := make([]bool, len(rhs)) copy(tmpContainer, rhs) r.RepeatedBool = tmpContainer } if rhs := m.RepeatedString; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.RepeatedString = tmpContainer } if rhs := m.RepeatedBytes; rhs != nil { tmpContainer := make([][]byte, len(rhs)) for k, v := range rhs { tmpBytes := make([]byte, len(v)) copy(tmpBytes, v) tmpContainer[k] = tmpBytes } r.RepeatedBytes = tmpContainer } if rhs := m.RepeatedNestedMessage; rhs != nil { tmpContainer := make([]*TestAllTypesProto2_NestedMessage, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.RepeatedNestedMessage = tmpContainer } if rhs := m.RepeatedForeignMessage; rhs != nil { tmpContainer := make([]*ForeignMessageProto2, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.RepeatedForeignMessage = tmpContainer } if rhs := m.RepeatedNestedEnum; rhs != nil { tmpContainer := make([]TestAllTypesProto2_NestedEnum, len(rhs)) copy(tmpContainer, rhs) r.RepeatedNestedEnum = tmpContainer } if rhs := m.RepeatedForeignEnum; rhs != nil { tmpContainer := make([]ForeignEnumProto2, len(rhs)) copy(tmpContainer, rhs) r.RepeatedForeignEnum = tmpContainer } if rhs := m.RepeatedStringPiece; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.RepeatedStringPiece = tmpContainer } if rhs := m.RepeatedCord; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.RepeatedCord = tmpContainer } if rhs := m.PackedInt32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedInt32 = tmpContainer } if rhs := m.PackedInt64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedInt64 = tmpContainer } if rhs := m.PackedUint32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.PackedUint32 = tmpContainer } if rhs := m.PackedUint64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.PackedUint64 = tmpContainer } if rhs := m.PackedSint32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedSint32 = tmpContainer } if rhs := m.PackedSint64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedSint64 = tmpContainer } if rhs := m.PackedFixed32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.PackedFixed32 = tmpContainer } if rhs := m.PackedFixed64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.PackedFixed64 = tmpContainer } if rhs := m.PackedSfixed32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedSfixed32 = tmpContainer } if rhs := m.PackedSfixed64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedSfixed64 = tmpContainer } if rhs := m.PackedFloat; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) r.PackedFloat = tmpContainer } if rhs := m.PackedDouble; rhs != nil { tmpContainer := make([]float64, len(rhs)) copy(tmpContainer, rhs) r.PackedDouble = tmpContainer } if rhs := m.PackedBool; rhs != nil { tmpContainer := make([]bool, len(rhs)) copy(tmpContainer, rhs) r.PackedBool = tmpContainer } if rhs := m.PackedNestedEnum; rhs != nil { tmpContainer := make([]TestAllTypesProto2_NestedEnum, len(rhs)) copy(tmpContainer, rhs) r.PackedNestedEnum = tmpContainer } if rhs := m.UnpackedInt32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedInt32 = tmpContainer } if rhs := m.UnpackedInt64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedInt64 = tmpContainer } if rhs := m.UnpackedUint32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedUint32 = tmpContainer } if rhs := m.UnpackedUint64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedUint64 = tmpContainer } if rhs := m.UnpackedSint32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedSint32 = tmpContainer } if rhs := m.UnpackedSint64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedSint64 = tmpContainer } if rhs := m.UnpackedFixed32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedFixed32 = tmpContainer } if rhs := m.UnpackedFixed64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedFixed64 = tmpContainer } if rhs := m.UnpackedSfixed32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedSfixed32 = tmpContainer } if rhs := m.UnpackedSfixed64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedSfixed64 = tmpContainer } if rhs := m.UnpackedFloat; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedFloat = tmpContainer } if rhs := m.UnpackedDouble; rhs != nil { tmpContainer := make([]float64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedDouble = tmpContainer } if rhs := m.UnpackedBool; rhs != nil { tmpContainer := make([]bool, len(rhs)) copy(tmpContainer, rhs) r.UnpackedBool = tmpContainer } if rhs := m.UnpackedNestedEnum; rhs != nil { tmpContainer := make([]TestAllTypesProto2_NestedEnum, len(rhs)) copy(tmpContainer, rhs) r.UnpackedNestedEnum = tmpContainer } if rhs := m.MapInt32Int32; rhs != nil { tmpContainer := make(map[int32]int32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapInt32Int32 = tmpContainer } if rhs := m.MapInt64Int64; rhs != nil { tmpContainer := make(map[int64]int64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapInt64Int64 = tmpContainer } if rhs := m.MapUint32Uint32; rhs != nil { tmpContainer := make(map[uint32]uint32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapUint32Uint32 = tmpContainer } if rhs := m.MapUint64Uint64; rhs != nil { tmpContainer := make(map[uint64]uint64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapUint64Uint64 = tmpContainer } if rhs := m.MapSint32Sint32; rhs != nil { tmpContainer := make(map[int32]int32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapSint32Sint32 = tmpContainer } if rhs := m.MapSint64Sint64; rhs != nil { tmpContainer := make(map[int64]int64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapSint64Sint64 = tmpContainer } if rhs := m.MapFixed32Fixed32; rhs != nil { tmpContainer := make(map[uint32]uint32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapFixed32Fixed32 = tmpContainer } if rhs := m.MapFixed64Fixed64; rhs != nil { tmpContainer := make(map[uint64]uint64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapFixed64Fixed64 = tmpContainer } if rhs := m.MapSfixed32Sfixed32; rhs != nil { tmpContainer := make(map[int32]int32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapSfixed32Sfixed32 = tmpContainer } if rhs := m.MapSfixed64Sfixed64; rhs != nil { tmpContainer := make(map[int64]int64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapSfixed64Sfixed64 = tmpContainer } if rhs := m.MapInt32Float; rhs != nil { tmpContainer := make(map[int32]float32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapInt32Float = tmpContainer } if rhs := m.MapInt32Double; rhs != nil { tmpContainer := make(map[int32]float64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapInt32Double = tmpContainer } if rhs := m.MapBoolBool; rhs != nil { tmpContainer := make(map[bool]bool, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapBoolBool = tmpContainer } if rhs := m.MapStringString; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapStringString = tmpContainer } if rhs := m.MapStringBytes; rhs != nil { tmpContainer := make(map[string][]byte, len(rhs)) for k, v := range rhs { tmpBytes := make([]byte, len(v)) copy(tmpBytes, v) tmpContainer[k] = tmpBytes } r.MapStringBytes = tmpContainer } if rhs := m.MapStringNestedMessage; rhs != nil { tmpContainer := make(map[string]*TestAllTypesProto2_NestedMessage, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.MapStringNestedMessage = tmpContainer } if rhs := m.MapStringForeignMessage; rhs != nil { tmpContainer := make(map[string]*ForeignMessageProto2, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.MapStringForeignMessage = tmpContainer } if rhs := m.MapStringNestedEnum; rhs != nil { tmpContainer := make(map[string]TestAllTypesProto2_NestedEnum, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapStringNestedEnum = tmpContainer } if rhs := m.MapStringForeignEnum; rhs != nil { tmpContainer := make(map[string]ForeignEnumProto2, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapStringForeignEnum = tmpContainer } if m.OneofField != nil { r.OneofField = m.OneofField.(interface { CloneVT() isTestAllTypesProto2_OneofField }).CloneVT() } if rhs := m.DefaultInt32; rhs != nil { tmpVal := *rhs r.DefaultInt32 = &tmpVal } if rhs := m.DefaultInt64; rhs != nil { tmpVal := *rhs r.DefaultInt64 = &tmpVal } if rhs := m.DefaultUint32; rhs != nil { tmpVal := *rhs r.DefaultUint32 = &tmpVal } if rhs := m.DefaultUint64; rhs != nil { tmpVal := *rhs r.DefaultUint64 = &tmpVal } if rhs := m.DefaultSint32; rhs != nil { tmpVal := *rhs r.DefaultSint32 = &tmpVal } if rhs := m.DefaultSint64; rhs != nil { tmpVal := *rhs r.DefaultSint64 = &tmpVal } if rhs := m.DefaultFixed32; rhs != nil { tmpVal := *rhs r.DefaultFixed32 = &tmpVal } if rhs := m.DefaultFixed64; rhs != nil { tmpVal := *rhs r.DefaultFixed64 = &tmpVal } if rhs := m.DefaultSfixed32; rhs != nil { tmpVal := *rhs r.DefaultSfixed32 = &tmpVal } if rhs := m.DefaultSfixed64; rhs != nil { tmpVal := *rhs r.DefaultSfixed64 = &tmpVal } if rhs := m.DefaultFloat; rhs != nil { tmpVal := *rhs r.DefaultFloat = &tmpVal } if rhs := m.DefaultDouble; rhs != nil { tmpVal := *rhs r.DefaultDouble = &tmpVal } if rhs := m.DefaultBool; rhs != nil { tmpVal := *rhs r.DefaultBool = &tmpVal } if rhs := m.DefaultString; rhs != nil { tmpVal := *rhs r.DefaultString = &tmpVal } if rhs := m.DefaultBytes; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.DefaultBytes = tmpBytes } if rhs := m.Fieldname1; rhs != nil { tmpVal := *rhs r.Fieldname1 = &tmpVal } if rhs := m.FieldName2; rhs != nil { tmpVal := *rhs r.FieldName2 = &tmpVal } if rhs := m.XFieldName3; rhs != nil { tmpVal := *rhs r.XFieldName3 = &tmpVal } if rhs := m.Field_Name4_; rhs != nil { tmpVal := *rhs r.Field_Name4_ = &tmpVal } if rhs := m.Field0Name5; rhs != nil { tmpVal := *rhs r.Field0Name5 = &tmpVal } if rhs := m.Field_0Name6; rhs != nil { tmpVal := *rhs r.Field_0Name6 = &tmpVal } if rhs := m.FieldName7; rhs != nil { tmpVal := *rhs r.FieldName7 = &tmpVal } if rhs := m.FieldName8; rhs != nil { tmpVal := *rhs r.FieldName8 = &tmpVal } if rhs := m.Field_Name9; rhs != nil { tmpVal := *rhs r.Field_Name9 = &tmpVal } if rhs := m.Field_Name10; rhs != nil { tmpVal := *rhs r.Field_Name10 = &tmpVal } if rhs := m.FIELD_NAME11; rhs != nil { tmpVal := *rhs r.FIELD_NAME11 = &tmpVal } if rhs := m.FIELDName12; rhs != nil { tmpVal := *rhs r.FIELDName12 = &tmpVal } if rhs := m.XFieldName13; rhs != nil { tmpVal := *rhs r.XFieldName13 = &tmpVal } if rhs := m.X_FieldName14; rhs != nil { tmpVal := *rhs r.X_FieldName14 = &tmpVal } if rhs := m.Field_Name15; rhs != nil { tmpVal := *rhs r.Field_Name15 = &tmpVal } if rhs := m.Field__Name16; rhs != nil { tmpVal := *rhs r.Field__Name16 = &tmpVal } if rhs := m.FieldName17__; rhs != nil { tmpVal := *rhs r.FieldName17__ = &tmpVal } if rhs := m.FieldName18__; rhs != nil { tmpVal := *rhs r.FieldName18__ = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestAllTypesProto2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestAllTypesProto2_OneofUint32) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofUint32)(nil) } r := new(TestAllTypesProto2_OneofUint32) r.OneofUint32 = m.OneofUint32 return r } func (m *TestAllTypesProto2_OneofNestedMessage) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofNestedMessage)(nil) } r := new(TestAllTypesProto2_OneofNestedMessage) r.OneofNestedMessage = m.OneofNestedMessage.CloneVT() return r } func (m *TestAllTypesProto2_OneofString) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofString)(nil) } r := new(TestAllTypesProto2_OneofString) r.OneofString = m.OneofString return r } func (m *TestAllTypesProto2_OneofBytes) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofBytes)(nil) } r := new(TestAllTypesProto2_OneofBytes) if rhs := m.OneofBytes; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.OneofBytes = tmpBytes } return r } func (m *TestAllTypesProto2_OneofBool) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofBool)(nil) } r := new(TestAllTypesProto2_OneofBool) r.OneofBool = m.OneofBool return r } func (m *TestAllTypesProto2_OneofUint64) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofUint64)(nil) } r := new(TestAllTypesProto2_OneofUint64) r.OneofUint64 = m.OneofUint64 return r } func (m *TestAllTypesProto2_OneofFloat) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofFloat)(nil) } r := new(TestAllTypesProto2_OneofFloat) r.OneofFloat = m.OneofFloat return r } func (m *TestAllTypesProto2_OneofDouble) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofDouble)(nil) } r := new(TestAllTypesProto2_OneofDouble) r.OneofDouble = m.OneofDouble return r } func (m *TestAllTypesProto2_OneofEnum) CloneVT() isTestAllTypesProto2_OneofField { if m == nil { return (*TestAllTypesProto2_OneofEnum)(nil) } r := new(TestAllTypesProto2_OneofEnum) r.OneofEnum = m.OneofEnum return r } func (m *ForeignMessageProto2) CloneVT() *ForeignMessageProto2 { if m == nil { return (*ForeignMessageProto2)(nil) } r := new(ForeignMessageProto2) if rhs := m.C; rhs != nil { tmpVal := *rhs r.C = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *ForeignMessageProto2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *UnknownToTestAllTypes_OptionalGroup) CloneVT() *UnknownToTestAllTypes_OptionalGroup { if m == nil { return (*UnknownToTestAllTypes_OptionalGroup)(nil) } r := new(UnknownToTestAllTypes_OptionalGroup) if rhs := m.A; rhs != nil { tmpVal := *rhs r.A = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *UnknownToTestAllTypes_OptionalGroup) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *UnknownToTestAllTypes) CloneVT() *UnknownToTestAllTypes { if m == nil { return (*UnknownToTestAllTypes)(nil) } r := new(UnknownToTestAllTypes) r.NestedMessage = m.NestedMessage.CloneVT() r.Optionalgroup = m.Optionalgroup.CloneVT() if rhs := m.OptionalInt32; rhs != nil { tmpVal := *rhs r.OptionalInt32 = &tmpVal } if rhs := m.OptionalString; rhs != nil { tmpVal := *rhs r.OptionalString = &tmpVal } if rhs := m.OptionalBool; rhs != nil { tmpVal := *rhs r.OptionalBool = &tmpVal } if rhs := m.RepeatedInt32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedInt32 = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *UnknownToTestAllTypes) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *NullHypothesisProto2) CloneVT() *NullHypothesisProto2 { if m == nil { return (*NullHypothesisProto2)(nil) } r := new(NullHypothesisProto2) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *NullHypothesisProto2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *EnumOnlyProto2) CloneVT() *EnumOnlyProto2 { if m == nil { return (*EnumOnlyProto2)(nil) } r := new(EnumOnlyProto2) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *EnumOnlyProto2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *OneStringProto2) CloneVT() *OneStringProto2 { if m == nil { return (*OneStringProto2)(nil) } r := new(OneStringProto2) if rhs := m.Data; rhs != nil { tmpVal := *rhs r.Data = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *OneStringProto2) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *TestAllTypesProto2_NestedMessage) EqualVT(that *TestAllTypesProto2_NestedMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.A, that.A; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if !this.Corecursive.EqualVT(that.Corecursive) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestAllTypesProto2_NestedMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestAllTypesProto2_NestedMessage) if !ok { return false } return this.EqualVT(that) } func (this *TestAllTypesProto2_Data) EqualVT(that *TestAllTypesProto2_Data) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.GroupInt32, that.GroupInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.GroupUint32, that.GroupUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestAllTypesProto2_Data) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestAllTypesProto2_Data) if !ok { return false } return this.EqualVT(that) } func (this *TestAllTypesProto2_MessageSetCorrect) EqualVT(that *TestAllTypesProto2_MessageSetCorrect) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestAllTypesProto2_MessageSetCorrect) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestAllTypesProto2_MessageSetCorrect) if !ok { return false } return this.EqualVT(that) } func (this *TestAllTypesProto2_MessageSetCorrectExtension1) EqualVT(that *TestAllTypesProto2_MessageSetCorrectExtension1) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.Str, that.Str; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestAllTypesProto2_MessageSetCorrectExtension1) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestAllTypesProto2_MessageSetCorrectExtension1) if !ok { return false } return this.EqualVT(that) } func (this *TestAllTypesProto2_MessageSetCorrectExtension2) EqualVT(that *TestAllTypesProto2_MessageSetCorrectExtension2) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.I, that.I; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestAllTypesProto2_MessageSetCorrectExtension2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestAllTypesProto2_MessageSetCorrectExtension2) if !ok { return false } return this.EqualVT(that) } func (this *TestAllTypesProto2) EqualVT(that *TestAllTypesProto2) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.OneofField == nil && that.OneofField != nil { return false } else if this.OneofField != nil { if that.OneofField == nil { return false } if !this.OneofField.(interface { EqualVT(isTestAllTypesProto2_OneofField) bool }).EqualVT(that.OneofField) { return false } } if p, q := this.OptionalInt32, that.OptionalInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalInt64, that.OptionalInt64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalUint32, that.OptionalUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalUint64, that.OptionalUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalSint32, that.OptionalSint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalSint64, that.OptionalSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalFixed32, that.OptionalFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalFixed64, that.OptionalFixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalSfixed32, that.OptionalSfixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalSfixed64, that.OptionalSfixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalFloat, that.OptionalFloat; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalDouble, that.OptionalDouble; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalBool, that.OptionalBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalString, that.OptionalString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalBytes, that.OptionalBytes; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { return false } if !this.OptionalNestedMessage.EqualVT(that.OptionalNestedMessage) { return false } if !this.OptionalForeignMessage.EqualVT(that.OptionalForeignMessage) { return false } if p, q := this.OptionalNestedEnum, that.OptionalNestedEnum; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalForeignEnum, that.OptionalForeignEnum; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalStringPiece, that.OptionalStringPiece; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalCord, that.OptionalCord; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if !this.RecursiveMessage.EqualVT(that.RecursiveMessage) { return false } if len(this.RepeatedInt32) != len(that.RepeatedInt32) { return false } for i, vx := range this.RepeatedInt32 { vy := that.RepeatedInt32[i] if vx != vy { return false } } if len(this.RepeatedInt64) != len(that.RepeatedInt64) { return false } for i, vx := range this.RepeatedInt64 { vy := that.RepeatedInt64[i] if vx != vy { return false } } if len(this.RepeatedUint32) != len(that.RepeatedUint32) { return false } for i, vx := range this.RepeatedUint32 { vy := that.RepeatedUint32[i] if vx != vy { return false } } if len(this.RepeatedUint64) != len(that.RepeatedUint64) { return false } for i, vx := range this.RepeatedUint64 { vy := that.RepeatedUint64[i] if vx != vy { return false } } if len(this.RepeatedSint32) != len(that.RepeatedSint32) { return false } for i, vx := range this.RepeatedSint32 { vy := that.RepeatedSint32[i] if vx != vy { return false } } if len(this.RepeatedSint64) != len(that.RepeatedSint64) { return false } for i, vx := range this.RepeatedSint64 { vy := that.RepeatedSint64[i] if vx != vy { return false } } if len(this.RepeatedFixed32) != len(that.RepeatedFixed32) { return false } for i, vx := range this.RepeatedFixed32 { vy := that.RepeatedFixed32[i] if vx != vy { return false } } if len(this.RepeatedFixed64) != len(that.RepeatedFixed64) { return false } for i, vx := range this.RepeatedFixed64 { vy := that.RepeatedFixed64[i] if vx != vy { return false } } if len(this.RepeatedSfixed32) != len(that.RepeatedSfixed32) { return false } for i, vx := range this.RepeatedSfixed32 { vy := that.RepeatedSfixed32[i] if vx != vy { return false } } if len(this.RepeatedSfixed64) != len(that.RepeatedSfixed64) { return false } for i, vx := range this.RepeatedSfixed64 { vy := that.RepeatedSfixed64[i] if vx != vy { return false } } if len(this.RepeatedFloat) != len(that.RepeatedFloat) { return false } for i, vx := range this.RepeatedFloat { vy := that.RepeatedFloat[i] if vx != vy { return false } } if len(this.RepeatedDouble) != len(that.RepeatedDouble) { return false } for i, vx := range this.RepeatedDouble { vy := that.RepeatedDouble[i] if vx != vy { return false } } if len(this.RepeatedBool) != len(that.RepeatedBool) { return false } for i, vx := range this.RepeatedBool { vy := that.RepeatedBool[i] if vx != vy { return false } } if len(this.RepeatedString) != len(that.RepeatedString) { return false } for i, vx := range this.RepeatedString { vy := that.RepeatedString[i] if vx != vy { return false } } if len(this.RepeatedBytes) != len(that.RepeatedBytes) { return false } for i, vx := range this.RepeatedBytes { vy := that.RepeatedBytes[i] if string(vx) != string(vy) { return false } } if len(this.RepeatedNestedMessage) != len(that.RepeatedNestedMessage) { return false } for i, vx := range this.RepeatedNestedMessage { vy := that.RepeatedNestedMessage[i] if p, q := vx, vy; p != q { if p == nil { p = &TestAllTypesProto2_NestedMessage{} } if q == nil { q = &TestAllTypesProto2_NestedMessage{} } if !p.EqualVT(q) { return false } } } if len(this.RepeatedForeignMessage) != len(that.RepeatedForeignMessage) { return false } for i, vx := range this.RepeatedForeignMessage { vy := that.RepeatedForeignMessage[i] if p, q := vx, vy; p != q { if p == nil { p = &ForeignMessageProto2{} } if q == nil { q = &ForeignMessageProto2{} } if !p.EqualVT(q) { return false } } } if len(this.RepeatedNestedEnum) != len(that.RepeatedNestedEnum) { return false } for i, vx := range this.RepeatedNestedEnum { vy := that.RepeatedNestedEnum[i] if vx != vy { return false } } if len(this.RepeatedForeignEnum) != len(that.RepeatedForeignEnum) { return false } for i, vx := range this.RepeatedForeignEnum { vy := that.RepeatedForeignEnum[i] if vx != vy { return false } } if len(this.RepeatedStringPiece) != len(that.RepeatedStringPiece) { return false } for i, vx := range this.RepeatedStringPiece { vy := that.RepeatedStringPiece[i] if vx != vy { return false } } if len(this.RepeatedCord) != len(that.RepeatedCord) { return false } for i, vx := range this.RepeatedCord { vy := that.RepeatedCord[i] if vx != vy { return false } } if len(this.MapInt32Int32) != len(that.MapInt32Int32) { return false } for i, vx := range this.MapInt32Int32 { vy, ok := that.MapInt32Int32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapInt64Int64) != len(that.MapInt64Int64) { return false } for i, vx := range this.MapInt64Int64 { vy, ok := that.MapInt64Int64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapUint32Uint32) != len(that.MapUint32Uint32) { return false } for i, vx := range this.MapUint32Uint32 { vy, ok := that.MapUint32Uint32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapUint64Uint64) != len(that.MapUint64Uint64) { return false } for i, vx := range this.MapUint64Uint64 { vy, ok := that.MapUint64Uint64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapSint32Sint32) != len(that.MapSint32Sint32) { return false } for i, vx := range this.MapSint32Sint32 { vy, ok := that.MapSint32Sint32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapSint64Sint64) != len(that.MapSint64Sint64) { return false } for i, vx := range this.MapSint64Sint64 { vy, ok := that.MapSint64Sint64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapFixed32Fixed32) != len(that.MapFixed32Fixed32) { return false } for i, vx := range this.MapFixed32Fixed32 { vy, ok := that.MapFixed32Fixed32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapFixed64Fixed64) != len(that.MapFixed64Fixed64) { return false } for i, vx := range this.MapFixed64Fixed64 { vy, ok := that.MapFixed64Fixed64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapSfixed32Sfixed32) != len(that.MapSfixed32Sfixed32) { return false } for i, vx := range this.MapSfixed32Sfixed32 { vy, ok := that.MapSfixed32Sfixed32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapSfixed64Sfixed64) != len(that.MapSfixed64Sfixed64) { return false } for i, vx := range this.MapSfixed64Sfixed64 { vy, ok := that.MapSfixed64Sfixed64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapInt32Float) != len(that.MapInt32Float) { return false } for i, vx := range this.MapInt32Float { vy, ok := that.MapInt32Float[i] if !ok { return false } if vx != vy { return false } } if len(this.MapInt32Double) != len(that.MapInt32Double) { return false } for i, vx := range this.MapInt32Double { vy, ok := that.MapInt32Double[i] if !ok { return false } if vx != vy { return false } } if len(this.MapBoolBool) != len(that.MapBoolBool) { return false } for i, vx := range this.MapBoolBool { vy, ok := that.MapBoolBool[i] if !ok { return false } if vx != vy { return false } } if len(this.MapStringString) != len(that.MapStringString) { return false } for i, vx := range this.MapStringString { vy, ok := that.MapStringString[i] if !ok { return false } if vx != vy { return false } } if len(this.MapStringBytes) != len(that.MapStringBytes) { return false } for i, vx := range this.MapStringBytes { vy, ok := that.MapStringBytes[i] if !ok { return false } if string(vx) != string(vy) { return false } } if len(this.MapStringNestedMessage) != len(that.MapStringNestedMessage) { return false } for i, vx := range this.MapStringNestedMessage { vy, ok := that.MapStringNestedMessage[i] if !ok { return false } if p, q := vx, vy; p != q { if p == nil { p = &TestAllTypesProto2_NestedMessage{} } if q == nil { q = &TestAllTypesProto2_NestedMessage{} } if !p.EqualVT(q) { return false } } } if len(this.MapStringForeignMessage) != len(that.MapStringForeignMessage) { return false } for i, vx := range this.MapStringForeignMessage { vy, ok := that.MapStringForeignMessage[i] if !ok { return false } if p, q := vx, vy; p != q { if p == nil { p = &ForeignMessageProto2{} } if q == nil { q = &ForeignMessageProto2{} } if !p.EqualVT(q) { return false } } } if len(this.MapStringNestedEnum) != len(that.MapStringNestedEnum) { return false } for i, vx := range this.MapStringNestedEnum { vy, ok := that.MapStringNestedEnum[i] if !ok { return false } if vx != vy { return false } } if len(this.MapStringForeignEnum) != len(that.MapStringForeignEnum) { return false } for i, vx := range this.MapStringForeignEnum { vy, ok := that.MapStringForeignEnum[i] if !ok { return false } if vx != vy { return false } } if len(this.PackedInt32) != len(that.PackedInt32) { return false } for i, vx := range this.PackedInt32 { vy := that.PackedInt32[i] if vx != vy { return false } } if len(this.PackedInt64) != len(that.PackedInt64) { return false } for i, vx := range this.PackedInt64 { vy := that.PackedInt64[i] if vx != vy { return false } } if len(this.PackedUint32) != len(that.PackedUint32) { return false } for i, vx := range this.PackedUint32 { vy := that.PackedUint32[i] if vx != vy { return false } } if len(this.PackedUint64) != len(that.PackedUint64) { return false } for i, vx := range this.PackedUint64 { vy := that.PackedUint64[i] if vx != vy { return false } } if len(this.PackedSint32) != len(that.PackedSint32) { return false } for i, vx := range this.PackedSint32 { vy := that.PackedSint32[i] if vx != vy { return false } } if len(this.PackedSint64) != len(that.PackedSint64) { return false } for i, vx := range this.PackedSint64 { vy := that.PackedSint64[i] if vx != vy { return false } } if len(this.PackedFixed32) != len(that.PackedFixed32) { return false } for i, vx := range this.PackedFixed32 { vy := that.PackedFixed32[i] if vx != vy { return false } } if len(this.PackedFixed64) != len(that.PackedFixed64) { return false } for i, vx := range this.PackedFixed64 { vy := that.PackedFixed64[i] if vx != vy { return false } } if len(this.PackedSfixed32) != len(that.PackedSfixed32) { return false } for i, vx := range this.PackedSfixed32 { vy := that.PackedSfixed32[i] if vx != vy { return false } } if len(this.PackedSfixed64) != len(that.PackedSfixed64) { return false } for i, vx := range this.PackedSfixed64 { vy := that.PackedSfixed64[i] if vx != vy { return false } } if len(this.PackedFloat) != len(that.PackedFloat) { return false } for i, vx := range this.PackedFloat { vy := that.PackedFloat[i] if vx != vy { return false } } if len(this.PackedDouble) != len(that.PackedDouble) { return false } for i, vx := range this.PackedDouble { vy := that.PackedDouble[i] if vx != vy { return false } } if len(this.PackedBool) != len(that.PackedBool) { return false } for i, vx := range this.PackedBool { vy := that.PackedBool[i] if vx != vy { return false } } if len(this.PackedNestedEnum) != len(that.PackedNestedEnum) { return false } for i, vx := range this.PackedNestedEnum { vy := that.PackedNestedEnum[i] if vx != vy { return false } } if len(this.UnpackedInt32) != len(that.UnpackedInt32) { return false } for i, vx := range this.UnpackedInt32 { vy := that.UnpackedInt32[i] if vx != vy { return false } } if len(this.UnpackedInt64) != len(that.UnpackedInt64) { return false } for i, vx := range this.UnpackedInt64 { vy := that.UnpackedInt64[i] if vx != vy { return false } } if len(this.UnpackedUint32) != len(that.UnpackedUint32) { return false } for i, vx := range this.UnpackedUint32 { vy := that.UnpackedUint32[i] if vx != vy { return false } } if len(this.UnpackedUint64) != len(that.UnpackedUint64) { return false } for i, vx := range this.UnpackedUint64 { vy := that.UnpackedUint64[i] if vx != vy { return false } } if len(this.UnpackedSint32) != len(that.UnpackedSint32) { return false } for i, vx := range this.UnpackedSint32 { vy := that.UnpackedSint32[i] if vx != vy { return false } } if len(this.UnpackedSint64) != len(that.UnpackedSint64) { return false } for i, vx := range this.UnpackedSint64 { vy := that.UnpackedSint64[i] if vx != vy { return false } } if len(this.UnpackedFixed32) != len(that.UnpackedFixed32) { return false } for i, vx := range this.UnpackedFixed32 { vy := that.UnpackedFixed32[i] if vx != vy { return false } } if len(this.UnpackedFixed64) != len(that.UnpackedFixed64) { return false } for i, vx := range this.UnpackedFixed64 { vy := that.UnpackedFixed64[i] if vx != vy { return false } } if len(this.UnpackedSfixed32) != len(that.UnpackedSfixed32) { return false } for i, vx := range this.UnpackedSfixed32 { vy := that.UnpackedSfixed32[i] if vx != vy { return false } } if len(this.UnpackedSfixed64) != len(that.UnpackedSfixed64) { return false } for i, vx := range this.UnpackedSfixed64 { vy := that.UnpackedSfixed64[i] if vx != vy { return false } } if len(this.UnpackedFloat) != len(that.UnpackedFloat) { return false } for i, vx := range this.UnpackedFloat { vy := that.UnpackedFloat[i] if vx != vy { return false } } if len(this.UnpackedDouble) != len(that.UnpackedDouble) { return false } for i, vx := range this.UnpackedDouble { vy := that.UnpackedDouble[i] if vx != vy { return false } } if len(this.UnpackedBool) != len(that.UnpackedBool) { return false } for i, vx := range this.UnpackedBool { vy := that.UnpackedBool[i] if vx != vy { return false } } if len(this.UnpackedNestedEnum) != len(that.UnpackedNestedEnum) { return false } for i, vx := range this.UnpackedNestedEnum { vy := that.UnpackedNestedEnum[i] if vx != vy { return false } } if !this.Data.EqualVT(that.Data) { return false } if p, q := this.DefaultInt32, that.DefaultInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultInt64, that.DefaultInt64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultUint32, that.DefaultUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultUint64, that.DefaultUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultSint32, that.DefaultSint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultSint64, that.DefaultSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultFixed32, that.DefaultFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultFixed64, that.DefaultFixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultSfixed32, that.DefaultSfixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultSfixed64, that.DefaultSfixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultFloat, that.DefaultFloat; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultDouble, that.DefaultDouble; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultBool, that.DefaultBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultString, that.DefaultString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.DefaultBytes, that.DefaultBytes; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { return false } if p, q := this.Fieldname1, that.Fieldname1; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.FieldName2, that.FieldName2; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.XFieldName3, that.XFieldName3; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.Field_Name4_, that.Field_Name4_; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.Field0Name5, that.Field0Name5; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.Field_0Name6, that.Field_0Name6; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.FieldName7, that.FieldName7; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.FieldName8, that.FieldName8; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.Field_Name9, that.Field_Name9; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.Field_Name10, that.Field_Name10; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.FIELD_NAME11, that.FIELD_NAME11; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.FIELDName12, that.FIELDName12; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.XFieldName13, that.XFieldName13; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.X_FieldName14, that.X_FieldName14; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.Field_Name15, that.Field_Name15; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.Field__Name16, that.Field__Name16; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.FieldName17__, that.FieldName17__; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.FieldName18__, that.FieldName18__; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestAllTypesProto2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestAllTypesProto2) if !ok { return false } return this.EqualVT(that) } func (this *TestAllTypesProto2_OneofUint32) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofUint32) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofUint32 != that.OneofUint32 { return false } return true } func (this *TestAllTypesProto2_OneofNestedMessage) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofNestedMessage) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.OneofNestedMessage, that.OneofNestedMessage; p != q { if p == nil { p = &TestAllTypesProto2_NestedMessage{} } if q == nil { q = &TestAllTypesProto2_NestedMessage{} } if !p.EqualVT(q) { return false } } return true } func (this *TestAllTypesProto2_OneofString) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofString) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofString != that.OneofString { return false } return true } func (this *TestAllTypesProto2_OneofBytes) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofBytes) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if string(this.OneofBytes) != string(that.OneofBytes) { return false } return true } func (this *TestAllTypesProto2_OneofBool) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofBool) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofBool != that.OneofBool { return false } return true } func (this *TestAllTypesProto2_OneofUint64) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofUint64) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofUint64 != that.OneofUint64 { return false } return true } func (this *TestAllTypesProto2_OneofFloat) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofFloat) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofFloat != that.OneofFloat { return false } return true } func (this *TestAllTypesProto2_OneofDouble) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofDouble) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofDouble != that.OneofDouble { return false } return true } func (this *TestAllTypesProto2_OneofEnum) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto2_OneofEnum) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofEnum != that.OneofEnum { return false } return true } func (this *ForeignMessageProto2) EqualVT(that *ForeignMessageProto2) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.C, that.C; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *ForeignMessageProto2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*ForeignMessageProto2) if !ok { return false } return this.EqualVT(that) } func (this *UnknownToTestAllTypes_OptionalGroup) EqualVT(that *UnknownToTestAllTypes_OptionalGroup) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.A, that.A; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *UnknownToTestAllTypes_OptionalGroup) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*UnknownToTestAllTypes_OptionalGroup) if !ok { return false } return this.EqualVT(that) } func (this *UnknownToTestAllTypes) EqualVT(that *UnknownToTestAllTypes) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.OptionalInt32, that.OptionalInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalString, that.OptionalString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if !this.NestedMessage.EqualVT(that.NestedMessage) { return false } if !this.Optionalgroup.EqualVT(that.Optionalgroup) { return false } if p, q := this.OptionalBool, that.OptionalBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedInt32) != len(that.RepeatedInt32) { return false } for i, vx := range this.RepeatedInt32 { vy := that.RepeatedInt32[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *UnknownToTestAllTypes) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*UnknownToTestAllTypes) if !ok { return false } return this.EqualVT(that) } func (this *NullHypothesisProto2) EqualVT(that *NullHypothesisProto2) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *NullHypothesisProto2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*NullHypothesisProto2) if !ok { return false } return this.EqualVT(that) } func (this *EnumOnlyProto2) EqualVT(that *EnumOnlyProto2) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *EnumOnlyProto2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*EnumOnlyProto2) if !ok { return false } return this.EqualVT(that) } func (this *OneStringProto2) EqualVT(that *OneStringProto2) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.Data, that.Data; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *OneStringProto2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*OneStringProto2) if !ok { return false } return this.EqualVT(that) } func (m *TestAllTypesProto2_NestedMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_NestedMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_NestedMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Corecursive != nil { size, err := m.Corecursive.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.A != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_Data) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_Data) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_Data) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.GroupUint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xd8 } if m.GroupInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xd0 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_MessageSetCorrect) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_MessageSetCorrect) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_MessageSetCorrect) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Str != nil { i -= len(*m.Str) copy(dAtA[i:], *m.Str) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Str))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.I != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.I)) i-- dAtA[i] = 0x48 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if vtmsg, ok := m.OneofField.(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size } if m.FieldName18__ != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName18__)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x90 } if m.FieldName17__ != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName17__)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x88 } if m.Field__Name16 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field__Name16)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x80 } if m.Field_Name15 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name15)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xf8 } if m.X_FieldName14 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.X_FieldName14)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xf0 } if m.XFieldName13 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName13)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xe8 } if m.FIELDName12 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELDName12)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xe0 } if m.FIELD_NAME11 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELD_NAME11)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xd8 } if m.Field_Name10 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name10)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xd0 } if m.Field_Name9 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name9)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xc8 } if m.FieldName8 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName8)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xc0 } if m.FieldName7 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName7)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xb8 } if m.Field_0Name6 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_0Name6)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xb0 } if m.Field0Name5 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field0Name5)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xa8 } if m.Field_Name4_ != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name4_)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xa0 } if m.XFieldName3 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName3)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x98 } if m.FieldName2 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName2)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x90 } if m.Fieldname1 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Fieldname1)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x88 } if m.DefaultBytes != nil { i -= len(m.DefaultBytes) copy(dAtA[i:], m.DefaultBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefaultBytes))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xfa } if m.DefaultString != nil { i -= len(*m.DefaultString) copy(dAtA[i:], *m.DefaultString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.DefaultString))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xf2 } if m.DefaultBool != nil { i-- if *m.DefaultBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0xf i-- dAtA[i] = 0xe8 } if m.DefaultDouble != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.DefaultDouble)))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xe1 } if m.DefaultFloat != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.DefaultFloat)))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xdd } if m.DefaultSfixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultSfixed64)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xd1 } if m.DefaultSfixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultSfixed32)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xcd } if m.DefaultFixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultFixed64)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xc1 } if m.DefaultFixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultFixed32)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xbd } if m.DefaultSint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.DefaultSint64)<<1)^uint64((*m.DefaultSint64>>63)))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xb0 } if m.DefaultSint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.DefaultSint32)<<1)^uint32((*m.DefaultSint32>>31)))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xa8 } if m.DefaultUint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint64)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xa0 } if m.DefaultUint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint32)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0x98 } if m.DefaultInt64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt64)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0x90 } if m.DefaultInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt32)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0x88 } if m.Data != nil { i-- dAtA[i] = 0xc i-- dAtA[i] = 0xcc size, err := m.Data.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i-- dAtA[i] = 0xc i-- dAtA[i] = 0xcb } if len(m.UnpackedNestedEnum) > 0 { for iNdEx := len(m.UnpackedNestedEnum) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedNestedEnum[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xb0 } } if len(m.UnpackedBool) > 0 { for iNdEx := len(m.UnpackedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.UnpackedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xa8 } } if len(m.UnpackedDouble) > 0 { for iNdEx := len(m.UnpackedDouble) - 1; iNdEx >= 0; iNdEx-- { f1 := math.Float64bits(float64(m.UnpackedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xa1 } } if len(m.UnpackedFloat) > 0 { for iNdEx := len(m.UnpackedFloat) - 1; iNdEx >= 0; iNdEx-- { f2 := math.Float32bits(float32(m.UnpackedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x9d } } if len(m.UnpackedSfixed64) > 0 { for iNdEx := len(m.UnpackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedSfixed64[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x91 } } if len(m.UnpackedSfixed32) > 0 { for iNdEx := len(m.UnpackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedSfixed32[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x8d } } if len(m.UnpackedFixed64) > 0 { for iNdEx := len(m.UnpackedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedFixed64[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x81 } } if len(m.UnpackedFixed32) > 0 { for iNdEx := len(m.UnpackedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedFixed32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xfd } } if len(m.UnpackedSint64) > 0 { for iNdEx := len(m.UnpackedSint64) - 1; iNdEx >= 0; iNdEx-- { x3 := (uint64(m.UnpackedSint64[iNdEx]) << 1) ^ uint64((m.UnpackedSint64[iNdEx] >> 63)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x3)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xf0 } } if len(m.UnpackedSint32) > 0 { for iNdEx := len(m.UnpackedSint32) - 1; iNdEx >= 0; iNdEx-- { x4 := (uint32(m.UnpackedSint32[iNdEx]) << 1) ^ uint32((m.UnpackedSint32[iNdEx] >> 31)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xe8 } } if len(m.UnpackedUint64) > 0 { for iNdEx := len(m.UnpackedUint64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint64[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xe0 } } if len(m.UnpackedUint32) > 0 { for iNdEx := len(m.UnpackedUint32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xd8 } } if len(m.UnpackedInt64) > 0 { for iNdEx := len(m.UnpackedInt64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt64[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xd0 } } if len(m.UnpackedInt32) > 0 { for iNdEx := len(m.UnpackedInt32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xc8 } } if len(m.PackedNestedEnum) > 0 { var pksize6 int for _, num := range m.PackedNestedEnum { pksize6 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize6 j5 := i for _, num1 := range m.PackedNestedEnum { num := uint64(num1) for num >= 1<<7 { dAtA[j5] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j5++ } dAtA[j5] = uint8(num) j5++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize6)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xc2 } if len(m.PackedBool) > 0 { for iNdEx := len(m.PackedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.PackedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedBool))) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xba } if len(m.PackedDouble) > 0 { for iNdEx := len(m.PackedDouble) - 1; iNdEx >= 0; iNdEx-- { f7 := math.Float64bits(float64(m.PackedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f7)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedDouble)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xb2 } if len(m.PackedFloat) > 0 { for iNdEx := len(m.PackedFloat) - 1; iNdEx >= 0; iNdEx-- { f8 := math.Float32bits(float32(m.PackedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f8)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFloat)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xaa } if len(m.PackedSfixed64) > 0 { for iNdEx := len(m.PackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedSfixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedSfixed64)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xa2 } if len(m.PackedSfixed32) > 0 { for iNdEx := len(m.PackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedSfixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedSfixed32)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x9a } if len(m.PackedFixed64) > 0 { for iNdEx := len(m.PackedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedFixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFixed64)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x92 } if len(m.PackedFixed32) > 0 { for iNdEx := len(m.PackedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedFixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFixed32)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x8a } if len(m.PackedSint64) > 0 { var pksize10 int for _, num := range m.PackedSint64 { pksize10 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize10 j9 := i for _, num := range m.PackedSint64 { x11 := (uint64(num) << 1) ^ uint64((num >> 63)) for x11 >= 1<<7 { dAtA[j9] = uint8(uint64(x11)&0x7f | 0x80) j9++ x11 >>= 7 } dAtA[j9] = uint8(x11) j9++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize10)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x82 } if len(m.PackedSint32) > 0 { var pksize13 int for _, num := range m.PackedSint32 { pksize13 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize13 j12 := i for _, num := range m.PackedSint32 { x14 := (uint32(num) << 1) ^ uint32((num >> 31)) for x14 >= 1<<7 { dAtA[j12] = uint8(uint64(x14)&0x7f | 0x80) j12++ x14 >>= 7 } dAtA[j12] = uint8(x14) j12++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize13)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xfa } if len(m.PackedUint64) > 0 { var pksize16 int for _, num := range m.PackedUint64 { pksize16 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize16 j15 := i for _, num := range m.PackedUint64 { for num >= 1<<7 { dAtA[j15] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j15++ } dAtA[j15] = uint8(num) j15++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize16)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xf2 } if len(m.PackedUint32) > 0 { var pksize18 int for _, num := range m.PackedUint32 { pksize18 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize18 j17 := i for _, num := range m.PackedUint32 { for num >= 1<<7 { dAtA[j17] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j17++ } dAtA[j17] = uint8(num) j17++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize18)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xea } if len(m.PackedInt64) > 0 { var pksize20 int for _, num := range m.PackedInt64 { pksize20 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize20 j19 := i for _, num1 := range m.PackedInt64 { num := uint64(num1) for num >= 1<<7 { dAtA[j19] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j19++ } dAtA[j19] = uint8(num) j19++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize20)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xe2 } if len(m.PackedInt32) > 0 { var pksize22 int for _, num := range m.PackedInt32 { pksize22 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize22 j21 := i for _, num1 := range m.PackedInt32 { num := uint64(num1) for num >= 1<<7 { dAtA[j21] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j21++ } dAtA[j21] = uint8(num) j21++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize22)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xda } if len(m.MapStringForeignEnum) > 0 { for k := range m.MapStringForeignEnum { v := m.MapStringForeignEnum[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xd2 } } if len(m.MapStringNestedEnum) > 0 { for k := range m.MapStringNestedEnum { v := m.MapStringNestedEnum[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xca } } if len(m.MapStringForeignMessage) > 0 { for k := range m.MapStringForeignMessage { v := m.MapStringForeignMessage[k] baseI := i size, err := v.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xc2 } } if len(m.MapStringNestedMessage) > 0 { for k := range m.MapStringNestedMessage { v := m.MapStringNestedMessage[k] baseI := i size, err := v.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xba } } if len(m.MapStringBytes) > 0 { for k := range m.MapStringBytes { v := m.MapStringBytes[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xb2 } } if len(m.MapStringString) > 0 { for k := range m.MapStringString { v := m.MapStringString[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xaa } } if len(m.MapBoolBool) > 0 { for k := range m.MapBoolBool { v := m.MapBoolBool[k] baseI := i i-- if v { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 i-- if k { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xa2 } } if len(m.MapInt32Double) > 0 { for k := range m.MapInt32Double { v := m.MapInt32Double[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) i-- dAtA[i] = 0x11 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x9a } } if len(m.MapInt32Float) > 0 { for k := range m.MapInt32Float { v := m.MapInt32Float[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) i-- dAtA[i] = 0x15 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x92 } } if len(m.MapSfixed64Sfixed64) > 0 { for k := range m.MapSfixed64Sfixed64 { v := m.MapSfixed64Sfixed64[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) i-- dAtA[i] = 0x11 i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- dAtA[i] = 0x9 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x8a } } if len(m.MapSfixed32Sfixed32) > 0 { for k := range m.MapSfixed32Sfixed32 { v := m.MapSfixed32Sfixed32[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) i-- dAtA[i] = 0x15 i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- dAtA[i] = 0xd i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x82 } } if len(m.MapFixed64Fixed64) > 0 { for k := range m.MapFixed64Fixed64 { v := m.MapFixed64Fixed64[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) i-- dAtA[i] = 0x11 i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- dAtA[i] = 0x9 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xfa } } if len(m.MapFixed32Fixed32) > 0 { for k := range m.MapFixed32Fixed32 { v := m.MapFixed32Fixed32[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) i-- dAtA[i] = 0x15 i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- dAtA[i] = 0xd i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xf2 } } if len(m.MapSint64Sint64) > 0 { for k := range m.MapSint64Sint64 { v := m.MapSint64Sint64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xea } } if len(m.MapSint32Sint32) > 0 { for k := range m.MapSint32Sint32 { v := m.MapSint32Sint32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xe2 } } if len(m.MapUint64Uint64) > 0 { for k := range m.MapUint64Uint64 { v := m.MapUint64Uint64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xda } } if len(m.MapUint32Uint32) > 0 { for k := range m.MapUint32Uint32 { v := m.MapUint32Uint32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xd2 } } if len(m.MapInt64Int64) > 0 { for k := range m.MapInt64Int64 { v := m.MapInt64Int64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xca } } if len(m.MapInt32Int32) > 0 { for k := range m.MapInt32Int32 { v := m.MapInt32Int32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xc2 } } if len(m.RepeatedCord) > 0 { for iNdEx := len(m.RepeatedCord) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedCord[iNdEx]) copy(dAtA[i:], m.RepeatedCord[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedCord[iNdEx]))) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xba } } if len(m.RepeatedStringPiece) > 0 { for iNdEx := len(m.RepeatedStringPiece) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedStringPiece[iNdEx]) copy(dAtA[i:], m.RepeatedStringPiece[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedStringPiece[iNdEx]))) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xb2 } } if len(m.RepeatedForeignEnum) > 0 { for iNdEx := len(m.RepeatedForeignEnum) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedForeignEnum[iNdEx])) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xa0 } } if len(m.RepeatedNestedEnum) > 0 { for iNdEx := len(m.RepeatedNestedEnum) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedNestedEnum[iNdEx])) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x98 } } if len(m.RepeatedForeignMessage) > 0 { for iNdEx := len(m.RepeatedForeignMessage) - 1; iNdEx >= 0; iNdEx-- { size, err := m.RepeatedForeignMessage[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x8a } } if len(m.RepeatedNestedMessage) > 0 { for iNdEx := len(m.RepeatedNestedMessage) - 1; iNdEx >= 0; iNdEx-- { size, err := m.RepeatedNestedMessage[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x82 } } if len(m.RepeatedBytes) > 0 { for iNdEx := len(m.RepeatedBytes) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedBytes[iNdEx]) copy(dAtA[i:], m.RepeatedBytes[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedBytes[iNdEx]))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xea } } if len(m.RepeatedString) > 0 { for iNdEx := len(m.RepeatedString) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedString[iNdEx]) copy(dAtA[i:], m.RepeatedString[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedString[iNdEx]))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xe2 } } if len(m.RepeatedBool) > 0 { for iNdEx := len(m.RepeatedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.RepeatedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xd8 } } if len(m.RepeatedDouble) > 0 { for iNdEx := len(m.RepeatedDouble) - 1; iNdEx >= 0; iNdEx-- { f23 := math.Float64bits(float64(m.RepeatedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f23)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xd1 } } if len(m.RepeatedFloat) > 0 { for iNdEx := len(m.RepeatedFloat) - 1; iNdEx >= 0; iNdEx-- { f24 := math.Float32bits(float32(m.RepeatedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f24)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xcd } } if len(m.RepeatedSfixed64) > 0 { for iNdEx := len(m.RepeatedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedSfixed64[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xc1 } } if len(m.RepeatedSfixed32) > 0 { for iNdEx := len(m.RepeatedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedSfixed32[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xbd } } if len(m.RepeatedFixed64) > 0 { for iNdEx := len(m.RepeatedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedFixed64[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xb1 } } if len(m.RepeatedFixed32) > 0 { for iNdEx := len(m.RepeatedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedFixed32[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xad } } if len(m.RepeatedSint64) > 0 { for iNdEx := len(m.RepeatedSint64) - 1; iNdEx >= 0; iNdEx-- { x25 := (uint64(m.RepeatedSint64[iNdEx]) << 1) ^ uint64((m.RepeatedSint64[iNdEx] >> 63)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x25)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xa0 } } if len(m.RepeatedSint32) > 0 { for iNdEx := len(m.RepeatedSint32) - 1; iNdEx >= 0; iNdEx-- { x26 := (uint32(m.RepeatedSint32[iNdEx]) << 1) ^ uint32((m.RepeatedSint32[iNdEx] >> 31)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x26)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x98 } } if len(m.RepeatedUint64) > 0 { for iNdEx := len(m.RepeatedUint64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedUint64[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x90 } } if len(m.RepeatedUint32) > 0 { for iNdEx := len(m.RepeatedUint32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedUint32[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x88 } } if len(m.RepeatedInt64) > 0 { for iNdEx := len(m.RepeatedInt64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedInt64[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x80 } } if len(m.RepeatedInt32) > 0 { for iNdEx := len(m.RepeatedInt32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedInt32[iNdEx])) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xf8 } } if m.RecursiveMessage != nil { size, err := m.RecursiveMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xda } if m.OptionalCord != nil { i -= len(*m.OptionalCord) copy(dAtA[i:], *m.OptionalCord) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalCord))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } if m.OptionalStringPiece != nil { i -= len(*m.OptionalStringPiece) copy(dAtA[i:], *m.OptionalStringPiece) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalStringPiece))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xc2 } if m.OptionalForeignEnum != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalForeignEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb0 } if m.OptionalNestedEnum != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalNestedEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa8 } if m.OptionalForeignMessage != nil { size, err := m.OptionalForeignMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x9a } if m.OptionalNestedMessage != nil { size, err := m.OptionalNestedMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x92 } if m.OptionalBytes != nil { i -= len(m.OptionalBytes) copy(dAtA[i:], m.OptionalBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalBytes))) i-- dAtA[i] = 0x7a } if m.OptionalString != nil { i -= len(*m.OptionalString) copy(dAtA[i:], *m.OptionalString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalString))) i-- dAtA[i] = 0x72 } if m.OptionalBool != nil { i-- if *m.OptionalBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x68 } if m.OptionalDouble != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.OptionalDouble)))) i-- dAtA[i] = 0x61 } if m.OptionalFloat != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.OptionalFloat)))) i-- dAtA[i] = 0x5d } if m.OptionalSfixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalSfixed64)) i-- dAtA[i] = 0x51 } if m.OptionalSfixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalSfixed32)) i-- dAtA[i] = 0x4d } if m.OptionalFixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalFixed64)) i-- dAtA[i] = 0x41 } if m.OptionalFixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalFixed32)) i-- dAtA[i] = 0x3d } if m.OptionalSint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.OptionalSint64)<<1)^uint64((*m.OptionalSint64>>63)))) i-- dAtA[i] = 0x30 } if m.OptionalSint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.OptionalSint32)<<1)^uint32((*m.OptionalSint32>>31)))) i-- dAtA[i] = 0x28 } if m.OptionalUint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint64)) i-- dAtA[i] = 0x20 } if m.OptionalUint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint32)) i-- dAtA[i] = 0x18 } if m.OptionalInt64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt64)) i-- dAtA[i] = 0x10 } if m.OptionalInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt32)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofUint32) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofUint32) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint32)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xf8 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.OneofNestedMessage != nil { size, err := m.OneofNestedMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x82 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofString) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofString) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofString) copy(dAtA[i:], m.OneofString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OneofString))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x8a return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofBytes) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofBytes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofBytes) copy(dAtA[i:], m.OneofBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OneofBytes))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x92 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofBool) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofBool) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i-- if m.OneofBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x98 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofUint64) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofUint64) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint64)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xa0 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofFloat) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofFloat) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.OneofFloat)))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xad return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofDouble) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofDouble) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OneofDouble)))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xb1 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofEnum) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto2_OneofEnum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofEnum)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xb8 return len(dAtA) - i, nil } func (m *ForeignMessageProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ForeignMessageProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ForeignMessageProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.C != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.C)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UnknownToTestAllTypes_OptionalGroup) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.A != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UnknownToTestAllTypes) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnknownToTestAllTypes) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnknownToTestAllTypes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.RepeatedInt32) > 0 { for iNdEx := len(m.RepeatedInt32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedInt32[iNdEx])) i-- dAtA[i] = 0x3f i-- dAtA[i] = 0x98 } } if m.OptionalBool != nil { i-- if *m.OptionalBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xf0 } if m.Optionalgroup != nil { i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xe4 size, err := m.Optionalgroup.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xe3 } if m.NestedMessage != nil { size, err := m.NestedMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xda } if m.OptionalString != nil { i -= len(*m.OptionalString) copy(dAtA[i:], *m.OptionalString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalString))) i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xd2 } if m.OptionalInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt32)) i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xc8 } return len(dAtA) - i, nil } func (m *NullHypothesisProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *NullHypothesisProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *NullHypothesisProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *EnumOnlyProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *EnumOnlyProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *EnumOnlyProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *OneStringProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneStringProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneStringProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Data != nil { i -= len(*m.Data) copy(dAtA[i:], *m.Data) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Data))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_NestedMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_NestedMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_NestedMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Corecursive != nil { size, err := m.Corecursive.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.A != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_Data) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_Data) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_Data) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.GroupUint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xd8 } if m.GroupInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xd0 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_MessageSetCorrect) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_MessageSetCorrect) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_MessageSetCorrect) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Str != nil { i -= len(*m.Str) copy(dAtA[i:], *m.Str) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Str))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.I != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.I)) i-- dAtA[i] = 0x48 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.FieldName18__ != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName18__)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x90 } if m.FieldName17__ != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName17__)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x88 } if m.Field__Name16 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field__Name16)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x80 } if m.Field_Name15 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name15)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xf8 } if m.X_FieldName14 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.X_FieldName14)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xf0 } if m.XFieldName13 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName13)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xe8 } if m.FIELDName12 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELDName12)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xe0 } if m.FIELD_NAME11 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELD_NAME11)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xd8 } if m.Field_Name10 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name10)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xd0 } if m.Field_Name9 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name9)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xc8 } if m.FieldName8 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName8)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xc0 } if m.FieldName7 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName7)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xb8 } if m.Field_0Name6 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_0Name6)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xb0 } if m.Field0Name5 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field0Name5)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xa8 } if m.Field_Name4_ != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name4_)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xa0 } if m.XFieldName3 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName3)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x98 } if m.FieldName2 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName2)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x90 } if m.Fieldname1 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Fieldname1)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x88 } if m.DefaultBytes != nil { i -= len(m.DefaultBytes) copy(dAtA[i:], m.DefaultBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefaultBytes))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xfa } if m.DefaultString != nil { i -= len(*m.DefaultString) copy(dAtA[i:], *m.DefaultString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.DefaultString))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xf2 } if m.DefaultBool != nil { i-- if *m.DefaultBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0xf i-- dAtA[i] = 0xe8 } if m.DefaultDouble != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.DefaultDouble)))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xe1 } if m.DefaultFloat != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.DefaultFloat)))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xdd } if m.DefaultSfixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultSfixed64)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xd1 } if m.DefaultSfixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultSfixed32)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xcd } if m.DefaultFixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultFixed64)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xc1 } if m.DefaultFixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultFixed32)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xbd } if m.DefaultSint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.DefaultSint64)<<1)^uint64((*m.DefaultSint64>>63)))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xb0 } if m.DefaultSint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.DefaultSint32)<<1)^uint32((*m.DefaultSint32>>31)))) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xa8 } if m.DefaultUint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint64)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0xa0 } if m.DefaultUint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint32)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0x98 } if m.DefaultInt64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt64)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0x90 } if m.DefaultInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt32)) i-- dAtA[i] = 0xf i-- dAtA[i] = 0x88 } if m.Data != nil { i-- dAtA[i] = 0xc i-- dAtA[i] = 0xcc size, err := m.Data.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i-- dAtA[i] = 0xc i-- dAtA[i] = 0xcb } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofEnum); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofDouble); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofFloat); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofUint64); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofBool); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofBytes); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofString); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofNestedMessage); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofUint32); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if len(m.UnpackedNestedEnum) > 0 { for iNdEx := len(m.UnpackedNestedEnum) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedNestedEnum[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xb0 } } if len(m.UnpackedBool) > 0 { for iNdEx := len(m.UnpackedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.UnpackedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xa8 } } if len(m.UnpackedDouble) > 0 { for iNdEx := len(m.UnpackedDouble) - 1; iNdEx >= 0; iNdEx-- { f1 := math.Float64bits(float64(m.UnpackedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xa1 } } if len(m.UnpackedFloat) > 0 { for iNdEx := len(m.UnpackedFloat) - 1; iNdEx >= 0; iNdEx-- { f2 := math.Float32bits(float32(m.UnpackedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x9d } } if len(m.UnpackedSfixed64) > 0 { for iNdEx := len(m.UnpackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedSfixed64[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x91 } } if len(m.UnpackedSfixed32) > 0 { for iNdEx := len(m.UnpackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedSfixed32[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x8d } } if len(m.UnpackedFixed64) > 0 { for iNdEx := len(m.UnpackedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedFixed64[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x81 } } if len(m.UnpackedFixed32) > 0 { for iNdEx := len(m.UnpackedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedFixed32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xfd } } if len(m.UnpackedSint64) > 0 { for iNdEx := len(m.UnpackedSint64) - 1; iNdEx >= 0; iNdEx-- { x3 := (uint64(m.UnpackedSint64[iNdEx]) << 1) ^ uint64((m.UnpackedSint64[iNdEx] >> 63)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x3)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xf0 } } if len(m.UnpackedSint32) > 0 { for iNdEx := len(m.UnpackedSint32) - 1; iNdEx >= 0; iNdEx-- { x4 := (uint32(m.UnpackedSint32[iNdEx]) << 1) ^ uint32((m.UnpackedSint32[iNdEx] >> 31)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xe8 } } if len(m.UnpackedUint64) > 0 { for iNdEx := len(m.UnpackedUint64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint64[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xe0 } } if len(m.UnpackedUint32) > 0 { for iNdEx := len(m.UnpackedUint32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xd8 } } if len(m.UnpackedInt64) > 0 { for iNdEx := len(m.UnpackedInt64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt64[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xd0 } } if len(m.UnpackedInt32) > 0 { for iNdEx := len(m.UnpackedInt32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xc8 } } if len(m.PackedNestedEnum) > 0 { var pksize6 int for _, num := range m.PackedNestedEnum { pksize6 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize6 j5 := i for _, num1 := range m.PackedNestedEnum { num := uint64(num1) for num >= 1<<7 { dAtA[j5] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j5++ } dAtA[j5] = uint8(num) j5++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize6)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xc2 } if len(m.PackedBool) > 0 { for iNdEx := len(m.PackedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.PackedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedBool))) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xba } if len(m.PackedDouble) > 0 { for iNdEx := len(m.PackedDouble) - 1; iNdEx >= 0; iNdEx-- { f7 := math.Float64bits(float64(m.PackedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f7)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedDouble)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xb2 } if len(m.PackedFloat) > 0 { for iNdEx := len(m.PackedFloat) - 1; iNdEx >= 0; iNdEx-- { f8 := math.Float32bits(float32(m.PackedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f8)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFloat)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xaa } if len(m.PackedSfixed64) > 0 { for iNdEx := len(m.PackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedSfixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedSfixed64)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xa2 } if len(m.PackedSfixed32) > 0 { for iNdEx := len(m.PackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedSfixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedSfixed32)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x9a } if len(m.PackedFixed64) > 0 { for iNdEx := len(m.PackedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedFixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFixed64)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x92 } if len(m.PackedFixed32) > 0 { for iNdEx := len(m.PackedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedFixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFixed32)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x8a } if len(m.PackedSint64) > 0 { var pksize10 int for _, num := range m.PackedSint64 { pksize10 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize10 j9 := i for _, num := range m.PackedSint64 { x11 := (uint64(num) << 1) ^ uint64((num >> 63)) for x11 >= 1<<7 { dAtA[j9] = uint8(uint64(x11)&0x7f | 0x80) j9++ x11 >>= 7 } dAtA[j9] = uint8(x11) j9++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize10)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x82 } if len(m.PackedSint32) > 0 { var pksize13 int for _, num := range m.PackedSint32 { pksize13 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize13 j12 := i for _, num := range m.PackedSint32 { x14 := (uint32(num) << 1) ^ uint32((num >> 31)) for x14 >= 1<<7 { dAtA[j12] = uint8(uint64(x14)&0x7f | 0x80) j12++ x14 >>= 7 } dAtA[j12] = uint8(x14) j12++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize13)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xfa } if len(m.PackedUint64) > 0 { var pksize16 int for _, num := range m.PackedUint64 { pksize16 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize16 j15 := i for _, num := range m.PackedUint64 { for num >= 1<<7 { dAtA[j15] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j15++ } dAtA[j15] = uint8(num) j15++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize16)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xf2 } if len(m.PackedUint32) > 0 { var pksize18 int for _, num := range m.PackedUint32 { pksize18 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize18 j17 := i for _, num := range m.PackedUint32 { for num >= 1<<7 { dAtA[j17] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j17++ } dAtA[j17] = uint8(num) j17++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize18)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xea } if len(m.PackedInt64) > 0 { var pksize20 int for _, num := range m.PackedInt64 { pksize20 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize20 j19 := i for _, num1 := range m.PackedInt64 { num := uint64(num1) for num >= 1<<7 { dAtA[j19] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j19++ } dAtA[j19] = uint8(num) j19++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize20)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xe2 } if len(m.PackedInt32) > 0 { var pksize22 int for _, num := range m.PackedInt32 { pksize22 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize22 j21 := i for _, num1 := range m.PackedInt32 { num := uint64(num1) for num >= 1<<7 { dAtA[j21] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j21++ } dAtA[j21] = uint8(num) j21++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize22)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xda } if len(m.MapStringForeignEnum) > 0 { for k := range m.MapStringForeignEnum { v := m.MapStringForeignEnum[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xd2 } } if len(m.MapStringNestedEnum) > 0 { for k := range m.MapStringNestedEnum { v := m.MapStringNestedEnum[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xca } } if len(m.MapStringForeignMessage) > 0 { for k := range m.MapStringForeignMessage { v := m.MapStringForeignMessage[k] baseI := i size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xc2 } } if len(m.MapStringNestedMessage) > 0 { for k := range m.MapStringNestedMessage { v := m.MapStringNestedMessage[k] baseI := i size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xba } } if len(m.MapStringBytes) > 0 { for k := range m.MapStringBytes { v := m.MapStringBytes[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xb2 } } if len(m.MapStringString) > 0 { for k := range m.MapStringString { v := m.MapStringString[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xaa } } if len(m.MapBoolBool) > 0 { for k := range m.MapBoolBool { v := m.MapBoolBool[k] baseI := i i-- if v { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 i-- if k { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xa2 } } if len(m.MapInt32Double) > 0 { for k := range m.MapInt32Double { v := m.MapInt32Double[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) i-- dAtA[i] = 0x11 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x9a } } if len(m.MapInt32Float) > 0 { for k := range m.MapInt32Float { v := m.MapInt32Float[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) i-- dAtA[i] = 0x15 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x92 } } if len(m.MapSfixed64Sfixed64) > 0 { for k := range m.MapSfixed64Sfixed64 { v := m.MapSfixed64Sfixed64[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) i-- dAtA[i] = 0x11 i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- dAtA[i] = 0x9 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x8a } } if len(m.MapSfixed32Sfixed32) > 0 { for k := range m.MapSfixed32Sfixed32 { v := m.MapSfixed32Sfixed32[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) i-- dAtA[i] = 0x15 i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- dAtA[i] = 0xd i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x82 } } if len(m.MapFixed64Fixed64) > 0 { for k := range m.MapFixed64Fixed64 { v := m.MapFixed64Fixed64[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) i-- dAtA[i] = 0x11 i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- dAtA[i] = 0x9 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xfa } } if len(m.MapFixed32Fixed32) > 0 { for k := range m.MapFixed32Fixed32 { v := m.MapFixed32Fixed32[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) i-- dAtA[i] = 0x15 i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- dAtA[i] = 0xd i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xf2 } } if len(m.MapSint64Sint64) > 0 { for k := range m.MapSint64Sint64 { v := m.MapSint64Sint64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xea } } if len(m.MapSint32Sint32) > 0 { for k := range m.MapSint32Sint32 { v := m.MapSint32Sint32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xe2 } } if len(m.MapUint64Uint64) > 0 { for k := range m.MapUint64Uint64 { v := m.MapUint64Uint64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xda } } if len(m.MapUint32Uint32) > 0 { for k := range m.MapUint32Uint32 { v := m.MapUint32Uint32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xd2 } } if len(m.MapInt64Int64) > 0 { for k := range m.MapInt64Int64 { v := m.MapInt64Int64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xca } } if len(m.MapInt32Int32) > 0 { for k := range m.MapInt32Int32 { v := m.MapInt32Int32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xc2 } } if len(m.RepeatedCord) > 0 { for iNdEx := len(m.RepeatedCord) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedCord[iNdEx]) copy(dAtA[i:], m.RepeatedCord[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedCord[iNdEx]))) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xba } } if len(m.RepeatedStringPiece) > 0 { for iNdEx := len(m.RepeatedStringPiece) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedStringPiece[iNdEx]) copy(dAtA[i:], m.RepeatedStringPiece[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedStringPiece[iNdEx]))) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xb2 } } if len(m.RepeatedForeignEnum) > 0 { for iNdEx := len(m.RepeatedForeignEnum) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedForeignEnum[iNdEx])) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xa0 } } if len(m.RepeatedNestedEnum) > 0 { for iNdEx := len(m.RepeatedNestedEnum) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedNestedEnum[iNdEx])) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x98 } } if len(m.RepeatedForeignMessage) > 0 { for iNdEx := len(m.RepeatedForeignMessage) - 1; iNdEx >= 0; iNdEx-- { size, err := m.RepeatedForeignMessage[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x8a } } if len(m.RepeatedNestedMessage) > 0 { for iNdEx := len(m.RepeatedNestedMessage) - 1; iNdEx >= 0; iNdEx-- { size, err := m.RepeatedNestedMessage[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x82 } } if len(m.RepeatedBytes) > 0 { for iNdEx := len(m.RepeatedBytes) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedBytes[iNdEx]) copy(dAtA[i:], m.RepeatedBytes[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedBytes[iNdEx]))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xea } } if len(m.RepeatedString) > 0 { for iNdEx := len(m.RepeatedString) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedString[iNdEx]) copy(dAtA[i:], m.RepeatedString[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedString[iNdEx]))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xe2 } } if len(m.RepeatedBool) > 0 { for iNdEx := len(m.RepeatedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.RepeatedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xd8 } } if len(m.RepeatedDouble) > 0 { for iNdEx := len(m.RepeatedDouble) - 1; iNdEx >= 0; iNdEx-- { f23 := math.Float64bits(float64(m.RepeatedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f23)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xd1 } } if len(m.RepeatedFloat) > 0 { for iNdEx := len(m.RepeatedFloat) - 1; iNdEx >= 0; iNdEx-- { f24 := math.Float32bits(float32(m.RepeatedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f24)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xcd } } if len(m.RepeatedSfixed64) > 0 { for iNdEx := len(m.RepeatedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedSfixed64[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xc1 } } if len(m.RepeatedSfixed32) > 0 { for iNdEx := len(m.RepeatedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedSfixed32[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xbd } } if len(m.RepeatedFixed64) > 0 { for iNdEx := len(m.RepeatedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedFixed64[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xb1 } } if len(m.RepeatedFixed32) > 0 { for iNdEx := len(m.RepeatedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedFixed32[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xad } } if len(m.RepeatedSint64) > 0 { for iNdEx := len(m.RepeatedSint64) - 1; iNdEx >= 0; iNdEx-- { x25 := (uint64(m.RepeatedSint64[iNdEx]) << 1) ^ uint64((m.RepeatedSint64[iNdEx] >> 63)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x25)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xa0 } } if len(m.RepeatedSint32) > 0 { for iNdEx := len(m.RepeatedSint32) - 1; iNdEx >= 0; iNdEx-- { x26 := (uint32(m.RepeatedSint32[iNdEx]) << 1) ^ uint32((m.RepeatedSint32[iNdEx] >> 31)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x26)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x98 } } if len(m.RepeatedUint64) > 0 { for iNdEx := len(m.RepeatedUint64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedUint64[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x90 } } if len(m.RepeatedUint32) > 0 { for iNdEx := len(m.RepeatedUint32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedUint32[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x88 } } if len(m.RepeatedInt64) > 0 { for iNdEx := len(m.RepeatedInt64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedInt64[iNdEx])) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x80 } } if len(m.RepeatedInt32) > 0 { for iNdEx := len(m.RepeatedInt32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedInt32[iNdEx])) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xf8 } } if m.RecursiveMessage != nil { size, err := m.RecursiveMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xda } if m.OptionalCord != nil { i -= len(*m.OptionalCord) copy(dAtA[i:], *m.OptionalCord) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalCord))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } if m.OptionalStringPiece != nil { i -= len(*m.OptionalStringPiece) copy(dAtA[i:], *m.OptionalStringPiece) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalStringPiece))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xc2 } if m.OptionalForeignEnum != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalForeignEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb0 } if m.OptionalNestedEnum != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalNestedEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa8 } if m.OptionalForeignMessage != nil { size, err := m.OptionalForeignMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x9a } if m.OptionalNestedMessage != nil { size, err := m.OptionalNestedMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x92 } if m.OptionalBytes != nil { i -= len(m.OptionalBytes) copy(dAtA[i:], m.OptionalBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalBytes))) i-- dAtA[i] = 0x7a } if m.OptionalString != nil { i -= len(*m.OptionalString) copy(dAtA[i:], *m.OptionalString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalString))) i-- dAtA[i] = 0x72 } if m.OptionalBool != nil { i-- if *m.OptionalBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x68 } if m.OptionalDouble != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.OptionalDouble)))) i-- dAtA[i] = 0x61 } if m.OptionalFloat != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.OptionalFloat)))) i-- dAtA[i] = 0x5d } if m.OptionalSfixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalSfixed64)) i-- dAtA[i] = 0x51 } if m.OptionalSfixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalSfixed32)) i-- dAtA[i] = 0x4d } if m.OptionalFixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalFixed64)) i-- dAtA[i] = 0x41 } if m.OptionalFixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalFixed32)) i-- dAtA[i] = 0x3d } if m.OptionalSint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.OptionalSint64)<<1)^uint64((*m.OptionalSint64>>63)))) i-- dAtA[i] = 0x30 } if m.OptionalSint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.OptionalSint32)<<1)^uint32((*m.OptionalSint32>>31)))) i-- dAtA[i] = 0x28 } if m.OptionalUint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint64)) i-- dAtA[i] = 0x20 } if m.OptionalUint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint32)) i-- dAtA[i] = 0x18 } if m.OptionalInt64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt64)) i-- dAtA[i] = 0x10 } if m.OptionalInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt32)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofUint32) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofUint32) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint32)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xf8 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.OneofNestedMessage != nil { size, err := m.OneofNestedMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x82 } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofString) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofString) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofString) copy(dAtA[i:], m.OneofString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OneofString))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x8a return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofBytes) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofBytes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofBytes) copy(dAtA[i:], m.OneofBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OneofBytes))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x92 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofBool) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofBool) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i-- if m.OneofBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x98 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofUint64) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofUint64) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint64)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xa0 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofFloat) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofFloat) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.OneofFloat)))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xad return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofDouble) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofDouble) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OneofDouble)))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xb1 return len(dAtA) - i, nil } func (m *TestAllTypesProto2_OneofEnum) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto2_OneofEnum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofEnum)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xb8 return len(dAtA) - i, nil } func (m *ForeignMessageProto2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ForeignMessageProto2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ForeignMessageProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.C != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.C)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UnknownToTestAllTypes_OptionalGroup) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.A != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UnknownToTestAllTypes) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnknownToTestAllTypes) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnknownToTestAllTypes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.RepeatedInt32) > 0 { for iNdEx := len(m.RepeatedInt32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedInt32[iNdEx])) i-- dAtA[i] = 0x3f i-- dAtA[i] = 0x98 } } if m.OptionalBool != nil { i-- if *m.OptionalBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xf0 } if m.Optionalgroup != nil { i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xe4 size, err := m.Optionalgroup.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xe3 } if m.NestedMessage != nil { size, err := m.NestedMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xda } if m.OptionalString != nil { i -= len(*m.OptionalString) copy(dAtA[i:], *m.OptionalString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalString))) i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xd2 } if m.OptionalInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt32)) i-- dAtA[i] = 0x3e i-- dAtA[i] = 0xc8 } return len(dAtA) - i, nil } func (m *NullHypothesisProto2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *NullHypothesisProto2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *NullHypothesisProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *EnumOnlyProto2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *EnumOnlyProto2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *EnumOnlyProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *OneStringProto2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneStringProto2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneStringProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Data != nil { i -= len(*m.Data) copy(dAtA[i:], *m.Data) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Data))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *TestAllTypesProto2_NestedMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.A != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.A)) } if m.Corecursive != nil { l = m.Corecursive.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } func (m *TestAllTypesProto2_Data) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.GroupInt32 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.GroupInt32)) } if m.GroupUint32 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.GroupUint32)) } n += len(m.unknownFields) return n } func (m *TestAllTypesProto2_MessageSetCorrect) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Str != nil { l = len(*m.Str) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.I != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.I)) } n += len(m.unknownFields) return n } func (m *TestAllTypesProto2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.OptionalInt32 != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalInt32)) } if m.OptionalInt64 != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalInt64)) } if m.OptionalUint32 != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalUint32)) } if m.OptionalUint64 != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalUint64)) } if m.OptionalSint32 != nil { n += 1 + protohelpers.SizeOfZigzag(uint64(*m.OptionalSint32)) } if m.OptionalSint64 != nil { n += 1 + protohelpers.SizeOfZigzag(uint64(*m.OptionalSint64)) } if m.OptionalFixed32 != nil { n += 5 } if m.OptionalFixed64 != nil { n += 9 } if m.OptionalSfixed32 != nil { n += 5 } if m.OptionalSfixed64 != nil { n += 9 } if m.OptionalFloat != nil { n += 5 } if m.OptionalDouble != nil { n += 9 } if m.OptionalBool != nil { n += 2 } if m.OptionalString != nil { l = len(*m.OptionalString) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalBytes != nil { l = len(m.OptionalBytes) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalNestedMessage != nil { l = m.OptionalNestedMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalForeignMessage != nil { l = m.OptionalForeignMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalNestedEnum != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.OptionalNestedEnum)) } if m.OptionalForeignEnum != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.OptionalForeignEnum)) } if m.OptionalStringPiece != nil { l = len(*m.OptionalStringPiece) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalCord != nil { l = len(*m.OptionalCord) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.RecursiveMessage != nil { l = m.RecursiveMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.RepeatedInt32) > 0 { for _, e := range m.RepeatedInt32 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.RepeatedInt64) > 0 { for _, e := range m.RepeatedInt64 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.RepeatedUint32) > 0 { for _, e := range m.RepeatedUint32 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.RepeatedUint64) > 0 { for _, e := range m.RepeatedUint64 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.RepeatedSint32) > 0 { for _, e := range m.RepeatedSint32 { n += 2 + protohelpers.SizeOfZigzag(uint64(e)) } } if len(m.RepeatedSint64) > 0 { for _, e := range m.RepeatedSint64 { n += 2 + protohelpers.SizeOfZigzag(uint64(e)) } } if len(m.RepeatedFixed32) > 0 { n += 6 * len(m.RepeatedFixed32) } if len(m.RepeatedFixed64) > 0 { n += 10 * len(m.RepeatedFixed64) } if len(m.RepeatedSfixed32) > 0 { n += 6 * len(m.RepeatedSfixed32) } if len(m.RepeatedSfixed64) > 0 { n += 10 * len(m.RepeatedSfixed64) } if len(m.RepeatedFloat) > 0 { n += 6 * len(m.RepeatedFloat) } if len(m.RepeatedDouble) > 0 { n += 10 * len(m.RepeatedDouble) } if len(m.RepeatedBool) > 0 { n += 3 * len(m.RepeatedBool) } if len(m.RepeatedString) > 0 { for _, s := range m.RepeatedString { l = len(s) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedBytes) > 0 { for _, b := range m.RepeatedBytes { l = len(b) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedNestedMessage) > 0 { for _, e := range m.RepeatedNestedMessage { l = e.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedForeignMessage) > 0 { for _, e := range m.RepeatedForeignMessage { l = e.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedNestedEnum) > 0 { for _, e := range m.RepeatedNestedEnum { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.RepeatedForeignEnum) > 0 { for _, e := range m.RepeatedForeignEnum { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.RepeatedStringPiece) > 0 { for _, s := range m.RepeatedStringPiece { l = len(s) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedCord) > 0 { for _, s := range m.RepeatedCord { l = len(s) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.MapInt32Int32) > 0 { for k, v := range m.MapInt32Int32 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapInt64Int64) > 0 { for k, v := range m.MapInt64Int64 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapUint32Uint32) > 0 { for k, v := range m.MapUint32Uint32 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapUint64Uint64) > 0 { for k, v := range m.MapUint64Uint64 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapSint32Sint32) > 0 { for k, v := range m.MapSint32Sint32 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfZigzag(uint64(k)) + 1 + protohelpers.SizeOfZigzag(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapSint64Sint64) > 0 { for k, v := range m.MapSint64Sint64 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfZigzag(uint64(k)) + 1 + protohelpers.SizeOfZigzag(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapFixed32Fixed32) > 0 { for k, v := range m.MapFixed32Fixed32 { _ = k _ = v mapEntrySize := 1 + 4 + 1 + 4 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapFixed64Fixed64) > 0 { for k, v := range m.MapFixed64Fixed64 { _ = k _ = v mapEntrySize := 1 + 8 + 1 + 8 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapSfixed32Sfixed32) > 0 { for k, v := range m.MapSfixed32Sfixed32 { _ = k _ = v mapEntrySize := 1 + 4 + 1 + 4 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapSfixed64Sfixed64) > 0 { for k, v := range m.MapSfixed64Sfixed64 { _ = k _ = v mapEntrySize := 1 + 8 + 1 + 8 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapInt32Float) > 0 { for k, v := range m.MapInt32Float { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + 4 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapInt32Double) > 0 { for k, v := range m.MapInt32Double { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + 8 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapBoolBool) > 0 { for k, v := range m.MapBoolBool { _ = k _ = v mapEntrySize := 1 + 1 + 1 + 1 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringString) > 0 { for k, v := range m.MapStringString { _ = k _ = v mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringBytes) > 0 { for k, v := range m.MapStringBytes { _ = k _ = v l = 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringNestedMessage) > 0 { for k, v := range m.MapStringNestedMessage { _ = k _ = v l = 0 if v != nil { l = v.SizeVT() } l += 1 + protohelpers.SizeOfVarint(uint64(l)) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringForeignMessage) > 0 { for k, v := range m.MapStringForeignMessage { _ = k _ = v l = 0 if v != nil { l = v.SizeVT() } l += 1 + protohelpers.SizeOfVarint(uint64(l)) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringNestedEnum) > 0 { for k, v := range m.MapStringNestedEnum { _ = k _ = v mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringForeignEnum) > 0 { for k, v := range m.MapStringForeignEnum { _ = k _ = v mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.PackedInt32) > 0 { l = 0 for _, e := range m.PackedInt32 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedInt64) > 0 { l = 0 for _, e := range m.PackedInt64 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedUint32) > 0 { l = 0 for _, e := range m.PackedUint32 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedUint64) > 0 { l = 0 for _, e := range m.PackedUint64 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedSint32) > 0 { l = 0 for _, e := range m.PackedSint32 { l += protohelpers.SizeOfZigzag(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedSint64) > 0 { l = 0 for _, e := range m.PackedSint64 { l += protohelpers.SizeOfZigzag(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedFixed32) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFixed32)*4)) + len(m.PackedFixed32)*4 } if len(m.PackedFixed64) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFixed64)*8)) + len(m.PackedFixed64)*8 } if len(m.PackedSfixed32) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedSfixed32)*4)) + len(m.PackedSfixed32)*4 } if len(m.PackedSfixed64) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedSfixed64)*8)) + len(m.PackedSfixed64)*8 } if len(m.PackedFloat) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFloat)*4)) + len(m.PackedFloat)*4 } if len(m.PackedDouble) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedDouble)*8)) + len(m.PackedDouble)*8 } if len(m.PackedBool) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedBool))) + len(m.PackedBool)*1 } if len(m.PackedNestedEnum) > 0 { l = 0 for _, e := range m.PackedNestedEnum { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.UnpackedInt32) > 0 { for _, e := range m.UnpackedInt32 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.UnpackedInt64) > 0 { for _, e := range m.UnpackedInt64 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.UnpackedUint32) > 0 { for _, e := range m.UnpackedUint32 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.UnpackedUint64) > 0 { for _, e := range m.UnpackedUint64 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.UnpackedSint32) > 0 { for _, e := range m.UnpackedSint32 { n += 2 + protohelpers.SizeOfZigzag(uint64(e)) } } if len(m.UnpackedSint64) > 0 { for _, e := range m.UnpackedSint64 { n += 2 + protohelpers.SizeOfZigzag(uint64(e)) } } if len(m.UnpackedFixed32) > 0 { n += 6 * len(m.UnpackedFixed32) } if len(m.UnpackedFixed64) > 0 { n += 10 * len(m.UnpackedFixed64) } if len(m.UnpackedSfixed32) > 0 { n += 6 * len(m.UnpackedSfixed32) } if len(m.UnpackedSfixed64) > 0 { n += 10 * len(m.UnpackedSfixed64) } if len(m.UnpackedFloat) > 0 { n += 6 * len(m.UnpackedFloat) } if len(m.UnpackedDouble) > 0 { n += 10 * len(m.UnpackedDouble) } if len(m.UnpackedBool) > 0 { n += 3 * len(m.UnpackedBool) } if len(m.UnpackedNestedEnum) > 0 { for _, e := range m.UnpackedNestedEnum { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if vtmsg, ok := m.OneofField.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } if m.Data != nil { l = m.Data.SizeVT() n += l + 4 } if m.DefaultInt32 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.DefaultInt32)) } if m.DefaultInt64 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.DefaultInt64)) } if m.DefaultUint32 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.DefaultUint32)) } if m.DefaultUint64 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.DefaultUint64)) } if m.DefaultSint32 != nil { n += 2 + protohelpers.SizeOfZigzag(uint64(*m.DefaultSint32)) } if m.DefaultSint64 != nil { n += 2 + protohelpers.SizeOfZigzag(uint64(*m.DefaultSint64)) } if m.DefaultFixed32 != nil { n += 6 } if m.DefaultFixed64 != nil { n += 10 } if m.DefaultSfixed32 != nil { n += 6 } if m.DefaultSfixed64 != nil { n += 10 } if m.DefaultFloat != nil { n += 6 } if m.DefaultDouble != nil { n += 10 } if m.DefaultBool != nil { n += 3 } if m.DefaultString != nil { l = len(*m.DefaultString) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DefaultBytes != nil { l = len(m.DefaultBytes) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Fieldname1 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.Fieldname1)) } if m.FieldName2 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.FieldName2)) } if m.XFieldName3 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.XFieldName3)) } if m.Field_Name4_ != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.Field_Name4_)) } if m.Field0Name5 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.Field0Name5)) } if m.Field_0Name6 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.Field_0Name6)) } if m.FieldName7 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.FieldName7)) } if m.FieldName8 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.FieldName8)) } if m.Field_Name9 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.Field_Name9)) } if m.Field_Name10 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.Field_Name10)) } if m.FIELD_NAME11 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.FIELD_NAME11)) } if m.FIELDName12 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.FIELDName12)) } if m.XFieldName13 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.XFieldName13)) } if m.X_FieldName14 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.X_FieldName14)) } if m.Field_Name15 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.Field_Name15)) } if m.Field__Name16 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.Field__Name16)) } if m.FieldName17__ != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.FieldName17__)) } if m.FieldName18__ != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.FieldName18__)) } n += len(m.unknownFields) return n } func (m *TestAllTypesProto2_OneofUint32) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofUint32)) return n } func (m *TestAllTypesProto2_OneofNestedMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.OneofNestedMessage != nil { l = m.OneofNestedMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *TestAllTypesProto2_OneofString) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.OneofString) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *TestAllTypesProto2_OneofBytes) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.OneofBytes) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *TestAllTypesProto2_OneofBool) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 3 return n } func (m *TestAllTypesProto2_OneofUint64) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofUint64)) return n } func (m *TestAllTypesProto2_OneofFloat) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 6 return n } func (m *TestAllTypesProto2_OneofDouble) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 10 return n } func (m *TestAllTypesProto2_OneofEnum) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofEnum)) return n } func (m *ForeignMessageProto2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.C != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.C)) } n += len(m.unknownFields) return n } func (m *UnknownToTestAllTypes_OptionalGroup) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.A != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.A)) } n += len(m.unknownFields) return n } func (m *UnknownToTestAllTypes) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.OptionalInt32 != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.OptionalInt32)) } if m.OptionalString != nil { l = len(*m.OptionalString) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.NestedMessage != nil { l = m.NestedMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Optionalgroup != nil { l = m.Optionalgroup.SizeVT() n += l + 4 } if m.OptionalBool != nil { n += 3 } if len(m.RepeatedInt32) > 0 { for _, e := range m.RepeatedInt32 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } n += len(m.unknownFields) return n } func (m *NullHypothesisProto2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *EnumOnlyProto2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *OneStringProto2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Data != nil { l = len(*m.Data) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } func (m *TestAllTypesProto2_NestedMessage) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_NestedMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.A = &v case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Corecursive", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Corecursive == nil { m.Corecursive = &TestAllTypesProto2{} } if err := m.Corecursive.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_Data) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_Data: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_Data: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 202: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field GroupInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.GroupInt32 = &v case 203: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field GroupUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.GroupUint32 = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_MessageSetCorrect) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrect: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrect: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } if (fieldNum >= 4) && (fieldNum < 2147483647) { err = proto.UnmarshalOptions{AllowPartial: true}.Unmarshal(dAtA[iNdEx:iNdEx+skippy], m) if err != nil { return err } iNdEx += skippy } else { m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension1: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension1: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 25: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Str = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field I", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.I = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt32 = &v case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt64", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt64 = &v case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalUint32 = &v case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalUint64 = &v case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint32 = &v case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint64 = &v2 case 7: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed32", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalFixed32 = &v case 8: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed64", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalFixed64 = &v case 9: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed32", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalSfixed32 = &v case 10: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed64", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalSfixed64 = &v case 11: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.OptionalFloat = &v2 case 12: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.OptionalDouble = &v2 case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OptionalBool = &b case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.OptionalString = &s iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalBytes = append(m.OptionalBytes[:0], dAtA[iNdEx:postIndex]...) if m.OptionalBytes == nil { m.OptionalBytes = []byte{} } iNdEx = postIndex case 18: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalNestedMessage == nil { m.OptionalNestedMessage = &TestAllTypesProto2_NestedMessage{} } if err := m.OptionalNestedMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 19: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalForeignMessage == nil { m.OptionalForeignMessage = &ForeignMessageProto2{} } if err := m.OptionalForeignMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 21: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedEnum", wireType) } var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.OptionalNestedEnum = &v case 22: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignEnum", wireType) } var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } m.OptionalForeignEnum = &v case 24: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalStringPiece", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.OptionalStringPiece = &s iNdEx = postIndex case 25: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.OptionalCord = &s iNdEx = postIndex case 27: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RecursiveMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.RecursiveMessage == nil { m.RecursiveMessage = &TestAllTypesProto2{} } if err := m.RecursiveMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 31: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt32) == 0 { m.RepeatedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32", wireType) } case 32: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt64 = append(m.RepeatedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt64) == 0 { m.RepeatedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt64 = append(m.RepeatedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt64", wireType) } case 33: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint32 = append(m.RepeatedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedUint32) == 0 { m.RepeatedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint32 = append(m.RepeatedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint32", wireType) } case 34: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint64 = append(m.RepeatedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedUint64) == 0 { m.RepeatedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint64 = append(m.RepeatedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint64", wireType) } case 35: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint32 = append(m.RepeatedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedSint32) == 0 { m.RepeatedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint32 = append(m.RepeatedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint32", wireType) } case 36: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedSint64) == 0 { m.RepeatedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint64", wireType) } case 37: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedFixed32 = append(m.RepeatedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedFixed32) == 0 { m.RepeatedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedFixed32 = append(m.RepeatedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed32", wireType) } case 38: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedFixed64 = append(m.RepeatedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedFixed64) == 0 { m.RepeatedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedFixed64 = append(m.RepeatedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed64", wireType) } case 39: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedSfixed32) == 0 { m.RepeatedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed32", wireType) } case 40: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedSfixed64) == 0 { m.RepeatedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed64", wireType) } case 41: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedFloat = append(m.RepeatedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedFloat) == 0 { m.RepeatedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedFloat = append(m.RepeatedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFloat", wireType) } case 42: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedDouble = append(m.RepeatedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedDouble) == 0 { m.RepeatedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedDouble = append(m.RepeatedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDouble", wireType) } case 43: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.RepeatedBool) == 0 { m.RepeatedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBool", wireType) } case 44: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedString = append(m.RepeatedString, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 45: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedBytes = append(m.RepeatedBytes, make([]byte, postIndex-iNdEx)) copy(m.RepeatedBytes[len(m.RepeatedBytes)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 48: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedNestedMessage = append(m.RepeatedNestedMessage, &TestAllTypesProto2_NestedMessage{}) if err := m.RepeatedNestedMessage[len(m.RepeatedNestedMessage)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 49: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedForeignMessage = append(m.RepeatedForeignMessage, &ForeignMessageProto2{}) if err := m.RepeatedForeignMessage[len(m.RepeatedForeignMessage)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 51: if wireType == 0 { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedNestedEnum) == 0 { m.RepeatedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedEnum", wireType) } case 52: if wireType == 0 { var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedForeignEnum) == 0 { m.RepeatedForeignEnum = make([]ForeignEnumProto2, 0, elementCount) } for iNdEx < postIndex { var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignEnum", wireType) } case 54: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedStringPiece", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedStringPiece = append(m.RepeatedStringPiece, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 55: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedCord = append(m.RepeatedCord, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 56: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Int32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Int32 == nil { m.MapInt32Int32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Int32[mapkey] = mapvalue iNdEx = postIndex case 57: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt64Int64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt64Int64 == nil { m.MapInt64Int64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt64Int64[mapkey] = mapvalue iNdEx = postIndex case 58: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapUint32Uint32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapUint32Uint32 == nil { m.MapUint32Uint32 = make(map[uint32]uint32) } var mapkey uint32 var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapUint32Uint32[mapkey] = mapvalue iNdEx = postIndex case 59: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapUint64Uint64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapUint64Uint64 == nil { m.MapUint64Uint64 = make(map[uint64]uint64) } var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapUint64Uint64[mapkey] = mapvalue iNdEx = postIndex case 60: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSint32Sint32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSint32Sint32 == nil { m.MapSint32Sint32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else if fieldNum == 2 { var mapvaluetemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSint32Sint32[mapkey] = mapvalue iNdEx = postIndex case 61: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSint64Sint64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSint64Sint64 == nil { m.MapSint64Sint64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else if fieldNum == 2 { var mapvaluetemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSint64Sint64[mapkey] = mapvalue iNdEx = postIndex case 62: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapFixed32Fixed32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapFixed32Fixed32 == nil { m.MapFixed32Fixed32 = make(map[uint32]uint32) } var mapkey uint32 var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else if fieldNum == 2 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapFixed32Fixed32[mapkey] = mapvalue iNdEx = postIndex case 63: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapFixed64Fixed64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapFixed64Fixed64 == nil { m.MapFixed64Fixed64 = make(map[uint64]uint64) } var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else if fieldNum == 2 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapFixed64Fixed64[mapkey] = mapvalue iNdEx = postIndex case 64: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed32Sfixed32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSfixed32Sfixed32 == nil { m.MapSfixed32Sfixed32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else if fieldNum == 2 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSfixed32Sfixed32[mapkey] = mapvalue iNdEx = postIndex case 65: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed64Sfixed64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSfixed64Sfixed64 == nil { m.MapSfixed64Sfixed64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else if fieldNum == 2 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSfixed64Sfixed64[mapkey] = mapvalue iNdEx = postIndex case 66: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Float", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Float == nil { m.MapInt32Float = make(map[int32]float32) } var mapkey int32 var mapvalue float32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { var mapvaluetemp uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 mapvalue = math.Float32frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Float[mapkey] = mapvalue iNdEx = postIndex case 67: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Double", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Double == nil { m.MapInt32Double = make(map[int32]float64) } var mapkey int32 var mapvalue float64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { var mapvaluetemp uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 mapvalue = math.Float64frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Double[mapkey] = mapvalue iNdEx = postIndex case 68: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapBoolBool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapBoolBool == nil { m.MapBoolBool = make(map[bool]bool) } var mapkey bool var mapvalue bool for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkeytemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapkey = bool(mapkeytemp != 0) } else if fieldNum == 2 { var mapvaluetemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvaluetemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapvalue = bool(mapvaluetemp != 0) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapBoolBool[mapkey] = mapvalue iNdEx = postIndex case 69: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringString", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringString == nil { m.MapStringString = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringString[mapkey] = mapvalue iNdEx = postIndex case 70: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringBytes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringBytes == nil { m.MapStringBytes = make(map[string][]byte) } var mapkey string var mapvalue []byte for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postbytesIndex := iNdEx + intMapbyteLen if postbytesIndex < 0 { return protohelpers.ErrInvalidLength } if postbytesIndex > l { return io.ErrUnexpectedEOF } mapvalue = make([]byte, mapbyteLen) copy(mapvalue, dAtA[iNdEx:postbytesIndex]) iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringBytes[mapkey] = mapvalue iNdEx = postIndex case 71: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringNestedMessage == nil { m.MapStringNestedMessage = make(map[string]*TestAllTypesProto2_NestedMessage) } var mapkey string var mapvalue *TestAllTypesProto2_NestedMessage for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &TestAllTypesProto2_NestedMessage{} if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringNestedMessage[mapkey] = mapvalue iNdEx = postIndex case 72: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringForeignMessage == nil { m.MapStringForeignMessage = make(map[string]*ForeignMessageProto2) } var mapkey string var mapvalue *ForeignMessageProto2 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &ForeignMessageProto2{} if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringForeignMessage[mapkey] = mapvalue iNdEx = postIndex case 73: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringNestedEnum == nil { m.MapStringNestedEnum = make(map[string]TestAllTypesProto2_NestedEnum) } var mapkey string var mapvalue TestAllTypesProto2_NestedEnum for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringNestedEnum[mapkey] = mapvalue iNdEx = postIndex case 74: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringForeignEnum == nil { m.MapStringForeignEnum = make(map[string]ForeignEnumProto2) } var mapkey string var mapvalue ForeignEnumProto2 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringForeignEnum[mapkey] = mapvalue iNdEx = postIndex case 75: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt32 = append(m.PackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedInt32) == 0 { m.PackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt32 = append(m.PackedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedInt32", wireType) } case 76: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt64 = append(m.PackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedInt64) == 0 { m.PackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt64 = append(m.PackedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedInt64", wireType) } case 77: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint32 = append(m.PackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedUint32) == 0 { m.PackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint32 = append(m.PackedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedUint32", wireType) } case 78: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint64 = append(m.PackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedUint64) == 0 { m.PackedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint64 = append(m.PackedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedUint64", wireType) } case 79: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint32 = append(m.PackedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedSint32) == 0 { m.PackedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint32 = append(m.PackedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSint32", wireType) } case 80: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint64 = append(m.PackedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedSint64) == 0 { m.PackedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint64 = append(m.PackedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSint64", wireType) } case 81: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedFixed32 = append(m.PackedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedFixed32) == 0 { m.PackedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedFixed32 = append(m.PackedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFixed32", wireType) } case 82: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedFixed64 = append(m.PackedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedFixed64) == 0 { m.PackedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedFixed64 = append(m.PackedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFixed64", wireType) } case 83: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedSfixed32 = append(m.PackedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedSfixed32) == 0 { m.PackedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedSfixed32 = append(m.PackedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed32", wireType) } case 84: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedSfixed64 = append(m.PackedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedSfixed64) == 0 { m.PackedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedSfixed64 = append(m.PackedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed64", wireType) } case 85: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedFloat = append(m.PackedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedFloat) == 0 { m.PackedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedFloat = append(m.PackedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFloat", wireType) } case 86: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedDouble = append(m.PackedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedDouble) == 0 { m.PackedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedDouble = append(m.PackedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedDouble", wireType) } case 87: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedBool = append(m.PackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.PackedBool) == 0 { m.PackedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedBool = append(m.PackedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedBool", wireType) } case 88: if wireType == 0 { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.PackedNestedEnum = append(m.PackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.PackedNestedEnum) == 0 { m.PackedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.PackedNestedEnum = append(m.PackedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedNestedEnum", wireType) } case 89: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt32 = append(m.UnpackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedInt32) == 0 { m.UnpackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt32 = append(m.UnpackedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt32", wireType) } case 90: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt64 = append(m.UnpackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedInt64) == 0 { m.UnpackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt64 = append(m.UnpackedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt64", wireType) } case 91: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint32 = append(m.UnpackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedUint32) == 0 { m.UnpackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint32 = append(m.UnpackedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint32", wireType) } case 92: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint64 = append(m.UnpackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedUint64) == 0 { m.UnpackedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint64 = append(m.UnpackedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint64", wireType) } case 93: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint32 = append(m.UnpackedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedSint32) == 0 { m.UnpackedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint32 = append(m.UnpackedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint32", wireType) } case 94: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedSint64) == 0 { m.UnpackedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint64", wireType) } case 95: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedFixed32 = append(m.UnpackedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedFixed32) == 0 { m.UnpackedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedFixed32 = append(m.UnpackedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed32", wireType) } case 96: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedFixed64 = append(m.UnpackedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedFixed64) == 0 { m.UnpackedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedFixed64 = append(m.UnpackedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed64", wireType) } case 97: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedSfixed32 = append(m.UnpackedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedSfixed32) == 0 { m.UnpackedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedSfixed32 = append(m.UnpackedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSfixed32", wireType) } case 98: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedSfixed64 = append(m.UnpackedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedSfixed64) == 0 { m.UnpackedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedSfixed64 = append(m.UnpackedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSfixed64", wireType) } case 99: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.UnpackedFloat = append(m.UnpackedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedFloat) == 0 { m.UnpackedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.UnpackedFloat = append(m.UnpackedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFloat", wireType) } case 100: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.UnpackedDouble = append(m.UnpackedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedDouble) == 0 { m.UnpackedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.UnpackedDouble = append(m.UnpackedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedDouble", wireType) } case 101: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.UnpackedBool) == 0 { m.UnpackedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedBool", wireType) } case 102: if wireType == 0 { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.UnpackedNestedEnum) == 0 { m.UnpackedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedNestedEnum", wireType) } case 111: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto2_OneofUint32{OneofUint32: v} case 112: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.OneofField.(*TestAllTypesProto2_OneofNestedMessage); ok { if err := oneof.OneofNestedMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &TestAllTypesProto2_NestedMessage{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.OneofField = &TestAllTypesProto2_OneofNestedMessage{OneofNestedMessage: v} } iNdEx = postIndex case 113: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OneofField = &TestAllTypesProto2_OneofString{OneofString: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 114: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := make([]byte, postIndex-iNdEx) copy(v, dAtA[iNdEx:postIndex]) m.OneofField = &TestAllTypesProto2_OneofBytes{OneofBytes: v} iNdEx = postIndex case 115: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OneofField = &TestAllTypesProto2_OneofBool{OneofBool: b} case 116: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto2_OneofUint64{OneofUint64: v} case 117: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OneofFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OneofField = &TestAllTypesProto2_OneofFloat{OneofFloat: float32(math.Float32frombits(v))} case 118: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OneofDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OneofField = &TestAllTypesProto2_OneofDouble{OneofDouble: float64(math.Float64frombits(v))} case 119: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofEnum", wireType) } var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto2_OneofEnum{OneofEnum: v} case 201: if wireType != 3 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } groupStart := iNdEx for { maybeGroupEnd := iNdEx var groupFieldWire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ groupFieldWire |= uint64(b&0x7F) << shift if b < 0x80 { break } } groupWireType := int(wire & 0x7) if groupWireType == 4 { if err := m.Data.UnmarshalVT(dAtA[groupStart:maybeGroupEnd]); err != nil { return err } break } skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } iNdEx += skippy } case 241: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.DefaultInt32 = &v case 242: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt64", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.DefaultInt64 = &v case 243: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.DefaultUint32 = &v case 244: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.DefaultUint64 = &v case 245: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.DefaultSint32 = &v case 246: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.DefaultSint64 = &v2 case 247: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed32", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.DefaultFixed32 = &v case 248: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed64", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.DefaultFixed64 = &v case 249: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed32", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.DefaultSfixed32 = &v case 250: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed64", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.DefaultSfixed64 = &v case 251: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.DefaultFloat = &v2 case 252: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.DefaultDouble = &v2 case 253: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.DefaultBool = &b case 254: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.DefaultString = &s iNdEx = postIndex case 255: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.DefaultBytes = append(m.DefaultBytes[:0], dAtA[iNdEx:postIndex]...) if m.DefaultBytes == nil { m.DefaultBytes = []byte{} } iNdEx = postIndex case 401: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Fieldname1", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Fieldname1 = &v case 402: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName2", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName2 = &v case 403: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field XFieldName3", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.XFieldName3 = &v case 404: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name4_", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_Name4_ = &v case 405: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field0Name5", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field0Name5 = &v case 406: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_0Name6", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_0Name6 = &v case 407: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName7", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName7 = &v case 408: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName8", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName8 = &v case 409: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name9", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_Name9 = &v case 410: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name10", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_Name10 = &v case 411: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FIELD_NAME11", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FIELD_NAME11 = &v case 412: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FIELDName12", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FIELDName12 = &v case 413: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field XFieldName13", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.XFieldName13 = &v case 414: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field X_FieldName14", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.X_FieldName14 = &v case 415: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name15", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_Name15 = &v case 416: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field__Name16", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field__Name16 = &v case 417: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName17__", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName17__ = &v case 418: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName18__", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName18__ = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } if (fieldNum >= 120) && (fieldNum < 201) { err = proto.UnmarshalOptions{AllowPartial: true}.Unmarshal(dAtA[iNdEx:iNdEx+skippy], m) if err != nil { return err } iNdEx += skippy } else { m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ForeignMessageProto2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ForeignMessageProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ForeignMessageProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.C = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnknownToTestAllTypes_OptionalGroup) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnknownToTestAllTypes_OptionalGroup: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnknownToTestAllTypes_OptionalGroup: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.A = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnknownToTestAllTypes) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnknownToTestAllTypes: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnknownToTestAllTypes: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1001: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt32 = &v case 1002: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.OptionalString = &s iNdEx = postIndex case 1003: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.NestedMessage == nil { m.NestedMessage = &ForeignMessageProto2{} } if err := m.NestedMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 1004: if wireType != 3 { return fmt.Errorf("proto: wrong wireType = %d for field Optionalgroup", wireType) } groupStart := iNdEx for { maybeGroupEnd := iNdEx var groupFieldWire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ groupFieldWire |= uint64(b&0x7F) << shift if b < 0x80 { break } } groupWireType := int(wire & 0x7) if groupWireType == 4 { if err := m.Optionalgroup.UnmarshalVT(dAtA[groupStart:maybeGroupEnd]); err != nil { return err } break } skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } iNdEx += skippy } case 1006: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OptionalBool = &b case 1011: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt32) == 0 { m.RepeatedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *NullHypothesisProto2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: NullHypothesisProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: NullHypothesisProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EnumOnlyProto2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: EnumOnlyProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EnumOnlyProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneStringProto2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneStringProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneStringProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Data = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_NestedMessage) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_NestedMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.A = &v case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Corecursive", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Corecursive == nil { m.Corecursive = &TestAllTypesProto2{} } if err := m.Corecursive.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_Data) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_Data: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_Data: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 202: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field GroupInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.GroupInt32 = &v case 203: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field GroupUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.GroupUint32 = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_MessageSetCorrect) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrect: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrect: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } if (fieldNum >= 4) && (fieldNum < 2147483647) { err = proto.UnmarshalOptions{AllowPartial: true}.Unmarshal(dAtA[iNdEx:iNdEx+skippy], m) if err != nil { return err } iNdEx += skippy } else { m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension1) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension1: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension1: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 25: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.Str = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2_MessageSetCorrectExtension2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field I", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.I = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt32 = &v case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt64", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt64 = &v case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalUint32 = &v case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalUint64 = &v case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint32 = &v case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint64 = &v2 case 7: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed32", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalFixed32 = &v case 8: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed64", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalFixed64 = &v case 9: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed32", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalSfixed32 = &v case 10: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed64", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalSfixed64 = &v case 11: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.OptionalFloat = &v2 case 12: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.OptionalDouble = &v2 case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OptionalBool = &b case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.OptionalString = &s iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalBytes = dAtA[iNdEx:postIndex] iNdEx = postIndex case 18: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalNestedMessage == nil { m.OptionalNestedMessage = &TestAllTypesProto2_NestedMessage{} } if err := m.OptionalNestedMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 19: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalForeignMessage == nil { m.OptionalForeignMessage = &ForeignMessageProto2{} } if err := m.OptionalForeignMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 21: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedEnum", wireType) } var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.OptionalNestedEnum = &v case 22: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignEnum", wireType) } var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } m.OptionalForeignEnum = &v case 24: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalStringPiece", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.OptionalStringPiece = &s iNdEx = postIndex case 25: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.OptionalCord = &s iNdEx = postIndex case 27: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RecursiveMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.RecursiveMessage == nil { m.RecursiveMessage = &TestAllTypesProto2{} } if err := m.RecursiveMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 31: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt32) == 0 { m.RepeatedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32", wireType) } case 32: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt64 = append(m.RepeatedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt64) == 0 { m.RepeatedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt64 = append(m.RepeatedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt64", wireType) } case 33: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint32 = append(m.RepeatedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedUint32) == 0 { m.RepeatedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint32 = append(m.RepeatedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint32", wireType) } case 34: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint64 = append(m.RepeatedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedUint64) == 0 { m.RepeatedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint64 = append(m.RepeatedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint64", wireType) } case 35: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint32 = append(m.RepeatedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedSint32) == 0 { m.RepeatedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint32 = append(m.RepeatedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint32", wireType) } case 36: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedSint64) == 0 { m.RepeatedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint64", wireType) } case 37: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedFixed32 = append(m.RepeatedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedFixed32) == 0 { m.RepeatedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedFixed32 = append(m.RepeatedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed32", wireType) } case 38: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedFixed64 = append(m.RepeatedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedFixed64) == 0 { m.RepeatedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedFixed64 = append(m.RepeatedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed64", wireType) } case 39: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedSfixed32) == 0 { m.RepeatedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed32", wireType) } case 40: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedSfixed64) == 0 { m.RepeatedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed64", wireType) } case 41: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedFloat = append(m.RepeatedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedFloat) == 0 { m.RepeatedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedFloat = append(m.RepeatedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFloat", wireType) } case 42: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedDouble = append(m.RepeatedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedDouble) == 0 { m.RepeatedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedDouble = append(m.RepeatedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDouble", wireType) } case 43: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.RepeatedBool) == 0 { m.RepeatedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBool", wireType) } case 44: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.RepeatedString = append(m.RepeatedString, stringValue) iNdEx = postIndex case 45: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedBytes = append(m.RepeatedBytes, dAtA[iNdEx:postIndex]) iNdEx = postIndex case 48: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedNestedMessage = append(m.RepeatedNestedMessage, &TestAllTypesProto2_NestedMessage{}) if err := m.RepeatedNestedMessage[len(m.RepeatedNestedMessage)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 49: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedForeignMessage = append(m.RepeatedForeignMessage, &ForeignMessageProto2{}) if err := m.RepeatedForeignMessage[len(m.RepeatedForeignMessage)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 51: if wireType == 0 { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedNestedEnum) == 0 { m.RepeatedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedEnum", wireType) } case 52: if wireType == 0 { var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedForeignEnum) == 0 { m.RepeatedForeignEnum = make([]ForeignEnumProto2, 0, elementCount) } for iNdEx < postIndex { var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignEnum", wireType) } case 54: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedStringPiece", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.RepeatedStringPiece = append(m.RepeatedStringPiece, stringValue) iNdEx = postIndex case 55: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.RepeatedCord = append(m.RepeatedCord, stringValue) iNdEx = postIndex case 56: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Int32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Int32 == nil { m.MapInt32Int32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Int32[mapkey] = mapvalue iNdEx = postIndex case 57: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt64Int64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt64Int64 == nil { m.MapInt64Int64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt64Int64[mapkey] = mapvalue iNdEx = postIndex case 58: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapUint32Uint32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapUint32Uint32 == nil { m.MapUint32Uint32 = make(map[uint32]uint32) } var mapkey uint32 var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapUint32Uint32[mapkey] = mapvalue iNdEx = postIndex case 59: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapUint64Uint64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapUint64Uint64 == nil { m.MapUint64Uint64 = make(map[uint64]uint64) } var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapUint64Uint64[mapkey] = mapvalue iNdEx = postIndex case 60: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSint32Sint32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSint32Sint32 == nil { m.MapSint32Sint32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else if fieldNum == 2 { var mapvaluetemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSint32Sint32[mapkey] = mapvalue iNdEx = postIndex case 61: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSint64Sint64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSint64Sint64 == nil { m.MapSint64Sint64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else if fieldNum == 2 { var mapvaluetemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSint64Sint64[mapkey] = mapvalue iNdEx = postIndex case 62: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapFixed32Fixed32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapFixed32Fixed32 == nil { m.MapFixed32Fixed32 = make(map[uint32]uint32) } var mapkey uint32 var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else if fieldNum == 2 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapFixed32Fixed32[mapkey] = mapvalue iNdEx = postIndex case 63: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapFixed64Fixed64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapFixed64Fixed64 == nil { m.MapFixed64Fixed64 = make(map[uint64]uint64) } var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else if fieldNum == 2 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapFixed64Fixed64[mapkey] = mapvalue iNdEx = postIndex case 64: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed32Sfixed32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSfixed32Sfixed32 == nil { m.MapSfixed32Sfixed32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else if fieldNum == 2 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSfixed32Sfixed32[mapkey] = mapvalue iNdEx = postIndex case 65: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed64Sfixed64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSfixed64Sfixed64 == nil { m.MapSfixed64Sfixed64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else if fieldNum == 2 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSfixed64Sfixed64[mapkey] = mapvalue iNdEx = postIndex case 66: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Float", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Float == nil { m.MapInt32Float = make(map[int32]float32) } var mapkey int32 var mapvalue float32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { var mapvaluetemp uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 mapvalue = math.Float32frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Float[mapkey] = mapvalue iNdEx = postIndex case 67: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Double", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Double == nil { m.MapInt32Double = make(map[int32]float64) } var mapkey int32 var mapvalue float64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { var mapvaluetemp uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 mapvalue = math.Float64frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Double[mapkey] = mapvalue iNdEx = postIndex case 68: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapBoolBool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapBoolBool == nil { m.MapBoolBool = make(map[bool]bool) } var mapkey bool var mapvalue bool for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkeytemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapkey = bool(mapkeytemp != 0) } else if fieldNum == 2 { var mapvaluetemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvaluetemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapvalue = bool(mapvaluetemp != 0) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapBoolBool[mapkey] = mapvalue iNdEx = postIndex case 69: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringString", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringString == nil { m.MapStringString = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } if intStringLenmapvalue == 0 { mapvalue = "" } else { mapvalue = unsafe.String(&dAtA[iNdEx], intStringLenmapvalue) } iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringString[mapkey] = mapvalue iNdEx = postIndex case 70: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringBytes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringBytes == nil { m.MapStringBytes = make(map[string][]byte) } var mapkey string var mapvalue []byte for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postbytesIndex := iNdEx + intMapbyteLen if postbytesIndex < 0 { return protohelpers.ErrInvalidLength } if postbytesIndex > l { return io.ErrUnexpectedEOF } mapvalue = dAtA[iNdEx:postbytesIndex] iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringBytes[mapkey] = mapvalue iNdEx = postIndex case 71: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringNestedMessage == nil { m.MapStringNestedMessage = make(map[string]*TestAllTypesProto2_NestedMessage) } var mapkey string var mapvalue *TestAllTypesProto2_NestedMessage for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &TestAllTypesProto2_NestedMessage{} if err := mapvalue.UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringNestedMessage[mapkey] = mapvalue iNdEx = postIndex case 72: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringForeignMessage == nil { m.MapStringForeignMessage = make(map[string]*ForeignMessageProto2) } var mapkey string var mapvalue *ForeignMessageProto2 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &ForeignMessageProto2{} if err := mapvalue.UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringForeignMessage[mapkey] = mapvalue iNdEx = postIndex case 73: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringNestedEnum == nil { m.MapStringNestedEnum = make(map[string]TestAllTypesProto2_NestedEnum) } var mapkey string var mapvalue TestAllTypesProto2_NestedEnum for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringNestedEnum[mapkey] = mapvalue iNdEx = postIndex case 74: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringForeignEnum == nil { m.MapStringForeignEnum = make(map[string]ForeignEnumProto2) } var mapkey string var mapvalue ForeignEnumProto2 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringForeignEnum[mapkey] = mapvalue iNdEx = postIndex case 75: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt32 = append(m.PackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedInt32) == 0 { m.PackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt32 = append(m.PackedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedInt32", wireType) } case 76: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt64 = append(m.PackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedInt64) == 0 { m.PackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt64 = append(m.PackedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedInt64", wireType) } case 77: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint32 = append(m.PackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedUint32) == 0 { m.PackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint32 = append(m.PackedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedUint32", wireType) } case 78: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint64 = append(m.PackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedUint64) == 0 { m.PackedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint64 = append(m.PackedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedUint64", wireType) } case 79: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint32 = append(m.PackedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedSint32) == 0 { m.PackedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint32 = append(m.PackedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSint32", wireType) } case 80: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint64 = append(m.PackedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedSint64) == 0 { m.PackedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint64 = append(m.PackedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSint64", wireType) } case 81: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedFixed32 = append(m.PackedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedFixed32) == 0 { m.PackedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedFixed32 = append(m.PackedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFixed32", wireType) } case 82: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedFixed64 = append(m.PackedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedFixed64) == 0 { m.PackedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedFixed64 = append(m.PackedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFixed64", wireType) } case 83: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedSfixed32 = append(m.PackedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedSfixed32) == 0 { m.PackedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedSfixed32 = append(m.PackedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed32", wireType) } case 84: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedSfixed64 = append(m.PackedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedSfixed64) == 0 { m.PackedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedSfixed64 = append(m.PackedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed64", wireType) } case 85: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedFloat = append(m.PackedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedFloat) == 0 { m.PackedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedFloat = append(m.PackedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFloat", wireType) } case 86: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedDouble = append(m.PackedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedDouble) == 0 { m.PackedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedDouble = append(m.PackedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedDouble", wireType) } case 87: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedBool = append(m.PackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.PackedBool) == 0 { m.PackedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedBool = append(m.PackedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedBool", wireType) } case 88: if wireType == 0 { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.PackedNestedEnum = append(m.PackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.PackedNestedEnum) == 0 { m.PackedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.PackedNestedEnum = append(m.PackedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedNestedEnum", wireType) } case 89: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt32 = append(m.UnpackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedInt32) == 0 { m.UnpackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt32 = append(m.UnpackedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt32", wireType) } case 90: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt64 = append(m.UnpackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedInt64) == 0 { m.UnpackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt64 = append(m.UnpackedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt64", wireType) } case 91: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint32 = append(m.UnpackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedUint32) == 0 { m.UnpackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint32 = append(m.UnpackedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint32", wireType) } case 92: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint64 = append(m.UnpackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedUint64) == 0 { m.UnpackedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint64 = append(m.UnpackedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint64", wireType) } case 93: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint32 = append(m.UnpackedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedSint32) == 0 { m.UnpackedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint32 = append(m.UnpackedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint32", wireType) } case 94: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedSint64) == 0 { m.UnpackedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint64", wireType) } case 95: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedFixed32 = append(m.UnpackedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedFixed32) == 0 { m.UnpackedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedFixed32 = append(m.UnpackedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed32", wireType) } case 96: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedFixed64 = append(m.UnpackedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedFixed64) == 0 { m.UnpackedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedFixed64 = append(m.UnpackedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed64", wireType) } case 97: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedSfixed32 = append(m.UnpackedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedSfixed32) == 0 { m.UnpackedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedSfixed32 = append(m.UnpackedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSfixed32", wireType) } case 98: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedSfixed64 = append(m.UnpackedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedSfixed64) == 0 { m.UnpackedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedSfixed64 = append(m.UnpackedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSfixed64", wireType) } case 99: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.UnpackedFloat = append(m.UnpackedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedFloat) == 0 { m.UnpackedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.UnpackedFloat = append(m.UnpackedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFloat", wireType) } case 100: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.UnpackedDouble = append(m.UnpackedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedDouble) == 0 { m.UnpackedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.UnpackedDouble = append(m.UnpackedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedDouble", wireType) } case 101: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.UnpackedBool) == 0 { m.UnpackedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedBool", wireType) } case 102: if wireType == 0 { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.UnpackedNestedEnum) == 0 { m.UnpackedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedNestedEnum", wireType) } case 111: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto2_OneofUint32{OneofUint32: v} case 112: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.OneofField.(*TestAllTypesProto2_OneofNestedMessage); ok { if err := oneof.OneofNestedMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &TestAllTypesProto2_NestedMessage{} if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.OneofField = &TestAllTypesProto2_OneofNestedMessage{OneofNestedMessage: v} } iNdEx = postIndex case 113: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.OneofField = &TestAllTypesProto2_OneofString{OneofString: stringValue} iNdEx = postIndex case 114: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := dAtA[iNdEx:postIndex] m.OneofField = &TestAllTypesProto2_OneofBytes{OneofBytes: v} iNdEx = postIndex case 115: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OneofField = &TestAllTypesProto2_OneofBool{OneofBool: b} case 116: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto2_OneofUint64{OneofUint64: v} case 117: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OneofFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OneofField = &TestAllTypesProto2_OneofFloat{OneofFloat: float32(math.Float32frombits(v))} case 118: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OneofDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OneofField = &TestAllTypesProto2_OneofDouble{OneofDouble: float64(math.Float64frombits(v))} case 119: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofEnum", wireType) } var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto2_OneofEnum{OneofEnum: v} case 201: if wireType != 3 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } groupStart := iNdEx for { maybeGroupEnd := iNdEx var groupFieldWire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ groupFieldWire |= uint64(b&0x7F) << shift if b < 0x80 { break } } groupWireType := int(wire & 0x7) if groupWireType == 4 { if err := m.Data.UnmarshalVTUnsafe(dAtA[groupStart:maybeGroupEnd]); err != nil { return err } break } skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } iNdEx += skippy } case 241: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.DefaultInt32 = &v case 242: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt64", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.DefaultInt64 = &v case 243: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.DefaultUint32 = &v case 244: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.DefaultUint64 = &v case 245: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.DefaultSint32 = &v case 246: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.DefaultSint64 = &v2 case 247: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed32", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.DefaultFixed32 = &v case 248: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed64", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.DefaultFixed64 = &v case 249: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed32", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.DefaultSfixed32 = &v case 250: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed64", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.DefaultSfixed64 = &v case 251: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.DefaultFloat = &v2 case 252: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.DefaultDouble = &v2 case 253: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.DefaultBool = &b case 254: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.DefaultString = &s iNdEx = postIndex case 255: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.DefaultBytes = dAtA[iNdEx:postIndex] iNdEx = postIndex case 401: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Fieldname1", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Fieldname1 = &v case 402: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName2", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName2 = &v case 403: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field XFieldName3", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.XFieldName3 = &v case 404: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name4_", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_Name4_ = &v case 405: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field0Name5", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field0Name5 = &v case 406: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_0Name6", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_0Name6 = &v case 407: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName7", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName7 = &v case 408: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName8", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName8 = &v case 409: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name9", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_Name9 = &v case 410: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name10", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_Name10 = &v case 411: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FIELD_NAME11", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FIELD_NAME11 = &v case 412: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FIELDName12", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FIELDName12 = &v case 413: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field XFieldName13", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.XFieldName13 = &v case 414: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field X_FieldName14", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.X_FieldName14 = &v case 415: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name15", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field_Name15 = &v case 416: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field__Name16", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.Field__Name16 = &v case 417: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName17__", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName17__ = &v case 418: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName18__", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.FieldName18__ = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } if (fieldNum >= 120) && (fieldNum < 201) { err = proto.UnmarshalOptions{AllowPartial: true}.Unmarshal(dAtA[iNdEx:iNdEx+skippy], m) if err != nil { return err } iNdEx += skippy } else { m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ForeignMessageProto2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ForeignMessageProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ForeignMessageProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.C = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnknownToTestAllTypes_OptionalGroup) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnknownToTestAllTypes_OptionalGroup: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnknownToTestAllTypes_OptionalGroup: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.A = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnknownToTestAllTypes) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnknownToTestAllTypes: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnknownToTestAllTypes: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1001: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt32 = &v case 1002: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.OptionalString = &s iNdEx = postIndex case 1003: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.NestedMessage == nil { m.NestedMessage = &ForeignMessageProto2{} } if err := m.NestedMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 1004: if wireType != 3 { return fmt.Errorf("proto: wrong wireType = %d for field Optionalgroup", wireType) } groupStart := iNdEx for { maybeGroupEnd := iNdEx var groupFieldWire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ groupFieldWire |= uint64(b&0x7F) << shift if b < 0x80 { break } } groupWireType := int(wire & 0x7) if groupWireType == 4 { if err := m.Optionalgroup.UnmarshalVTUnsafe(dAtA[groupStart:maybeGroupEnd]); err != nil { return err } break } skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } iNdEx += skippy } case 1006: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OptionalBool = &b case 1011: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt32) == 0 { m.RepeatedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *NullHypothesisProto2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: NullHypothesisProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: NullHypothesisProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EnumOnlyProto2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: EnumOnlyProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EnumOnlyProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneStringProto2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneStringProto2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneStringProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.Data = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } test_messages_proto3.pb.go000066400000000000000000004614431455570004500344120ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance// 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. // // Test schema for proto3 messages. This test schema is used by: // // - benchmarks // - fuzz tests // - conformance tests // // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: src/google/protobuf/test_messages_proto3.proto package conformance import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" durationpb "google.golang.org/protobuf/types/known/durationpb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type ForeignEnum int32 const ( ForeignEnum_FOREIGN_FOO ForeignEnum = 0 ForeignEnum_FOREIGN_BAR ForeignEnum = 1 ForeignEnum_FOREIGN_BAZ ForeignEnum = 2 ) // Enum value maps for ForeignEnum. var ( ForeignEnum_name = map[int32]string{ 0: "FOREIGN_FOO", 1: "FOREIGN_BAR", 2: "FOREIGN_BAZ", } ForeignEnum_value = map[string]int32{ "FOREIGN_FOO": 0, "FOREIGN_BAR": 1, "FOREIGN_BAZ": 2, } ) func (x ForeignEnum) Enum() *ForeignEnum { p := new(ForeignEnum) *p = x return p } func (x ForeignEnum) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ForeignEnum) Descriptor() protoreflect.EnumDescriptor { return file_src_google_protobuf_test_messages_proto3_proto_enumTypes[0].Descriptor() } func (ForeignEnum) Type() protoreflect.EnumType { return &file_src_google_protobuf_test_messages_proto3_proto_enumTypes[0] } func (x ForeignEnum) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use ForeignEnum.Descriptor instead. func (ForeignEnum) EnumDescriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{0} } type TestAllTypesProto3_NestedEnum int32 const ( TestAllTypesProto3_FOO TestAllTypesProto3_NestedEnum = 0 TestAllTypesProto3_BAR TestAllTypesProto3_NestedEnum = 1 TestAllTypesProto3_BAZ TestAllTypesProto3_NestedEnum = 2 TestAllTypesProto3_NEG TestAllTypesProto3_NestedEnum = -1 // Intentionally negative. ) // Enum value maps for TestAllTypesProto3_NestedEnum. var ( TestAllTypesProto3_NestedEnum_name = map[int32]string{ 0: "FOO", 1: "BAR", 2: "BAZ", -1: "NEG", } TestAllTypesProto3_NestedEnum_value = map[string]int32{ "FOO": 0, "BAR": 1, "BAZ": 2, "NEG": -1, } ) func (x TestAllTypesProto3_NestedEnum) Enum() *TestAllTypesProto3_NestedEnum { p := new(TestAllTypesProto3_NestedEnum) *p = x return p } func (x TestAllTypesProto3_NestedEnum) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TestAllTypesProto3_NestedEnum) Descriptor() protoreflect.EnumDescriptor { return file_src_google_protobuf_test_messages_proto3_proto_enumTypes[1].Descriptor() } func (TestAllTypesProto3_NestedEnum) Type() protoreflect.EnumType { return &file_src_google_protobuf_test_messages_proto3_proto_enumTypes[1] } func (x TestAllTypesProto3_NestedEnum) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use TestAllTypesProto3_NestedEnum.Descriptor instead. func (TestAllTypesProto3_NestedEnum) EnumDescriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{0, 0} } type TestAllTypesProto3_AliasedEnum int32 const ( TestAllTypesProto3_ALIAS_FOO TestAllTypesProto3_AliasedEnum = 0 TestAllTypesProto3_ALIAS_BAR TestAllTypesProto3_AliasedEnum = 1 TestAllTypesProto3_ALIAS_BAZ TestAllTypesProto3_AliasedEnum = 2 TestAllTypesProto3_MOO TestAllTypesProto3_AliasedEnum = 2 TestAllTypesProto3_moo TestAllTypesProto3_AliasedEnum = 2 TestAllTypesProto3_bAz TestAllTypesProto3_AliasedEnum = 2 ) // Enum value maps for TestAllTypesProto3_AliasedEnum. var ( TestAllTypesProto3_AliasedEnum_name = map[int32]string{ 0: "ALIAS_FOO", 1: "ALIAS_BAR", 2: "ALIAS_BAZ", // Duplicate value: 2: "MOO", // Duplicate value: 2: "moo", // Duplicate value: 2: "bAz", } TestAllTypesProto3_AliasedEnum_value = map[string]int32{ "ALIAS_FOO": 0, "ALIAS_BAR": 1, "ALIAS_BAZ": 2, "MOO": 2, "moo": 2, "bAz": 2, } ) func (x TestAllTypesProto3_AliasedEnum) Enum() *TestAllTypesProto3_AliasedEnum { p := new(TestAllTypesProto3_AliasedEnum) *p = x return p } func (x TestAllTypesProto3_AliasedEnum) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TestAllTypesProto3_AliasedEnum) Descriptor() protoreflect.EnumDescriptor { return file_src_google_protobuf_test_messages_proto3_proto_enumTypes[2].Descriptor() } func (TestAllTypesProto3_AliasedEnum) Type() protoreflect.EnumType { return &file_src_google_protobuf_test_messages_proto3_proto_enumTypes[2] } func (x TestAllTypesProto3_AliasedEnum) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use TestAllTypesProto3_AliasedEnum.Descriptor instead. func (TestAllTypesProto3_AliasedEnum) EnumDescriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{0, 1} } type EnumOnlyProto3_Bool int32 const ( EnumOnlyProto3_kFalse EnumOnlyProto3_Bool = 0 EnumOnlyProto3_kTrue EnumOnlyProto3_Bool = 1 ) // Enum value maps for EnumOnlyProto3_Bool. var ( EnumOnlyProto3_Bool_name = map[int32]string{ 0: "kFalse", 1: "kTrue", } EnumOnlyProto3_Bool_value = map[string]int32{ "kFalse": 0, "kTrue": 1, } ) func (x EnumOnlyProto3_Bool) Enum() *EnumOnlyProto3_Bool { p := new(EnumOnlyProto3_Bool) *p = x return p } func (x EnumOnlyProto3_Bool) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (EnumOnlyProto3_Bool) Descriptor() protoreflect.EnumDescriptor { return file_src_google_protobuf_test_messages_proto3_proto_enumTypes[3].Descriptor() } func (EnumOnlyProto3_Bool) Type() protoreflect.EnumType { return &file_src_google_protobuf_test_messages_proto3_proto_enumTypes[3] } func (x EnumOnlyProto3_Bool) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use EnumOnlyProto3_Bool.Descriptor instead. func (EnumOnlyProto3_Bool) EnumDescriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{3, 0} } // This proto includes every type of field in both singular and repeated // forms. // // Also, crucially, all messages and enums in this file are eventually // submessages of this message. So for example, a fuzz test of TestAllTypes // could trigger bugs that occur in any message type in this file. We verify // this stays true in a unit test. type TestAllTypesProto3 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Singular OptionalInt32 int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"` OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"` OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"` OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"` OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"` OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"` OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"` OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"` OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"` OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"` OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"` OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"` OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"` OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"` OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"` OptionalNestedMessage *TestAllTypesProto3_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage,proto3" json:"optional_nested_message,omitempty"` OptionalForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage,proto3" json:"optional_foreign_message,omitempty"` OptionalNestedEnum TestAllTypesProto3_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,proto3,enum=protobuf_test_messages.proto3.TestAllTypesProto3_NestedEnum" json:"optional_nested_enum,omitempty"` OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,proto3,enum=protobuf_test_messages.proto3.ForeignEnum" json:"optional_foreign_enum,omitempty"` OptionalAliasedEnum TestAllTypesProto3_AliasedEnum `protobuf:"varint,23,opt,name=optional_aliased_enum,json=optionalAliasedEnum,proto3,enum=protobuf_test_messages.proto3.TestAllTypesProto3_AliasedEnum" json:"optional_aliased_enum,omitempty"` OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece,proto3" json:"optional_string_piece,omitempty"` OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord,proto3" json:"optional_cord,omitempty"` RecursiveMessage *TestAllTypesProto3 `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage,proto3" json:"recursive_message,omitempty"` // Repeated RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32,proto3" json:"repeated_int32,omitempty"` RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64,proto3" json:"repeated_int64,omitempty"` RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32,proto3" json:"repeated_uint32,omitempty"` RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64,proto3" json:"repeated_uint64,omitempty"` RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32,proto3" json:"repeated_sint32,omitempty"` RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64,proto3" json:"repeated_sint64,omitempty"` RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32,proto3" json:"repeated_fixed32,omitempty"` RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64,proto3" json:"repeated_fixed64,omitempty"` RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32,proto3" json:"repeated_sfixed32,omitempty"` RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64,proto3" json:"repeated_sfixed64,omitempty"` RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat,proto3" json:"repeated_float,omitempty"` RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble,proto3" json:"repeated_double,omitempty"` RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool,proto3" json:"repeated_bool,omitempty"` RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"` RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"` RepeatedNestedMessage []*TestAllTypesProto3_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage,proto3" json:"repeated_nested_message,omitempty"` RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage,proto3" json:"repeated_foreign_message,omitempty"` RepeatedNestedEnum []TestAllTypesProto3_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,proto3,enum=protobuf_test_messages.proto3.TestAllTypesProto3_NestedEnum" json:"repeated_nested_enum,omitempty"` RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,proto3,enum=protobuf_test_messages.proto3.ForeignEnum" json:"repeated_foreign_enum,omitempty"` RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece,proto3" json:"repeated_string_piece,omitempty"` RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord,proto3" json:"repeated_cord,omitempty"` // Packed PackedInt32 []int32 `protobuf:"varint,75,rep,packed,name=packed_int32,json=packedInt32,proto3" json:"packed_int32,omitempty"` PackedInt64 []int64 `protobuf:"varint,76,rep,packed,name=packed_int64,json=packedInt64,proto3" json:"packed_int64,omitempty"` PackedUint32 []uint32 `protobuf:"varint,77,rep,packed,name=packed_uint32,json=packedUint32,proto3" json:"packed_uint32,omitempty"` PackedUint64 []uint64 `protobuf:"varint,78,rep,packed,name=packed_uint64,json=packedUint64,proto3" json:"packed_uint64,omitempty"` PackedSint32 []int32 `protobuf:"zigzag32,79,rep,packed,name=packed_sint32,json=packedSint32,proto3" json:"packed_sint32,omitempty"` PackedSint64 []int64 `protobuf:"zigzag64,80,rep,packed,name=packed_sint64,json=packedSint64,proto3" json:"packed_sint64,omitempty"` PackedFixed32 []uint32 `protobuf:"fixed32,81,rep,packed,name=packed_fixed32,json=packedFixed32,proto3" json:"packed_fixed32,omitempty"` PackedFixed64 []uint64 `protobuf:"fixed64,82,rep,packed,name=packed_fixed64,json=packedFixed64,proto3" json:"packed_fixed64,omitempty"` PackedSfixed32 []int32 `protobuf:"fixed32,83,rep,packed,name=packed_sfixed32,json=packedSfixed32,proto3" json:"packed_sfixed32,omitempty"` PackedSfixed64 []int64 `protobuf:"fixed64,84,rep,packed,name=packed_sfixed64,json=packedSfixed64,proto3" json:"packed_sfixed64,omitempty"` PackedFloat []float32 `protobuf:"fixed32,85,rep,packed,name=packed_float,json=packedFloat,proto3" json:"packed_float,omitempty"` PackedDouble []float64 `protobuf:"fixed64,86,rep,packed,name=packed_double,json=packedDouble,proto3" json:"packed_double,omitempty"` PackedBool []bool `protobuf:"varint,87,rep,packed,name=packed_bool,json=packedBool,proto3" json:"packed_bool,omitempty"` PackedNestedEnum []TestAllTypesProto3_NestedEnum `protobuf:"varint,88,rep,packed,name=packed_nested_enum,json=packedNestedEnum,proto3,enum=protobuf_test_messages.proto3.TestAllTypesProto3_NestedEnum" json:"packed_nested_enum,omitempty"` // Unpacked UnpackedInt32 []int32 `protobuf:"varint,89,rep,name=unpacked_int32,json=unpackedInt32,proto3" json:"unpacked_int32,omitempty"` UnpackedInt64 []int64 `protobuf:"varint,90,rep,name=unpacked_int64,json=unpackedInt64,proto3" json:"unpacked_int64,omitempty"` UnpackedUint32 []uint32 `protobuf:"varint,91,rep,name=unpacked_uint32,json=unpackedUint32,proto3" json:"unpacked_uint32,omitempty"` UnpackedUint64 []uint64 `protobuf:"varint,92,rep,name=unpacked_uint64,json=unpackedUint64,proto3" json:"unpacked_uint64,omitempty"` UnpackedSint32 []int32 `protobuf:"zigzag32,93,rep,name=unpacked_sint32,json=unpackedSint32,proto3" json:"unpacked_sint32,omitempty"` UnpackedSint64 []int64 `protobuf:"zigzag64,94,rep,name=unpacked_sint64,json=unpackedSint64,proto3" json:"unpacked_sint64,omitempty"` UnpackedFixed32 []uint32 `protobuf:"fixed32,95,rep,name=unpacked_fixed32,json=unpackedFixed32,proto3" json:"unpacked_fixed32,omitempty"` UnpackedFixed64 []uint64 `protobuf:"fixed64,96,rep,name=unpacked_fixed64,json=unpackedFixed64,proto3" json:"unpacked_fixed64,omitempty"` UnpackedSfixed32 []int32 `protobuf:"fixed32,97,rep,name=unpacked_sfixed32,json=unpackedSfixed32,proto3" json:"unpacked_sfixed32,omitempty"` UnpackedSfixed64 []int64 `protobuf:"fixed64,98,rep,name=unpacked_sfixed64,json=unpackedSfixed64,proto3" json:"unpacked_sfixed64,omitempty"` UnpackedFloat []float32 `protobuf:"fixed32,99,rep,name=unpacked_float,json=unpackedFloat,proto3" json:"unpacked_float,omitempty"` UnpackedDouble []float64 `protobuf:"fixed64,100,rep,name=unpacked_double,json=unpackedDouble,proto3" json:"unpacked_double,omitempty"` UnpackedBool []bool `protobuf:"varint,101,rep,name=unpacked_bool,json=unpackedBool,proto3" json:"unpacked_bool,omitempty"` UnpackedNestedEnum []TestAllTypesProto3_NestedEnum `protobuf:"varint,102,rep,name=unpacked_nested_enum,json=unpackedNestedEnum,proto3,enum=protobuf_test_messages.proto3.TestAllTypesProto3_NestedEnum" json:"unpacked_nested_enum,omitempty"` // Map MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32,proto3" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64,proto3" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32,proto3" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64,proto3" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32,proto3" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64,proto3" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32,proto3" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64,proto3" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32,proto3" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64,proto3" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float,proto3" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double,proto3" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool,proto3" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString,proto3" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes,proto3" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` MapStringNestedMessage map[string]*TestAllTypesProto3_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage,proto3" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` MapStringForeignMessage map[string]*ForeignMessage `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage,proto3" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` MapStringNestedEnum map[string]TestAllTypesProto3_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum,proto3" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=protobuf_test_messages.proto3.TestAllTypesProto3_NestedEnum"` MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum,proto3" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=protobuf_test_messages.proto3.ForeignEnum"` // Types that are assignable to OneofField: // // *TestAllTypesProto3_OneofUint32 // *TestAllTypesProto3_OneofNestedMessage // *TestAllTypesProto3_OneofString // *TestAllTypesProto3_OneofBytes // *TestAllTypesProto3_OneofBool // *TestAllTypesProto3_OneofUint64 // *TestAllTypesProto3_OneofFloat // *TestAllTypesProto3_OneofDouble // *TestAllTypesProto3_OneofEnum // *TestAllTypesProto3_OneofNullValue OneofField isTestAllTypesProto3_OneofField `protobuf_oneof:"oneof_field"` // Well-known types OptionalBoolWrapper *wrapperspb.BoolValue `protobuf:"bytes,201,opt,name=optional_bool_wrapper,json=optionalBoolWrapper,proto3" json:"optional_bool_wrapper,omitempty"` OptionalInt32Wrapper *wrapperspb.Int32Value `protobuf:"bytes,202,opt,name=optional_int32_wrapper,json=optionalInt32Wrapper,proto3" json:"optional_int32_wrapper,omitempty"` OptionalInt64Wrapper *wrapperspb.Int64Value `protobuf:"bytes,203,opt,name=optional_int64_wrapper,json=optionalInt64Wrapper,proto3" json:"optional_int64_wrapper,omitempty"` OptionalUint32Wrapper *wrapperspb.UInt32Value `protobuf:"bytes,204,opt,name=optional_uint32_wrapper,json=optionalUint32Wrapper,proto3" json:"optional_uint32_wrapper,omitempty"` OptionalUint64Wrapper *wrapperspb.UInt64Value `protobuf:"bytes,205,opt,name=optional_uint64_wrapper,json=optionalUint64Wrapper,proto3" json:"optional_uint64_wrapper,omitempty"` OptionalFloatWrapper *wrapperspb.FloatValue `protobuf:"bytes,206,opt,name=optional_float_wrapper,json=optionalFloatWrapper,proto3" json:"optional_float_wrapper,omitempty"` OptionalDoubleWrapper *wrapperspb.DoubleValue `protobuf:"bytes,207,opt,name=optional_double_wrapper,json=optionalDoubleWrapper,proto3" json:"optional_double_wrapper,omitempty"` OptionalStringWrapper *wrapperspb.StringValue `protobuf:"bytes,208,opt,name=optional_string_wrapper,json=optionalStringWrapper,proto3" json:"optional_string_wrapper,omitempty"` OptionalBytesWrapper *wrapperspb.BytesValue `protobuf:"bytes,209,opt,name=optional_bytes_wrapper,json=optionalBytesWrapper,proto3" json:"optional_bytes_wrapper,omitempty"` RepeatedBoolWrapper []*wrapperspb.BoolValue `protobuf:"bytes,211,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper,proto3" json:"repeated_bool_wrapper,omitempty"` RepeatedInt32Wrapper []*wrapperspb.Int32Value `protobuf:"bytes,212,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper,proto3" json:"repeated_int32_wrapper,omitempty"` RepeatedInt64Wrapper []*wrapperspb.Int64Value `protobuf:"bytes,213,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper,proto3" json:"repeated_int64_wrapper,omitempty"` RepeatedUint32Wrapper []*wrapperspb.UInt32Value `protobuf:"bytes,214,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper,proto3" json:"repeated_uint32_wrapper,omitempty"` RepeatedUint64Wrapper []*wrapperspb.UInt64Value `protobuf:"bytes,215,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper,proto3" json:"repeated_uint64_wrapper,omitempty"` RepeatedFloatWrapper []*wrapperspb.FloatValue `protobuf:"bytes,216,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper,proto3" json:"repeated_float_wrapper,omitempty"` RepeatedDoubleWrapper []*wrapperspb.DoubleValue `protobuf:"bytes,217,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper,proto3" json:"repeated_double_wrapper,omitempty"` RepeatedStringWrapper []*wrapperspb.StringValue `protobuf:"bytes,218,rep,name=repeated_string_wrapper,json=repeatedStringWrapper,proto3" json:"repeated_string_wrapper,omitempty"` RepeatedBytesWrapper []*wrapperspb.BytesValue `protobuf:"bytes,219,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper,proto3" json:"repeated_bytes_wrapper,omitempty"` OptionalDuration *durationpb.Duration `protobuf:"bytes,301,opt,name=optional_duration,json=optionalDuration,proto3" json:"optional_duration,omitempty"` OptionalTimestamp *timestamppb.Timestamp `protobuf:"bytes,302,opt,name=optional_timestamp,json=optionalTimestamp,proto3" json:"optional_timestamp,omitempty"` OptionalFieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,303,opt,name=optional_field_mask,json=optionalFieldMask,proto3" json:"optional_field_mask,omitempty"` OptionalStruct *structpb.Struct `protobuf:"bytes,304,opt,name=optional_struct,json=optionalStruct,proto3" json:"optional_struct,omitempty"` OptionalAny *anypb.Any `protobuf:"bytes,305,opt,name=optional_any,json=optionalAny,proto3" json:"optional_any,omitempty"` OptionalValue *structpb.Value `protobuf:"bytes,306,opt,name=optional_value,json=optionalValue,proto3" json:"optional_value,omitempty"` OptionalNullValue structpb.NullValue `protobuf:"varint,307,opt,name=optional_null_value,json=optionalNullValue,proto3,enum=google.protobuf.NullValue" json:"optional_null_value,omitempty"` RepeatedDuration []*durationpb.Duration `protobuf:"bytes,311,rep,name=repeated_duration,json=repeatedDuration,proto3" json:"repeated_duration,omitempty"` RepeatedTimestamp []*timestamppb.Timestamp `protobuf:"bytes,312,rep,name=repeated_timestamp,json=repeatedTimestamp,proto3" json:"repeated_timestamp,omitempty"` RepeatedFieldmask []*fieldmaskpb.FieldMask `protobuf:"bytes,313,rep,name=repeated_fieldmask,json=repeatedFieldmask,proto3" json:"repeated_fieldmask,omitempty"` RepeatedStruct []*structpb.Struct `protobuf:"bytes,324,rep,name=repeated_struct,json=repeatedStruct,proto3" json:"repeated_struct,omitempty"` RepeatedAny []*anypb.Any `protobuf:"bytes,315,rep,name=repeated_any,json=repeatedAny,proto3" json:"repeated_any,omitempty"` RepeatedValue []*structpb.Value `protobuf:"bytes,316,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"` RepeatedListValue []*structpb.ListValue `protobuf:"bytes,317,rep,name=repeated_list_value,json=repeatedListValue,proto3" json:"repeated_list_value,omitempty"` // Test field-name-to-JSON-name convention. // (protobuf says names can be any valid C/C++ identifier.) Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1,proto3" json:"fieldname1,omitempty"` FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2,proto3" json:"field_name2,omitempty"` XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3,proto3" json:"_field_name3,omitempty"` Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4,proto3" json:"field__name4_,omitempty"` Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5,proto3" json:"field0name5,omitempty"` Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6,proto3" json:"field_0_name6,omitempty"` FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7,proto3" json:"fieldName7,omitempty"` FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8,proto3" json:"FieldName8,omitempty"` Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9,proto3" json:"field_Name9,omitempty"` Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10,proto3" json:"Field_Name10,omitempty"` FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11,proto3" json:"FIELD_NAME11,omitempty"` FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12,proto3" json:"FIELD_name12,omitempty"` XFieldName13 int32 `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13,proto3" json:"__field_name13,omitempty"` X_FieldName14 int32 `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14,proto3" json:"__Field_name14,omitempty"` Field_Name15 int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15,proto3" json:"field__name15,omitempty"` Field__Name16 int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16,proto3" json:"field__Name16,omitempty"` FieldName17__ int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17,proto3" json:"field_name17__,omitempty"` FieldName18__ int32 `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18,proto3" json:"Field_name18__,omitempty"` } func (x *TestAllTypesProto3) Reset() { *x = TestAllTypesProto3{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAllTypesProto3) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAllTypesProto3) ProtoMessage() {} func (x *TestAllTypesProto3) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestAllTypesProto3.ProtoReflect.Descriptor instead. func (*TestAllTypesProto3) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{0} } func (x *TestAllTypesProto3) GetOptionalInt32() int32 { if x != nil { return x.OptionalInt32 } return 0 } func (x *TestAllTypesProto3) GetOptionalInt64() int64 { if x != nil { return x.OptionalInt64 } return 0 } func (x *TestAllTypesProto3) GetOptionalUint32() uint32 { if x != nil { return x.OptionalUint32 } return 0 } func (x *TestAllTypesProto3) GetOptionalUint64() uint64 { if x != nil { return x.OptionalUint64 } return 0 } func (x *TestAllTypesProto3) GetOptionalSint32() int32 { if x != nil { return x.OptionalSint32 } return 0 } func (x *TestAllTypesProto3) GetOptionalSint64() int64 { if x != nil { return x.OptionalSint64 } return 0 } func (x *TestAllTypesProto3) GetOptionalFixed32() uint32 { if x != nil { return x.OptionalFixed32 } return 0 } func (x *TestAllTypesProto3) GetOptionalFixed64() uint64 { if x != nil { return x.OptionalFixed64 } return 0 } func (x *TestAllTypesProto3) GetOptionalSfixed32() int32 { if x != nil { return x.OptionalSfixed32 } return 0 } func (x *TestAllTypesProto3) GetOptionalSfixed64() int64 { if x != nil { return x.OptionalSfixed64 } return 0 } func (x *TestAllTypesProto3) GetOptionalFloat() float32 { if x != nil { return x.OptionalFloat } return 0 } func (x *TestAllTypesProto3) GetOptionalDouble() float64 { if x != nil { return x.OptionalDouble } return 0 } func (x *TestAllTypesProto3) GetOptionalBool() bool { if x != nil { return x.OptionalBool } return false } func (x *TestAllTypesProto3) GetOptionalString() string { if x != nil { return x.OptionalString } return "" } func (x *TestAllTypesProto3) GetOptionalBytes() []byte { if x != nil { return x.OptionalBytes } return nil } func (x *TestAllTypesProto3) GetOptionalNestedMessage() *TestAllTypesProto3_NestedMessage { if x != nil { return x.OptionalNestedMessage } return nil } func (x *TestAllTypesProto3) GetOptionalForeignMessage() *ForeignMessage { if x != nil { return x.OptionalForeignMessage } return nil } func (x *TestAllTypesProto3) GetOptionalNestedEnum() TestAllTypesProto3_NestedEnum { if x != nil { return x.OptionalNestedEnum } return TestAllTypesProto3_FOO } func (x *TestAllTypesProto3) GetOptionalForeignEnum() ForeignEnum { if x != nil { return x.OptionalForeignEnum } return ForeignEnum_FOREIGN_FOO } func (x *TestAllTypesProto3) GetOptionalAliasedEnum() TestAllTypesProto3_AliasedEnum { if x != nil { return x.OptionalAliasedEnum } return TestAllTypesProto3_ALIAS_FOO } func (x *TestAllTypesProto3) GetOptionalStringPiece() string { if x != nil { return x.OptionalStringPiece } return "" } func (x *TestAllTypesProto3) GetOptionalCord() string { if x != nil { return x.OptionalCord } return "" } func (x *TestAllTypesProto3) GetRecursiveMessage() *TestAllTypesProto3 { if x != nil { return x.RecursiveMessage } return nil } func (x *TestAllTypesProto3) GetRepeatedInt32() []int32 { if x != nil { return x.RepeatedInt32 } return nil } func (x *TestAllTypesProto3) GetRepeatedInt64() []int64 { if x != nil { return x.RepeatedInt64 } return nil } func (x *TestAllTypesProto3) GetRepeatedUint32() []uint32 { if x != nil { return x.RepeatedUint32 } return nil } func (x *TestAllTypesProto3) GetRepeatedUint64() []uint64 { if x != nil { return x.RepeatedUint64 } return nil } func (x *TestAllTypesProto3) GetRepeatedSint32() []int32 { if x != nil { return x.RepeatedSint32 } return nil } func (x *TestAllTypesProto3) GetRepeatedSint64() []int64 { if x != nil { return x.RepeatedSint64 } return nil } func (x *TestAllTypesProto3) GetRepeatedFixed32() []uint32 { if x != nil { return x.RepeatedFixed32 } return nil } func (x *TestAllTypesProto3) GetRepeatedFixed64() []uint64 { if x != nil { return x.RepeatedFixed64 } return nil } func (x *TestAllTypesProto3) GetRepeatedSfixed32() []int32 { if x != nil { return x.RepeatedSfixed32 } return nil } func (x *TestAllTypesProto3) GetRepeatedSfixed64() []int64 { if x != nil { return x.RepeatedSfixed64 } return nil } func (x *TestAllTypesProto3) GetRepeatedFloat() []float32 { if x != nil { return x.RepeatedFloat } return nil } func (x *TestAllTypesProto3) GetRepeatedDouble() []float64 { if x != nil { return x.RepeatedDouble } return nil } func (x *TestAllTypesProto3) GetRepeatedBool() []bool { if x != nil { return x.RepeatedBool } return nil } func (x *TestAllTypesProto3) GetRepeatedString() []string { if x != nil { return x.RepeatedString } return nil } func (x *TestAllTypesProto3) GetRepeatedBytes() [][]byte { if x != nil { return x.RepeatedBytes } return nil } func (x *TestAllTypesProto3) GetRepeatedNestedMessage() []*TestAllTypesProto3_NestedMessage { if x != nil { return x.RepeatedNestedMessage } return nil } func (x *TestAllTypesProto3) GetRepeatedForeignMessage() []*ForeignMessage { if x != nil { return x.RepeatedForeignMessage } return nil } func (x *TestAllTypesProto3) GetRepeatedNestedEnum() []TestAllTypesProto3_NestedEnum { if x != nil { return x.RepeatedNestedEnum } return nil } func (x *TestAllTypesProto3) GetRepeatedForeignEnum() []ForeignEnum { if x != nil { return x.RepeatedForeignEnum } return nil } func (x *TestAllTypesProto3) GetRepeatedStringPiece() []string { if x != nil { return x.RepeatedStringPiece } return nil } func (x *TestAllTypesProto3) GetRepeatedCord() []string { if x != nil { return x.RepeatedCord } return nil } func (x *TestAllTypesProto3) GetPackedInt32() []int32 { if x != nil { return x.PackedInt32 } return nil } func (x *TestAllTypesProto3) GetPackedInt64() []int64 { if x != nil { return x.PackedInt64 } return nil } func (x *TestAllTypesProto3) GetPackedUint32() []uint32 { if x != nil { return x.PackedUint32 } return nil } func (x *TestAllTypesProto3) GetPackedUint64() []uint64 { if x != nil { return x.PackedUint64 } return nil } func (x *TestAllTypesProto3) GetPackedSint32() []int32 { if x != nil { return x.PackedSint32 } return nil } func (x *TestAllTypesProto3) GetPackedSint64() []int64 { if x != nil { return x.PackedSint64 } return nil } func (x *TestAllTypesProto3) GetPackedFixed32() []uint32 { if x != nil { return x.PackedFixed32 } return nil } func (x *TestAllTypesProto3) GetPackedFixed64() []uint64 { if x != nil { return x.PackedFixed64 } return nil } func (x *TestAllTypesProto3) GetPackedSfixed32() []int32 { if x != nil { return x.PackedSfixed32 } return nil } func (x *TestAllTypesProto3) GetPackedSfixed64() []int64 { if x != nil { return x.PackedSfixed64 } return nil } func (x *TestAllTypesProto3) GetPackedFloat() []float32 { if x != nil { return x.PackedFloat } return nil } func (x *TestAllTypesProto3) GetPackedDouble() []float64 { if x != nil { return x.PackedDouble } return nil } func (x *TestAllTypesProto3) GetPackedBool() []bool { if x != nil { return x.PackedBool } return nil } func (x *TestAllTypesProto3) GetPackedNestedEnum() []TestAllTypesProto3_NestedEnum { if x != nil { return x.PackedNestedEnum } return nil } func (x *TestAllTypesProto3) GetUnpackedInt32() []int32 { if x != nil { return x.UnpackedInt32 } return nil } func (x *TestAllTypesProto3) GetUnpackedInt64() []int64 { if x != nil { return x.UnpackedInt64 } return nil } func (x *TestAllTypesProto3) GetUnpackedUint32() []uint32 { if x != nil { return x.UnpackedUint32 } return nil } func (x *TestAllTypesProto3) GetUnpackedUint64() []uint64 { if x != nil { return x.UnpackedUint64 } return nil } func (x *TestAllTypesProto3) GetUnpackedSint32() []int32 { if x != nil { return x.UnpackedSint32 } return nil } func (x *TestAllTypesProto3) GetUnpackedSint64() []int64 { if x != nil { return x.UnpackedSint64 } return nil } func (x *TestAllTypesProto3) GetUnpackedFixed32() []uint32 { if x != nil { return x.UnpackedFixed32 } return nil } func (x *TestAllTypesProto3) GetUnpackedFixed64() []uint64 { if x != nil { return x.UnpackedFixed64 } return nil } func (x *TestAllTypesProto3) GetUnpackedSfixed32() []int32 { if x != nil { return x.UnpackedSfixed32 } return nil } func (x *TestAllTypesProto3) GetUnpackedSfixed64() []int64 { if x != nil { return x.UnpackedSfixed64 } return nil } func (x *TestAllTypesProto3) GetUnpackedFloat() []float32 { if x != nil { return x.UnpackedFloat } return nil } func (x *TestAllTypesProto3) GetUnpackedDouble() []float64 { if x != nil { return x.UnpackedDouble } return nil } func (x *TestAllTypesProto3) GetUnpackedBool() []bool { if x != nil { return x.UnpackedBool } return nil } func (x *TestAllTypesProto3) GetUnpackedNestedEnum() []TestAllTypesProto3_NestedEnum { if x != nil { return x.UnpackedNestedEnum } return nil } func (x *TestAllTypesProto3) GetMapInt32Int32() map[int32]int32 { if x != nil { return x.MapInt32Int32 } return nil } func (x *TestAllTypesProto3) GetMapInt64Int64() map[int64]int64 { if x != nil { return x.MapInt64Int64 } return nil } func (x *TestAllTypesProto3) GetMapUint32Uint32() map[uint32]uint32 { if x != nil { return x.MapUint32Uint32 } return nil } func (x *TestAllTypesProto3) GetMapUint64Uint64() map[uint64]uint64 { if x != nil { return x.MapUint64Uint64 } return nil } func (x *TestAllTypesProto3) GetMapSint32Sint32() map[int32]int32 { if x != nil { return x.MapSint32Sint32 } return nil } func (x *TestAllTypesProto3) GetMapSint64Sint64() map[int64]int64 { if x != nil { return x.MapSint64Sint64 } return nil } func (x *TestAllTypesProto3) GetMapFixed32Fixed32() map[uint32]uint32 { if x != nil { return x.MapFixed32Fixed32 } return nil } func (x *TestAllTypesProto3) GetMapFixed64Fixed64() map[uint64]uint64 { if x != nil { return x.MapFixed64Fixed64 } return nil } func (x *TestAllTypesProto3) GetMapSfixed32Sfixed32() map[int32]int32 { if x != nil { return x.MapSfixed32Sfixed32 } return nil } func (x *TestAllTypesProto3) GetMapSfixed64Sfixed64() map[int64]int64 { if x != nil { return x.MapSfixed64Sfixed64 } return nil } func (x *TestAllTypesProto3) GetMapInt32Float() map[int32]float32 { if x != nil { return x.MapInt32Float } return nil } func (x *TestAllTypesProto3) GetMapInt32Double() map[int32]float64 { if x != nil { return x.MapInt32Double } return nil } func (x *TestAllTypesProto3) GetMapBoolBool() map[bool]bool { if x != nil { return x.MapBoolBool } return nil } func (x *TestAllTypesProto3) GetMapStringString() map[string]string { if x != nil { return x.MapStringString } return nil } func (x *TestAllTypesProto3) GetMapStringBytes() map[string][]byte { if x != nil { return x.MapStringBytes } return nil } func (x *TestAllTypesProto3) GetMapStringNestedMessage() map[string]*TestAllTypesProto3_NestedMessage { if x != nil { return x.MapStringNestedMessage } return nil } func (x *TestAllTypesProto3) GetMapStringForeignMessage() map[string]*ForeignMessage { if x != nil { return x.MapStringForeignMessage } return nil } func (x *TestAllTypesProto3) GetMapStringNestedEnum() map[string]TestAllTypesProto3_NestedEnum { if x != nil { return x.MapStringNestedEnum } return nil } func (x *TestAllTypesProto3) GetMapStringForeignEnum() map[string]ForeignEnum { if x != nil { return x.MapStringForeignEnum } return nil } func (m *TestAllTypesProto3) GetOneofField() isTestAllTypesProto3_OneofField { if m != nil { return m.OneofField } return nil } func (x *TestAllTypesProto3) GetOneofUint32() uint32 { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofUint32); ok { return x.OneofUint32 } return 0 } func (x *TestAllTypesProto3) GetOneofNestedMessage() *TestAllTypesProto3_NestedMessage { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofNestedMessage); ok { return x.OneofNestedMessage } return nil } func (x *TestAllTypesProto3) GetOneofString() string { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofString); ok { return x.OneofString } return "" } func (x *TestAllTypesProto3) GetOneofBytes() []byte { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofBytes); ok { return x.OneofBytes } return nil } func (x *TestAllTypesProto3) GetOneofBool() bool { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofBool); ok { return x.OneofBool } return false } func (x *TestAllTypesProto3) GetOneofUint64() uint64 { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofUint64); ok { return x.OneofUint64 } return 0 } func (x *TestAllTypesProto3) GetOneofFloat() float32 { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofFloat); ok { return x.OneofFloat } return 0 } func (x *TestAllTypesProto3) GetOneofDouble() float64 { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofDouble); ok { return x.OneofDouble } return 0 } func (x *TestAllTypesProto3) GetOneofEnum() TestAllTypesProto3_NestedEnum { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofEnum); ok { return x.OneofEnum } return TestAllTypesProto3_FOO } func (x *TestAllTypesProto3) GetOneofNullValue() structpb.NullValue { if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofNullValue); ok { return x.OneofNullValue } return structpb.NullValue(0) } func (x *TestAllTypesProto3) GetOptionalBoolWrapper() *wrapperspb.BoolValue { if x != nil { return x.OptionalBoolWrapper } return nil } func (x *TestAllTypesProto3) GetOptionalInt32Wrapper() *wrapperspb.Int32Value { if x != nil { return x.OptionalInt32Wrapper } return nil } func (x *TestAllTypesProto3) GetOptionalInt64Wrapper() *wrapperspb.Int64Value { if x != nil { return x.OptionalInt64Wrapper } return nil } func (x *TestAllTypesProto3) GetOptionalUint32Wrapper() *wrapperspb.UInt32Value { if x != nil { return x.OptionalUint32Wrapper } return nil } func (x *TestAllTypesProto3) GetOptionalUint64Wrapper() *wrapperspb.UInt64Value { if x != nil { return x.OptionalUint64Wrapper } return nil } func (x *TestAllTypesProto3) GetOptionalFloatWrapper() *wrapperspb.FloatValue { if x != nil { return x.OptionalFloatWrapper } return nil } func (x *TestAllTypesProto3) GetOptionalDoubleWrapper() *wrapperspb.DoubleValue { if x != nil { return x.OptionalDoubleWrapper } return nil } func (x *TestAllTypesProto3) GetOptionalStringWrapper() *wrapperspb.StringValue { if x != nil { return x.OptionalStringWrapper } return nil } func (x *TestAllTypesProto3) GetOptionalBytesWrapper() *wrapperspb.BytesValue { if x != nil { return x.OptionalBytesWrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedBoolWrapper() []*wrapperspb.BoolValue { if x != nil { return x.RepeatedBoolWrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedInt32Wrapper() []*wrapperspb.Int32Value { if x != nil { return x.RepeatedInt32Wrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedInt64Wrapper() []*wrapperspb.Int64Value { if x != nil { return x.RepeatedInt64Wrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedUint32Wrapper() []*wrapperspb.UInt32Value { if x != nil { return x.RepeatedUint32Wrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedUint64Wrapper() []*wrapperspb.UInt64Value { if x != nil { return x.RepeatedUint64Wrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedFloatWrapper() []*wrapperspb.FloatValue { if x != nil { return x.RepeatedFloatWrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedDoubleWrapper() []*wrapperspb.DoubleValue { if x != nil { return x.RepeatedDoubleWrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedStringWrapper() []*wrapperspb.StringValue { if x != nil { return x.RepeatedStringWrapper } return nil } func (x *TestAllTypesProto3) GetRepeatedBytesWrapper() []*wrapperspb.BytesValue { if x != nil { return x.RepeatedBytesWrapper } return nil } func (x *TestAllTypesProto3) GetOptionalDuration() *durationpb.Duration { if x != nil { return x.OptionalDuration } return nil } func (x *TestAllTypesProto3) GetOptionalTimestamp() *timestamppb.Timestamp { if x != nil { return x.OptionalTimestamp } return nil } func (x *TestAllTypesProto3) GetOptionalFieldMask() *fieldmaskpb.FieldMask { if x != nil { return x.OptionalFieldMask } return nil } func (x *TestAllTypesProto3) GetOptionalStruct() *structpb.Struct { if x != nil { return x.OptionalStruct } return nil } func (x *TestAllTypesProto3) GetOptionalAny() *anypb.Any { if x != nil { return x.OptionalAny } return nil } func (x *TestAllTypesProto3) GetOptionalValue() *structpb.Value { if x != nil { return x.OptionalValue } return nil } func (x *TestAllTypesProto3) GetOptionalNullValue() structpb.NullValue { if x != nil { return x.OptionalNullValue } return structpb.NullValue(0) } func (x *TestAllTypesProto3) GetRepeatedDuration() []*durationpb.Duration { if x != nil { return x.RepeatedDuration } return nil } func (x *TestAllTypesProto3) GetRepeatedTimestamp() []*timestamppb.Timestamp { if x != nil { return x.RepeatedTimestamp } return nil } func (x *TestAllTypesProto3) GetRepeatedFieldmask() []*fieldmaskpb.FieldMask { if x != nil { return x.RepeatedFieldmask } return nil } func (x *TestAllTypesProto3) GetRepeatedStruct() []*structpb.Struct { if x != nil { return x.RepeatedStruct } return nil } func (x *TestAllTypesProto3) GetRepeatedAny() []*anypb.Any { if x != nil { return x.RepeatedAny } return nil } func (x *TestAllTypesProto3) GetRepeatedValue() []*structpb.Value { if x != nil { return x.RepeatedValue } return nil } func (x *TestAllTypesProto3) GetRepeatedListValue() []*structpb.ListValue { if x != nil { return x.RepeatedListValue } return nil } func (x *TestAllTypesProto3) GetFieldname1() int32 { if x != nil { return x.Fieldname1 } return 0 } func (x *TestAllTypesProto3) GetFieldName2() int32 { if x != nil { return x.FieldName2 } return 0 } func (x *TestAllTypesProto3) GetXFieldName3() int32 { if x != nil { return x.XFieldName3 } return 0 } func (x *TestAllTypesProto3) GetField_Name4_() int32 { if x != nil { return x.Field_Name4_ } return 0 } func (x *TestAllTypesProto3) GetField0Name5() int32 { if x != nil { return x.Field0Name5 } return 0 } func (x *TestAllTypesProto3) GetField_0Name6() int32 { if x != nil { return x.Field_0Name6 } return 0 } func (x *TestAllTypesProto3) GetFieldName7() int32 { if x != nil { return x.FieldName7 } return 0 } func (x *TestAllTypesProto3) GetFieldName8() int32 { if x != nil { return x.FieldName8 } return 0 } func (x *TestAllTypesProto3) GetField_Name9() int32 { if x != nil { return x.Field_Name9 } return 0 } func (x *TestAllTypesProto3) GetField_Name10() int32 { if x != nil { return x.Field_Name10 } return 0 } func (x *TestAllTypesProto3) GetFIELD_NAME11() int32 { if x != nil { return x.FIELD_NAME11 } return 0 } func (x *TestAllTypesProto3) GetFIELDName12() int32 { if x != nil { return x.FIELDName12 } return 0 } func (x *TestAllTypesProto3) GetXFieldName13() int32 { if x != nil { return x.XFieldName13 } return 0 } func (x *TestAllTypesProto3) GetX_FieldName14() int32 { if x != nil { return x.X_FieldName14 } return 0 } func (x *TestAllTypesProto3) GetField_Name15() int32 { if x != nil { return x.Field_Name15 } return 0 } func (x *TestAllTypesProto3) GetField__Name16() int32 { if x != nil { return x.Field__Name16 } return 0 } func (x *TestAllTypesProto3) GetFieldName17__() int32 { if x != nil { return x.FieldName17__ } return 0 } func (x *TestAllTypesProto3) GetFieldName18__() int32 { if x != nil { return x.FieldName18__ } return 0 } type isTestAllTypesProto3_OneofField interface { isTestAllTypesProto3_OneofField() } type TestAllTypesProto3_OneofUint32 struct { OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"` } type TestAllTypesProto3_OneofNestedMessage struct { OneofNestedMessage *TestAllTypesProto3_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,proto3,oneof"` } type TestAllTypesProto3_OneofString struct { OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"` } type TestAllTypesProto3_OneofBytes struct { OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` } type TestAllTypesProto3_OneofBool struct { OneofBool bool `protobuf:"varint,115,opt,name=oneof_bool,json=oneofBool,proto3,oneof"` } type TestAllTypesProto3_OneofUint64 struct { OneofUint64 uint64 `protobuf:"varint,116,opt,name=oneof_uint64,json=oneofUint64,proto3,oneof"` } type TestAllTypesProto3_OneofFloat struct { OneofFloat float32 `protobuf:"fixed32,117,opt,name=oneof_float,json=oneofFloat,proto3,oneof"` } type TestAllTypesProto3_OneofDouble struct { OneofDouble float64 `protobuf:"fixed64,118,opt,name=oneof_double,json=oneofDouble,proto3,oneof"` } type TestAllTypesProto3_OneofEnum struct { OneofEnum TestAllTypesProto3_NestedEnum `protobuf:"varint,119,opt,name=oneof_enum,json=oneofEnum,proto3,enum=protobuf_test_messages.proto3.TestAllTypesProto3_NestedEnum,oneof"` } type TestAllTypesProto3_OneofNullValue struct { OneofNullValue structpb.NullValue `protobuf:"varint,120,opt,name=oneof_null_value,json=oneofNullValue,proto3,enum=google.protobuf.NullValue,oneof"` } func (*TestAllTypesProto3_OneofUint32) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofNestedMessage) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofString) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofBytes) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofBool) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofUint64) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofFloat) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofDouble) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofEnum) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofNullValue) isTestAllTypesProto3_OneofField() {} type ForeignMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` } func (x *ForeignMessage) Reset() { *x = ForeignMessage{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ForeignMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*ForeignMessage) ProtoMessage() {} func (x *ForeignMessage) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ForeignMessage.ProtoReflect.Descriptor instead. func (*ForeignMessage) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{1} } func (x *ForeignMessage) GetC() int32 { if x != nil { return x.C } return 0 } type NullHypothesisProto3 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *NullHypothesisProto3) Reset() { *x = NullHypothesisProto3{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *NullHypothesisProto3) String() string { return protoimpl.X.MessageStringOf(x) } func (*NullHypothesisProto3) ProtoMessage() {} func (x *NullHypothesisProto3) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use NullHypothesisProto3.ProtoReflect.Descriptor instead. func (*NullHypothesisProto3) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{2} } type EnumOnlyProto3 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *EnumOnlyProto3) Reset() { *x = EnumOnlyProto3{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EnumOnlyProto3) String() string { return protoimpl.X.MessageStringOf(x) } func (*EnumOnlyProto3) ProtoMessage() {} func (x *EnumOnlyProto3) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use EnumOnlyProto3.ProtoReflect.Descriptor instead. func (*EnumOnlyProto3) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{3} } type TestAllTypesProto3_NestedMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` Corecursive *TestAllTypesProto3 `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"` } func (x *TestAllTypesProto3_NestedMessage) Reset() { *x = TestAllTypesProto3_NestedMessage{} if protoimpl.UnsafeEnabled { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAllTypesProto3_NestedMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAllTypesProto3_NestedMessage) ProtoMessage() {} func (x *TestAllTypesProto3_NestedMessage) ProtoReflect() protoreflect.Message { mi := &file_src_google_protobuf_test_messages_proto3_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestAllTypesProto3_NestedMessage.ProtoReflect.Descriptor instead. func (*TestAllTypesProto3_NestedMessage) Descriptor() ([]byte, []int) { return file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP(), []int{0, 0} } func (x *TestAllTypesProto3_NestedMessage) GetA() int32 { if x != nil { return x.A } return 0 } func (x *TestAllTypesProto3_NestedMessage) GetCorecursive() *TestAllTypesProto3 { if x != nil { return x.Corecursive } return nil } var File_src_google_protobuf_test_messages_proto3_proto protoreflect.FileDescriptor var file_src_google_protobuf_test_messages_proto3_proto_rawDesc = []byte{ 0x0a, 0x2e, 0x73, 0x72, 0x63, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x5b, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x10, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x67, 0x0a, 0x18, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x6e, 0x0a, 0x14, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x5e, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x71, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x08, 0x02, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x72, 0x64, 0x12, 0x5e, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x52, 0x10, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x20, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x22, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x23, 0x20, 0x03, 0x28, 0x11, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x24, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x25, 0x20, 0x03, 0x28, 0x07, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x26, 0x20, 0x03, 0x28, 0x06, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x27, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x28, 0x20, 0x03, 0x28, 0x10, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x29, 0x20, 0x03, 0x28, 0x02, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x2a, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x2c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x2d, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x30, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x67, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x31, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x16, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x6e, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x33, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x12, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x5e, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x34, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x18, 0x36, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x08, 0x02, 0x52, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x37, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x72, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x4b, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x4c, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x4d, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x4e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x4f, 0x20, 0x03, 0x28, 0x11, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x50, 0x20, 0x03, 0x28, 0x12, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x51, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x52, 0x20, 0x03, 0x28, 0x06, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x53, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x54, 0x20, 0x03, 0x28, 0x10, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x55, 0x20, 0x03, 0x28, 0x02, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x56, 0x20, 0x03, 0x28, 0x01, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x57, 0x20, 0x03, 0x28, 0x08, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x6e, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x58, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x29, 0x0a, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x59, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0d, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x5a, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0d, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x5b, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x5c, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x5d, 0x20, 0x03, 0x28, 0x11, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x5e, 0x20, 0x03, 0x28, 0x12, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2d, 0x0a, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x5f, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2d, 0x0a, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x60, 0x20, 0x03, 0x28, 0x06, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x11, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x61, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x02, 0x10, 0x00, 0x52, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x11, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x62, 0x20, 0x03, 0x28, 0x10, 0x42, 0x02, 0x10, 0x00, 0x52, 0x10, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x63, 0x20, 0x03, 0x28, 0x02, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0d, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x64, 0x20, 0x03, 0x28, 0x01, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x65, 0x20, 0x03, 0x28, 0x08, 0x42, 0x02, 0x10, 0x00, 0x52, 0x0c, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x72, 0x0a, 0x14, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x66, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x02, 0x10, 0x00, 0x52, 0x12, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x6c, 0x0a, 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x38, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x6c, 0x0a, 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x39, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x3a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x3b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x3c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x3d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x78, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x3e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x78, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x3f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x7e, 0x0a, 0x15, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x40, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x6d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x7e, 0x0a, 0x15, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x41, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x6d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x6c, 0x0a, 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x42, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x6f, 0x0a, 0x10, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x43, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x66, 0x0a, 0x0d, 0x6d, 0x61, 0x70, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x44, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x6d, 0x61, 0x70, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x72, 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x45, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x6f, 0x0a, 0x10, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x46, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x19, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x47, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x48, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x17, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x49, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x6d, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x4a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x73, 0x0a, 0x14, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x12, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x71, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x73, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x74, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x21, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x75, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x76, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x5d, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x46, 0x0a, 0x10, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x78, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4f, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xca, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xcb, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xcc, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xcd, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xce, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xcf, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd0, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd1, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd3, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x16, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd4, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x16, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd5, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd6, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd7, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x16, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd8, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xd9, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xda, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x16, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0xdb, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xad, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0xae, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4b, 0x0a, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0xaf, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x41, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x18, 0xb0, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0xb1, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x6e, 0x79, 0x12, 0x3e, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0xb2, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0xb3, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xb7, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0xb8, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4a, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0xb9, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x41, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x18, 0xc4, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0xbb, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x12, 0x3e, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0xbc, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0xbd, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x18, 0x91, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x18, 0x92, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x12, 0x21, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x33, 0x18, 0x93, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x33, 0x12, 0x22, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x34, 0x5f, 0x18, 0x94, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x34, 0x12, 0x21, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x30, 0x6e, 0x61, 0x6d, 0x65, 0x35, 0x18, 0x95, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x30, 0x6e, 0x61, 0x6d, 0x65, 0x35, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x30, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x36, 0x18, 0x96, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x30, 0x4e, 0x61, 0x6d, 0x65, 0x36, 0x12, 0x1f, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x37, 0x18, 0x97, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x37, 0x12, 0x1f, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x38, 0x18, 0x98, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x38, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x39, 0x18, 0x99, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x39, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x30, 0x18, 0x9a, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x30, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x31, 0x31, 0x18, 0x9b, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x4e, 0x41, 0x4d, 0x45, 0x31, 0x31, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x32, 0x18, 0x9c, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x32, 0x12, 0x24, 0x0a, 0x0e, 0x5f, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x33, 0x18, 0x9d, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x33, 0x12, 0x24, 0x0a, 0x0e, 0x5f, 0x5f, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x34, 0x18, 0x9e, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x34, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x35, 0x18, 0x9f, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x35, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x36, 0x18, 0xa0, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x36, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x37, 0x5f, 0x5f, 0x18, 0xa1, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x37, 0x12, 0x24, 0x0a, 0x0e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x38, 0x5f, 0x5f, 0x18, 0xa2, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x38, 0x1a, 0x72, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x12, 0x53, 0x0a, 0x0b, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x1a, 0x40, 0x0a, 0x12, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x18, 0x4d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x18, 0x4d, 0x61, 0x70, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x10, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x4d, 0x61, 0x70, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x8a, 0x01, 0x0a, 0x1b, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x55, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x79, 0x0a, 0x1c, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x84, 0x01, 0x0a, 0x18, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x52, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x73, 0x0a, 0x19, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x39, 0x0a, 0x0a, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x4f, 0x4f, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x41, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x41, 0x5a, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x45, 0x47, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x22, 0x59, 0x0a, 0x0b, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x5f, 0x46, 0x4f, 0x4f, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x5f, 0x42, 0x41, 0x52, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x5f, 0x42, 0x41, 0x5a, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x4f, 0x4f, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x6d, 0x6f, 0x6f, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x41, 0x7a, 0x10, 0x02, 0x1a, 0x02, 0x10, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4a, 0x06, 0x08, 0xf5, 0x03, 0x10, 0xff, 0x03, 0x22, 0x1e, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x63, 0x22, 0x16, 0x0a, 0x14, 0x4e, 0x75, 0x6c, 0x6c, 0x48, 0x79, 0x70, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x2f, 0x0a, 0x0e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x6e, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x1d, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x0a, 0x0a, 0x06, 0x6b, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x6b, 0x54, 0x72, 0x75, 0x65, 0x10, 0x01, 0x2a, 0x40, 0x0a, 0x0b, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e, 0x5f, 0x46, 0x4f, 0x4f, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e, 0x5f, 0x42, 0x41, 0x52, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e, 0x5f, 0x42, 0x41, 0x5a, 0x10, 0x02, 0x42, 0x38, 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x48, 0x01, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x06, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_src_google_protobuf_test_messages_proto3_proto_rawDescOnce sync.Once file_src_google_protobuf_test_messages_proto3_proto_rawDescData = file_src_google_protobuf_test_messages_proto3_proto_rawDesc ) func file_src_google_protobuf_test_messages_proto3_proto_rawDescGZIP() []byte { file_src_google_protobuf_test_messages_proto3_proto_rawDescOnce.Do(func() { file_src_google_protobuf_test_messages_proto3_proto_rawDescData = protoimpl.X.CompressGZIP(file_src_google_protobuf_test_messages_proto3_proto_rawDescData) }) return file_src_google_protobuf_test_messages_proto3_proto_rawDescData } var file_src_google_protobuf_test_messages_proto3_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_src_google_protobuf_test_messages_proto3_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_src_google_protobuf_test_messages_proto3_proto_goTypes = []interface{}{ (ForeignEnum)(0), // 0: protobuf_test_messages.proto3.ForeignEnum (TestAllTypesProto3_NestedEnum)(0), // 1: protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum (TestAllTypesProto3_AliasedEnum)(0), // 2: protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum (EnumOnlyProto3_Bool)(0), // 3: protobuf_test_messages.proto3.EnumOnlyProto3.Bool (*TestAllTypesProto3)(nil), // 4: protobuf_test_messages.proto3.TestAllTypesProto3 (*ForeignMessage)(nil), // 5: protobuf_test_messages.proto3.ForeignMessage (*NullHypothesisProto3)(nil), // 6: protobuf_test_messages.proto3.NullHypothesisProto3 (*EnumOnlyProto3)(nil), // 7: protobuf_test_messages.proto3.EnumOnlyProto3 (*TestAllTypesProto3_NestedMessage)(nil), // 8: protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage nil, // 9: protobuf_test_messages.proto3.TestAllTypesProto3.MapInt32Int32Entry nil, // 10: protobuf_test_messages.proto3.TestAllTypesProto3.MapInt64Int64Entry nil, // 11: protobuf_test_messages.proto3.TestAllTypesProto3.MapUint32Uint32Entry nil, // 12: protobuf_test_messages.proto3.TestAllTypesProto3.MapUint64Uint64Entry nil, // 13: protobuf_test_messages.proto3.TestAllTypesProto3.MapSint32Sint32Entry nil, // 14: protobuf_test_messages.proto3.TestAllTypesProto3.MapSint64Sint64Entry nil, // 15: protobuf_test_messages.proto3.TestAllTypesProto3.MapFixed32Fixed32Entry nil, // 16: protobuf_test_messages.proto3.TestAllTypesProto3.MapFixed64Fixed64Entry nil, // 17: protobuf_test_messages.proto3.TestAllTypesProto3.MapSfixed32Sfixed32Entry nil, // 18: protobuf_test_messages.proto3.TestAllTypesProto3.MapSfixed64Sfixed64Entry nil, // 19: protobuf_test_messages.proto3.TestAllTypesProto3.MapInt32FloatEntry nil, // 20: protobuf_test_messages.proto3.TestAllTypesProto3.MapInt32DoubleEntry nil, // 21: protobuf_test_messages.proto3.TestAllTypesProto3.MapBoolBoolEntry nil, // 22: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringStringEntry nil, // 23: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringBytesEntry nil, // 24: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringNestedMessageEntry nil, // 25: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringForeignMessageEntry nil, // 26: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringNestedEnumEntry nil, // 27: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringForeignEnumEntry (structpb.NullValue)(0), // 28: google.protobuf.NullValue (*wrapperspb.BoolValue)(nil), // 29: google.protobuf.BoolValue (*wrapperspb.Int32Value)(nil), // 30: google.protobuf.Int32Value (*wrapperspb.Int64Value)(nil), // 31: google.protobuf.Int64Value (*wrapperspb.UInt32Value)(nil), // 32: google.protobuf.UInt32Value (*wrapperspb.UInt64Value)(nil), // 33: google.protobuf.UInt64Value (*wrapperspb.FloatValue)(nil), // 34: google.protobuf.FloatValue (*wrapperspb.DoubleValue)(nil), // 35: google.protobuf.DoubleValue (*wrapperspb.StringValue)(nil), // 36: google.protobuf.StringValue (*wrapperspb.BytesValue)(nil), // 37: google.protobuf.BytesValue (*durationpb.Duration)(nil), // 38: google.protobuf.Duration (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp (*fieldmaskpb.FieldMask)(nil), // 40: google.protobuf.FieldMask (*structpb.Struct)(nil), // 41: google.protobuf.Struct (*anypb.Any)(nil), // 42: google.protobuf.Any (*structpb.Value)(nil), // 43: google.protobuf.Value (*structpb.ListValue)(nil), // 44: google.protobuf.ListValue } var file_src_google_protobuf_test_messages_proto3_proto_depIdxs = []int32{ 8, // 0: protobuf_test_messages.proto3.TestAllTypesProto3.optional_nested_message:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage 5, // 1: protobuf_test_messages.proto3.TestAllTypesProto3.optional_foreign_message:type_name -> protobuf_test_messages.proto3.ForeignMessage 1, // 2: protobuf_test_messages.proto3.TestAllTypesProto3.optional_nested_enum:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum 0, // 3: protobuf_test_messages.proto3.TestAllTypesProto3.optional_foreign_enum:type_name -> protobuf_test_messages.proto3.ForeignEnum 2, // 4: protobuf_test_messages.proto3.TestAllTypesProto3.optional_aliased_enum:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum 4, // 5: protobuf_test_messages.proto3.TestAllTypesProto3.recursive_message:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3 8, // 6: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_nested_message:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage 5, // 7: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_foreign_message:type_name -> protobuf_test_messages.proto3.ForeignMessage 1, // 8: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_nested_enum:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum 0, // 9: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_foreign_enum:type_name -> protobuf_test_messages.proto3.ForeignEnum 1, // 10: protobuf_test_messages.proto3.TestAllTypesProto3.packed_nested_enum:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum 1, // 11: protobuf_test_messages.proto3.TestAllTypesProto3.unpacked_nested_enum:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum 9, // 12: protobuf_test_messages.proto3.TestAllTypesProto3.map_int32_int32:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapInt32Int32Entry 10, // 13: protobuf_test_messages.proto3.TestAllTypesProto3.map_int64_int64:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapInt64Int64Entry 11, // 14: protobuf_test_messages.proto3.TestAllTypesProto3.map_uint32_uint32:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapUint32Uint32Entry 12, // 15: protobuf_test_messages.proto3.TestAllTypesProto3.map_uint64_uint64:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapUint64Uint64Entry 13, // 16: protobuf_test_messages.proto3.TestAllTypesProto3.map_sint32_sint32:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapSint32Sint32Entry 14, // 17: protobuf_test_messages.proto3.TestAllTypesProto3.map_sint64_sint64:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapSint64Sint64Entry 15, // 18: protobuf_test_messages.proto3.TestAllTypesProto3.map_fixed32_fixed32:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapFixed32Fixed32Entry 16, // 19: protobuf_test_messages.proto3.TestAllTypesProto3.map_fixed64_fixed64:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapFixed64Fixed64Entry 17, // 20: protobuf_test_messages.proto3.TestAllTypesProto3.map_sfixed32_sfixed32:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapSfixed32Sfixed32Entry 18, // 21: protobuf_test_messages.proto3.TestAllTypesProto3.map_sfixed64_sfixed64:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapSfixed64Sfixed64Entry 19, // 22: protobuf_test_messages.proto3.TestAllTypesProto3.map_int32_float:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapInt32FloatEntry 20, // 23: protobuf_test_messages.proto3.TestAllTypesProto3.map_int32_double:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapInt32DoubleEntry 21, // 24: protobuf_test_messages.proto3.TestAllTypesProto3.map_bool_bool:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapBoolBoolEntry 22, // 25: protobuf_test_messages.proto3.TestAllTypesProto3.map_string_string:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapStringStringEntry 23, // 26: protobuf_test_messages.proto3.TestAllTypesProto3.map_string_bytes:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapStringBytesEntry 24, // 27: protobuf_test_messages.proto3.TestAllTypesProto3.map_string_nested_message:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapStringNestedMessageEntry 25, // 28: protobuf_test_messages.proto3.TestAllTypesProto3.map_string_foreign_message:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapStringForeignMessageEntry 26, // 29: protobuf_test_messages.proto3.TestAllTypesProto3.map_string_nested_enum:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapStringNestedEnumEntry 27, // 30: protobuf_test_messages.proto3.TestAllTypesProto3.map_string_foreign_enum:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.MapStringForeignEnumEntry 8, // 31: protobuf_test_messages.proto3.TestAllTypesProto3.oneof_nested_message:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage 1, // 32: protobuf_test_messages.proto3.TestAllTypesProto3.oneof_enum:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum 28, // 33: protobuf_test_messages.proto3.TestAllTypesProto3.oneof_null_value:type_name -> google.protobuf.NullValue 29, // 34: protobuf_test_messages.proto3.TestAllTypesProto3.optional_bool_wrapper:type_name -> google.protobuf.BoolValue 30, // 35: protobuf_test_messages.proto3.TestAllTypesProto3.optional_int32_wrapper:type_name -> google.protobuf.Int32Value 31, // 36: protobuf_test_messages.proto3.TestAllTypesProto3.optional_int64_wrapper:type_name -> google.protobuf.Int64Value 32, // 37: protobuf_test_messages.proto3.TestAllTypesProto3.optional_uint32_wrapper:type_name -> google.protobuf.UInt32Value 33, // 38: protobuf_test_messages.proto3.TestAllTypesProto3.optional_uint64_wrapper:type_name -> google.protobuf.UInt64Value 34, // 39: protobuf_test_messages.proto3.TestAllTypesProto3.optional_float_wrapper:type_name -> google.protobuf.FloatValue 35, // 40: protobuf_test_messages.proto3.TestAllTypesProto3.optional_double_wrapper:type_name -> google.protobuf.DoubleValue 36, // 41: protobuf_test_messages.proto3.TestAllTypesProto3.optional_string_wrapper:type_name -> google.protobuf.StringValue 37, // 42: protobuf_test_messages.proto3.TestAllTypesProto3.optional_bytes_wrapper:type_name -> google.protobuf.BytesValue 29, // 43: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_bool_wrapper:type_name -> google.protobuf.BoolValue 30, // 44: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_int32_wrapper:type_name -> google.protobuf.Int32Value 31, // 45: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_int64_wrapper:type_name -> google.protobuf.Int64Value 32, // 46: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_uint32_wrapper:type_name -> google.protobuf.UInt32Value 33, // 47: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_uint64_wrapper:type_name -> google.protobuf.UInt64Value 34, // 48: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_float_wrapper:type_name -> google.protobuf.FloatValue 35, // 49: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_double_wrapper:type_name -> google.protobuf.DoubleValue 36, // 50: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_string_wrapper:type_name -> google.protobuf.StringValue 37, // 51: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_bytes_wrapper:type_name -> google.protobuf.BytesValue 38, // 52: protobuf_test_messages.proto3.TestAllTypesProto3.optional_duration:type_name -> google.protobuf.Duration 39, // 53: protobuf_test_messages.proto3.TestAllTypesProto3.optional_timestamp:type_name -> google.protobuf.Timestamp 40, // 54: protobuf_test_messages.proto3.TestAllTypesProto3.optional_field_mask:type_name -> google.protobuf.FieldMask 41, // 55: protobuf_test_messages.proto3.TestAllTypesProto3.optional_struct:type_name -> google.protobuf.Struct 42, // 56: protobuf_test_messages.proto3.TestAllTypesProto3.optional_any:type_name -> google.protobuf.Any 43, // 57: protobuf_test_messages.proto3.TestAllTypesProto3.optional_value:type_name -> google.protobuf.Value 28, // 58: protobuf_test_messages.proto3.TestAllTypesProto3.optional_null_value:type_name -> google.protobuf.NullValue 38, // 59: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_duration:type_name -> google.protobuf.Duration 39, // 60: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_timestamp:type_name -> google.protobuf.Timestamp 40, // 61: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_fieldmask:type_name -> google.protobuf.FieldMask 41, // 62: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_struct:type_name -> google.protobuf.Struct 42, // 63: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_any:type_name -> google.protobuf.Any 43, // 64: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_value:type_name -> google.protobuf.Value 44, // 65: protobuf_test_messages.proto3.TestAllTypesProto3.repeated_list_value:type_name -> google.protobuf.ListValue 4, // 66: protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage.corecursive:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3 8, // 67: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringNestedMessageEntry.value:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage 5, // 68: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringForeignMessageEntry.value:type_name -> protobuf_test_messages.proto3.ForeignMessage 1, // 69: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringNestedEnumEntry.value:type_name -> protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum 0, // 70: protobuf_test_messages.proto3.TestAllTypesProto3.MapStringForeignEnumEntry.value:type_name -> protobuf_test_messages.proto3.ForeignEnum 71, // [71:71] is the sub-list for method output_type 71, // [71:71] is the sub-list for method input_type 71, // [71:71] is the sub-list for extension type_name 71, // [71:71] is the sub-list for extension extendee 0, // [0:71] is the sub-list for field type_name } func init() { file_src_google_protobuf_test_messages_proto3_proto_init() } func file_src_google_protobuf_test_messages_proto3_proto_init() { if File_src_google_protobuf_test_messages_proto3_proto != nil { return } if !protoimpl.UnsafeEnabled { file_src_google_protobuf_test_messages_proto3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAllTypesProto3); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ForeignMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto3_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NullHypothesisProto3); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto3_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumOnlyProto3); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_src_google_protobuf_test_messages_proto3_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAllTypesProto3_NestedMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_src_google_protobuf_test_messages_proto3_proto_msgTypes[0].OneofWrappers = []interface{}{ (*TestAllTypesProto3_OneofUint32)(nil), (*TestAllTypesProto3_OneofNestedMessage)(nil), (*TestAllTypesProto3_OneofString)(nil), (*TestAllTypesProto3_OneofBytes)(nil), (*TestAllTypesProto3_OneofBool)(nil), (*TestAllTypesProto3_OneofUint64)(nil), (*TestAllTypesProto3_OneofFloat)(nil), (*TestAllTypesProto3_OneofDouble)(nil), (*TestAllTypesProto3_OneofEnum)(nil), (*TestAllTypesProto3_OneofNullValue)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_src_google_protobuf_test_messages_proto3_proto_rawDesc, NumEnums: 4, NumMessages: 24, NumExtensions: 0, NumServices: 0, }, GoTypes: file_src_google_protobuf_test_messages_proto3_proto_goTypes, DependencyIndexes: file_src_google_protobuf_test_messages_proto3_proto_depIdxs, EnumInfos: file_src_google_protobuf_test_messages_proto3_proto_enumTypes, MessageInfos: file_src_google_protobuf_test_messages_proto3_proto_msgTypes, }.Build() File_src_google_protobuf_test_messages_proto3_proto = out.File file_src_google_protobuf_test_messages_proto3_proto_rawDesc = nil file_src_google_protobuf_test_messages_proto3_proto_goTypes = nil file_src_google_protobuf_test_messages_proto3_proto_depIdxs = nil } test_messages_proto3_vtproto.pb.go000066400000000000000000020555761455570004500362170ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/conformance/internal/conformance// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: src/google/protobuf/test_messages_proto3.proto package conformance import ( binary "encoding/binary" fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" anypb1 "github.com/planetscale/vtprotobuf/types/known/anypb" durationpb1 "github.com/planetscale/vtprotobuf/types/known/durationpb" fieldmaskpb1 "github.com/planetscale/vtprotobuf/types/known/fieldmaskpb" structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb" timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb" wrapperspb1 "github.com/planetscale/vtprotobuf/types/known/wrapperspb" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" durationpb "google.golang.org/protobuf/types/known/durationpb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" io "io" math "math" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *TestAllTypesProto3_NestedMessage) CloneVT() *TestAllTypesProto3_NestedMessage { if m == nil { return (*TestAllTypesProto3_NestedMessage)(nil) } r := new(TestAllTypesProto3_NestedMessage) r.A = m.A r.Corecursive = m.Corecursive.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestAllTypesProto3_NestedMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestAllTypesProto3) CloneVT() *TestAllTypesProto3 { if m == nil { return (*TestAllTypesProto3)(nil) } r := new(TestAllTypesProto3) r.OptionalInt32 = m.OptionalInt32 r.OptionalInt64 = m.OptionalInt64 r.OptionalUint32 = m.OptionalUint32 r.OptionalUint64 = m.OptionalUint64 r.OptionalSint32 = m.OptionalSint32 r.OptionalSint64 = m.OptionalSint64 r.OptionalFixed32 = m.OptionalFixed32 r.OptionalFixed64 = m.OptionalFixed64 r.OptionalSfixed32 = m.OptionalSfixed32 r.OptionalSfixed64 = m.OptionalSfixed64 r.OptionalFloat = m.OptionalFloat r.OptionalDouble = m.OptionalDouble r.OptionalBool = m.OptionalBool r.OptionalString = m.OptionalString r.OptionalNestedMessage = m.OptionalNestedMessage.CloneVT() r.OptionalForeignMessage = m.OptionalForeignMessage.CloneVT() r.OptionalNestedEnum = m.OptionalNestedEnum r.OptionalForeignEnum = m.OptionalForeignEnum r.OptionalAliasedEnum = m.OptionalAliasedEnum r.OptionalStringPiece = m.OptionalStringPiece r.OptionalCord = m.OptionalCord r.RecursiveMessage = m.RecursiveMessage.CloneVT() r.OptionalBoolWrapper = (*wrapperspb.BoolValue)((*wrapperspb1.BoolValue)(m.OptionalBoolWrapper).CloneVT()) r.OptionalInt32Wrapper = (*wrapperspb.Int32Value)((*wrapperspb1.Int32Value)(m.OptionalInt32Wrapper).CloneVT()) r.OptionalInt64Wrapper = (*wrapperspb.Int64Value)((*wrapperspb1.Int64Value)(m.OptionalInt64Wrapper).CloneVT()) r.OptionalUint32Wrapper = (*wrapperspb.UInt32Value)((*wrapperspb1.UInt32Value)(m.OptionalUint32Wrapper).CloneVT()) r.OptionalUint64Wrapper = (*wrapperspb.UInt64Value)((*wrapperspb1.UInt64Value)(m.OptionalUint64Wrapper).CloneVT()) r.OptionalFloatWrapper = (*wrapperspb.FloatValue)((*wrapperspb1.FloatValue)(m.OptionalFloatWrapper).CloneVT()) r.OptionalDoubleWrapper = (*wrapperspb.DoubleValue)((*wrapperspb1.DoubleValue)(m.OptionalDoubleWrapper).CloneVT()) r.OptionalStringWrapper = (*wrapperspb.StringValue)((*wrapperspb1.StringValue)(m.OptionalStringWrapper).CloneVT()) r.OptionalBytesWrapper = (*wrapperspb.BytesValue)((*wrapperspb1.BytesValue)(m.OptionalBytesWrapper).CloneVT()) r.OptionalDuration = (*durationpb.Duration)((*durationpb1.Duration)(m.OptionalDuration).CloneVT()) r.OptionalTimestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.OptionalTimestamp).CloneVT()) r.OptionalFieldMask = (*fieldmaskpb.FieldMask)((*fieldmaskpb1.FieldMask)(m.OptionalFieldMask).CloneVT()) r.OptionalStruct = (*structpb.Struct)((*structpb1.Struct)(m.OptionalStruct).CloneVT()) r.OptionalAny = (*anypb.Any)((*anypb1.Any)(m.OptionalAny).CloneVT()) r.OptionalValue = (*structpb.Value)((*structpb1.Value)(m.OptionalValue).CloneVT()) r.OptionalNullValue = m.OptionalNullValue r.Fieldname1 = m.Fieldname1 r.FieldName2 = m.FieldName2 r.XFieldName3 = m.XFieldName3 r.Field_Name4_ = m.Field_Name4_ r.Field0Name5 = m.Field0Name5 r.Field_0Name6 = m.Field_0Name6 r.FieldName7 = m.FieldName7 r.FieldName8 = m.FieldName8 r.Field_Name9 = m.Field_Name9 r.Field_Name10 = m.Field_Name10 r.FIELD_NAME11 = m.FIELD_NAME11 r.FIELDName12 = m.FIELDName12 r.XFieldName13 = m.XFieldName13 r.X_FieldName14 = m.X_FieldName14 r.Field_Name15 = m.Field_Name15 r.Field__Name16 = m.Field__Name16 r.FieldName17__ = m.FieldName17__ r.FieldName18__ = m.FieldName18__ if rhs := m.OptionalBytes; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.OptionalBytes = tmpBytes } if rhs := m.RepeatedInt32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedInt32 = tmpContainer } if rhs := m.RepeatedInt64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedInt64 = tmpContainer } if rhs := m.RepeatedUint32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedUint32 = tmpContainer } if rhs := m.RepeatedUint64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedUint64 = tmpContainer } if rhs := m.RepeatedSint32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedSint32 = tmpContainer } if rhs := m.RepeatedSint64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedSint64 = tmpContainer } if rhs := m.RepeatedFixed32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedFixed32 = tmpContainer } if rhs := m.RepeatedFixed64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedFixed64 = tmpContainer } if rhs := m.RepeatedSfixed32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedSfixed32 = tmpContainer } if rhs := m.RepeatedSfixed64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedSfixed64 = tmpContainer } if rhs := m.RepeatedFloat; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedFloat = tmpContainer } if rhs := m.RepeatedDouble; rhs != nil { tmpContainer := make([]float64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedDouble = tmpContainer } if rhs := m.RepeatedBool; rhs != nil { tmpContainer := make([]bool, len(rhs)) copy(tmpContainer, rhs) r.RepeatedBool = tmpContainer } if rhs := m.RepeatedString; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.RepeatedString = tmpContainer } if rhs := m.RepeatedBytes; rhs != nil { tmpContainer := make([][]byte, len(rhs)) for k, v := range rhs { tmpBytes := make([]byte, len(v)) copy(tmpBytes, v) tmpContainer[k] = tmpBytes } r.RepeatedBytes = tmpContainer } if rhs := m.RepeatedNestedMessage; rhs != nil { tmpContainer := make([]*TestAllTypesProto3_NestedMessage, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.RepeatedNestedMessage = tmpContainer } if rhs := m.RepeatedForeignMessage; rhs != nil { tmpContainer := make([]*ForeignMessage, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.RepeatedForeignMessage = tmpContainer } if rhs := m.RepeatedNestedEnum; rhs != nil { tmpContainer := make([]TestAllTypesProto3_NestedEnum, len(rhs)) copy(tmpContainer, rhs) r.RepeatedNestedEnum = tmpContainer } if rhs := m.RepeatedForeignEnum; rhs != nil { tmpContainer := make([]ForeignEnum, len(rhs)) copy(tmpContainer, rhs) r.RepeatedForeignEnum = tmpContainer } if rhs := m.RepeatedStringPiece; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.RepeatedStringPiece = tmpContainer } if rhs := m.RepeatedCord; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.RepeatedCord = tmpContainer } if rhs := m.PackedInt32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedInt32 = tmpContainer } if rhs := m.PackedInt64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedInt64 = tmpContainer } if rhs := m.PackedUint32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.PackedUint32 = tmpContainer } if rhs := m.PackedUint64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.PackedUint64 = tmpContainer } if rhs := m.PackedSint32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedSint32 = tmpContainer } if rhs := m.PackedSint64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedSint64 = tmpContainer } if rhs := m.PackedFixed32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.PackedFixed32 = tmpContainer } if rhs := m.PackedFixed64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.PackedFixed64 = tmpContainer } if rhs := m.PackedSfixed32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedSfixed32 = tmpContainer } if rhs := m.PackedSfixed64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedSfixed64 = tmpContainer } if rhs := m.PackedFloat; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) r.PackedFloat = tmpContainer } if rhs := m.PackedDouble; rhs != nil { tmpContainer := make([]float64, len(rhs)) copy(tmpContainer, rhs) r.PackedDouble = tmpContainer } if rhs := m.PackedBool; rhs != nil { tmpContainer := make([]bool, len(rhs)) copy(tmpContainer, rhs) r.PackedBool = tmpContainer } if rhs := m.PackedNestedEnum; rhs != nil { tmpContainer := make([]TestAllTypesProto3_NestedEnum, len(rhs)) copy(tmpContainer, rhs) r.PackedNestedEnum = tmpContainer } if rhs := m.UnpackedInt32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedInt32 = tmpContainer } if rhs := m.UnpackedInt64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedInt64 = tmpContainer } if rhs := m.UnpackedUint32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedUint32 = tmpContainer } if rhs := m.UnpackedUint64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedUint64 = tmpContainer } if rhs := m.UnpackedSint32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedSint32 = tmpContainer } if rhs := m.UnpackedSint64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedSint64 = tmpContainer } if rhs := m.UnpackedFixed32; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedFixed32 = tmpContainer } if rhs := m.UnpackedFixed64; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedFixed64 = tmpContainer } if rhs := m.UnpackedSfixed32; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedSfixed32 = tmpContainer } if rhs := m.UnpackedSfixed64; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedSfixed64 = tmpContainer } if rhs := m.UnpackedFloat; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) r.UnpackedFloat = tmpContainer } if rhs := m.UnpackedDouble; rhs != nil { tmpContainer := make([]float64, len(rhs)) copy(tmpContainer, rhs) r.UnpackedDouble = tmpContainer } if rhs := m.UnpackedBool; rhs != nil { tmpContainer := make([]bool, len(rhs)) copy(tmpContainer, rhs) r.UnpackedBool = tmpContainer } if rhs := m.UnpackedNestedEnum; rhs != nil { tmpContainer := make([]TestAllTypesProto3_NestedEnum, len(rhs)) copy(tmpContainer, rhs) r.UnpackedNestedEnum = tmpContainer } if rhs := m.MapInt32Int32; rhs != nil { tmpContainer := make(map[int32]int32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapInt32Int32 = tmpContainer } if rhs := m.MapInt64Int64; rhs != nil { tmpContainer := make(map[int64]int64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapInt64Int64 = tmpContainer } if rhs := m.MapUint32Uint32; rhs != nil { tmpContainer := make(map[uint32]uint32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapUint32Uint32 = tmpContainer } if rhs := m.MapUint64Uint64; rhs != nil { tmpContainer := make(map[uint64]uint64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapUint64Uint64 = tmpContainer } if rhs := m.MapSint32Sint32; rhs != nil { tmpContainer := make(map[int32]int32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapSint32Sint32 = tmpContainer } if rhs := m.MapSint64Sint64; rhs != nil { tmpContainer := make(map[int64]int64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapSint64Sint64 = tmpContainer } if rhs := m.MapFixed32Fixed32; rhs != nil { tmpContainer := make(map[uint32]uint32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapFixed32Fixed32 = tmpContainer } if rhs := m.MapFixed64Fixed64; rhs != nil { tmpContainer := make(map[uint64]uint64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapFixed64Fixed64 = tmpContainer } if rhs := m.MapSfixed32Sfixed32; rhs != nil { tmpContainer := make(map[int32]int32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapSfixed32Sfixed32 = tmpContainer } if rhs := m.MapSfixed64Sfixed64; rhs != nil { tmpContainer := make(map[int64]int64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapSfixed64Sfixed64 = tmpContainer } if rhs := m.MapInt32Float; rhs != nil { tmpContainer := make(map[int32]float32, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapInt32Float = tmpContainer } if rhs := m.MapInt32Double; rhs != nil { tmpContainer := make(map[int32]float64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapInt32Double = tmpContainer } if rhs := m.MapBoolBool; rhs != nil { tmpContainer := make(map[bool]bool, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapBoolBool = tmpContainer } if rhs := m.MapStringString; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapStringString = tmpContainer } if rhs := m.MapStringBytes; rhs != nil { tmpContainer := make(map[string][]byte, len(rhs)) for k, v := range rhs { tmpBytes := make([]byte, len(v)) copy(tmpBytes, v) tmpContainer[k] = tmpBytes } r.MapStringBytes = tmpContainer } if rhs := m.MapStringNestedMessage; rhs != nil { tmpContainer := make(map[string]*TestAllTypesProto3_NestedMessage, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.MapStringNestedMessage = tmpContainer } if rhs := m.MapStringForeignMessage; rhs != nil { tmpContainer := make(map[string]*ForeignMessage, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.MapStringForeignMessage = tmpContainer } if rhs := m.MapStringNestedEnum; rhs != nil { tmpContainer := make(map[string]TestAllTypesProto3_NestedEnum, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapStringNestedEnum = tmpContainer } if rhs := m.MapStringForeignEnum; rhs != nil { tmpContainer := make(map[string]ForeignEnum, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.MapStringForeignEnum = tmpContainer } if m.OneofField != nil { r.OneofField = m.OneofField.(interface { CloneVT() isTestAllTypesProto3_OneofField }).CloneVT() } if rhs := m.RepeatedBoolWrapper; rhs != nil { tmpContainer := make([]*wrapperspb.BoolValue, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.BoolValue)((*wrapperspb1.BoolValue)(v).CloneVT()) } r.RepeatedBoolWrapper = tmpContainer } if rhs := m.RepeatedInt32Wrapper; rhs != nil { tmpContainer := make([]*wrapperspb.Int32Value, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.Int32Value)((*wrapperspb1.Int32Value)(v).CloneVT()) } r.RepeatedInt32Wrapper = tmpContainer } if rhs := m.RepeatedInt64Wrapper; rhs != nil { tmpContainer := make([]*wrapperspb.Int64Value, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.Int64Value)((*wrapperspb1.Int64Value)(v).CloneVT()) } r.RepeatedInt64Wrapper = tmpContainer } if rhs := m.RepeatedUint32Wrapper; rhs != nil { tmpContainer := make([]*wrapperspb.UInt32Value, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.UInt32Value)((*wrapperspb1.UInt32Value)(v).CloneVT()) } r.RepeatedUint32Wrapper = tmpContainer } if rhs := m.RepeatedUint64Wrapper; rhs != nil { tmpContainer := make([]*wrapperspb.UInt64Value, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.UInt64Value)((*wrapperspb1.UInt64Value)(v).CloneVT()) } r.RepeatedUint64Wrapper = tmpContainer } if rhs := m.RepeatedFloatWrapper; rhs != nil { tmpContainer := make([]*wrapperspb.FloatValue, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.FloatValue)((*wrapperspb1.FloatValue)(v).CloneVT()) } r.RepeatedFloatWrapper = tmpContainer } if rhs := m.RepeatedDoubleWrapper; rhs != nil { tmpContainer := make([]*wrapperspb.DoubleValue, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.DoubleValue)((*wrapperspb1.DoubleValue)(v).CloneVT()) } r.RepeatedDoubleWrapper = tmpContainer } if rhs := m.RepeatedStringWrapper; rhs != nil { tmpContainer := make([]*wrapperspb.StringValue, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.StringValue)((*wrapperspb1.StringValue)(v).CloneVT()) } r.RepeatedStringWrapper = tmpContainer } if rhs := m.RepeatedBytesWrapper; rhs != nil { tmpContainer := make([]*wrapperspb.BytesValue, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*wrapperspb.BytesValue)((*wrapperspb1.BytesValue)(v).CloneVT()) } r.RepeatedBytesWrapper = tmpContainer } if rhs := m.RepeatedDuration; rhs != nil { tmpContainer := make([]*durationpb.Duration, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*durationpb.Duration)((*durationpb1.Duration)(v).CloneVT()) } r.RepeatedDuration = tmpContainer } if rhs := m.RepeatedTimestamp; rhs != nil { tmpContainer := make([]*timestamppb.Timestamp, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(v).CloneVT()) } r.RepeatedTimestamp = tmpContainer } if rhs := m.RepeatedFieldmask; rhs != nil { tmpContainer := make([]*fieldmaskpb.FieldMask, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*fieldmaskpb.FieldMask)((*fieldmaskpb1.FieldMask)(v).CloneVT()) } r.RepeatedFieldmask = tmpContainer } if rhs := m.RepeatedStruct; rhs != nil { tmpContainer := make([]*structpb.Struct, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*structpb.Struct)((*structpb1.Struct)(v).CloneVT()) } r.RepeatedStruct = tmpContainer } if rhs := m.RepeatedAny; rhs != nil { tmpContainer := make([]*anypb.Any, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*anypb.Any)((*anypb1.Any)(v).CloneVT()) } r.RepeatedAny = tmpContainer } if rhs := m.RepeatedValue; rhs != nil { tmpContainer := make([]*structpb.Value, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*structpb.Value)((*structpb1.Value)(v).CloneVT()) } r.RepeatedValue = tmpContainer } if rhs := m.RepeatedListValue; rhs != nil { tmpContainer := make([]*structpb.ListValue, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*structpb.ListValue)((*structpb1.ListValue)(v).CloneVT()) } r.RepeatedListValue = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestAllTypesProto3) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestAllTypesProto3_OneofUint32) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofUint32)(nil) } r := new(TestAllTypesProto3_OneofUint32) r.OneofUint32 = m.OneofUint32 return r } func (m *TestAllTypesProto3_OneofNestedMessage) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofNestedMessage)(nil) } r := new(TestAllTypesProto3_OneofNestedMessage) r.OneofNestedMessage = m.OneofNestedMessage.CloneVT() return r } func (m *TestAllTypesProto3_OneofString) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofString)(nil) } r := new(TestAllTypesProto3_OneofString) r.OneofString = m.OneofString return r } func (m *TestAllTypesProto3_OneofBytes) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofBytes)(nil) } r := new(TestAllTypesProto3_OneofBytes) if rhs := m.OneofBytes; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.OneofBytes = tmpBytes } return r } func (m *TestAllTypesProto3_OneofBool) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofBool)(nil) } r := new(TestAllTypesProto3_OneofBool) r.OneofBool = m.OneofBool return r } func (m *TestAllTypesProto3_OneofUint64) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofUint64)(nil) } r := new(TestAllTypesProto3_OneofUint64) r.OneofUint64 = m.OneofUint64 return r } func (m *TestAllTypesProto3_OneofFloat) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofFloat)(nil) } r := new(TestAllTypesProto3_OneofFloat) r.OneofFloat = m.OneofFloat return r } func (m *TestAllTypesProto3_OneofDouble) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofDouble)(nil) } r := new(TestAllTypesProto3_OneofDouble) r.OneofDouble = m.OneofDouble return r } func (m *TestAllTypesProto3_OneofEnum) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofEnum)(nil) } r := new(TestAllTypesProto3_OneofEnum) r.OneofEnum = m.OneofEnum return r } func (m *TestAllTypesProto3_OneofNullValue) CloneVT() isTestAllTypesProto3_OneofField { if m == nil { return (*TestAllTypesProto3_OneofNullValue)(nil) } r := new(TestAllTypesProto3_OneofNullValue) r.OneofNullValue = m.OneofNullValue return r } func (m *ForeignMessage) CloneVT() *ForeignMessage { if m == nil { return (*ForeignMessage)(nil) } r := new(ForeignMessage) r.C = m.C if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *ForeignMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *NullHypothesisProto3) CloneVT() *NullHypothesisProto3 { if m == nil { return (*NullHypothesisProto3)(nil) } r := new(NullHypothesisProto3) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *NullHypothesisProto3) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *EnumOnlyProto3) CloneVT() *EnumOnlyProto3 { if m == nil { return (*EnumOnlyProto3)(nil) } r := new(EnumOnlyProto3) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *EnumOnlyProto3) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *TestAllTypesProto3_NestedMessage) EqualVT(that *TestAllTypesProto3_NestedMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.A != that.A { return false } if !this.Corecursive.EqualVT(that.Corecursive) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestAllTypesProto3_NestedMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestAllTypesProto3_NestedMessage) if !ok { return false } return this.EqualVT(that) } func (this *TestAllTypesProto3) EqualVT(that *TestAllTypesProto3) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.OneofField == nil && that.OneofField != nil { return false } else if this.OneofField != nil { if that.OneofField == nil { return false } if !this.OneofField.(interface { EqualVT(isTestAllTypesProto3_OneofField) bool }).EqualVT(that.OneofField) { return false } } if this.OptionalInt32 != that.OptionalInt32 { return false } if this.OptionalInt64 != that.OptionalInt64 { return false } if this.OptionalUint32 != that.OptionalUint32 { return false } if this.OptionalUint64 != that.OptionalUint64 { return false } if this.OptionalSint32 != that.OptionalSint32 { return false } if this.OptionalSint64 != that.OptionalSint64 { return false } if this.OptionalFixed32 != that.OptionalFixed32 { return false } if this.OptionalFixed64 != that.OptionalFixed64 { return false } if this.OptionalSfixed32 != that.OptionalSfixed32 { return false } if this.OptionalSfixed64 != that.OptionalSfixed64 { return false } if this.OptionalFloat != that.OptionalFloat { return false } if this.OptionalDouble != that.OptionalDouble { return false } if this.OptionalBool != that.OptionalBool { return false } if this.OptionalString != that.OptionalString { return false } if string(this.OptionalBytes) != string(that.OptionalBytes) { return false } if !this.OptionalNestedMessage.EqualVT(that.OptionalNestedMessage) { return false } if !this.OptionalForeignMessage.EqualVT(that.OptionalForeignMessage) { return false } if this.OptionalNestedEnum != that.OptionalNestedEnum { return false } if this.OptionalForeignEnum != that.OptionalForeignEnum { return false } if this.OptionalAliasedEnum != that.OptionalAliasedEnum { return false } if this.OptionalStringPiece != that.OptionalStringPiece { return false } if this.OptionalCord != that.OptionalCord { return false } if !this.RecursiveMessage.EqualVT(that.RecursiveMessage) { return false } if len(this.RepeatedInt32) != len(that.RepeatedInt32) { return false } for i, vx := range this.RepeatedInt32 { vy := that.RepeatedInt32[i] if vx != vy { return false } } if len(this.RepeatedInt64) != len(that.RepeatedInt64) { return false } for i, vx := range this.RepeatedInt64 { vy := that.RepeatedInt64[i] if vx != vy { return false } } if len(this.RepeatedUint32) != len(that.RepeatedUint32) { return false } for i, vx := range this.RepeatedUint32 { vy := that.RepeatedUint32[i] if vx != vy { return false } } if len(this.RepeatedUint64) != len(that.RepeatedUint64) { return false } for i, vx := range this.RepeatedUint64 { vy := that.RepeatedUint64[i] if vx != vy { return false } } if len(this.RepeatedSint32) != len(that.RepeatedSint32) { return false } for i, vx := range this.RepeatedSint32 { vy := that.RepeatedSint32[i] if vx != vy { return false } } if len(this.RepeatedSint64) != len(that.RepeatedSint64) { return false } for i, vx := range this.RepeatedSint64 { vy := that.RepeatedSint64[i] if vx != vy { return false } } if len(this.RepeatedFixed32) != len(that.RepeatedFixed32) { return false } for i, vx := range this.RepeatedFixed32 { vy := that.RepeatedFixed32[i] if vx != vy { return false } } if len(this.RepeatedFixed64) != len(that.RepeatedFixed64) { return false } for i, vx := range this.RepeatedFixed64 { vy := that.RepeatedFixed64[i] if vx != vy { return false } } if len(this.RepeatedSfixed32) != len(that.RepeatedSfixed32) { return false } for i, vx := range this.RepeatedSfixed32 { vy := that.RepeatedSfixed32[i] if vx != vy { return false } } if len(this.RepeatedSfixed64) != len(that.RepeatedSfixed64) { return false } for i, vx := range this.RepeatedSfixed64 { vy := that.RepeatedSfixed64[i] if vx != vy { return false } } if len(this.RepeatedFloat) != len(that.RepeatedFloat) { return false } for i, vx := range this.RepeatedFloat { vy := that.RepeatedFloat[i] if vx != vy { return false } } if len(this.RepeatedDouble) != len(that.RepeatedDouble) { return false } for i, vx := range this.RepeatedDouble { vy := that.RepeatedDouble[i] if vx != vy { return false } } if len(this.RepeatedBool) != len(that.RepeatedBool) { return false } for i, vx := range this.RepeatedBool { vy := that.RepeatedBool[i] if vx != vy { return false } } if len(this.RepeatedString) != len(that.RepeatedString) { return false } for i, vx := range this.RepeatedString { vy := that.RepeatedString[i] if vx != vy { return false } } if len(this.RepeatedBytes) != len(that.RepeatedBytes) { return false } for i, vx := range this.RepeatedBytes { vy := that.RepeatedBytes[i] if string(vx) != string(vy) { return false } } if len(this.RepeatedNestedMessage) != len(that.RepeatedNestedMessage) { return false } for i, vx := range this.RepeatedNestedMessage { vy := that.RepeatedNestedMessage[i] if p, q := vx, vy; p != q { if p == nil { p = &TestAllTypesProto3_NestedMessage{} } if q == nil { q = &TestAllTypesProto3_NestedMessage{} } if !p.EqualVT(q) { return false } } } if len(this.RepeatedForeignMessage) != len(that.RepeatedForeignMessage) { return false } for i, vx := range this.RepeatedForeignMessage { vy := that.RepeatedForeignMessage[i] if p, q := vx, vy; p != q { if p == nil { p = &ForeignMessage{} } if q == nil { q = &ForeignMessage{} } if !p.EqualVT(q) { return false } } } if len(this.RepeatedNestedEnum) != len(that.RepeatedNestedEnum) { return false } for i, vx := range this.RepeatedNestedEnum { vy := that.RepeatedNestedEnum[i] if vx != vy { return false } } if len(this.RepeatedForeignEnum) != len(that.RepeatedForeignEnum) { return false } for i, vx := range this.RepeatedForeignEnum { vy := that.RepeatedForeignEnum[i] if vx != vy { return false } } if len(this.RepeatedStringPiece) != len(that.RepeatedStringPiece) { return false } for i, vx := range this.RepeatedStringPiece { vy := that.RepeatedStringPiece[i] if vx != vy { return false } } if len(this.RepeatedCord) != len(that.RepeatedCord) { return false } for i, vx := range this.RepeatedCord { vy := that.RepeatedCord[i] if vx != vy { return false } } if len(this.MapInt32Int32) != len(that.MapInt32Int32) { return false } for i, vx := range this.MapInt32Int32 { vy, ok := that.MapInt32Int32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapInt64Int64) != len(that.MapInt64Int64) { return false } for i, vx := range this.MapInt64Int64 { vy, ok := that.MapInt64Int64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapUint32Uint32) != len(that.MapUint32Uint32) { return false } for i, vx := range this.MapUint32Uint32 { vy, ok := that.MapUint32Uint32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapUint64Uint64) != len(that.MapUint64Uint64) { return false } for i, vx := range this.MapUint64Uint64 { vy, ok := that.MapUint64Uint64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapSint32Sint32) != len(that.MapSint32Sint32) { return false } for i, vx := range this.MapSint32Sint32 { vy, ok := that.MapSint32Sint32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapSint64Sint64) != len(that.MapSint64Sint64) { return false } for i, vx := range this.MapSint64Sint64 { vy, ok := that.MapSint64Sint64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapFixed32Fixed32) != len(that.MapFixed32Fixed32) { return false } for i, vx := range this.MapFixed32Fixed32 { vy, ok := that.MapFixed32Fixed32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapFixed64Fixed64) != len(that.MapFixed64Fixed64) { return false } for i, vx := range this.MapFixed64Fixed64 { vy, ok := that.MapFixed64Fixed64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapSfixed32Sfixed32) != len(that.MapSfixed32Sfixed32) { return false } for i, vx := range this.MapSfixed32Sfixed32 { vy, ok := that.MapSfixed32Sfixed32[i] if !ok { return false } if vx != vy { return false } } if len(this.MapSfixed64Sfixed64) != len(that.MapSfixed64Sfixed64) { return false } for i, vx := range this.MapSfixed64Sfixed64 { vy, ok := that.MapSfixed64Sfixed64[i] if !ok { return false } if vx != vy { return false } } if len(this.MapInt32Float) != len(that.MapInt32Float) { return false } for i, vx := range this.MapInt32Float { vy, ok := that.MapInt32Float[i] if !ok { return false } if vx != vy { return false } } if len(this.MapInt32Double) != len(that.MapInt32Double) { return false } for i, vx := range this.MapInt32Double { vy, ok := that.MapInt32Double[i] if !ok { return false } if vx != vy { return false } } if len(this.MapBoolBool) != len(that.MapBoolBool) { return false } for i, vx := range this.MapBoolBool { vy, ok := that.MapBoolBool[i] if !ok { return false } if vx != vy { return false } } if len(this.MapStringString) != len(that.MapStringString) { return false } for i, vx := range this.MapStringString { vy, ok := that.MapStringString[i] if !ok { return false } if vx != vy { return false } } if len(this.MapStringBytes) != len(that.MapStringBytes) { return false } for i, vx := range this.MapStringBytes { vy, ok := that.MapStringBytes[i] if !ok { return false } if string(vx) != string(vy) { return false } } if len(this.MapStringNestedMessage) != len(that.MapStringNestedMessage) { return false } for i, vx := range this.MapStringNestedMessage { vy, ok := that.MapStringNestedMessage[i] if !ok { return false } if p, q := vx, vy; p != q { if p == nil { p = &TestAllTypesProto3_NestedMessage{} } if q == nil { q = &TestAllTypesProto3_NestedMessage{} } if !p.EqualVT(q) { return false } } } if len(this.MapStringForeignMessage) != len(that.MapStringForeignMessage) { return false } for i, vx := range this.MapStringForeignMessage { vy, ok := that.MapStringForeignMessage[i] if !ok { return false } if p, q := vx, vy; p != q { if p == nil { p = &ForeignMessage{} } if q == nil { q = &ForeignMessage{} } if !p.EqualVT(q) { return false } } } if len(this.MapStringNestedEnum) != len(that.MapStringNestedEnum) { return false } for i, vx := range this.MapStringNestedEnum { vy, ok := that.MapStringNestedEnum[i] if !ok { return false } if vx != vy { return false } } if len(this.MapStringForeignEnum) != len(that.MapStringForeignEnum) { return false } for i, vx := range this.MapStringForeignEnum { vy, ok := that.MapStringForeignEnum[i] if !ok { return false } if vx != vy { return false } } if len(this.PackedInt32) != len(that.PackedInt32) { return false } for i, vx := range this.PackedInt32 { vy := that.PackedInt32[i] if vx != vy { return false } } if len(this.PackedInt64) != len(that.PackedInt64) { return false } for i, vx := range this.PackedInt64 { vy := that.PackedInt64[i] if vx != vy { return false } } if len(this.PackedUint32) != len(that.PackedUint32) { return false } for i, vx := range this.PackedUint32 { vy := that.PackedUint32[i] if vx != vy { return false } } if len(this.PackedUint64) != len(that.PackedUint64) { return false } for i, vx := range this.PackedUint64 { vy := that.PackedUint64[i] if vx != vy { return false } } if len(this.PackedSint32) != len(that.PackedSint32) { return false } for i, vx := range this.PackedSint32 { vy := that.PackedSint32[i] if vx != vy { return false } } if len(this.PackedSint64) != len(that.PackedSint64) { return false } for i, vx := range this.PackedSint64 { vy := that.PackedSint64[i] if vx != vy { return false } } if len(this.PackedFixed32) != len(that.PackedFixed32) { return false } for i, vx := range this.PackedFixed32 { vy := that.PackedFixed32[i] if vx != vy { return false } } if len(this.PackedFixed64) != len(that.PackedFixed64) { return false } for i, vx := range this.PackedFixed64 { vy := that.PackedFixed64[i] if vx != vy { return false } } if len(this.PackedSfixed32) != len(that.PackedSfixed32) { return false } for i, vx := range this.PackedSfixed32 { vy := that.PackedSfixed32[i] if vx != vy { return false } } if len(this.PackedSfixed64) != len(that.PackedSfixed64) { return false } for i, vx := range this.PackedSfixed64 { vy := that.PackedSfixed64[i] if vx != vy { return false } } if len(this.PackedFloat) != len(that.PackedFloat) { return false } for i, vx := range this.PackedFloat { vy := that.PackedFloat[i] if vx != vy { return false } } if len(this.PackedDouble) != len(that.PackedDouble) { return false } for i, vx := range this.PackedDouble { vy := that.PackedDouble[i] if vx != vy { return false } } if len(this.PackedBool) != len(that.PackedBool) { return false } for i, vx := range this.PackedBool { vy := that.PackedBool[i] if vx != vy { return false } } if len(this.PackedNestedEnum) != len(that.PackedNestedEnum) { return false } for i, vx := range this.PackedNestedEnum { vy := that.PackedNestedEnum[i] if vx != vy { return false } } if len(this.UnpackedInt32) != len(that.UnpackedInt32) { return false } for i, vx := range this.UnpackedInt32 { vy := that.UnpackedInt32[i] if vx != vy { return false } } if len(this.UnpackedInt64) != len(that.UnpackedInt64) { return false } for i, vx := range this.UnpackedInt64 { vy := that.UnpackedInt64[i] if vx != vy { return false } } if len(this.UnpackedUint32) != len(that.UnpackedUint32) { return false } for i, vx := range this.UnpackedUint32 { vy := that.UnpackedUint32[i] if vx != vy { return false } } if len(this.UnpackedUint64) != len(that.UnpackedUint64) { return false } for i, vx := range this.UnpackedUint64 { vy := that.UnpackedUint64[i] if vx != vy { return false } } if len(this.UnpackedSint32) != len(that.UnpackedSint32) { return false } for i, vx := range this.UnpackedSint32 { vy := that.UnpackedSint32[i] if vx != vy { return false } } if len(this.UnpackedSint64) != len(that.UnpackedSint64) { return false } for i, vx := range this.UnpackedSint64 { vy := that.UnpackedSint64[i] if vx != vy { return false } } if len(this.UnpackedFixed32) != len(that.UnpackedFixed32) { return false } for i, vx := range this.UnpackedFixed32 { vy := that.UnpackedFixed32[i] if vx != vy { return false } } if len(this.UnpackedFixed64) != len(that.UnpackedFixed64) { return false } for i, vx := range this.UnpackedFixed64 { vy := that.UnpackedFixed64[i] if vx != vy { return false } } if len(this.UnpackedSfixed32) != len(that.UnpackedSfixed32) { return false } for i, vx := range this.UnpackedSfixed32 { vy := that.UnpackedSfixed32[i] if vx != vy { return false } } if len(this.UnpackedSfixed64) != len(that.UnpackedSfixed64) { return false } for i, vx := range this.UnpackedSfixed64 { vy := that.UnpackedSfixed64[i] if vx != vy { return false } } if len(this.UnpackedFloat) != len(that.UnpackedFloat) { return false } for i, vx := range this.UnpackedFloat { vy := that.UnpackedFloat[i] if vx != vy { return false } } if len(this.UnpackedDouble) != len(that.UnpackedDouble) { return false } for i, vx := range this.UnpackedDouble { vy := that.UnpackedDouble[i] if vx != vy { return false } } if len(this.UnpackedBool) != len(that.UnpackedBool) { return false } for i, vx := range this.UnpackedBool { vy := that.UnpackedBool[i] if vx != vy { return false } } if len(this.UnpackedNestedEnum) != len(that.UnpackedNestedEnum) { return false } for i, vx := range this.UnpackedNestedEnum { vy := that.UnpackedNestedEnum[i] if vx != vy { return false } } if !(*wrapperspb1.BoolValue)(this.OptionalBoolWrapper).EqualVT((*wrapperspb1.BoolValue)(that.OptionalBoolWrapper)) { return false } if !(*wrapperspb1.Int32Value)(this.OptionalInt32Wrapper).EqualVT((*wrapperspb1.Int32Value)(that.OptionalInt32Wrapper)) { return false } if !(*wrapperspb1.Int64Value)(this.OptionalInt64Wrapper).EqualVT((*wrapperspb1.Int64Value)(that.OptionalInt64Wrapper)) { return false } if !(*wrapperspb1.UInt32Value)(this.OptionalUint32Wrapper).EqualVT((*wrapperspb1.UInt32Value)(that.OptionalUint32Wrapper)) { return false } if !(*wrapperspb1.UInt64Value)(this.OptionalUint64Wrapper).EqualVT((*wrapperspb1.UInt64Value)(that.OptionalUint64Wrapper)) { return false } if !(*wrapperspb1.FloatValue)(this.OptionalFloatWrapper).EqualVT((*wrapperspb1.FloatValue)(that.OptionalFloatWrapper)) { return false } if !(*wrapperspb1.DoubleValue)(this.OptionalDoubleWrapper).EqualVT((*wrapperspb1.DoubleValue)(that.OptionalDoubleWrapper)) { return false } if !(*wrapperspb1.StringValue)(this.OptionalStringWrapper).EqualVT((*wrapperspb1.StringValue)(that.OptionalStringWrapper)) { return false } if !(*wrapperspb1.BytesValue)(this.OptionalBytesWrapper).EqualVT((*wrapperspb1.BytesValue)(that.OptionalBytesWrapper)) { return false } if len(this.RepeatedBoolWrapper) != len(that.RepeatedBoolWrapper) { return false } for i, vx := range this.RepeatedBoolWrapper { vy := that.RepeatedBoolWrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.BoolValue{} } if q == nil { q = &wrapperspb.BoolValue{} } if !(*wrapperspb1.BoolValue)(p).EqualVT((*wrapperspb1.BoolValue)(q)) { return false } } } if len(this.RepeatedInt32Wrapper) != len(that.RepeatedInt32Wrapper) { return false } for i, vx := range this.RepeatedInt32Wrapper { vy := that.RepeatedInt32Wrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.Int32Value{} } if q == nil { q = &wrapperspb.Int32Value{} } if !(*wrapperspb1.Int32Value)(p).EqualVT((*wrapperspb1.Int32Value)(q)) { return false } } } if len(this.RepeatedInt64Wrapper) != len(that.RepeatedInt64Wrapper) { return false } for i, vx := range this.RepeatedInt64Wrapper { vy := that.RepeatedInt64Wrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.Int64Value{} } if q == nil { q = &wrapperspb.Int64Value{} } if !(*wrapperspb1.Int64Value)(p).EqualVT((*wrapperspb1.Int64Value)(q)) { return false } } } if len(this.RepeatedUint32Wrapper) != len(that.RepeatedUint32Wrapper) { return false } for i, vx := range this.RepeatedUint32Wrapper { vy := that.RepeatedUint32Wrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.UInt32Value{} } if q == nil { q = &wrapperspb.UInt32Value{} } if !(*wrapperspb1.UInt32Value)(p).EqualVT((*wrapperspb1.UInt32Value)(q)) { return false } } } if len(this.RepeatedUint64Wrapper) != len(that.RepeatedUint64Wrapper) { return false } for i, vx := range this.RepeatedUint64Wrapper { vy := that.RepeatedUint64Wrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.UInt64Value{} } if q == nil { q = &wrapperspb.UInt64Value{} } if !(*wrapperspb1.UInt64Value)(p).EqualVT((*wrapperspb1.UInt64Value)(q)) { return false } } } if len(this.RepeatedFloatWrapper) != len(that.RepeatedFloatWrapper) { return false } for i, vx := range this.RepeatedFloatWrapper { vy := that.RepeatedFloatWrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.FloatValue{} } if q == nil { q = &wrapperspb.FloatValue{} } if !(*wrapperspb1.FloatValue)(p).EqualVT((*wrapperspb1.FloatValue)(q)) { return false } } } if len(this.RepeatedDoubleWrapper) != len(that.RepeatedDoubleWrapper) { return false } for i, vx := range this.RepeatedDoubleWrapper { vy := that.RepeatedDoubleWrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.DoubleValue{} } if q == nil { q = &wrapperspb.DoubleValue{} } if !(*wrapperspb1.DoubleValue)(p).EqualVT((*wrapperspb1.DoubleValue)(q)) { return false } } } if len(this.RepeatedStringWrapper) != len(that.RepeatedStringWrapper) { return false } for i, vx := range this.RepeatedStringWrapper { vy := that.RepeatedStringWrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.StringValue{} } if q == nil { q = &wrapperspb.StringValue{} } if !(*wrapperspb1.StringValue)(p).EqualVT((*wrapperspb1.StringValue)(q)) { return false } } } if len(this.RepeatedBytesWrapper) != len(that.RepeatedBytesWrapper) { return false } for i, vx := range this.RepeatedBytesWrapper { vy := that.RepeatedBytesWrapper[i] if p, q := vx, vy; p != q { if p == nil { p = &wrapperspb.BytesValue{} } if q == nil { q = &wrapperspb.BytesValue{} } if !(*wrapperspb1.BytesValue)(p).EqualVT((*wrapperspb1.BytesValue)(q)) { return false } } } if !(*durationpb1.Duration)(this.OptionalDuration).EqualVT((*durationpb1.Duration)(that.OptionalDuration)) { return false } if !(*timestamppb1.Timestamp)(this.OptionalTimestamp).EqualVT((*timestamppb1.Timestamp)(that.OptionalTimestamp)) { return false } if !(*fieldmaskpb1.FieldMask)(this.OptionalFieldMask).EqualVT((*fieldmaskpb1.FieldMask)(that.OptionalFieldMask)) { return false } if !(*structpb1.Struct)(this.OptionalStruct).EqualVT((*structpb1.Struct)(that.OptionalStruct)) { return false } if !(*anypb1.Any)(this.OptionalAny).EqualVT((*anypb1.Any)(that.OptionalAny)) { return false } if !(*structpb1.Value)(this.OptionalValue).EqualVT((*structpb1.Value)(that.OptionalValue)) { return false } if this.OptionalNullValue != that.OptionalNullValue { return false } if len(this.RepeatedDuration) != len(that.RepeatedDuration) { return false } for i, vx := range this.RepeatedDuration { vy := that.RepeatedDuration[i] if p, q := vx, vy; p != q { if p == nil { p = &durationpb.Duration{} } if q == nil { q = &durationpb.Duration{} } if !(*durationpb1.Duration)(p).EqualVT((*durationpb1.Duration)(q)) { return false } } } if len(this.RepeatedTimestamp) != len(that.RepeatedTimestamp) { return false } for i, vx := range this.RepeatedTimestamp { vy := that.RepeatedTimestamp[i] if p, q := vx, vy; p != q { if p == nil { p = ×tamppb.Timestamp{} } if q == nil { q = ×tamppb.Timestamp{} } if !(*timestamppb1.Timestamp)(p).EqualVT((*timestamppb1.Timestamp)(q)) { return false } } } if len(this.RepeatedFieldmask) != len(that.RepeatedFieldmask) { return false } for i, vx := range this.RepeatedFieldmask { vy := that.RepeatedFieldmask[i] if p, q := vx, vy; p != q { if p == nil { p = &fieldmaskpb.FieldMask{} } if q == nil { q = &fieldmaskpb.FieldMask{} } if !(*fieldmaskpb1.FieldMask)(p).EqualVT((*fieldmaskpb1.FieldMask)(q)) { return false } } } if len(this.RepeatedAny) != len(that.RepeatedAny) { return false } for i, vx := range this.RepeatedAny { vy := that.RepeatedAny[i] if p, q := vx, vy; p != q { if p == nil { p = &anypb.Any{} } if q == nil { q = &anypb.Any{} } if !(*anypb1.Any)(p).EqualVT((*anypb1.Any)(q)) { return false } } } if len(this.RepeatedValue) != len(that.RepeatedValue) { return false } for i, vx := range this.RepeatedValue { vy := that.RepeatedValue[i] if p, q := vx, vy; p != q { if p == nil { p = &structpb.Value{} } if q == nil { q = &structpb.Value{} } if !(*structpb1.Value)(p).EqualVT((*structpb1.Value)(q)) { return false } } } if len(this.RepeatedListValue) != len(that.RepeatedListValue) { return false } for i, vx := range this.RepeatedListValue { vy := that.RepeatedListValue[i] if p, q := vx, vy; p != q { if p == nil { p = &structpb.ListValue{} } if q == nil { q = &structpb.ListValue{} } if !(*structpb1.ListValue)(p).EqualVT((*structpb1.ListValue)(q)) { return false } } } if len(this.RepeatedStruct) != len(that.RepeatedStruct) { return false } for i, vx := range this.RepeatedStruct { vy := that.RepeatedStruct[i] if p, q := vx, vy; p != q { if p == nil { p = &structpb.Struct{} } if q == nil { q = &structpb.Struct{} } if !(*structpb1.Struct)(p).EqualVT((*structpb1.Struct)(q)) { return false } } } if this.Fieldname1 != that.Fieldname1 { return false } if this.FieldName2 != that.FieldName2 { return false } if this.XFieldName3 != that.XFieldName3 { return false } if this.Field_Name4_ != that.Field_Name4_ { return false } if this.Field0Name5 != that.Field0Name5 { return false } if this.Field_0Name6 != that.Field_0Name6 { return false } if this.FieldName7 != that.FieldName7 { return false } if this.FieldName8 != that.FieldName8 { return false } if this.Field_Name9 != that.Field_Name9 { return false } if this.Field_Name10 != that.Field_Name10 { return false } if this.FIELD_NAME11 != that.FIELD_NAME11 { return false } if this.FIELDName12 != that.FIELDName12 { return false } if this.XFieldName13 != that.XFieldName13 { return false } if this.X_FieldName14 != that.X_FieldName14 { return false } if this.Field_Name15 != that.Field_Name15 { return false } if this.Field__Name16 != that.Field__Name16 { return false } if this.FieldName17__ != that.FieldName17__ { return false } if this.FieldName18__ != that.FieldName18__ { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestAllTypesProto3) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestAllTypesProto3) if !ok { return false } return this.EqualVT(that) } func (this *TestAllTypesProto3_OneofUint32) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofUint32) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofUint32 != that.OneofUint32 { return false } return true } func (this *TestAllTypesProto3_OneofNestedMessage) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofNestedMessage) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.OneofNestedMessage, that.OneofNestedMessage; p != q { if p == nil { p = &TestAllTypesProto3_NestedMessage{} } if q == nil { q = &TestAllTypesProto3_NestedMessage{} } if !p.EqualVT(q) { return false } } return true } func (this *TestAllTypesProto3_OneofString) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofString) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofString != that.OneofString { return false } return true } func (this *TestAllTypesProto3_OneofBytes) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofBytes) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if string(this.OneofBytes) != string(that.OneofBytes) { return false } return true } func (this *TestAllTypesProto3_OneofBool) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofBool) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofBool != that.OneofBool { return false } return true } func (this *TestAllTypesProto3_OneofUint64) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofUint64) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofUint64 != that.OneofUint64 { return false } return true } func (this *TestAllTypesProto3_OneofFloat) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofFloat) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofFloat != that.OneofFloat { return false } return true } func (this *TestAllTypesProto3_OneofDouble) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofDouble) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofDouble != that.OneofDouble { return false } return true } func (this *TestAllTypesProto3_OneofEnum) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofEnum) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofEnum != that.OneofEnum { return false } return true } func (this *TestAllTypesProto3_OneofNullValue) EqualVT(thatIface isTestAllTypesProto3_OneofField) bool { that, ok := thatIface.(*TestAllTypesProto3_OneofNullValue) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.OneofNullValue != that.OneofNullValue { return false } return true } func (this *ForeignMessage) EqualVT(that *ForeignMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.C != that.C { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *ForeignMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*ForeignMessage) if !ok { return false } return this.EqualVT(that) } func (this *NullHypothesisProto3) EqualVT(that *NullHypothesisProto3) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *NullHypothesisProto3) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*NullHypothesisProto3) if !ok { return false } return this.EqualVT(that) } func (this *EnumOnlyProto3) EqualVT(that *EnumOnlyProto3) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *EnumOnlyProto3) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*EnumOnlyProto3) if !ok { return false } return this.EqualVT(that) } func (m *TestAllTypesProto3_NestedMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto3_NestedMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_NestedMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Corecursive != nil { size, err := m.Corecursive.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.A != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TestAllTypesProto3) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto3) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if vtmsg, ok := m.OneofField.(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size } if m.FieldName18__ != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName18__)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x90 } if m.FieldName17__ != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName17__)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x88 } if m.Field__Name16 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field__Name16)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x80 } if m.Field_Name15 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_Name15)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xf8 } if m.X_FieldName14 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.X_FieldName14)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xf0 } if m.XFieldName13 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.XFieldName13)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xe8 } if m.FIELDName12 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FIELDName12)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xe0 } if m.FIELD_NAME11 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FIELD_NAME11)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xd8 } if m.Field_Name10 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_Name10)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xd0 } if m.Field_Name9 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_Name9)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xc8 } if m.FieldName8 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName8)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xc0 } if m.FieldName7 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName7)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xb8 } if m.Field_0Name6 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_0Name6)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xb0 } if m.Field0Name5 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field0Name5)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xa8 } if m.Field_Name4_ != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_Name4_)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xa0 } if m.XFieldName3 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.XFieldName3)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x98 } if m.FieldName2 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName2)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x90 } if m.Fieldname1 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Fieldname1)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x88 } if len(m.RepeatedStruct) > 0 { for iNdEx := len(m.RepeatedStruct) - 1; iNdEx >= 0; iNdEx-- { size, err := (*structpb1.Struct)(m.RepeatedStruct[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x14 i-- dAtA[i] = 0xa2 } } if len(m.RepeatedListValue) > 0 { for iNdEx := len(m.RepeatedListValue) - 1; iNdEx >= 0; iNdEx-- { size, err := (*structpb1.ListValue)(m.RepeatedListValue[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xea } } if len(m.RepeatedValue) > 0 { for iNdEx := len(m.RepeatedValue) - 1; iNdEx >= 0; iNdEx-- { size, err := (*structpb1.Value)(m.RepeatedValue[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xe2 } } if len(m.RepeatedAny) > 0 { for iNdEx := len(m.RepeatedAny) - 1; iNdEx >= 0; iNdEx-- { size, err := (*anypb1.Any)(m.RepeatedAny[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xda } } if len(m.RepeatedFieldmask) > 0 { for iNdEx := len(m.RepeatedFieldmask) - 1; iNdEx >= 0; iNdEx-- { size, err := (*fieldmaskpb1.FieldMask)(m.RepeatedFieldmask[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xca } } if len(m.RepeatedTimestamp) > 0 { for iNdEx := len(m.RepeatedTimestamp) - 1; iNdEx >= 0; iNdEx-- { size, err := (*timestamppb1.Timestamp)(m.RepeatedTimestamp[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xc2 } } if len(m.RepeatedDuration) > 0 { for iNdEx := len(m.RepeatedDuration) - 1; iNdEx >= 0; iNdEx-- { size, err := (*durationpb1.Duration)(m.RepeatedDuration[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xba } } if m.OptionalNullValue != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalNullValue)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0x98 } if m.OptionalValue != nil { size, err := (*structpb1.Value)(m.OptionalValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0x92 } if m.OptionalAny != nil { size, err := (*anypb1.Any)(m.OptionalAny).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0x8a } if m.OptionalStruct != nil { size, err := (*structpb1.Struct)(m.OptionalStruct).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0x82 } if m.OptionalFieldMask != nil { size, err := (*fieldmaskpb1.FieldMask)(m.OptionalFieldMask).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i-- dAtA[i] = 0xfa } if m.OptionalTimestamp != nil { size, err := (*timestamppb1.Timestamp)(m.OptionalTimestamp).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i-- dAtA[i] = 0xf2 } if m.OptionalDuration != nil { size, err := (*durationpb1.Duration)(m.OptionalDuration).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i-- dAtA[i] = 0xea } if len(m.RepeatedBytesWrapper) > 0 { for iNdEx := len(m.RepeatedBytesWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.BytesValue)(m.RepeatedBytesWrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xda } } if len(m.RepeatedStringWrapper) > 0 { for iNdEx := len(m.RepeatedStringWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.StringValue)(m.RepeatedStringWrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xd2 } } if len(m.RepeatedDoubleWrapper) > 0 { for iNdEx := len(m.RepeatedDoubleWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.DoubleValue)(m.RepeatedDoubleWrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xca } } if len(m.RepeatedFloatWrapper) > 0 { for iNdEx := len(m.RepeatedFloatWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.FloatValue)(m.RepeatedFloatWrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xc2 } } if len(m.RepeatedUint64Wrapper) > 0 { for iNdEx := len(m.RepeatedUint64Wrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.UInt64Value)(m.RepeatedUint64Wrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xba } } if len(m.RepeatedUint32Wrapper) > 0 { for iNdEx := len(m.RepeatedUint32Wrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.UInt32Value)(m.RepeatedUint32Wrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xb2 } } if len(m.RepeatedInt64Wrapper) > 0 { for iNdEx := len(m.RepeatedInt64Wrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.Int64Value)(m.RepeatedInt64Wrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xaa } } if len(m.RepeatedInt32Wrapper) > 0 { for iNdEx := len(m.RepeatedInt32Wrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.Int32Value)(m.RepeatedInt32Wrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xa2 } } if len(m.RepeatedBoolWrapper) > 0 { for iNdEx := len(m.RepeatedBoolWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.BoolValue)(m.RepeatedBoolWrapper[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0x9a } } if m.OptionalBytesWrapper != nil { size, err := (*wrapperspb1.BytesValue)(m.OptionalBytesWrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0x8a } if m.OptionalStringWrapper != nil { size, err := (*wrapperspb1.StringValue)(m.OptionalStringWrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0x82 } if m.OptionalDoubleWrapper != nil { size, err := (*wrapperspb1.DoubleValue)(m.OptionalDoubleWrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xfa } if m.OptionalFloatWrapper != nil { size, err := (*wrapperspb1.FloatValue)(m.OptionalFloatWrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xf2 } if m.OptionalUint64Wrapper != nil { size, err := (*wrapperspb1.UInt64Value)(m.OptionalUint64Wrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xea } if m.OptionalUint32Wrapper != nil { size, err := (*wrapperspb1.UInt32Value)(m.OptionalUint32Wrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xe2 } if m.OptionalInt64Wrapper != nil { size, err := (*wrapperspb1.Int64Value)(m.OptionalInt64Wrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xda } if m.OptionalInt32Wrapper != nil { size, err := (*wrapperspb1.Int32Value)(m.OptionalInt32Wrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xd2 } if m.OptionalBoolWrapper != nil { size, err := (*wrapperspb1.BoolValue)(m.OptionalBoolWrapper).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xca } if len(m.UnpackedNestedEnum) > 0 { for iNdEx := len(m.UnpackedNestedEnum) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedNestedEnum[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xb0 } } if len(m.UnpackedBool) > 0 { for iNdEx := len(m.UnpackedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.UnpackedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xa8 } } if len(m.UnpackedDouble) > 0 { for iNdEx := len(m.UnpackedDouble) - 1; iNdEx >= 0; iNdEx-- { f1 := math.Float64bits(float64(m.UnpackedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xa1 } } if len(m.UnpackedFloat) > 0 { for iNdEx := len(m.UnpackedFloat) - 1; iNdEx >= 0; iNdEx-- { f2 := math.Float32bits(float32(m.UnpackedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x9d } } if len(m.UnpackedSfixed64) > 0 { for iNdEx := len(m.UnpackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedSfixed64[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x91 } } if len(m.UnpackedSfixed32) > 0 { for iNdEx := len(m.UnpackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedSfixed32[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x8d } } if len(m.UnpackedFixed64) > 0 { for iNdEx := len(m.UnpackedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedFixed64[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x81 } } if len(m.UnpackedFixed32) > 0 { for iNdEx := len(m.UnpackedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedFixed32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xfd } } if len(m.UnpackedSint64) > 0 { for iNdEx := len(m.UnpackedSint64) - 1; iNdEx >= 0; iNdEx-- { x3 := (uint64(m.UnpackedSint64[iNdEx]) << 1) ^ uint64((m.UnpackedSint64[iNdEx] >> 63)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x3)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xf0 } } if len(m.UnpackedSint32) > 0 { for iNdEx := len(m.UnpackedSint32) - 1; iNdEx >= 0; iNdEx-- { x4 := (uint32(m.UnpackedSint32[iNdEx]) << 1) ^ uint32((m.UnpackedSint32[iNdEx] >> 31)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xe8 } } if len(m.UnpackedUint64) > 0 { for iNdEx := len(m.UnpackedUint64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint64[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xe0 } } if len(m.UnpackedUint32) > 0 { for iNdEx := len(m.UnpackedUint32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xd8 } } if len(m.UnpackedInt64) > 0 { for iNdEx := len(m.UnpackedInt64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt64[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xd0 } } if len(m.UnpackedInt32) > 0 { for iNdEx := len(m.UnpackedInt32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xc8 } } if len(m.PackedNestedEnum) > 0 { var pksize6 int for _, num := range m.PackedNestedEnum { pksize6 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize6 j5 := i for _, num1 := range m.PackedNestedEnum { num := uint64(num1) for num >= 1<<7 { dAtA[j5] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j5++ } dAtA[j5] = uint8(num) j5++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize6)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xc2 } if len(m.PackedBool) > 0 { for iNdEx := len(m.PackedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.PackedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedBool))) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xba } if len(m.PackedDouble) > 0 { for iNdEx := len(m.PackedDouble) - 1; iNdEx >= 0; iNdEx-- { f7 := math.Float64bits(float64(m.PackedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f7)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedDouble)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xb2 } if len(m.PackedFloat) > 0 { for iNdEx := len(m.PackedFloat) - 1; iNdEx >= 0; iNdEx-- { f8 := math.Float32bits(float32(m.PackedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f8)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFloat)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xaa } if len(m.PackedSfixed64) > 0 { for iNdEx := len(m.PackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedSfixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedSfixed64)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xa2 } if len(m.PackedSfixed32) > 0 { for iNdEx := len(m.PackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedSfixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedSfixed32)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x9a } if len(m.PackedFixed64) > 0 { for iNdEx := len(m.PackedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedFixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFixed64)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x92 } if len(m.PackedFixed32) > 0 { for iNdEx := len(m.PackedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedFixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFixed32)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x8a } if len(m.PackedSint64) > 0 { var pksize10 int for _, num := range m.PackedSint64 { pksize10 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize10 j9 := i for _, num := range m.PackedSint64 { x11 := (uint64(num) << 1) ^ uint64((num >> 63)) for x11 >= 1<<7 { dAtA[j9] = uint8(uint64(x11)&0x7f | 0x80) j9++ x11 >>= 7 } dAtA[j9] = uint8(x11) j9++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize10)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x82 } if len(m.PackedSint32) > 0 { var pksize13 int for _, num := range m.PackedSint32 { pksize13 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize13 j12 := i for _, num := range m.PackedSint32 { x14 := (uint32(num) << 1) ^ uint32((num >> 31)) for x14 >= 1<<7 { dAtA[j12] = uint8(uint64(x14)&0x7f | 0x80) j12++ x14 >>= 7 } dAtA[j12] = uint8(x14) j12++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize13)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xfa } if len(m.PackedUint64) > 0 { var pksize16 int for _, num := range m.PackedUint64 { pksize16 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize16 j15 := i for _, num := range m.PackedUint64 { for num >= 1<<7 { dAtA[j15] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j15++ } dAtA[j15] = uint8(num) j15++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize16)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xf2 } if len(m.PackedUint32) > 0 { var pksize18 int for _, num := range m.PackedUint32 { pksize18 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize18 j17 := i for _, num := range m.PackedUint32 { for num >= 1<<7 { dAtA[j17] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j17++ } dAtA[j17] = uint8(num) j17++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize18)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xea } if len(m.PackedInt64) > 0 { var pksize20 int for _, num := range m.PackedInt64 { pksize20 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize20 j19 := i for _, num1 := range m.PackedInt64 { num := uint64(num1) for num >= 1<<7 { dAtA[j19] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j19++ } dAtA[j19] = uint8(num) j19++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize20)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xe2 } if len(m.PackedInt32) > 0 { var pksize22 int for _, num := range m.PackedInt32 { pksize22 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize22 j21 := i for _, num1 := range m.PackedInt32 { num := uint64(num1) for num >= 1<<7 { dAtA[j21] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j21++ } dAtA[j21] = uint8(num) j21++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize22)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xda } if len(m.MapStringForeignEnum) > 0 { for k := range m.MapStringForeignEnum { v := m.MapStringForeignEnum[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xd2 } } if len(m.MapStringNestedEnum) > 0 { for k := range m.MapStringNestedEnum { v := m.MapStringNestedEnum[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xca } } if len(m.MapStringForeignMessage) > 0 { for k := range m.MapStringForeignMessage { v := m.MapStringForeignMessage[k] baseI := i size, err := v.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xc2 } } if len(m.MapStringNestedMessage) > 0 { for k := range m.MapStringNestedMessage { v := m.MapStringNestedMessage[k] baseI := i size, err := v.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xba } } if len(m.MapStringBytes) > 0 { for k := range m.MapStringBytes { v := m.MapStringBytes[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xb2 } } if len(m.MapStringString) > 0 { for k := range m.MapStringString { v := m.MapStringString[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xaa } } if len(m.MapBoolBool) > 0 { for k := range m.MapBoolBool { v := m.MapBoolBool[k] baseI := i i-- if v { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 i-- if k { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xa2 } } if len(m.MapInt32Double) > 0 { for k := range m.MapInt32Double { v := m.MapInt32Double[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) i-- dAtA[i] = 0x11 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x9a } } if len(m.MapInt32Float) > 0 { for k := range m.MapInt32Float { v := m.MapInt32Float[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) i-- dAtA[i] = 0x15 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x92 } } if len(m.MapSfixed64Sfixed64) > 0 { for k := range m.MapSfixed64Sfixed64 { v := m.MapSfixed64Sfixed64[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) i-- dAtA[i] = 0x11 i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- dAtA[i] = 0x9 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x8a } } if len(m.MapSfixed32Sfixed32) > 0 { for k := range m.MapSfixed32Sfixed32 { v := m.MapSfixed32Sfixed32[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) i-- dAtA[i] = 0x15 i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- dAtA[i] = 0xd i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x82 } } if len(m.MapFixed64Fixed64) > 0 { for k := range m.MapFixed64Fixed64 { v := m.MapFixed64Fixed64[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) i-- dAtA[i] = 0x11 i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- dAtA[i] = 0x9 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xfa } } if len(m.MapFixed32Fixed32) > 0 { for k := range m.MapFixed32Fixed32 { v := m.MapFixed32Fixed32[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) i-- dAtA[i] = 0x15 i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- dAtA[i] = 0xd i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xf2 } } if len(m.MapSint64Sint64) > 0 { for k := range m.MapSint64Sint64 { v := m.MapSint64Sint64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xea } } if len(m.MapSint32Sint32) > 0 { for k := range m.MapSint32Sint32 { v := m.MapSint32Sint32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xe2 } } if len(m.MapUint64Uint64) > 0 { for k := range m.MapUint64Uint64 { v := m.MapUint64Uint64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xda } } if len(m.MapUint32Uint32) > 0 { for k := range m.MapUint32Uint32 { v := m.MapUint32Uint32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xd2 } } if len(m.MapInt64Int64) > 0 { for k := range m.MapInt64Int64 { v := m.MapInt64Int64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xca } } if len(m.MapInt32Int32) > 0 { for k := range m.MapInt32Int32 { v := m.MapInt32Int32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xc2 } } if len(m.RepeatedCord) > 0 { for iNdEx := len(m.RepeatedCord) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedCord[iNdEx]) copy(dAtA[i:], m.RepeatedCord[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedCord[iNdEx]))) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xba } } if len(m.RepeatedStringPiece) > 0 { for iNdEx := len(m.RepeatedStringPiece) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedStringPiece[iNdEx]) copy(dAtA[i:], m.RepeatedStringPiece[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedStringPiece[iNdEx]))) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xb2 } } if len(m.RepeatedForeignEnum) > 0 { var pksize24 int for _, num := range m.RepeatedForeignEnum { pksize24 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize24 j23 := i for _, num1 := range m.RepeatedForeignEnum { num := uint64(num1) for num >= 1<<7 { dAtA[j23] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j23++ } dAtA[j23] = uint8(num) j23++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize24)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xa2 } if len(m.RepeatedNestedEnum) > 0 { var pksize26 int for _, num := range m.RepeatedNestedEnum { pksize26 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize26 j25 := i for _, num1 := range m.RepeatedNestedEnum { num := uint64(num1) for num >= 1<<7 { dAtA[j25] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j25++ } dAtA[j25] = uint8(num) j25++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize26)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x9a } if len(m.RepeatedForeignMessage) > 0 { for iNdEx := len(m.RepeatedForeignMessage) - 1; iNdEx >= 0; iNdEx-- { size, err := m.RepeatedForeignMessage[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x8a } } if len(m.RepeatedNestedMessage) > 0 { for iNdEx := len(m.RepeatedNestedMessage) - 1; iNdEx >= 0; iNdEx-- { size, err := m.RepeatedNestedMessage[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x82 } } if len(m.RepeatedBytes) > 0 { for iNdEx := len(m.RepeatedBytes) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedBytes[iNdEx]) copy(dAtA[i:], m.RepeatedBytes[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedBytes[iNdEx]))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xea } } if len(m.RepeatedString) > 0 { for iNdEx := len(m.RepeatedString) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedString[iNdEx]) copy(dAtA[i:], m.RepeatedString[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedString[iNdEx]))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xe2 } } if len(m.RepeatedBool) > 0 { for iNdEx := len(m.RepeatedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.RepeatedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedBool))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xda } if len(m.RepeatedDouble) > 0 { for iNdEx := len(m.RepeatedDouble) - 1; iNdEx >= 0; iNdEx-- { f27 := math.Float64bits(float64(m.RepeatedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f27)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedDouble)*8)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xd2 } if len(m.RepeatedFloat) > 0 { for iNdEx := len(m.RepeatedFloat) - 1; iNdEx >= 0; iNdEx-- { f28 := math.Float32bits(float32(m.RepeatedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f28)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedFloat)*4)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xca } if len(m.RepeatedSfixed64) > 0 { for iNdEx := len(m.RepeatedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedSfixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedSfixed64)*8)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xc2 } if len(m.RepeatedSfixed32) > 0 { for iNdEx := len(m.RepeatedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedSfixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedSfixed32)*4)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xba } if len(m.RepeatedFixed64) > 0 { for iNdEx := len(m.RepeatedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedFixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedFixed64)*8)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xb2 } if len(m.RepeatedFixed32) > 0 { for iNdEx := len(m.RepeatedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedFixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedFixed32)*4)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xaa } if len(m.RepeatedSint64) > 0 { var pksize30 int for _, num := range m.RepeatedSint64 { pksize30 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize30 j29 := i for _, num := range m.RepeatedSint64 { x31 := (uint64(num) << 1) ^ uint64((num >> 63)) for x31 >= 1<<7 { dAtA[j29] = uint8(uint64(x31)&0x7f | 0x80) j29++ x31 >>= 7 } dAtA[j29] = uint8(x31) j29++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize30)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xa2 } if len(m.RepeatedSint32) > 0 { var pksize33 int for _, num := range m.RepeatedSint32 { pksize33 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize33 j32 := i for _, num := range m.RepeatedSint32 { x34 := (uint32(num) << 1) ^ uint32((num >> 31)) for x34 >= 1<<7 { dAtA[j32] = uint8(uint64(x34)&0x7f | 0x80) j32++ x34 >>= 7 } dAtA[j32] = uint8(x34) j32++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize33)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x9a } if len(m.RepeatedUint64) > 0 { var pksize36 int for _, num := range m.RepeatedUint64 { pksize36 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize36 j35 := i for _, num := range m.RepeatedUint64 { for num >= 1<<7 { dAtA[j35] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j35++ } dAtA[j35] = uint8(num) j35++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize36)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x92 } if len(m.RepeatedUint32) > 0 { var pksize38 int for _, num := range m.RepeatedUint32 { pksize38 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize38 j37 := i for _, num := range m.RepeatedUint32 { for num >= 1<<7 { dAtA[j37] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j37++ } dAtA[j37] = uint8(num) j37++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize38)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x8a } if len(m.RepeatedInt64) > 0 { var pksize40 int for _, num := range m.RepeatedInt64 { pksize40 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize40 j39 := i for _, num1 := range m.RepeatedInt64 { num := uint64(num1) for num >= 1<<7 { dAtA[j39] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j39++ } dAtA[j39] = uint8(num) j39++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize40)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x82 } if len(m.RepeatedInt32) > 0 { var pksize42 int for _, num := range m.RepeatedInt32 { pksize42 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize42 j41 := i for _, num1 := range m.RepeatedInt32 { num := uint64(num1) for num >= 1<<7 { dAtA[j41] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j41++ } dAtA[j41] = uint8(num) j41++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize42)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xfa } if m.RecursiveMessage != nil { size, err := m.RecursiveMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xda } if len(m.OptionalCord) > 0 { i -= len(m.OptionalCord) copy(dAtA[i:], m.OptionalCord) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalCord))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } if len(m.OptionalStringPiece) > 0 { i -= len(m.OptionalStringPiece) copy(dAtA[i:], m.OptionalStringPiece) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalStringPiece))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xc2 } if m.OptionalAliasedEnum != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalAliasedEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb8 } if m.OptionalForeignEnum != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalForeignEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb0 } if m.OptionalNestedEnum != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalNestedEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa8 } if m.OptionalForeignMessage != nil { size, err := m.OptionalForeignMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x9a } if m.OptionalNestedMessage != nil { size, err := m.OptionalNestedMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x92 } if len(m.OptionalBytes) > 0 { i -= len(m.OptionalBytes) copy(dAtA[i:], m.OptionalBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalBytes))) i-- dAtA[i] = 0x7a } if len(m.OptionalString) > 0 { i -= len(m.OptionalString) copy(dAtA[i:], m.OptionalString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalString))) i-- dAtA[i] = 0x72 } if m.OptionalBool { i-- if m.OptionalBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x68 } if m.OptionalDouble != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OptionalDouble)))) i-- dAtA[i] = 0x61 } if m.OptionalFloat != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.OptionalFloat)))) i-- dAtA[i] = 0x5d } if m.OptionalSfixed64 != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.OptionalSfixed64)) i-- dAtA[i] = 0x51 } if m.OptionalSfixed32 != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.OptionalSfixed32)) i-- dAtA[i] = 0x4d } if m.OptionalFixed64 != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.OptionalFixed64)) i-- dAtA[i] = 0x41 } if m.OptionalFixed32 != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.OptionalFixed32)) i-- dAtA[i] = 0x3d } if m.OptionalSint64 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(m.OptionalSint64)<<1)^uint64((m.OptionalSint64>>63)))) i-- dAtA[i] = 0x30 } if m.OptionalSint32 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(m.OptionalSint32)<<1)^uint32((m.OptionalSint32>>31)))) i-- dAtA[i] = 0x28 } if m.OptionalUint64 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalUint64)) i-- dAtA[i] = 0x20 } if m.OptionalUint32 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalUint32)) i-- dAtA[i] = 0x18 } if m.OptionalInt64 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalInt64)) i-- dAtA[i] = 0x10 } if m.OptionalInt32 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalInt32)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofUint32) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofUint32) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint32)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xf8 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofNestedMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofNestedMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.OneofNestedMessage != nil { size, err := m.OneofNestedMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x82 } return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofString) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofString) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofString) copy(dAtA[i:], m.OneofString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OneofString))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x8a return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofBytes) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofBytes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofBytes) copy(dAtA[i:], m.OneofBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OneofBytes))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x92 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofBool) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofBool) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i-- if m.OneofBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x98 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofUint64) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofUint64) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint64)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xa0 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofFloat) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofFloat) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.OneofFloat)))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xad return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofDouble) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofDouble) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OneofDouble)))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xb1 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofEnum) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofEnum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofEnum)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xb8 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofNullValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestAllTypesProto3_OneofNullValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofNullValue)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xc0 return len(dAtA) - i, nil } func (m *ForeignMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ForeignMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ForeignMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.C != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.C)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *NullHypothesisProto3) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *NullHypothesisProto3) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *NullHypothesisProto3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *EnumOnlyProto3) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *EnumOnlyProto3) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *EnumOnlyProto3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *TestAllTypesProto3_NestedMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto3_NestedMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_NestedMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Corecursive != nil { size, err := m.Corecursive.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.A != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TestAllTypesProto3) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestAllTypesProto3) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.FieldName18__ != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName18__)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x90 } if m.FieldName17__ != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName17__)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x88 } if m.Field__Name16 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field__Name16)) i-- dAtA[i] = 0x1a i-- dAtA[i] = 0x80 } if m.Field_Name15 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_Name15)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xf8 } if m.X_FieldName14 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.X_FieldName14)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xf0 } if m.XFieldName13 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.XFieldName13)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xe8 } if m.FIELDName12 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FIELDName12)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xe0 } if m.FIELD_NAME11 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FIELD_NAME11)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xd8 } if m.Field_Name10 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_Name10)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xd0 } if m.Field_Name9 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_Name9)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xc8 } if m.FieldName8 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName8)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xc0 } if m.FieldName7 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName7)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xb8 } if m.Field_0Name6 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_0Name6)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xb0 } if m.Field0Name5 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field0Name5)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xa8 } if m.Field_Name4_ != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Field_Name4_)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0xa0 } if m.XFieldName3 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.XFieldName3)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x98 } if m.FieldName2 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FieldName2)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x90 } if m.Fieldname1 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Fieldname1)) i-- dAtA[i] = 0x19 i-- dAtA[i] = 0x88 } if len(m.RepeatedStruct) > 0 { for iNdEx := len(m.RepeatedStruct) - 1; iNdEx >= 0; iNdEx-- { size, err := (*structpb1.Struct)(m.RepeatedStruct[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x14 i-- dAtA[i] = 0xa2 } } if len(m.RepeatedListValue) > 0 { for iNdEx := len(m.RepeatedListValue) - 1; iNdEx >= 0; iNdEx-- { size, err := (*structpb1.ListValue)(m.RepeatedListValue[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xea } } if len(m.RepeatedValue) > 0 { for iNdEx := len(m.RepeatedValue) - 1; iNdEx >= 0; iNdEx-- { size, err := (*structpb1.Value)(m.RepeatedValue[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xe2 } } if len(m.RepeatedAny) > 0 { for iNdEx := len(m.RepeatedAny) - 1; iNdEx >= 0; iNdEx-- { size, err := (*anypb1.Any)(m.RepeatedAny[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xda } } if len(m.RepeatedFieldmask) > 0 { for iNdEx := len(m.RepeatedFieldmask) - 1; iNdEx >= 0; iNdEx-- { size, err := (*fieldmaskpb1.FieldMask)(m.RepeatedFieldmask[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xca } } if len(m.RepeatedTimestamp) > 0 { for iNdEx := len(m.RepeatedTimestamp) - 1; iNdEx >= 0; iNdEx-- { size, err := (*timestamppb1.Timestamp)(m.RepeatedTimestamp[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xc2 } } if len(m.RepeatedDuration) > 0 { for iNdEx := len(m.RepeatedDuration) - 1; iNdEx >= 0; iNdEx-- { size, err := (*durationpb1.Duration)(m.RepeatedDuration[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0xba } } if m.OptionalNullValue != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalNullValue)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0x98 } if m.OptionalValue != nil { size, err := (*structpb1.Value)(m.OptionalValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0x92 } if m.OptionalAny != nil { size, err := (*anypb1.Any)(m.OptionalAny).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0x8a } if m.OptionalStruct != nil { size, err := (*structpb1.Struct)(m.OptionalStruct).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x13 i-- dAtA[i] = 0x82 } if m.OptionalFieldMask != nil { size, err := (*fieldmaskpb1.FieldMask)(m.OptionalFieldMask).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i-- dAtA[i] = 0xfa } if m.OptionalTimestamp != nil { size, err := (*timestamppb1.Timestamp)(m.OptionalTimestamp).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i-- dAtA[i] = 0xf2 } if m.OptionalDuration != nil { size, err := (*durationpb1.Duration)(m.OptionalDuration).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i-- dAtA[i] = 0xea } if len(m.RepeatedBytesWrapper) > 0 { for iNdEx := len(m.RepeatedBytesWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.BytesValue)(m.RepeatedBytesWrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xda } } if len(m.RepeatedStringWrapper) > 0 { for iNdEx := len(m.RepeatedStringWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.StringValue)(m.RepeatedStringWrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xd2 } } if len(m.RepeatedDoubleWrapper) > 0 { for iNdEx := len(m.RepeatedDoubleWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.DoubleValue)(m.RepeatedDoubleWrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xca } } if len(m.RepeatedFloatWrapper) > 0 { for iNdEx := len(m.RepeatedFloatWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.FloatValue)(m.RepeatedFloatWrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xc2 } } if len(m.RepeatedUint64Wrapper) > 0 { for iNdEx := len(m.RepeatedUint64Wrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.UInt64Value)(m.RepeatedUint64Wrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xba } } if len(m.RepeatedUint32Wrapper) > 0 { for iNdEx := len(m.RepeatedUint32Wrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.UInt32Value)(m.RepeatedUint32Wrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xb2 } } if len(m.RepeatedInt64Wrapper) > 0 { for iNdEx := len(m.RepeatedInt64Wrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.Int64Value)(m.RepeatedInt64Wrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xaa } } if len(m.RepeatedInt32Wrapper) > 0 { for iNdEx := len(m.RepeatedInt32Wrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.Int32Value)(m.RepeatedInt32Wrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0xa2 } } if len(m.RepeatedBoolWrapper) > 0 { for iNdEx := len(m.RepeatedBoolWrapper) - 1; iNdEx >= 0; iNdEx-- { size, err := (*wrapperspb1.BoolValue)(m.RepeatedBoolWrapper[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0x9a } } if m.OptionalBytesWrapper != nil { size, err := (*wrapperspb1.BytesValue)(m.OptionalBytesWrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0x8a } if m.OptionalStringWrapper != nil { size, err := (*wrapperspb1.StringValue)(m.OptionalStringWrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xd i-- dAtA[i] = 0x82 } if m.OptionalDoubleWrapper != nil { size, err := (*wrapperspb1.DoubleValue)(m.OptionalDoubleWrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xfa } if m.OptionalFloatWrapper != nil { size, err := (*wrapperspb1.FloatValue)(m.OptionalFloatWrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xf2 } if m.OptionalUint64Wrapper != nil { size, err := (*wrapperspb1.UInt64Value)(m.OptionalUint64Wrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xea } if m.OptionalUint32Wrapper != nil { size, err := (*wrapperspb1.UInt32Value)(m.OptionalUint32Wrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xe2 } if m.OptionalInt64Wrapper != nil { size, err := (*wrapperspb1.Int64Value)(m.OptionalInt64Wrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xda } if m.OptionalInt32Wrapper != nil { size, err := (*wrapperspb1.Int32Value)(m.OptionalInt32Wrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xd2 } if m.OptionalBoolWrapper != nil { size, err := (*wrapperspb1.BoolValue)(m.OptionalBoolWrapper).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xc i-- dAtA[i] = 0xca } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofNullValue); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofEnum); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofDouble); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofFloat); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofUint64); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofBool); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofBytes); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofString); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofNestedMessage); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.OneofField.(*TestAllTypesProto3_OneofUint32); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if len(m.UnpackedNestedEnum) > 0 { for iNdEx := len(m.UnpackedNestedEnum) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedNestedEnum[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xb0 } } if len(m.UnpackedBool) > 0 { for iNdEx := len(m.UnpackedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.UnpackedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xa8 } } if len(m.UnpackedDouble) > 0 { for iNdEx := len(m.UnpackedDouble) - 1; iNdEx >= 0; iNdEx-- { f1 := math.Float64bits(float64(m.UnpackedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xa1 } } if len(m.UnpackedFloat) > 0 { for iNdEx := len(m.UnpackedFloat) - 1; iNdEx >= 0; iNdEx-- { f2 := math.Float32bits(float32(m.UnpackedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x9d } } if len(m.UnpackedSfixed64) > 0 { for iNdEx := len(m.UnpackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedSfixed64[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x91 } } if len(m.UnpackedSfixed32) > 0 { for iNdEx := len(m.UnpackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedSfixed32[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x8d } } if len(m.UnpackedFixed64) > 0 { for iNdEx := len(m.UnpackedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedFixed64[iNdEx])) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0x81 } } if len(m.UnpackedFixed32) > 0 { for iNdEx := len(m.UnpackedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedFixed32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xfd } } if len(m.UnpackedSint64) > 0 { for iNdEx := len(m.UnpackedSint64) - 1; iNdEx >= 0; iNdEx-- { x3 := (uint64(m.UnpackedSint64[iNdEx]) << 1) ^ uint64((m.UnpackedSint64[iNdEx] >> 63)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x3)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xf0 } } if len(m.UnpackedSint32) > 0 { for iNdEx := len(m.UnpackedSint32) - 1; iNdEx >= 0; iNdEx-- { x4 := (uint32(m.UnpackedSint32[iNdEx]) << 1) ^ uint32((m.UnpackedSint32[iNdEx] >> 31)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xe8 } } if len(m.UnpackedUint64) > 0 { for iNdEx := len(m.UnpackedUint64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint64[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xe0 } } if len(m.UnpackedUint32) > 0 { for iNdEx := len(m.UnpackedUint32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xd8 } } if len(m.UnpackedInt64) > 0 { for iNdEx := len(m.UnpackedInt64) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt64[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xd0 } } if len(m.UnpackedInt32) > 0 { for iNdEx := len(m.UnpackedInt32) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt32[iNdEx])) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xc8 } } if len(m.PackedNestedEnum) > 0 { var pksize6 int for _, num := range m.PackedNestedEnum { pksize6 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize6 j5 := i for _, num1 := range m.PackedNestedEnum { num := uint64(num1) for num >= 1<<7 { dAtA[j5] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j5++ } dAtA[j5] = uint8(num) j5++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize6)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xc2 } if len(m.PackedBool) > 0 { for iNdEx := len(m.PackedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.PackedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedBool))) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xba } if len(m.PackedDouble) > 0 { for iNdEx := len(m.PackedDouble) - 1; iNdEx >= 0; iNdEx-- { f7 := math.Float64bits(float64(m.PackedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f7)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedDouble)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xb2 } if len(m.PackedFloat) > 0 { for iNdEx := len(m.PackedFloat) - 1; iNdEx >= 0; iNdEx-- { f8 := math.Float32bits(float32(m.PackedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f8)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFloat)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xaa } if len(m.PackedSfixed64) > 0 { for iNdEx := len(m.PackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedSfixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedSfixed64)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0xa2 } if len(m.PackedSfixed32) > 0 { for iNdEx := len(m.PackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedSfixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedSfixed32)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x9a } if len(m.PackedFixed64) > 0 { for iNdEx := len(m.PackedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedFixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFixed64)*8)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x92 } if len(m.PackedFixed32) > 0 { for iNdEx := len(m.PackedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedFixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedFixed32)*4)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x8a } if len(m.PackedSint64) > 0 { var pksize10 int for _, num := range m.PackedSint64 { pksize10 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize10 j9 := i for _, num := range m.PackedSint64 { x11 := (uint64(num) << 1) ^ uint64((num >> 63)) for x11 >= 1<<7 { dAtA[j9] = uint8(uint64(x11)&0x7f | 0x80) j9++ x11 >>= 7 } dAtA[j9] = uint8(x11) j9++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize10)) i-- dAtA[i] = 0x5 i-- dAtA[i] = 0x82 } if len(m.PackedSint32) > 0 { var pksize13 int for _, num := range m.PackedSint32 { pksize13 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize13 j12 := i for _, num := range m.PackedSint32 { x14 := (uint32(num) << 1) ^ uint32((num >> 31)) for x14 >= 1<<7 { dAtA[j12] = uint8(uint64(x14)&0x7f | 0x80) j12++ x14 >>= 7 } dAtA[j12] = uint8(x14) j12++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize13)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xfa } if len(m.PackedUint64) > 0 { var pksize16 int for _, num := range m.PackedUint64 { pksize16 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize16 j15 := i for _, num := range m.PackedUint64 { for num >= 1<<7 { dAtA[j15] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j15++ } dAtA[j15] = uint8(num) j15++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize16)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xf2 } if len(m.PackedUint32) > 0 { var pksize18 int for _, num := range m.PackedUint32 { pksize18 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize18 j17 := i for _, num := range m.PackedUint32 { for num >= 1<<7 { dAtA[j17] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j17++ } dAtA[j17] = uint8(num) j17++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize18)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xea } if len(m.PackedInt64) > 0 { var pksize20 int for _, num := range m.PackedInt64 { pksize20 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize20 j19 := i for _, num1 := range m.PackedInt64 { num := uint64(num1) for num >= 1<<7 { dAtA[j19] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j19++ } dAtA[j19] = uint8(num) j19++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize20)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xe2 } if len(m.PackedInt32) > 0 { var pksize22 int for _, num := range m.PackedInt32 { pksize22 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize22 j21 := i for _, num1 := range m.PackedInt32 { num := uint64(num1) for num >= 1<<7 { dAtA[j21] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j21++ } dAtA[j21] = uint8(num) j21++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize22)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xda } if len(m.MapStringForeignEnum) > 0 { for k := range m.MapStringForeignEnum { v := m.MapStringForeignEnum[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xd2 } } if len(m.MapStringNestedEnum) > 0 { for k := range m.MapStringNestedEnum { v := m.MapStringNestedEnum[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xca } } if len(m.MapStringForeignMessage) > 0 { for k := range m.MapStringForeignMessage { v := m.MapStringForeignMessage[k] baseI := i size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xc2 } } if len(m.MapStringNestedMessage) > 0 { for k := range m.MapStringNestedMessage { v := m.MapStringNestedMessage[k] baseI := i size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xba } } if len(m.MapStringBytes) > 0 { for k := range m.MapStringBytes { v := m.MapStringBytes[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xb2 } } if len(m.MapStringString) > 0 { for k := range m.MapStringString { v := m.MapStringString[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xaa } } if len(m.MapBoolBool) > 0 { for k := range m.MapBoolBool { v := m.MapBoolBool[k] baseI := i i-- if v { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 i-- if k { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0xa2 } } if len(m.MapInt32Double) > 0 { for k := range m.MapInt32Double { v := m.MapInt32Double[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) i-- dAtA[i] = 0x11 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x9a } } if len(m.MapInt32Float) > 0 { for k := range m.MapInt32Float { v := m.MapInt32Float[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) i-- dAtA[i] = 0x15 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x92 } } if len(m.MapSfixed64Sfixed64) > 0 { for k := range m.MapSfixed64Sfixed64 { v := m.MapSfixed64Sfixed64[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) i-- dAtA[i] = 0x11 i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- dAtA[i] = 0x9 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x8a } } if len(m.MapSfixed32Sfixed32) > 0 { for k := range m.MapSfixed32Sfixed32 { v := m.MapSfixed32Sfixed32[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) i-- dAtA[i] = 0x15 i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- dAtA[i] = 0xd i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x4 i-- dAtA[i] = 0x82 } } if len(m.MapFixed64Fixed64) > 0 { for k := range m.MapFixed64Fixed64 { v := m.MapFixed64Fixed64[k] baseI := i i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) i-- dAtA[i] = 0x11 i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- dAtA[i] = 0x9 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xfa } } if len(m.MapFixed32Fixed32) > 0 { for k := range m.MapFixed32Fixed32 { v := m.MapFixed32Fixed32[k] baseI := i i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) i-- dAtA[i] = 0x15 i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- dAtA[i] = 0xd i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xf2 } } if len(m.MapSint64Sint64) > 0 { for k := range m.MapSint64Sint64 { v := m.MapSint64Sint64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xea } } if len(m.MapSint32Sint32) > 0 { for k := range m.MapSint32Sint32 { v := m.MapSint32Sint32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xe2 } } if len(m.MapUint64Uint64) > 0 { for k := range m.MapUint64Uint64 { v := m.MapUint64Uint64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xda } } if len(m.MapUint32Uint32) > 0 { for k := range m.MapUint32Uint32 { v := m.MapUint32Uint32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xd2 } } if len(m.MapInt64Int64) > 0 { for k := range m.MapInt64Int64 { v := m.MapInt64Int64[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xca } } if len(m.MapInt32Int32) > 0 { for k := range m.MapInt32Int32 { v := m.MapInt32Int32[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xc2 } } if len(m.RepeatedCord) > 0 { for iNdEx := len(m.RepeatedCord) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedCord[iNdEx]) copy(dAtA[i:], m.RepeatedCord[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedCord[iNdEx]))) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xba } } if len(m.RepeatedStringPiece) > 0 { for iNdEx := len(m.RepeatedStringPiece) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedStringPiece[iNdEx]) copy(dAtA[i:], m.RepeatedStringPiece[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedStringPiece[iNdEx]))) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xb2 } } if len(m.RepeatedForeignEnum) > 0 { var pksize24 int for _, num := range m.RepeatedForeignEnum { pksize24 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize24 j23 := i for _, num1 := range m.RepeatedForeignEnum { num := uint64(num1) for num >= 1<<7 { dAtA[j23] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j23++ } dAtA[j23] = uint8(num) j23++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize24)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0xa2 } if len(m.RepeatedNestedEnum) > 0 { var pksize26 int for _, num := range m.RepeatedNestedEnum { pksize26 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize26 j25 := i for _, num1 := range m.RepeatedNestedEnum { num := uint64(num1) for num >= 1<<7 { dAtA[j25] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j25++ } dAtA[j25] = uint8(num) j25++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize26)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x9a } if len(m.RepeatedForeignMessage) > 0 { for iNdEx := len(m.RepeatedForeignMessage) - 1; iNdEx >= 0; iNdEx-- { size, err := m.RepeatedForeignMessage[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x8a } } if len(m.RepeatedNestedMessage) > 0 { for iNdEx := len(m.RepeatedNestedMessage) - 1; iNdEx >= 0; iNdEx-- { size, err := m.RepeatedNestedMessage[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3 i-- dAtA[i] = 0x82 } } if len(m.RepeatedBytes) > 0 { for iNdEx := len(m.RepeatedBytes) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedBytes[iNdEx]) copy(dAtA[i:], m.RepeatedBytes[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedBytes[iNdEx]))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xea } } if len(m.RepeatedString) > 0 { for iNdEx := len(m.RepeatedString) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedString[iNdEx]) copy(dAtA[i:], m.RepeatedString[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedString[iNdEx]))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xe2 } } if len(m.RepeatedBool) > 0 { for iNdEx := len(m.RepeatedBool) - 1; iNdEx >= 0; iNdEx-- { i-- if m.RepeatedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedBool))) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xda } if len(m.RepeatedDouble) > 0 { for iNdEx := len(m.RepeatedDouble) - 1; iNdEx >= 0; iNdEx-- { f27 := math.Float64bits(float64(m.RepeatedDouble[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f27)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedDouble)*8)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xd2 } if len(m.RepeatedFloat) > 0 { for iNdEx := len(m.RepeatedFloat) - 1; iNdEx >= 0; iNdEx-- { f28 := math.Float32bits(float32(m.RepeatedFloat[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f28)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedFloat)*4)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xca } if len(m.RepeatedSfixed64) > 0 { for iNdEx := len(m.RepeatedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedSfixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedSfixed64)*8)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xc2 } if len(m.RepeatedSfixed32) > 0 { for iNdEx := len(m.RepeatedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedSfixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedSfixed32)*4)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xba } if len(m.RepeatedFixed64) > 0 { for iNdEx := len(m.RepeatedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedFixed64[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedFixed64)*8)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xb2 } if len(m.RepeatedFixed32) > 0 { for iNdEx := len(m.RepeatedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedFixed32[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedFixed32)*4)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xaa } if len(m.RepeatedSint64) > 0 { var pksize30 int for _, num := range m.RepeatedSint64 { pksize30 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize30 j29 := i for _, num := range m.RepeatedSint64 { x31 := (uint64(num) << 1) ^ uint64((num >> 63)) for x31 >= 1<<7 { dAtA[j29] = uint8(uint64(x31)&0x7f | 0x80) j29++ x31 >>= 7 } dAtA[j29] = uint8(x31) j29++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize30)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xa2 } if len(m.RepeatedSint32) > 0 { var pksize33 int for _, num := range m.RepeatedSint32 { pksize33 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize33 j32 := i for _, num := range m.RepeatedSint32 { x34 := (uint32(num) << 1) ^ uint32((num >> 31)) for x34 >= 1<<7 { dAtA[j32] = uint8(uint64(x34)&0x7f | 0x80) j32++ x34 >>= 7 } dAtA[j32] = uint8(x34) j32++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize33)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x9a } if len(m.RepeatedUint64) > 0 { var pksize36 int for _, num := range m.RepeatedUint64 { pksize36 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize36 j35 := i for _, num := range m.RepeatedUint64 { for num >= 1<<7 { dAtA[j35] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j35++ } dAtA[j35] = uint8(num) j35++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize36)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x92 } if len(m.RepeatedUint32) > 0 { var pksize38 int for _, num := range m.RepeatedUint32 { pksize38 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize38 j37 := i for _, num := range m.RepeatedUint32 { for num >= 1<<7 { dAtA[j37] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j37++ } dAtA[j37] = uint8(num) j37++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize38)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x8a } if len(m.RepeatedInt64) > 0 { var pksize40 int for _, num := range m.RepeatedInt64 { pksize40 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize40 j39 := i for _, num1 := range m.RepeatedInt64 { num := uint64(num1) for num >= 1<<7 { dAtA[j39] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j39++ } dAtA[j39] = uint8(num) j39++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize40)) i-- dAtA[i] = 0x2 i-- dAtA[i] = 0x82 } if len(m.RepeatedInt32) > 0 { var pksize42 int for _, num := range m.RepeatedInt32 { pksize42 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize42 j41 := i for _, num1 := range m.RepeatedInt32 { num := uint64(num1) for num >= 1<<7 { dAtA[j41] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j41++ } dAtA[j41] = uint8(num) j41++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize42)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xfa } if m.RecursiveMessage != nil { size, err := m.RecursiveMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xda } if len(m.OptionalCord) > 0 { i -= len(m.OptionalCord) copy(dAtA[i:], m.OptionalCord) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalCord))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } if len(m.OptionalStringPiece) > 0 { i -= len(m.OptionalStringPiece) copy(dAtA[i:], m.OptionalStringPiece) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalStringPiece))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xc2 } if m.OptionalAliasedEnum != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalAliasedEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb8 } if m.OptionalForeignEnum != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalForeignEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb0 } if m.OptionalNestedEnum != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalNestedEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa8 } if m.OptionalForeignMessage != nil { size, err := m.OptionalForeignMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x9a } if m.OptionalNestedMessage != nil { size, err := m.OptionalNestedMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x92 } if len(m.OptionalBytes) > 0 { i -= len(m.OptionalBytes) copy(dAtA[i:], m.OptionalBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalBytes))) i-- dAtA[i] = 0x7a } if len(m.OptionalString) > 0 { i -= len(m.OptionalString) copy(dAtA[i:], m.OptionalString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalString))) i-- dAtA[i] = 0x72 } if m.OptionalBool { i-- if m.OptionalBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x68 } if m.OptionalDouble != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OptionalDouble)))) i-- dAtA[i] = 0x61 } if m.OptionalFloat != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.OptionalFloat)))) i-- dAtA[i] = 0x5d } if m.OptionalSfixed64 != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.OptionalSfixed64)) i-- dAtA[i] = 0x51 } if m.OptionalSfixed32 != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.OptionalSfixed32)) i-- dAtA[i] = 0x4d } if m.OptionalFixed64 != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.OptionalFixed64)) i-- dAtA[i] = 0x41 } if m.OptionalFixed32 != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.OptionalFixed32)) i-- dAtA[i] = 0x3d } if m.OptionalSint64 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(m.OptionalSint64)<<1)^uint64((m.OptionalSint64>>63)))) i-- dAtA[i] = 0x30 } if m.OptionalSint32 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(m.OptionalSint32)<<1)^uint32((m.OptionalSint32>>31)))) i-- dAtA[i] = 0x28 } if m.OptionalUint64 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalUint64)) i-- dAtA[i] = 0x20 } if m.OptionalUint32 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalUint32)) i-- dAtA[i] = 0x18 } if m.OptionalInt64 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalInt64)) i-- dAtA[i] = 0x10 } if m.OptionalInt32 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalInt32)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofUint32) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofUint32) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint32)) i-- dAtA[i] = 0x6 i-- dAtA[i] = 0xf8 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofNestedMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofNestedMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.OneofNestedMessage != nil { size, err := m.OneofNestedMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x82 } return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofString) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofString) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofString) copy(dAtA[i:], m.OneofString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OneofString))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x8a return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofBytes) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofBytes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofBytes) copy(dAtA[i:], m.OneofBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OneofBytes))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x92 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofBool) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofBool) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i-- if m.OneofBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x7 i-- dAtA[i] = 0x98 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofUint64) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofUint64) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint64)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xa0 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofFloat) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofFloat) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.OneofFloat)))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xad return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofDouble) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofDouble) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OneofDouble)))) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xb1 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofEnum) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofEnum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofEnum)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xb8 return len(dAtA) - i, nil } func (m *TestAllTypesProto3_OneofNullValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestAllTypesProto3_OneofNullValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofNullValue)) i-- dAtA[i] = 0x7 i-- dAtA[i] = 0xc0 return len(dAtA) - i, nil } func (m *ForeignMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ForeignMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ForeignMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.C != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.C)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *NullHypothesisProto3) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *NullHypothesisProto3) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *NullHypothesisProto3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *EnumOnlyProto3) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *EnumOnlyProto3) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *EnumOnlyProto3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *TestAllTypesProto3_NestedMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.A != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.A)) } if m.Corecursive != nil { l = m.Corecursive.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } func (m *TestAllTypesProto3) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.OptionalInt32 != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalInt32)) } if m.OptionalInt64 != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalInt64)) } if m.OptionalUint32 != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalUint32)) } if m.OptionalUint64 != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalUint64)) } if m.OptionalSint32 != 0 { n += 1 + protohelpers.SizeOfZigzag(uint64(m.OptionalSint32)) } if m.OptionalSint64 != 0 { n += 1 + protohelpers.SizeOfZigzag(uint64(m.OptionalSint64)) } if m.OptionalFixed32 != 0 { n += 5 } if m.OptionalFixed64 != 0 { n += 9 } if m.OptionalSfixed32 != 0 { n += 5 } if m.OptionalSfixed64 != 0 { n += 9 } if m.OptionalFloat != 0 { n += 5 } if m.OptionalDouble != 0 { n += 9 } if m.OptionalBool { n += 2 } l = len(m.OptionalString) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.OptionalBytes) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalNestedMessage != nil { l = m.OptionalNestedMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalForeignMessage != nil { l = m.OptionalForeignMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalNestedEnum != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.OptionalNestedEnum)) } if m.OptionalForeignEnum != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.OptionalForeignEnum)) } if m.OptionalAliasedEnum != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.OptionalAliasedEnum)) } l = len(m.OptionalStringPiece) if l > 0 { n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.OptionalCord) if l > 0 { n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.RecursiveMessage != nil { l = m.RecursiveMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.RepeatedInt32) > 0 { l = 0 for _, e := range m.RepeatedInt32 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.RepeatedInt64) > 0 { l = 0 for _, e := range m.RepeatedInt64 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.RepeatedUint32) > 0 { l = 0 for _, e := range m.RepeatedUint32 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.RepeatedUint64) > 0 { l = 0 for _, e := range m.RepeatedUint64 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.RepeatedSint32) > 0 { l = 0 for _, e := range m.RepeatedSint32 { l += protohelpers.SizeOfZigzag(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.RepeatedSint64) > 0 { l = 0 for _, e := range m.RepeatedSint64 { l += protohelpers.SizeOfZigzag(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.RepeatedFixed32) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.RepeatedFixed32)*4)) + len(m.RepeatedFixed32)*4 } if len(m.RepeatedFixed64) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.RepeatedFixed64)*8)) + len(m.RepeatedFixed64)*8 } if len(m.RepeatedSfixed32) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.RepeatedSfixed32)*4)) + len(m.RepeatedSfixed32)*4 } if len(m.RepeatedSfixed64) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.RepeatedSfixed64)*8)) + len(m.RepeatedSfixed64)*8 } if len(m.RepeatedFloat) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.RepeatedFloat)*4)) + len(m.RepeatedFloat)*4 } if len(m.RepeatedDouble) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.RepeatedDouble)*8)) + len(m.RepeatedDouble)*8 } if len(m.RepeatedBool) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.RepeatedBool))) + len(m.RepeatedBool)*1 } if len(m.RepeatedString) > 0 { for _, s := range m.RepeatedString { l = len(s) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedBytes) > 0 { for _, b := range m.RepeatedBytes { l = len(b) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedNestedMessage) > 0 { for _, e := range m.RepeatedNestedMessage { l = e.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedForeignMessage) > 0 { for _, e := range m.RepeatedForeignMessage { l = e.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedNestedEnum) > 0 { l = 0 for _, e := range m.RepeatedNestedEnum { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.RepeatedForeignEnum) > 0 { l = 0 for _, e := range m.RepeatedForeignEnum { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.RepeatedStringPiece) > 0 { for _, s := range m.RepeatedStringPiece { l = len(s) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedCord) > 0 { for _, s := range m.RepeatedCord { l = len(s) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.MapInt32Int32) > 0 { for k, v := range m.MapInt32Int32 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapInt64Int64) > 0 { for k, v := range m.MapInt64Int64 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapUint32Uint32) > 0 { for k, v := range m.MapUint32Uint32 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapUint64Uint64) > 0 { for k, v := range m.MapUint64Uint64 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapSint32Sint32) > 0 { for k, v := range m.MapSint32Sint32 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfZigzag(uint64(k)) + 1 + protohelpers.SizeOfZigzag(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapSint64Sint64) > 0 { for k, v := range m.MapSint64Sint64 { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfZigzag(uint64(k)) + 1 + protohelpers.SizeOfZigzag(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapFixed32Fixed32) > 0 { for k, v := range m.MapFixed32Fixed32 { _ = k _ = v mapEntrySize := 1 + 4 + 1 + 4 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapFixed64Fixed64) > 0 { for k, v := range m.MapFixed64Fixed64 { _ = k _ = v mapEntrySize := 1 + 8 + 1 + 8 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapSfixed32Sfixed32) > 0 { for k, v := range m.MapSfixed32Sfixed32 { _ = k _ = v mapEntrySize := 1 + 4 + 1 + 4 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapSfixed64Sfixed64) > 0 { for k, v := range m.MapSfixed64Sfixed64 { _ = k _ = v mapEntrySize := 1 + 8 + 1 + 8 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapInt32Float) > 0 { for k, v := range m.MapInt32Float { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + 4 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapInt32Double) > 0 { for k, v := range m.MapInt32Double { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + 8 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapBoolBool) > 0 { for k, v := range m.MapBoolBool { _ = k _ = v mapEntrySize := 1 + 1 + 1 + 1 n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringString) > 0 { for k, v := range m.MapStringString { _ = k _ = v mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringBytes) > 0 { for k, v := range m.MapStringBytes { _ = k _ = v l = 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringNestedMessage) > 0 { for k, v := range m.MapStringNestedMessage { _ = k _ = v l = 0 if v != nil { l = v.SizeVT() } l += 1 + protohelpers.SizeOfVarint(uint64(l)) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringForeignMessage) > 0 { for k, v := range m.MapStringForeignMessage { _ = k _ = v l = 0 if v != nil { l = v.SizeVT() } l += 1 + protohelpers.SizeOfVarint(uint64(l)) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringNestedEnum) > 0 { for k, v := range m.MapStringNestedEnum { _ = k _ = v mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.MapStringForeignEnum) > 0 { for k, v := range m.MapStringForeignEnum { _ = k _ = v mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 2 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.PackedInt32) > 0 { l = 0 for _, e := range m.PackedInt32 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedInt64) > 0 { l = 0 for _, e := range m.PackedInt64 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedUint32) > 0 { l = 0 for _, e := range m.PackedUint32 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedUint64) > 0 { l = 0 for _, e := range m.PackedUint64 { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedSint32) > 0 { l = 0 for _, e := range m.PackedSint32 { l += protohelpers.SizeOfZigzag(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedSint64) > 0 { l = 0 for _, e := range m.PackedSint64 { l += protohelpers.SizeOfZigzag(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.PackedFixed32) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFixed32)*4)) + len(m.PackedFixed32)*4 } if len(m.PackedFixed64) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFixed64)*8)) + len(m.PackedFixed64)*8 } if len(m.PackedSfixed32) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedSfixed32)*4)) + len(m.PackedSfixed32)*4 } if len(m.PackedSfixed64) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedSfixed64)*8)) + len(m.PackedSfixed64)*8 } if len(m.PackedFloat) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFloat)*4)) + len(m.PackedFloat)*4 } if len(m.PackedDouble) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedDouble)*8)) + len(m.PackedDouble)*8 } if len(m.PackedBool) > 0 { n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedBool))) + len(m.PackedBool)*1 } if len(m.PackedNestedEnum) > 0 { l = 0 for _, e := range m.PackedNestedEnum { l += protohelpers.SizeOfVarint(uint64(e)) } n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l } if len(m.UnpackedInt32) > 0 { for _, e := range m.UnpackedInt32 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.UnpackedInt64) > 0 { for _, e := range m.UnpackedInt64 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.UnpackedUint32) > 0 { for _, e := range m.UnpackedUint32 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.UnpackedUint64) > 0 { for _, e := range m.UnpackedUint64 { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.UnpackedSint32) > 0 { for _, e := range m.UnpackedSint32 { n += 2 + protohelpers.SizeOfZigzag(uint64(e)) } } if len(m.UnpackedSint64) > 0 { for _, e := range m.UnpackedSint64 { n += 2 + protohelpers.SizeOfZigzag(uint64(e)) } } if len(m.UnpackedFixed32) > 0 { n += 6 * len(m.UnpackedFixed32) } if len(m.UnpackedFixed64) > 0 { n += 10 * len(m.UnpackedFixed64) } if len(m.UnpackedSfixed32) > 0 { n += 6 * len(m.UnpackedSfixed32) } if len(m.UnpackedSfixed64) > 0 { n += 10 * len(m.UnpackedSfixed64) } if len(m.UnpackedFloat) > 0 { n += 6 * len(m.UnpackedFloat) } if len(m.UnpackedDouble) > 0 { n += 10 * len(m.UnpackedDouble) } if len(m.UnpackedBool) > 0 { n += 3 * len(m.UnpackedBool) } if len(m.UnpackedNestedEnum) > 0 { for _, e := range m.UnpackedNestedEnum { n += 2 + protohelpers.SizeOfVarint(uint64(e)) } } if vtmsg, ok := m.OneofField.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } if m.OptionalBoolWrapper != nil { l = (*wrapperspb1.BoolValue)(m.OptionalBoolWrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalInt32Wrapper != nil { l = (*wrapperspb1.Int32Value)(m.OptionalInt32Wrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalInt64Wrapper != nil { l = (*wrapperspb1.Int64Value)(m.OptionalInt64Wrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalUint32Wrapper != nil { l = (*wrapperspb1.UInt32Value)(m.OptionalUint32Wrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalUint64Wrapper != nil { l = (*wrapperspb1.UInt64Value)(m.OptionalUint64Wrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalFloatWrapper != nil { l = (*wrapperspb1.FloatValue)(m.OptionalFloatWrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalDoubleWrapper != nil { l = (*wrapperspb1.DoubleValue)(m.OptionalDoubleWrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalStringWrapper != nil { l = (*wrapperspb1.StringValue)(m.OptionalStringWrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalBytesWrapper != nil { l = (*wrapperspb1.BytesValue)(m.OptionalBytesWrapper).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.RepeatedBoolWrapper) > 0 { for _, e := range m.RepeatedBoolWrapper { l = (*wrapperspb1.BoolValue)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedInt32Wrapper) > 0 { for _, e := range m.RepeatedInt32Wrapper { l = (*wrapperspb1.Int32Value)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedInt64Wrapper) > 0 { for _, e := range m.RepeatedInt64Wrapper { l = (*wrapperspb1.Int64Value)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedUint32Wrapper) > 0 { for _, e := range m.RepeatedUint32Wrapper { l = (*wrapperspb1.UInt32Value)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedUint64Wrapper) > 0 { for _, e := range m.RepeatedUint64Wrapper { l = (*wrapperspb1.UInt64Value)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedFloatWrapper) > 0 { for _, e := range m.RepeatedFloatWrapper { l = (*wrapperspb1.FloatValue)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedDoubleWrapper) > 0 { for _, e := range m.RepeatedDoubleWrapper { l = (*wrapperspb1.DoubleValue)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedStringWrapper) > 0 { for _, e := range m.RepeatedStringWrapper { l = (*wrapperspb1.StringValue)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedBytesWrapper) > 0 { for _, e := range m.RepeatedBytesWrapper { l = (*wrapperspb1.BytesValue)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.OptionalDuration != nil { l = (*durationpb1.Duration)(m.OptionalDuration).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalTimestamp != nil { l = (*timestamppb1.Timestamp)(m.OptionalTimestamp).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalFieldMask != nil { l = (*fieldmaskpb1.FieldMask)(m.OptionalFieldMask).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalStruct != nil { l = (*structpb1.Struct)(m.OptionalStruct).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalAny != nil { l = (*anypb1.Any)(m.OptionalAny).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalValue != nil { l = (*structpb1.Value)(m.OptionalValue).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalNullValue != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.OptionalNullValue)) } if len(m.RepeatedDuration) > 0 { for _, e := range m.RepeatedDuration { l = (*durationpb1.Duration)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedTimestamp) > 0 { for _, e := range m.RepeatedTimestamp { l = (*timestamppb1.Timestamp)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedFieldmask) > 0 { for _, e := range m.RepeatedFieldmask { l = (*fieldmaskpb1.FieldMask)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedAny) > 0 { for _, e := range m.RepeatedAny { l = (*anypb1.Any)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedValue) > 0 { for _, e := range m.RepeatedValue { l = (*structpb1.Value)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedListValue) > 0 { for _, e := range m.RepeatedListValue { l = (*structpb1.ListValue)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.RepeatedStruct) > 0 { for _, e := range m.RepeatedStruct { l = (*structpb1.Struct)(e).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Fieldname1 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.Fieldname1)) } if m.FieldName2 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.FieldName2)) } if m.XFieldName3 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.XFieldName3)) } if m.Field_Name4_ != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.Field_Name4_)) } if m.Field0Name5 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.Field0Name5)) } if m.Field_0Name6 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.Field_0Name6)) } if m.FieldName7 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.FieldName7)) } if m.FieldName8 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.FieldName8)) } if m.Field_Name9 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.Field_Name9)) } if m.Field_Name10 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.Field_Name10)) } if m.FIELD_NAME11 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.FIELD_NAME11)) } if m.FIELDName12 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.FIELDName12)) } if m.XFieldName13 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.XFieldName13)) } if m.X_FieldName14 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.X_FieldName14)) } if m.Field_Name15 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.Field_Name15)) } if m.Field__Name16 != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.Field__Name16)) } if m.FieldName17__ != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.FieldName17__)) } if m.FieldName18__ != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.FieldName18__)) } n += len(m.unknownFields) return n } func (m *TestAllTypesProto3_OneofUint32) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofUint32)) return n } func (m *TestAllTypesProto3_OneofNestedMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.OneofNestedMessage != nil { l = m.OneofNestedMessage.SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *TestAllTypesProto3_OneofString) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.OneofString) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *TestAllTypesProto3_OneofBytes) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.OneofBytes) n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *TestAllTypesProto3_OneofBool) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 3 return n } func (m *TestAllTypesProto3_OneofUint64) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofUint64)) return n } func (m *TestAllTypesProto3_OneofFloat) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 6 return n } func (m *TestAllTypesProto3_OneofDouble) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 10 return n } func (m *TestAllTypesProto3_OneofEnum) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofEnum)) return n } func (m *TestAllTypesProto3_OneofNullValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofNullValue)) return n } func (m *ForeignMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.C != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.C)) } n += len(m.unknownFields) return n } func (m *NullHypothesisProto3) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *EnumOnlyProto3) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *TestAllTypesProto3_NestedMessage) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto3_NestedMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto3_NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } m.A = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.A |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Corecursive", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Corecursive == nil { m.Corecursive = &TestAllTypesProto3{} } if err := m.Corecursive.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto3) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } m.OptionalInt32 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalInt32 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt64", wireType) } m.OptionalInt64 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalInt64 |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint32", wireType) } m.OptionalUint32 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalUint32 |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint64", wireType) } m.OptionalUint64 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalUint64 |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint32 = v case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint64 = int64(v) case 7: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed32", wireType) } m.OptionalFixed32 = 0 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } m.OptionalFixed32 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 case 8: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed64", wireType) } m.OptionalFixed64 = 0 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } m.OptionalFixed64 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 case 9: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed32", wireType) } m.OptionalSfixed32 = 0 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } m.OptionalSfixed32 = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 case 10: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed64", wireType) } m.OptionalSfixed64 = 0 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } m.OptionalSfixed64 = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 case 11: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalFloat = float32(math.Float32frombits(v)) case 12: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalDouble = float64(math.Float64frombits(v)) case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.OptionalBool = bool(v != 0) case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalString = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalBytes = append(m.OptionalBytes[:0], dAtA[iNdEx:postIndex]...) if m.OptionalBytes == nil { m.OptionalBytes = []byte{} } iNdEx = postIndex case 18: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalNestedMessage == nil { m.OptionalNestedMessage = &TestAllTypesProto3_NestedMessage{} } if err := m.OptionalNestedMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 19: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalForeignMessage == nil { m.OptionalForeignMessage = &ForeignMessage{} } if err := m.OptionalForeignMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 21: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedEnum", wireType) } m.OptionalNestedEnum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalNestedEnum |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } case 22: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignEnum", wireType) } m.OptionalForeignEnum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalForeignEnum |= ForeignEnum(b&0x7F) << shift if b < 0x80 { break } } case 23: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalAliasedEnum", wireType) } m.OptionalAliasedEnum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalAliasedEnum |= TestAllTypesProto3_AliasedEnum(b&0x7F) << shift if b < 0x80 { break } } case 24: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalStringPiece", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalStringPiece = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 25: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalCord = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 27: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RecursiveMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.RecursiveMessage == nil { m.RecursiveMessage = &TestAllTypesProto3{} } if err := m.RecursiveMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 31: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt32) == 0 { m.RepeatedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32", wireType) } case 32: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt64 = append(m.RepeatedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt64) == 0 { m.RepeatedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt64 = append(m.RepeatedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt64", wireType) } case 33: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint32 = append(m.RepeatedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedUint32) == 0 { m.RepeatedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint32 = append(m.RepeatedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint32", wireType) } case 34: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint64 = append(m.RepeatedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedUint64) == 0 { m.RepeatedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint64 = append(m.RepeatedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint64", wireType) } case 35: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint32 = append(m.RepeatedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedSint32) == 0 { m.RepeatedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint32 = append(m.RepeatedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint32", wireType) } case 36: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedSint64) == 0 { m.RepeatedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint64", wireType) } case 37: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedFixed32 = append(m.RepeatedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedFixed32) == 0 { m.RepeatedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedFixed32 = append(m.RepeatedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed32", wireType) } case 38: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedFixed64 = append(m.RepeatedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedFixed64) == 0 { m.RepeatedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedFixed64 = append(m.RepeatedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed64", wireType) } case 39: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedSfixed32) == 0 { m.RepeatedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed32", wireType) } case 40: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedSfixed64) == 0 { m.RepeatedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed64", wireType) } case 41: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedFloat = append(m.RepeatedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedFloat) == 0 { m.RepeatedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedFloat = append(m.RepeatedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFloat", wireType) } case 42: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedDouble = append(m.RepeatedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedDouble) == 0 { m.RepeatedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedDouble = append(m.RepeatedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDouble", wireType) } case 43: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.RepeatedBool) == 0 { m.RepeatedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBool", wireType) } case 44: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedString = append(m.RepeatedString, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 45: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedBytes = append(m.RepeatedBytes, make([]byte, postIndex-iNdEx)) copy(m.RepeatedBytes[len(m.RepeatedBytes)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 48: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedNestedMessage = append(m.RepeatedNestedMessage, &TestAllTypesProto3_NestedMessage{}) if err := m.RepeatedNestedMessage[len(m.RepeatedNestedMessage)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 49: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedForeignMessage = append(m.RepeatedForeignMessage, &ForeignMessage{}) if err := m.RepeatedForeignMessage[len(m.RepeatedForeignMessage)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 51: if wireType == 0 { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedNestedEnum) == 0 { m.RepeatedNestedEnum = make([]TestAllTypesProto3_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedEnum", wireType) } case 52: if wireType == 0 { var v ForeignEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedForeignEnum) == 0 { m.RepeatedForeignEnum = make([]ForeignEnum, 0, elementCount) } for iNdEx < postIndex { var v ForeignEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignEnum", wireType) } case 54: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedStringPiece", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedStringPiece = append(m.RepeatedStringPiece, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 55: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedCord = append(m.RepeatedCord, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 56: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Int32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Int32 == nil { m.MapInt32Int32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Int32[mapkey] = mapvalue iNdEx = postIndex case 57: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt64Int64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt64Int64 == nil { m.MapInt64Int64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt64Int64[mapkey] = mapvalue iNdEx = postIndex case 58: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapUint32Uint32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapUint32Uint32 == nil { m.MapUint32Uint32 = make(map[uint32]uint32) } var mapkey uint32 var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapUint32Uint32[mapkey] = mapvalue iNdEx = postIndex case 59: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapUint64Uint64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapUint64Uint64 == nil { m.MapUint64Uint64 = make(map[uint64]uint64) } var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapUint64Uint64[mapkey] = mapvalue iNdEx = postIndex case 60: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSint32Sint32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSint32Sint32 == nil { m.MapSint32Sint32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else if fieldNum == 2 { var mapvaluetemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSint32Sint32[mapkey] = mapvalue iNdEx = postIndex case 61: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSint64Sint64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSint64Sint64 == nil { m.MapSint64Sint64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else if fieldNum == 2 { var mapvaluetemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSint64Sint64[mapkey] = mapvalue iNdEx = postIndex case 62: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapFixed32Fixed32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapFixed32Fixed32 == nil { m.MapFixed32Fixed32 = make(map[uint32]uint32) } var mapkey uint32 var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else if fieldNum == 2 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapFixed32Fixed32[mapkey] = mapvalue iNdEx = postIndex case 63: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapFixed64Fixed64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapFixed64Fixed64 == nil { m.MapFixed64Fixed64 = make(map[uint64]uint64) } var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else if fieldNum == 2 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapFixed64Fixed64[mapkey] = mapvalue iNdEx = postIndex case 64: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed32Sfixed32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSfixed32Sfixed32 == nil { m.MapSfixed32Sfixed32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else if fieldNum == 2 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSfixed32Sfixed32[mapkey] = mapvalue iNdEx = postIndex case 65: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed64Sfixed64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSfixed64Sfixed64 == nil { m.MapSfixed64Sfixed64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else if fieldNum == 2 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSfixed64Sfixed64[mapkey] = mapvalue iNdEx = postIndex case 66: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Float", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Float == nil { m.MapInt32Float = make(map[int32]float32) } var mapkey int32 var mapvalue float32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { var mapvaluetemp uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 mapvalue = math.Float32frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Float[mapkey] = mapvalue iNdEx = postIndex case 67: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Double", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Double == nil { m.MapInt32Double = make(map[int32]float64) } var mapkey int32 var mapvalue float64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { var mapvaluetemp uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 mapvalue = math.Float64frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Double[mapkey] = mapvalue iNdEx = postIndex case 68: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapBoolBool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapBoolBool == nil { m.MapBoolBool = make(map[bool]bool) } var mapkey bool var mapvalue bool for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkeytemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapkey = bool(mapkeytemp != 0) } else if fieldNum == 2 { var mapvaluetemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvaluetemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapvalue = bool(mapvaluetemp != 0) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapBoolBool[mapkey] = mapvalue iNdEx = postIndex case 69: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringString", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringString == nil { m.MapStringString = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringString[mapkey] = mapvalue iNdEx = postIndex case 70: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringBytes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringBytes == nil { m.MapStringBytes = make(map[string][]byte) } var mapkey string var mapvalue []byte for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postbytesIndex := iNdEx + intMapbyteLen if postbytesIndex < 0 { return protohelpers.ErrInvalidLength } if postbytesIndex > l { return io.ErrUnexpectedEOF } mapvalue = make([]byte, mapbyteLen) copy(mapvalue, dAtA[iNdEx:postbytesIndex]) iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringBytes[mapkey] = mapvalue iNdEx = postIndex case 71: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringNestedMessage == nil { m.MapStringNestedMessage = make(map[string]*TestAllTypesProto3_NestedMessage) } var mapkey string var mapvalue *TestAllTypesProto3_NestedMessage for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &TestAllTypesProto3_NestedMessage{} if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringNestedMessage[mapkey] = mapvalue iNdEx = postIndex case 72: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringForeignMessage == nil { m.MapStringForeignMessage = make(map[string]*ForeignMessage) } var mapkey string var mapvalue *ForeignMessage for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &ForeignMessage{} if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringForeignMessage[mapkey] = mapvalue iNdEx = postIndex case 73: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringNestedEnum == nil { m.MapStringNestedEnum = make(map[string]TestAllTypesProto3_NestedEnum) } var mapkey string var mapvalue TestAllTypesProto3_NestedEnum for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringNestedEnum[mapkey] = mapvalue iNdEx = postIndex case 74: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringForeignEnum == nil { m.MapStringForeignEnum = make(map[string]ForeignEnum) } var mapkey string var mapvalue ForeignEnum for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= ForeignEnum(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringForeignEnum[mapkey] = mapvalue iNdEx = postIndex case 75: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt32 = append(m.PackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedInt32) == 0 { m.PackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt32 = append(m.PackedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedInt32", wireType) } case 76: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt64 = append(m.PackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedInt64) == 0 { m.PackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt64 = append(m.PackedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedInt64", wireType) } case 77: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint32 = append(m.PackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedUint32) == 0 { m.PackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint32 = append(m.PackedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedUint32", wireType) } case 78: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint64 = append(m.PackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedUint64) == 0 { m.PackedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint64 = append(m.PackedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedUint64", wireType) } case 79: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint32 = append(m.PackedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedSint32) == 0 { m.PackedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint32 = append(m.PackedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSint32", wireType) } case 80: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint64 = append(m.PackedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedSint64) == 0 { m.PackedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint64 = append(m.PackedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSint64", wireType) } case 81: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedFixed32 = append(m.PackedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedFixed32) == 0 { m.PackedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedFixed32 = append(m.PackedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFixed32", wireType) } case 82: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedFixed64 = append(m.PackedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedFixed64) == 0 { m.PackedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedFixed64 = append(m.PackedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFixed64", wireType) } case 83: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedSfixed32 = append(m.PackedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedSfixed32) == 0 { m.PackedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedSfixed32 = append(m.PackedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed32", wireType) } case 84: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedSfixed64 = append(m.PackedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedSfixed64) == 0 { m.PackedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedSfixed64 = append(m.PackedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed64", wireType) } case 85: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedFloat = append(m.PackedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedFloat) == 0 { m.PackedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedFloat = append(m.PackedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFloat", wireType) } case 86: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedDouble = append(m.PackedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedDouble) == 0 { m.PackedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedDouble = append(m.PackedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedDouble", wireType) } case 87: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedBool = append(m.PackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.PackedBool) == 0 { m.PackedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedBool = append(m.PackedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedBool", wireType) } case 88: if wireType == 0 { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.PackedNestedEnum = append(m.PackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.PackedNestedEnum) == 0 { m.PackedNestedEnum = make([]TestAllTypesProto3_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.PackedNestedEnum = append(m.PackedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedNestedEnum", wireType) } case 89: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt32 = append(m.UnpackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedInt32) == 0 { m.UnpackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt32 = append(m.UnpackedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt32", wireType) } case 90: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt64 = append(m.UnpackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedInt64) == 0 { m.UnpackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt64 = append(m.UnpackedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt64", wireType) } case 91: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint32 = append(m.UnpackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedUint32) == 0 { m.UnpackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint32 = append(m.UnpackedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint32", wireType) } case 92: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint64 = append(m.UnpackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedUint64) == 0 { m.UnpackedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint64 = append(m.UnpackedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint64", wireType) } case 93: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint32 = append(m.UnpackedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedSint32) == 0 { m.UnpackedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint32 = append(m.UnpackedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint32", wireType) } case 94: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedSint64) == 0 { m.UnpackedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint64", wireType) } case 95: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedFixed32 = append(m.UnpackedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedFixed32) == 0 { m.UnpackedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedFixed32 = append(m.UnpackedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed32", wireType) } case 96: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedFixed64 = append(m.UnpackedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedFixed64) == 0 { m.UnpackedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedFixed64 = append(m.UnpackedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed64", wireType) } case 97: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedSfixed32 = append(m.UnpackedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedSfixed32) == 0 { m.UnpackedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedSfixed32 = append(m.UnpackedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSfixed32", wireType) } case 98: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedSfixed64 = append(m.UnpackedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedSfixed64) == 0 { m.UnpackedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedSfixed64 = append(m.UnpackedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSfixed64", wireType) } case 99: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.UnpackedFloat = append(m.UnpackedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedFloat) == 0 { m.UnpackedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.UnpackedFloat = append(m.UnpackedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFloat", wireType) } case 100: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.UnpackedDouble = append(m.UnpackedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedDouble) == 0 { m.UnpackedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.UnpackedDouble = append(m.UnpackedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedDouble", wireType) } case 101: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.UnpackedBool) == 0 { m.UnpackedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedBool", wireType) } case 102: if wireType == 0 { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.UnpackedNestedEnum) == 0 { m.UnpackedNestedEnum = make([]TestAllTypesProto3_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedNestedEnum", wireType) } case 111: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto3_OneofUint32{OneofUint32: v} case 112: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.OneofField.(*TestAllTypesProto3_OneofNestedMessage); ok { if err := oneof.OneofNestedMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &TestAllTypesProto3_NestedMessage{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.OneofField = &TestAllTypesProto3_OneofNestedMessage{OneofNestedMessage: v} } iNdEx = postIndex case 113: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OneofField = &TestAllTypesProto3_OneofString{OneofString: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 114: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := make([]byte, postIndex-iNdEx) copy(v, dAtA[iNdEx:postIndex]) m.OneofField = &TestAllTypesProto3_OneofBytes{OneofBytes: v} iNdEx = postIndex case 115: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OneofField = &TestAllTypesProto3_OneofBool{OneofBool: b} case 116: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto3_OneofUint64{OneofUint64: v} case 117: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OneofFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OneofField = &TestAllTypesProto3_OneofFloat{OneofFloat: float32(math.Float32frombits(v))} case 118: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OneofDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OneofField = &TestAllTypesProto3_OneofDouble{OneofDouble: float64(math.Float64frombits(v))} case 119: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofEnum", wireType) } var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto3_OneofEnum{OneofEnum: v} case 120: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofNullValue", wireType) } var v structpb.NullValue for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= structpb.NullValue(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto3_OneofNullValue{OneofNullValue: v} case 201: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBoolWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalBoolWrapper == nil { m.OptionalBoolWrapper = &wrapperspb.BoolValue{} } if err := (*wrapperspb1.BoolValue)(m.OptionalBoolWrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 202: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalInt32Wrapper == nil { m.OptionalInt32Wrapper = &wrapperspb.Int32Value{} } if err := (*wrapperspb1.Int32Value)(m.OptionalInt32Wrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 203: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt64Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalInt64Wrapper == nil { m.OptionalInt64Wrapper = &wrapperspb.Int64Value{} } if err := (*wrapperspb1.Int64Value)(m.OptionalInt64Wrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 204: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint32Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalUint32Wrapper == nil { m.OptionalUint32Wrapper = &wrapperspb.UInt32Value{} } if err := (*wrapperspb1.UInt32Value)(m.OptionalUint32Wrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 205: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint64Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalUint64Wrapper == nil { m.OptionalUint64Wrapper = &wrapperspb.UInt64Value{} } if err := (*wrapperspb1.UInt64Value)(m.OptionalUint64Wrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 206: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFloatWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalFloatWrapper == nil { m.OptionalFloatWrapper = &wrapperspb.FloatValue{} } if err := (*wrapperspb1.FloatValue)(m.OptionalFloatWrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 207: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDoubleWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalDoubleWrapper == nil { m.OptionalDoubleWrapper = &wrapperspb.DoubleValue{} } if err := (*wrapperspb1.DoubleValue)(m.OptionalDoubleWrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 208: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalStringWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalStringWrapper == nil { m.OptionalStringWrapper = &wrapperspb.StringValue{} } if err := (*wrapperspb1.StringValue)(m.OptionalStringWrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 209: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytesWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalBytesWrapper == nil { m.OptionalBytesWrapper = &wrapperspb.BytesValue{} } if err := (*wrapperspb1.BytesValue)(m.OptionalBytesWrapper).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 211: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBoolWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedBoolWrapper = append(m.RepeatedBoolWrapper, &wrapperspb.BoolValue{}) if err := (*wrapperspb1.BoolValue)(m.RepeatedBoolWrapper[len(m.RepeatedBoolWrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 212: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedInt32Wrapper = append(m.RepeatedInt32Wrapper, &wrapperspb.Int32Value{}) if err := (*wrapperspb1.Int32Value)(m.RepeatedInt32Wrapper[len(m.RepeatedInt32Wrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 213: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt64Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedInt64Wrapper = append(m.RepeatedInt64Wrapper, &wrapperspb.Int64Value{}) if err := (*wrapperspb1.Int64Value)(m.RepeatedInt64Wrapper[len(m.RepeatedInt64Wrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 214: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint32Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedUint32Wrapper = append(m.RepeatedUint32Wrapper, &wrapperspb.UInt32Value{}) if err := (*wrapperspb1.UInt32Value)(m.RepeatedUint32Wrapper[len(m.RepeatedUint32Wrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 215: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint64Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedUint64Wrapper = append(m.RepeatedUint64Wrapper, &wrapperspb.UInt64Value{}) if err := (*wrapperspb1.UInt64Value)(m.RepeatedUint64Wrapper[len(m.RepeatedUint64Wrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 216: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFloatWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedFloatWrapper = append(m.RepeatedFloatWrapper, &wrapperspb.FloatValue{}) if err := (*wrapperspb1.FloatValue)(m.RepeatedFloatWrapper[len(m.RepeatedFloatWrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 217: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDoubleWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedDoubleWrapper = append(m.RepeatedDoubleWrapper, &wrapperspb.DoubleValue{}) if err := (*wrapperspb1.DoubleValue)(m.RepeatedDoubleWrapper[len(m.RepeatedDoubleWrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 218: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedStringWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedStringWrapper = append(m.RepeatedStringWrapper, &wrapperspb.StringValue{}) if err := (*wrapperspb1.StringValue)(m.RepeatedStringWrapper[len(m.RepeatedStringWrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 219: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBytesWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedBytesWrapper = append(m.RepeatedBytesWrapper, &wrapperspb.BytesValue{}) if err := (*wrapperspb1.BytesValue)(m.RepeatedBytesWrapper[len(m.RepeatedBytesWrapper)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 301: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDuration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalDuration == nil { m.OptionalDuration = &durationpb.Duration{} } if err := (*durationpb1.Duration)(m.OptionalDuration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 302: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalTimestamp == nil { m.OptionalTimestamp = ×tamppb.Timestamp{} } if err := (*timestamppb1.Timestamp)(m.OptionalTimestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 303: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFieldMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalFieldMask == nil { m.OptionalFieldMask = &fieldmaskpb.FieldMask{} } if err := (*fieldmaskpb1.FieldMask)(m.OptionalFieldMask).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 304: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalStruct", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalStruct == nil { m.OptionalStruct = &structpb.Struct{} } if err := (*structpb1.Struct)(m.OptionalStruct).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 305: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalAny", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalAny == nil { m.OptionalAny = &anypb.Any{} } if err := (*anypb1.Any)(m.OptionalAny).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 306: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalValue == nil { m.OptionalValue = &structpb.Value{} } if err := (*structpb1.Value)(m.OptionalValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 307: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNullValue", wireType) } m.OptionalNullValue = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalNullValue |= structpb.NullValue(b&0x7F) << shift if b < 0x80 { break } } case 311: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDuration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedDuration = append(m.RepeatedDuration, &durationpb.Duration{}) if err := (*durationpb1.Duration)(m.RepeatedDuration[len(m.RepeatedDuration)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 312: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedTimestamp = append(m.RepeatedTimestamp, ×tamppb.Timestamp{}) if err := (*timestamppb1.Timestamp)(m.RepeatedTimestamp[len(m.RepeatedTimestamp)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 313: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFieldmask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedFieldmask = append(m.RepeatedFieldmask, &fieldmaskpb.FieldMask{}) if err := (*fieldmaskpb1.FieldMask)(m.RepeatedFieldmask[len(m.RepeatedFieldmask)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 315: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedAny", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedAny = append(m.RepeatedAny, &anypb.Any{}) if err := (*anypb1.Any)(m.RepeatedAny[len(m.RepeatedAny)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 316: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedValue = append(m.RepeatedValue, &structpb.Value{}) if err := (*structpb1.Value)(m.RepeatedValue[len(m.RepeatedValue)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 317: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedListValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedListValue = append(m.RepeatedListValue, &structpb.ListValue{}) if err := (*structpb1.ListValue)(m.RepeatedListValue[len(m.RepeatedListValue)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 324: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedStruct", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedStruct = append(m.RepeatedStruct, &structpb.Struct{}) if err := (*structpb1.Struct)(m.RepeatedStruct[len(m.RepeatedStruct)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 401: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Fieldname1", wireType) } m.Fieldname1 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Fieldname1 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 402: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName2", wireType) } m.FieldName2 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName2 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 403: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field XFieldName3", wireType) } m.XFieldName3 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.XFieldName3 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 404: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name4_", wireType) } m.Field_Name4_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_Name4_ |= int32(b&0x7F) << shift if b < 0x80 { break } } case 405: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field0Name5", wireType) } m.Field0Name5 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field0Name5 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 406: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_0Name6", wireType) } m.Field_0Name6 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_0Name6 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 407: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName7", wireType) } m.FieldName7 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName7 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 408: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName8", wireType) } m.FieldName8 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName8 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 409: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name9", wireType) } m.Field_Name9 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_Name9 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 410: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name10", wireType) } m.Field_Name10 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_Name10 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 411: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FIELD_NAME11", wireType) } m.FIELD_NAME11 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FIELD_NAME11 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 412: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FIELDName12", wireType) } m.FIELDName12 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FIELDName12 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 413: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field XFieldName13", wireType) } m.XFieldName13 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.XFieldName13 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 414: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field X_FieldName14", wireType) } m.X_FieldName14 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.X_FieldName14 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 415: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name15", wireType) } m.Field_Name15 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_Name15 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 416: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field__Name16", wireType) } m.Field__Name16 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field__Name16 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 417: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName17__", wireType) } m.FieldName17__ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName17__ |= int32(b&0x7F) << shift if b < 0x80 { break } } case 418: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName18__", wireType) } m.FieldName18__ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName18__ |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ForeignMessage) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ForeignMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ForeignMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) } m.C = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.C |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *NullHypothesisProto3) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: NullHypothesisProto3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: NullHypothesisProto3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EnumOnlyProto3) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: EnumOnlyProto3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EnumOnlyProto3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto3_NestedMessage) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto3_NestedMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto3_NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } m.A = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.A |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Corecursive", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Corecursive == nil { m.Corecursive = &TestAllTypesProto3{} } if err := m.Corecursive.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestAllTypesProto3) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestAllTypesProto3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestAllTypesProto3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } m.OptionalInt32 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalInt32 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt64", wireType) } m.OptionalInt64 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalInt64 |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint32", wireType) } m.OptionalUint32 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalUint32 |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint64", wireType) } m.OptionalUint64 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalUint64 |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint32 = v case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint64 = int64(v) case 7: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed32", wireType) } m.OptionalFixed32 = 0 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } m.OptionalFixed32 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 case 8: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed64", wireType) } m.OptionalFixed64 = 0 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } m.OptionalFixed64 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 case 9: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed32", wireType) } m.OptionalSfixed32 = 0 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } m.OptionalSfixed32 = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 case 10: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed64", wireType) } m.OptionalSfixed64 = 0 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } m.OptionalSfixed64 = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 case 11: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalFloat = float32(math.Float32frombits(v)) case 12: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalDouble = float64(math.Float64frombits(v)) case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.OptionalBool = bool(v != 0) case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.OptionalString = stringValue iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalBytes = dAtA[iNdEx:postIndex] iNdEx = postIndex case 18: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalNestedMessage == nil { m.OptionalNestedMessage = &TestAllTypesProto3_NestedMessage{} } if err := m.OptionalNestedMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 19: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalForeignMessage == nil { m.OptionalForeignMessage = &ForeignMessage{} } if err := m.OptionalForeignMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 21: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedEnum", wireType) } m.OptionalNestedEnum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalNestedEnum |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } case 22: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignEnum", wireType) } m.OptionalForeignEnum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalForeignEnum |= ForeignEnum(b&0x7F) << shift if b < 0x80 { break } } case 23: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalAliasedEnum", wireType) } m.OptionalAliasedEnum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalAliasedEnum |= TestAllTypesProto3_AliasedEnum(b&0x7F) << shift if b < 0x80 { break } } case 24: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalStringPiece", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.OptionalStringPiece = stringValue iNdEx = postIndex case 25: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.OptionalCord = stringValue iNdEx = postIndex case 27: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RecursiveMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.RecursiveMessage == nil { m.RecursiveMessage = &TestAllTypesProto3{} } if err := m.RecursiveMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 31: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt32) == 0 { m.RepeatedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt32 = append(m.RepeatedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32", wireType) } case 32: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt64 = append(m.RepeatedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedInt64) == 0 { m.RepeatedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedInt64 = append(m.RepeatedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt64", wireType) } case 33: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint32 = append(m.RepeatedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedUint32) == 0 { m.RepeatedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint32 = append(m.RepeatedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint32", wireType) } case 34: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint64 = append(m.RepeatedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedUint64) == 0 { m.RepeatedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedUint64 = append(m.RepeatedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint64", wireType) } case 35: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint32 = append(m.RepeatedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedSint32) == 0 { m.RepeatedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint32 = append(m.RepeatedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint32", wireType) } case 36: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedSint64) == 0 { m.RepeatedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint64", wireType) } case 37: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedFixed32 = append(m.RepeatedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedFixed32) == 0 { m.RepeatedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedFixed32 = append(m.RepeatedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed32", wireType) } case 38: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedFixed64 = append(m.RepeatedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedFixed64) == 0 { m.RepeatedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedFixed64 = append(m.RepeatedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed64", wireType) } case 39: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedSfixed32) == 0 { m.RepeatedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed32", wireType) } case 40: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedSfixed64) == 0 { m.RepeatedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed64", wireType) } case 41: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedFloat = append(m.RepeatedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedFloat) == 0 { m.RepeatedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedFloat = append(m.RepeatedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFloat", wireType) } case 42: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedDouble = append(m.RepeatedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedDouble) == 0 { m.RepeatedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedDouble = append(m.RepeatedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDouble", wireType) } case 43: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.RepeatedBool) == 0 { m.RepeatedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBool", wireType) } case 44: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.RepeatedString = append(m.RepeatedString, stringValue) iNdEx = postIndex case 45: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedBytes = append(m.RepeatedBytes, dAtA[iNdEx:postIndex]) iNdEx = postIndex case 48: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedNestedMessage = append(m.RepeatedNestedMessage, &TestAllTypesProto3_NestedMessage{}) if err := m.RepeatedNestedMessage[len(m.RepeatedNestedMessage)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 49: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedForeignMessage = append(m.RepeatedForeignMessage, &ForeignMessage{}) if err := m.RepeatedForeignMessage[len(m.RepeatedForeignMessage)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 51: if wireType == 0 { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedNestedEnum) == 0 { m.RepeatedNestedEnum = make([]TestAllTypesProto3_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedEnum", wireType) } case 52: if wireType == 0 { var v ForeignEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedForeignEnum) == 0 { m.RepeatedForeignEnum = make([]ForeignEnum, 0, elementCount) } for iNdEx < postIndex { var v ForeignEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= ForeignEnum(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignEnum", wireType) } case 54: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedStringPiece", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.RepeatedStringPiece = append(m.RepeatedStringPiece, stringValue) iNdEx = postIndex case 55: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.RepeatedCord = append(m.RepeatedCord, stringValue) iNdEx = postIndex case 56: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Int32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Int32 == nil { m.MapInt32Int32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Int32[mapkey] = mapvalue iNdEx = postIndex case 57: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt64Int64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt64Int64 == nil { m.MapInt64Int64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt64Int64[mapkey] = mapvalue iNdEx = postIndex case 58: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapUint32Uint32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapUint32Uint32 == nil { m.MapUint32Uint32 = make(map[uint32]uint32) } var mapkey uint32 var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapUint32Uint32[mapkey] = mapvalue iNdEx = postIndex case 59: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapUint64Uint64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapUint64Uint64 == nil { m.MapUint64Uint64 = make(map[uint64]uint64) } var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapUint64Uint64[mapkey] = mapvalue iNdEx = postIndex case 60: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSint32Sint32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSint32Sint32 == nil { m.MapSint32Sint32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else if fieldNum == 2 { var mapvaluetemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSint32Sint32[mapkey] = mapvalue iNdEx = postIndex case 61: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSint64Sint64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSint64Sint64 == nil { m.MapSint64Sint64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else if fieldNum == 2 { var mapvaluetemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSint64Sint64[mapkey] = mapvalue iNdEx = postIndex case 62: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapFixed32Fixed32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapFixed32Fixed32 == nil { m.MapFixed32Fixed32 = make(map[uint32]uint32) } var mapkey uint32 var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else if fieldNum == 2 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapFixed32Fixed32[mapkey] = mapvalue iNdEx = postIndex case 63: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapFixed64Fixed64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapFixed64Fixed64 == nil { m.MapFixed64Fixed64 = make(map[uint64]uint64) } var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else if fieldNum == 2 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapFixed64Fixed64[mapkey] = mapvalue iNdEx = postIndex case 64: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed32Sfixed32", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSfixed32Sfixed32 == nil { m.MapSfixed32Sfixed32 = make(map[int32]int32) } var mapkey int32 var mapvalue int32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else if fieldNum == 2 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSfixed32Sfixed32[mapkey] = mapvalue iNdEx = postIndex case 65: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed64Sfixed64", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapSfixed64Sfixed64 == nil { m.MapSfixed64Sfixed64 = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else if fieldNum == 2 { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapSfixed64Sfixed64[mapkey] = mapvalue iNdEx = postIndex case 66: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Float", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Float == nil { m.MapInt32Float = make(map[int32]float32) } var mapkey int32 var mapvalue float32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { var mapvaluetemp uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 mapvalue = math.Float32frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Float[mapkey] = mapvalue iNdEx = postIndex case 67: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Double", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapInt32Double == nil { m.MapInt32Double = make(map[int32]float64) } var mapkey int32 var mapvalue float64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { var mapvaluetemp uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 mapvalue = math.Float64frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapInt32Double[mapkey] = mapvalue iNdEx = postIndex case 68: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapBoolBool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapBoolBool == nil { m.MapBoolBool = make(map[bool]bool) } var mapkey bool var mapvalue bool for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var mapkeytemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkeytemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapkey = bool(mapkeytemp != 0) } else if fieldNum == 2 { var mapvaluetemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvaluetemp |= int(b&0x7F) << shift if b < 0x80 { break } } mapvalue = bool(mapvaluetemp != 0) } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapBoolBool[mapkey] = mapvalue iNdEx = postIndex case 69: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringString", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringString == nil { m.MapStringString = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } if intStringLenmapvalue == 0 { mapvalue = "" } else { mapvalue = unsafe.String(&dAtA[iNdEx], intStringLenmapvalue) } iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringString[mapkey] = mapvalue iNdEx = postIndex case 70: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringBytes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringBytes == nil { m.MapStringBytes = make(map[string][]byte) } var mapkey string var mapvalue []byte for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postbytesIndex := iNdEx + intMapbyteLen if postbytesIndex < 0 { return protohelpers.ErrInvalidLength } if postbytesIndex > l { return io.ErrUnexpectedEOF } mapvalue = dAtA[iNdEx:postbytesIndex] iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringBytes[mapkey] = mapvalue iNdEx = postIndex case 71: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringNestedMessage == nil { m.MapStringNestedMessage = make(map[string]*TestAllTypesProto3_NestedMessage) } var mapkey string var mapvalue *TestAllTypesProto3_NestedMessage for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &TestAllTypesProto3_NestedMessage{} if err := mapvalue.UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringNestedMessage[mapkey] = mapvalue iNdEx = postIndex case 72: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringForeignMessage == nil { m.MapStringForeignMessage = make(map[string]*ForeignMessage) } var mapkey string var mapvalue *ForeignMessage for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &ForeignMessage{} if err := mapvalue.UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringForeignMessage[mapkey] = mapvalue iNdEx = postIndex case 73: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringNestedEnum == nil { m.MapStringNestedEnum = make(map[string]TestAllTypesProto3_NestedEnum) } var mapkey string var mapvalue TestAllTypesProto3_NestedEnum for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringNestedEnum[mapkey] = mapvalue iNdEx = postIndex case 74: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.MapStringForeignEnum == nil { m.MapStringForeignEnum = make(map[string]ForeignEnum) } var mapkey string var mapvalue ForeignEnum for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= ForeignEnum(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.MapStringForeignEnum[mapkey] = mapvalue iNdEx = postIndex case 75: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt32 = append(m.PackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedInt32) == 0 { m.PackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt32 = append(m.PackedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedInt32", wireType) } case 76: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt64 = append(m.PackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedInt64) == 0 { m.PackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedInt64 = append(m.PackedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedInt64", wireType) } case 77: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint32 = append(m.PackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedUint32) == 0 { m.PackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint32 = append(m.PackedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedUint32", wireType) } case 78: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint64 = append(m.PackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedUint64) == 0 { m.PackedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedUint64 = append(m.PackedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedUint64", wireType) } case 79: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint32 = append(m.PackedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedSint32) == 0 { m.PackedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint32 = append(m.PackedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSint32", wireType) } case 80: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint64 = append(m.PackedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedSint64) == 0 { m.PackedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedSint64 = append(m.PackedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSint64", wireType) } case 81: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedFixed32 = append(m.PackedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedFixed32) == 0 { m.PackedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedFixed32 = append(m.PackedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFixed32", wireType) } case 82: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedFixed64 = append(m.PackedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedFixed64) == 0 { m.PackedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedFixed64 = append(m.PackedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFixed64", wireType) } case 83: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedSfixed32 = append(m.PackedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedSfixed32) == 0 { m.PackedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedSfixed32 = append(m.PackedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed32", wireType) } case 84: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedSfixed64 = append(m.PackedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedSfixed64) == 0 { m.PackedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedSfixed64 = append(m.PackedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed64", wireType) } case 85: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedFloat = append(m.PackedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedFloat) == 0 { m.PackedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedFloat = append(m.PackedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedFloat", wireType) } case 86: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedDouble = append(m.PackedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedDouble) == 0 { m.PackedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedDouble = append(m.PackedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedDouble", wireType) } case 87: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedBool = append(m.PackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.PackedBool) == 0 { m.PackedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedBool = append(m.PackedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedBool", wireType) } case 88: if wireType == 0 { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.PackedNestedEnum = append(m.PackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.PackedNestedEnum) == 0 { m.PackedNestedEnum = make([]TestAllTypesProto3_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.PackedNestedEnum = append(m.PackedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedNestedEnum", wireType) } case 89: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt32 = append(m.UnpackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedInt32) == 0 { m.UnpackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt32 = append(m.UnpackedInt32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt32", wireType) } case 90: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt64 = append(m.UnpackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedInt64) == 0 { m.UnpackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedInt64 = append(m.UnpackedInt64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt64", wireType) } case 91: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint32 = append(m.UnpackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedUint32) == 0 { m.UnpackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint32 = append(m.UnpackedUint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint32", wireType) } case 92: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint64 = append(m.UnpackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedUint64) == 0 { m.UnpackedUint64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedUint64 = append(m.UnpackedUint64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint64", wireType) } case 93: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint32 = append(m.UnpackedSint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedSint32) == 0 { m.UnpackedSint32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint32 = append(m.UnpackedSint32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint32", wireType) } case 94: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.UnpackedSint64) == 0 { m.UnpackedSint64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint64", wireType) } case 95: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedFixed32 = append(m.UnpackedFixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedFixed32) == 0 { m.UnpackedFixed32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedFixed32 = append(m.UnpackedFixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed32", wireType) } case 96: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedFixed64 = append(m.UnpackedFixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedFixed64) == 0 { m.UnpackedFixed64 = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedFixed64 = append(m.UnpackedFixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed64", wireType) } case 97: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedSfixed32 = append(m.UnpackedSfixed32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedSfixed32) == 0 { m.UnpackedSfixed32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.UnpackedSfixed32 = append(m.UnpackedSfixed32, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSfixed32", wireType) } case 98: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedSfixed64 = append(m.UnpackedSfixed64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedSfixed64) == 0 { m.UnpackedSfixed64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.UnpackedSfixed64 = append(m.UnpackedSfixed64, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSfixed64", wireType) } case 99: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.UnpackedFloat = append(m.UnpackedFloat, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.UnpackedFloat) == 0 { m.UnpackedFloat = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.UnpackedFloat = append(m.UnpackedFloat, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFloat", wireType) } case 100: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.UnpackedDouble = append(m.UnpackedDouble, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.UnpackedDouble) == 0 { m.UnpackedDouble = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.UnpackedDouble = append(m.UnpackedDouble, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedDouble", wireType) } case 101: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.UnpackedBool) == 0 { m.UnpackedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedBool", wireType) } case 102: if wireType == 0 { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.UnpackedNestedEnum) == 0 { m.UnpackedNestedEnum = make([]TestAllTypesProto3_NestedEnum, 0, elementCount) } for iNdEx < postIndex { var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field UnpackedNestedEnum", wireType) } case 111: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto3_OneofUint32{OneofUint32: v} case 112: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.OneofField.(*TestAllTypesProto3_OneofNestedMessage); ok { if err := oneof.OneofNestedMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &TestAllTypesProto3_NestedMessage{} if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.OneofField = &TestAllTypesProto3_OneofNestedMessage{OneofNestedMessage: v} } iNdEx = postIndex case 113: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.OneofField = &TestAllTypesProto3_OneofString{OneofString: stringValue} iNdEx = postIndex case 114: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneofBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := dAtA[iNdEx:postIndex] m.OneofField = &TestAllTypesProto3_OneofBytes{OneofBytes: v} iNdEx = postIndex case 115: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OneofField = &TestAllTypesProto3_OneofBool{OneofBool: b} case 116: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto3_OneofUint64{OneofUint64: v} case 117: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OneofFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OneofField = &TestAllTypesProto3_OneofFloat{OneofFloat: float32(math.Float32frombits(v))} case 118: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OneofDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OneofField = &TestAllTypesProto3_OneofDouble{OneofDouble: float64(math.Float64frombits(v))} case 119: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofEnum", wireType) } var v TestAllTypesProto3_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= TestAllTypesProto3_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto3_OneofEnum{OneofEnum: v} case 120: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OneofNullValue", wireType) } var v structpb.NullValue for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= structpb.NullValue(b&0x7F) << shift if b < 0x80 { break } } m.OneofField = &TestAllTypesProto3_OneofNullValue{OneofNullValue: v} case 201: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBoolWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalBoolWrapper == nil { m.OptionalBoolWrapper = &wrapperspb.BoolValue{} } if err := (*wrapperspb1.BoolValue)(m.OptionalBoolWrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 202: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalInt32Wrapper == nil { m.OptionalInt32Wrapper = &wrapperspb.Int32Value{} } if err := (*wrapperspb1.Int32Value)(m.OptionalInt32Wrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 203: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt64Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalInt64Wrapper == nil { m.OptionalInt64Wrapper = &wrapperspb.Int64Value{} } if err := (*wrapperspb1.Int64Value)(m.OptionalInt64Wrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 204: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint32Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalUint32Wrapper == nil { m.OptionalUint32Wrapper = &wrapperspb.UInt32Value{} } if err := (*wrapperspb1.UInt32Value)(m.OptionalUint32Wrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 205: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint64Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalUint64Wrapper == nil { m.OptionalUint64Wrapper = &wrapperspb.UInt64Value{} } if err := (*wrapperspb1.UInt64Value)(m.OptionalUint64Wrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 206: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFloatWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalFloatWrapper == nil { m.OptionalFloatWrapper = &wrapperspb.FloatValue{} } if err := (*wrapperspb1.FloatValue)(m.OptionalFloatWrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 207: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDoubleWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalDoubleWrapper == nil { m.OptionalDoubleWrapper = &wrapperspb.DoubleValue{} } if err := (*wrapperspb1.DoubleValue)(m.OptionalDoubleWrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 208: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalStringWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalStringWrapper == nil { m.OptionalStringWrapper = &wrapperspb.StringValue{} } if err := (*wrapperspb1.StringValue)(m.OptionalStringWrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 209: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytesWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalBytesWrapper == nil { m.OptionalBytesWrapper = &wrapperspb.BytesValue{} } if err := (*wrapperspb1.BytesValue)(m.OptionalBytesWrapper).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 211: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBoolWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedBoolWrapper = append(m.RepeatedBoolWrapper, &wrapperspb.BoolValue{}) if err := (*wrapperspb1.BoolValue)(m.RepeatedBoolWrapper[len(m.RepeatedBoolWrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 212: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedInt32Wrapper = append(m.RepeatedInt32Wrapper, &wrapperspb.Int32Value{}) if err := (*wrapperspb1.Int32Value)(m.RepeatedInt32Wrapper[len(m.RepeatedInt32Wrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 213: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt64Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedInt64Wrapper = append(m.RepeatedInt64Wrapper, &wrapperspb.Int64Value{}) if err := (*wrapperspb1.Int64Value)(m.RepeatedInt64Wrapper[len(m.RepeatedInt64Wrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 214: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint32Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedUint32Wrapper = append(m.RepeatedUint32Wrapper, &wrapperspb.UInt32Value{}) if err := (*wrapperspb1.UInt32Value)(m.RepeatedUint32Wrapper[len(m.RepeatedUint32Wrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 215: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint64Wrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedUint64Wrapper = append(m.RepeatedUint64Wrapper, &wrapperspb.UInt64Value{}) if err := (*wrapperspb1.UInt64Value)(m.RepeatedUint64Wrapper[len(m.RepeatedUint64Wrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 216: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFloatWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedFloatWrapper = append(m.RepeatedFloatWrapper, &wrapperspb.FloatValue{}) if err := (*wrapperspb1.FloatValue)(m.RepeatedFloatWrapper[len(m.RepeatedFloatWrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 217: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDoubleWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedDoubleWrapper = append(m.RepeatedDoubleWrapper, &wrapperspb.DoubleValue{}) if err := (*wrapperspb1.DoubleValue)(m.RepeatedDoubleWrapper[len(m.RepeatedDoubleWrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 218: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedStringWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedStringWrapper = append(m.RepeatedStringWrapper, &wrapperspb.StringValue{}) if err := (*wrapperspb1.StringValue)(m.RepeatedStringWrapper[len(m.RepeatedStringWrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 219: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBytesWrapper", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedBytesWrapper = append(m.RepeatedBytesWrapper, &wrapperspb.BytesValue{}) if err := (*wrapperspb1.BytesValue)(m.RepeatedBytesWrapper[len(m.RepeatedBytesWrapper)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 301: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDuration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalDuration == nil { m.OptionalDuration = &durationpb.Duration{} } if err := (*durationpb1.Duration)(m.OptionalDuration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 302: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalTimestamp == nil { m.OptionalTimestamp = ×tamppb.Timestamp{} } if err := (*timestamppb1.Timestamp)(m.OptionalTimestamp).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 303: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFieldMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalFieldMask == nil { m.OptionalFieldMask = &fieldmaskpb.FieldMask{} } if err := (*fieldmaskpb1.FieldMask)(m.OptionalFieldMask).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 304: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalStruct", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalStruct == nil { m.OptionalStruct = &structpb.Struct{} } if err := (*structpb1.Struct)(m.OptionalStruct).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 305: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalAny", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalAny == nil { m.OptionalAny = &anypb.Any{} } if err := (*anypb1.Any)(m.OptionalAny).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 306: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.OptionalValue == nil { m.OptionalValue = &structpb.Value{} } if err := (*structpb1.Value)(m.OptionalValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 307: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalNullValue", wireType) } m.OptionalNullValue = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.OptionalNullValue |= structpb.NullValue(b&0x7F) << shift if b < 0x80 { break } } case 311: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDuration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedDuration = append(m.RepeatedDuration, &durationpb.Duration{}) if err := (*durationpb1.Duration)(m.RepeatedDuration[len(m.RepeatedDuration)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 312: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedTimestamp = append(m.RepeatedTimestamp, ×tamppb.Timestamp{}) if err := (*timestamppb1.Timestamp)(m.RepeatedTimestamp[len(m.RepeatedTimestamp)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 313: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFieldmask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedFieldmask = append(m.RepeatedFieldmask, &fieldmaskpb.FieldMask{}) if err := (*fieldmaskpb1.FieldMask)(m.RepeatedFieldmask[len(m.RepeatedFieldmask)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 315: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedAny", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedAny = append(m.RepeatedAny, &anypb.Any{}) if err := (*anypb1.Any)(m.RepeatedAny[len(m.RepeatedAny)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 316: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedValue = append(m.RepeatedValue, &structpb.Value{}) if err := (*structpb1.Value)(m.RepeatedValue[len(m.RepeatedValue)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 317: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedListValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedListValue = append(m.RepeatedListValue, &structpb.ListValue{}) if err := (*structpb1.ListValue)(m.RepeatedListValue[len(m.RepeatedListValue)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 324: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedStruct", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedStruct = append(m.RepeatedStruct, &structpb.Struct{}) if err := (*structpb1.Struct)(m.RepeatedStruct[len(m.RepeatedStruct)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 401: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Fieldname1", wireType) } m.Fieldname1 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Fieldname1 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 402: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName2", wireType) } m.FieldName2 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName2 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 403: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field XFieldName3", wireType) } m.XFieldName3 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.XFieldName3 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 404: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name4_", wireType) } m.Field_Name4_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_Name4_ |= int32(b&0x7F) << shift if b < 0x80 { break } } case 405: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field0Name5", wireType) } m.Field0Name5 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field0Name5 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 406: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_0Name6", wireType) } m.Field_0Name6 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_0Name6 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 407: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName7", wireType) } m.FieldName7 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName7 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 408: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName8", wireType) } m.FieldName8 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName8 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 409: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name9", wireType) } m.Field_Name9 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_Name9 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 410: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name10", wireType) } m.Field_Name10 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_Name10 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 411: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FIELD_NAME11", wireType) } m.FIELD_NAME11 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FIELD_NAME11 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 412: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FIELDName12", wireType) } m.FIELDName12 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FIELDName12 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 413: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field XFieldName13", wireType) } m.XFieldName13 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.XFieldName13 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 414: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field X_FieldName14", wireType) } m.X_FieldName14 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.X_FieldName14 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 415: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field_Name15", wireType) } m.Field_Name15 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field_Name15 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 416: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Field__Name16", wireType) } m.Field__Name16 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Field__Name16 |= int32(b&0x7F) << shift if b < 0x80 { break } } case 417: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName17__", wireType) } m.FieldName17__ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName17__ |= int32(b&0x7F) << shift if b < 0x80 { break } } case 418: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FieldName18__", wireType) } m.FieldName18__ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.FieldName18__ |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ForeignMessage) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ForeignMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ForeignMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) } m.C = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.C |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *NullHypothesisProto3) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: NullHypothesisProto3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: NullHypothesisProto3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EnumOnlyProto3) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: EnumOnlyProto3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EnumOnlyProto3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/doc/000077500000000000000000000000001455570004500215175ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/doc/dependency_decisions.yml000066400000000000000000000011771455570004500264260ustar00rootroot00000000000000--- - - :permit - bsd-2-clause - :who: :why: :versions: [] :when: 2022-01-29 15:00:47.721236000 Z - - :permit - bsd-3-clause - :who: :why: :versions: [] :when: 2022-01-29 15:00:48.022596000 Z - - :permit - apache-2.0 - :who: :why: :versions: [] :when: 2022-01-29 15:00:48.281393000 Z - - :permit - MIT - :who: :why: :versions: [] :when: 2022-01-29 15:00:48.545683000 Z - - :permit - ISC - :who: :why: :versions: [] :when: 2022-01-29 15:00:48.811668000 Z - - :permit - mpl-2.0 - :who: :why: :versions: [] :when: 2022-01-29 15:00:49.071997000 Z golang-github-planetscale-vtprotobuf-0.6.0/features/000077500000000000000000000000001455570004500225705ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/features/clone/000077500000000000000000000000001455570004500236705ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/features/clone/clone.go000066400000000000000000000257701455570004500253320ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Copyright (c) 2013, The GoGo Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package clone import ( "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/reflect/protoreflect" "github.com/planetscale/vtprotobuf/generator" ) const ( cloneName = "CloneVT" cloneMessageName = "CloneMessageVT" ) var ( protoPkg = protogen.GoImportPath("google.golang.org/protobuf/proto") ) func init() { generator.RegisterFeature("clone", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &clone{GeneratedFile: gen} }) } type clone struct { *generator.GeneratedFile once bool } var _ generator.FeatureGenerator = (*clone)(nil) func (p *clone) Name() string { return "clone" } func (p *clone) GenerateFile(file *protogen.File) bool { proto3 := file.Desc.Syntax() == protoreflect.Proto3 for _, message := range file.Messages { p.processMessage(proto3, message) } return p.once } // cloneOneofField generates the statements for cloning a oneof field func (p *clone) cloneOneofField(lhsBase, rhsBase string, oneof *protogen.Oneof) { fieldname := oneof.GoName ccInterfaceName := "is" + oneof.GoIdent.GoName lhs := lhsBase + "." + fieldname rhs := rhsBase + "." + fieldname p.P(`if `, rhs, ` != nil {`) if p.IsWellKnownType(oneof.Parent) { p.P(`switch c := `, rhs, `.(type) {`) for _, f := range oneof.Fields { p.P(`case *`, f.GoIdent, `:`) p.P(lhs, `= (*`, f.GoIdent, `)((*`, p.WellKnownFieldMap(f), `)(c).`, cloneName, `())`) } p.P(`}`) } else { p.P(lhs, ` = `, rhs, `.(interface{ `, cloneName, `() `, ccInterfaceName, ` }).`, cloneName, `()`) } p.P(`}`) } // cloneFieldSingular generates the code for cloning a singular, non-oneof field. func (p *clone) cloneFieldSingular(lhs, rhs string, kind protoreflect.Kind, message *protogen.Message) { switch { case kind == protoreflect.MessageKind, kind == protoreflect.GroupKind: switch { case p.IsWellKnownType(message): p.P(lhs, ` = (*`, message.GoIdent, `)((*`, p.WellKnownTypeMap(message), `)(`, rhs, `).`, cloneName, `())`) case p.IsLocalMessage(message): p.P(lhs, ` = `, rhs, `.`, cloneName, `()`) default: // rhs is a concrete type, we need to first convert it to an interface in order to use an interface // type assertion. p.P(`if vtpb, ok := interface{}(`, rhs, `).(interface{ `, cloneName, `() *`, message.GoIdent, ` }); ok {`) p.P(lhs, ` = vtpb.`, cloneName, `()`) p.P(`} else {`) p.P(lhs, ` = `, protoPkg.Ident("Clone"), `(`, rhs, `).(*`, message.GoIdent, `)`) p.P(`}`) } case kind == protoreflect.BytesKind: p.P(`tmpBytes := make([]byte, len(`, rhs, `))`) p.P(`copy(tmpBytes, `, rhs, `)`) p.P(lhs, ` = tmpBytes`) case isScalar(kind): p.P(lhs, ` = `, rhs) default: panic("unexpected") } } // cloneField generates the code for cloning a field in a protobuf. func (p *clone) cloneField(lhsBase, rhsBase string, allFieldsNullable bool, field *protogen.Field) { // At this point, if we encounter a non-synthetic oneof, we assume it to be the representative // field for that oneof. if field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() { p.cloneOneofField(lhsBase, rhsBase, field.Oneof) return } if !isReference(allFieldsNullable, field) { panic("method should not be invoked for non-reference fields") } fieldname := field.GoName lhs := lhsBase + "." + fieldname rhs := rhsBase + "." + fieldname // At this point, we are only looking at reference types (pointers, maps, slices, interfaces), which can all // be nil. p.P(`if rhs := `, rhs, `; rhs != nil {`) rhs = "rhs" fieldKind := field.Desc.Kind() msg := field.Message // possibly nil if field.Desc.Cardinality() == protoreflect.Repeated { // maps and slices goType, _ := p.FieldGoType(field) p.P(`tmpContainer := make(`, goType, `, len(`, rhs, `))`) if isScalar(fieldKind) && field.Desc.IsList() { // Generated code optimization: instead of iterating over all (key/index, value) pairs, // do a single copy(dst, src) invocation for slices whose elements aren't reference types. p.P(`copy(tmpContainer, `, rhs, `)`) } else { if field.Desc.IsMap() { // For maps, the type of the value field determines what code is generated for cloning // an entry. valueField := field.Message.Fields[1] fieldKind = valueField.Desc.Kind() msg = valueField.Message } p.P(`for k, v := range `, rhs, ` {`) p.cloneFieldSingular("tmpContainer[k]", "v", fieldKind, msg) p.P(`}`) } p.P(lhs, ` = tmpContainer`) } else if isScalar(fieldKind) { p.P(`tmpVal := *`, rhs) p.P(lhs, ` = &tmpVal`) } else { p.cloneFieldSingular(lhs, rhs, fieldKind, msg) } p.P(`}`) } func (p *clone) generateCloneMethodsForMessage(proto3 bool, message *protogen.Message) { ccTypeName := message.GoIdent.GoName p.P(`func (m *`, ccTypeName, `) `, cloneName, `() *`, ccTypeName, ` {`) p.body(!proto3, ccTypeName, message, true) p.P(`}`) p.P() if !p.Wrapper() { p.P(`func (m *`, ccTypeName, `) `, cloneMessageName, `() `, protoPkg.Ident("Message"), ` {`) p.P(`return m.`, cloneName, `()`) p.P(`}`) p.P() } } // body generates the code for the actual cloning logic of a structure containing the given fields. // In practice, those can be the fields of a message. // The object to be cloned is assumed to be called "m". func (p *clone) body(allFieldsNullable bool, ccTypeName string, message *protogen.Message, cloneUnknownFields bool) { // The method body for a message or a oneof wrapper always starts with a nil check. p.P(`if m == nil {`) // We use an explicitly typed nil to avoid returning the nil interface in the oneof wrapper // case. p.P(`return (*`, ccTypeName, `)(nil)`) p.P(`}`) fields := message.Fields // Make a first pass over the fields, in which we initialize all non-reference fields via direct // struct literal initialization, and extract all other (reference) fields for a second pass. // Do not require qualified name because CloneVT generates in same file with definition. p.Alloc("r", message, false) var refFields []*protogen.Field oneofFields := make(map[string]struct{}, len(fields)) for _, field := range fields { if field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() { // Use the first field in a oneof as the representative for that oneof, disregard // the other fields in that oneof. if _, ok := oneofFields[field.Oneof.GoName]; !ok { refFields = append(refFields, field) oneofFields[field.Oneof.GoName] = struct{}{} } continue } if !isReference(allFieldsNullable, field) { p.P(`r.`, field.GoName, ` = m.`, field.GoName) continue } // Shortcut: for types where we know that an optimized clone method exists, we can call it directly as it is // nil-safe. if field.Desc.Cardinality() != protoreflect.Repeated { switch { case p.IsWellKnownType(field.Message): p.P(`r.`, field.GoName, ` = (*`, field.Message.GoIdent, `)((*`, p.WellKnownTypeMap(field.Message), `)(m.`, field.GoName, `).`, cloneName, `())`) continue case p.IsLocalMessage(field.Message): p.P(`r.`, field.GoName, ` = m.`, field.GoName, `.`, cloneName, `()`) continue } } refFields = append(refFields, field) } // Generate explicit assignment statements for all reference fields. for _, field := range refFields { p.cloneField("r", "m", allFieldsNullable, field) } if cloneUnknownFields && !p.Wrapper() { // Clone unknown fields, if any p.P(`if len(m.unknownFields) > 0 {`) p.P(`r.unknownFields = make([]byte, len(m.unknownFields))`) p.P(`copy(r.unknownFields, m.unknownFields)`) p.P(`}`) } p.P(`return r`) } func (p *clone) bodyForOneOf(ccTypeName string, field *protogen.Field) { // The method body for a message or a oneof wrapper always starts with a nil check. p.P(`if m == nil {`) // We use an explicitly typed nil to avoid returning the nil interface in the oneof wrapper // case. p.P(`return (*`, ccTypeName, `)(nil)`) p.P(`}`) p.P("r", " := new(", ccTypeName, `)`) if !isReference(false, field) { p.P(`r.`, field.GoName, ` = m.`, field.GoName) p.P(`return r`) return } // Shortcut: for types where we know that an optimized clone method exists, we can call it directly as it is // nil-safe. if field.Desc.Cardinality() != protoreflect.Repeated && field.Message != nil { switch { case p.IsWellKnownType(field.Message): p.P(`r.`, field.GoName, ` = (*`, field.Message.GoIdent, `)((*`, p.WellKnownTypeMap(field.Message), `)(m.`, field.GoName, `).`, cloneName, `())`) p.P(`return r`) return case p.IsLocalMessage(field.Message): p.P(`r.`, field.GoName, ` = m.`, field.GoName, `.`, cloneName, `()`) p.P(`return r`) return } } // Generate explicit assignment statements for reference field. p.cloneField("r", "m", false, field) p.P(`return r`) } // generateCloneMethodsForOneof generates the clone method for the oneof wrapper type of a // field in a oneof. func (p *clone) generateCloneMethodsForOneof(message *protogen.Message, field *protogen.Field) { ccTypeName := field.GoIdent.GoName ccInterfaceName := "is" + field.Oneof.GoIdent.GoName if p.IsWellKnownType(message) { p.P(`func (m *`, ccTypeName, `) `, cloneName, `() *`, ccTypeName, ` {`) } else { p.P(`func (m *`, ccTypeName, `) `, cloneName, `() `, ccInterfaceName, ` {`) } // Create a "fake" field for the single oneof member, pretending it is not a oneof field. fieldInOneof := *field fieldInOneof.Oneof = nil // If we have a scalar field in a oneof, that field is never nullable, even when using proto2 p.bodyForOneOf(ccTypeName, &fieldInOneof) p.P(`}`) p.P() } func (p *clone) processMessageOneofs(message *protogen.Message) { for _, field := range message.Fields { if field.Oneof == nil || field.Oneof.Desc.IsSynthetic() { continue } p.generateCloneMethodsForOneof(message, field) } } func (p *clone) processMessage(proto3 bool, message *protogen.Message) { for _, nested := range message.Messages { p.processMessage(proto3, nested) } if message.Desc.IsMapEntry() { return } p.once = true p.generateCloneMethodsForMessage(proto3, message) p.processMessageOneofs(message) } // isReference checks whether the Go equivalent of the given field is of reference type, i.e., can be nil. func isReference(allFieldsNullable bool, field *protogen.Field) bool { if allFieldsNullable || field.Oneof != nil || field.Message != nil || field.Desc.Cardinality() == protoreflect.Repeated || field.Desc.Kind() == protoreflect.BytesKind { return true } if !isScalar(field.Desc.Kind()) { panic("unexpected non-reference, non-scalar field") } return false } func isScalar(kind protoreflect.Kind) bool { switch kind { case protoreflect.BoolKind, protoreflect.StringKind, protoreflect.DoubleKind, protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind, protoreflect.FloatKind, protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Sint64Kind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.Sint32Kind, protoreflect.EnumKind: return true } return false } golang-github-planetscale-vtprotobuf-0.6.0/features/equal/000077500000000000000000000000001455570004500236775ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/features/equal/equal.go000066400000000000000000000200321455570004500253320ustar00rootroot00000000000000// Copyright (c) 2022 PlanetScale Inc. All rights reserved. package equal import ( "fmt" "sort" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/reflect/protoreflect" "github.com/planetscale/vtprotobuf/generator" ) func init() { generator.RegisterFeature("equal", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &equal{GeneratedFile: gen} }) } var ( protoPkg = protogen.GoImportPath("google.golang.org/protobuf/proto") ) type equal struct { *generator.GeneratedFile once bool } var _ generator.FeatureGenerator = (*equal)(nil) func (p *equal) Name() string { return "equal" } func (p *equal) GenerateFile(file *protogen.File) bool { proto3 := file.Desc.Syntax() == protoreflect.Proto3 for _, message := range file.Messages { p.message(proto3, message) } return p.once } const equalName = "EqualVT" const equalMessageName = "EqualMessageVT" func (p *equal) message(proto3 bool, message *protogen.Message) { for _, nested := range message.Messages { p.message(proto3, nested) } if message.Desc.IsMapEntry() { return } p.once = true ccTypeName := message.GoIdent.GoName p.P(`func (this *`, ccTypeName, `) `, equalName, `(that *`, ccTypeName, `) bool {`) p.P(`if this == that {`) p.P(` return true`) p.P(`} else if this == nil || that == nil {`) p.P(` return false`) p.P(`}`) sort.Slice(message.Fields, func(i, j int) bool { return message.Fields[i].Desc.Number() < message.Fields[j].Desc.Number() }) { oneofs := make(map[string]struct{}, len(message.Fields)) for _, field := range message.Fields { oneof := field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() if !oneof { continue } fieldname := field.Oneof.GoName if _, ok := oneofs[fieldname]; ok { continue } oneofs[fieldname] = struct{}{} p.P(`if this.`, fieldname, ` == nil && that.`, fieldname, ` != nil {`) p.P(` return false`) p.P(`} else if this.`, fieldname, ` != nil {`) p.P(` if that.`, fieldname, ` == nil {`) p.P(` return false`) p.P(` }`) ccInterfaceName := fmt.Sprintf("is%s", field.Oneof.GoIdent.GoName) if p.IsWellKnownType(message) { p.P(`switch c := this.`, fieldname, `.(type) {`) for _, f := range field.Oneof.Fields { p.P(`case *`, f.GoIdent, `:`) p.P(`if !(*`, p.WellKnownFieldMap(f), `)(c).`, equalName, `(that.`, fieldname, `) {`) p.P(`return false`) p.P(`}`) } p.P(`}`) } else { p.P(`if !this.`, fieldname, `.(interface{ `, equalName, `(`, ccInterfaceName, `) bool }).`, equalName, `(that.`, fieldname, `) {`) p.P(`return false`) p.P(`}`) } p.P(`}`) } } for _, field := range message.Fields { oneof := field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() nullable := field.Message != nil || (field.Oneof != nil && field.Oneof.Desc.IsSynthetic()) || (!proto3 && !oneof) if !oneof { p.field(field, nullable) } } if p.Wrapper() { p.P(`return true`) } else { p.P(`return string(this.unknownFields) == string(that.unknownFields)`) } p.P(`}`) p.P() if !p.Wrapper() { p.P(`func (this *`, ccTypeName, `) `, equalMessageName, `(thatMsg `, protoPkg.Ident("Message"), `) bool {`) p.P(`that, ok := thatMsg.(*`, ccTypeName, `)`) p.P(`if !ok {`) p.P(`return false`) p.P(`}`) p.P(`return this.`, equalName, `(that)`) p.P(`}`) } for _, field := range message.Fields { oneof := field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() if !oneof { continue } p.oneof(field) } } func (p *equal) oneof(field *protogen.Field) { ccTypeName := field.GoIdent.GoName ccInterfaceName := fmt.Sprintf("is%s", field.Oneof.GoIdent.GoName) fieldname := field.GoName if p.IsWellKnownType(field.Parent) { p.P(`func (this *`, ccTypeName, `) `, equalName, `(thatIface any) bool {`) } else { p.P(`func (this *`, ccTypeName, `) `, equalName, `(thatIface `, ccInterfaceName, `) bool {`) } p.P(`that, ok := thatIface.(*`, ccTypeName, `)`) p.P(`if !ok {`) if p.IsWellKnownType(field.Parent) { p.P(`if ot, ok := thatIface.(*`, field.GoIdent, `); ok {`) p.P(`that = (*`, ccTypeName, `)(ot)`) p.P("} else {") p.P("return false") p.P("}") } else { p.P(`return false`) } p.P(`}`) p.P(`if this == that {`) p.P(`return true`) p.P(`}`) p.P(`if this == nil && that != nil || this != nil && that == nil {`) p.P(`return false`) p.P(`}`) lhs := fmt.Sprintf("this.%s", fieldname) rhs := fmt.Sprintf("that.%s", fieldname) kind := field.Desc.Kind() switch { case isScalar(kind): p.compareScalar(lhs, rhs, false) case kind == protoreflect.BytesKind: p.compareBytes(lhs, rhs, false) case kind == protoreflect.MessageKind || kind == protoreflect.GroupKind: p.compareCall(lhs, rhs, field.Message, false) default: panic("not implemented") } p.P(`return true`) p.P(`}`) p.P() } func (p *equal) field(field *protogen.Field, nullable bool) { fieldname := field.GoName repeated := field.Desc.Cardinality() == protoreflect.Repeated lhs := fmt.Sprintf("this.%s", fieldname) rhs := fmt.Sprintf("that.%s", fieldname) if repeated { p.P(`if len(`, lhs, `) != len(`, rhs, `) {`) p.P(` return false`) p.P(`}`) p.P(`for i, vx := range `, lhs, ` {`) if field.Desc.IsMap() { p.P(`vy, ok := `, rhs, `[i]`) p.P(`if !ok {`) p.P(`return false`) p.P(`}`) field = field.Message.Fields[1] } else { p.P(`vy := `, rhs, `[i]`) } lhs, rhs = "vx", "vy" nullable = false } kind := field.Desc.Kind() switch { case isScalar(kind): p.compareScalar(lhs, rhs, nullable) case kind == protoreflect.BytesKind: p.compareBytes(lhs, rhs, nullable) case kind == protoreflect.MessageKind || kind == protoreflect.GroupKind: p.compareCall(lhs, rhs, field.Message, nullable) default: panic("not implemented") } if repeated { // close for loop p.P(`}`) } } func (p *equal) compareScalar(lhs, rhs string, nullable bool) { if nullable { p.P(`if p, q := `, lhs, `, `, rhs, `; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) {`) } else { p.P(`if `, lhs, ` != `, rhs, ` {`) } p.P(` return false`) p.P(`}`) } func (p *equal) compareBytes(lhs, rhs string, nullable bool) { if nullable { p.P(`if p, q := `, lhs, `, `, rhs, `; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) {`) } else { // Inlined call to bytes.Equal() p.P(`if string(`, lhs, `) != string(`, rhs, `) {`) } p.P(` return false`) p.P(`}`) } func (p *equal) compareCall(lhs, rhs string, msg *protogen.Message, nullable bool) { if !nullable { // The p != q check is mostly intended to catch the lhs = nil, rhs = nil case in which we would pointlessly // allocate not just one but two empty values. However, it also provides us with an extra scope to establish // our p and q variables. p.P(`if p, q := `, lhs, `, `, rhs, `; p != q {`) defer p.P(`}`) p.P(`if p == nil {`) p.P(`p = &`, p.QualifiedGoIdent(msg.GoIdent), `{}`) p.P(`}`) p.P(`if q == nil {`) p.P(`q = &`, p.QualifiedGoIdent(msg.GoIdent), `{}`) p.P(`}`) lhs, rhs = "p", "q" } switch { case p.IsWellKnownType(msg): wkt := p.WellKnownTypeMap(msg) p.P(`if !(*`, wkt, `)(`, lhs, `).`, equalName, `((*`, wkt, `)(`, rhs, `)) {`) p.P(` return false`) p.P(`}`) case p.IsLocalMessage(msg): p.P(`if !`, lhs, `.`, equalName, `(`, rhs, `) {`) p.P(` return false`) p.P(`}`) default: p.P(`if equal, ok := interface{}(`, lhs, `).(interface { `, equalName, `(*`, p.QualifiedGoIdent(msg.GoIdent), `) bool }); ok {`) p.P(` if !equal.`, equalName, `(`, rhs, `) {`) p.P(` return false`) p.P(` }`) p.P(`} else if !`, p.Ident("google.golang.org/protobuf/proto", "Equal"), `(`, lhs, `, `, rhs, `) {`) p.P(` return false`) p.P(`}`) } } func isScalar(kind protoreflect.Kind) bool { switch kind { case protoreflect.BoolKind, protoreflect.StringKind, protoreflect.DoubleKind, protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind, protoreflect.FloatKind, protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Sint64Kind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.Sint32Kind, protoreflect.EnumKind: return true } return false } golang-github-planetscale-vtprotobuf-0.6.0/features/grpc/000077500000000000000000000000001455570004500235235ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/features/grpc/grpc.go000066400000000000000000000350531455570004500250130ustar00rootroot00000000000000/* * * Copyright 2020 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package grpc import ( "fmt" "strconv" "strings" "github.com/planetscale/vtprotobuf/generator" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/types/descriptorpb" ) const ( contextPackage = protogen.GoImportPath("context") grpcPackage = protogen.GoImportPath("google.golang.org/grpc") codesPackage = protogen.GoImportPath("google.golang.org/grpc/codes") statusPackage = protogen.GoImportPath("google.golang.org/grpc/status") ) // generateFileContent generates the gRPC service definitions, excluding the package statement. func generateFileContent(gen *protogen.Plugin, file *protogen.File, g *generator.GeneratedFile) { if len(file.Services) == 0 { return } 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("// Requires gRPC-Go v1.32.0 or later.") g.P("const _ = ", grpcPackage.Ident("SupportPackageIsVersion7")) // When changing, update version number above. g.P() for _, service := range file.Services { genService(gen, file, g, service) } } func genService(gen *protogen.Plugin, file *protogen.File, g *generator.GeneratedFile, service *protogen.Service) { clientName := service.GoName + "Client" g.P("// ", clientName, " is the client API for ", service.GoName, " service.") g.P("//") g.P("// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.") // Client interface. if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { g.P("//") g.P(deprecationComment) } g.Annotate(clientName, service.Location) g.P("type ", clientName, " interface {") for _, method := range service.Methods { g.Annotate(clientName+"."+method.GoName, method.Location) if method.Desc.Options().(*descriptorpb.MethodOptions).GetDeprecated() { g.P(deprecationComment) } g.P(method.Comments.Leading, clientSignature(g, method)) } g.P("}") g.P() // Client structure. g.P("type ", unexport(clientName), " struct {") g.P("cc ", grpcPackage.Ident("ClientConnInterface")) g.P("}") g.P() // NewClient factory. if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { g.P(deprecationComment) } g.P("func New", clientName, " (cc ", grpcPackage.Ident("ClientConnInterface"), ") ", clientName, " {") g.P("return &", unexport(clientName), "{cc}") g.P("}") g.P() var methodIndex, streamIndex int // Client method implementations. for _, method := range service.Methods { if !method.Desc.IsStreamingServer() && !method.Desc.IsStreamingClient() { // Unary RPC method genClientMethod(gen, file, g, method, methodIndex) methodIndex++ } else { // Streaming RPC method genClientMethod(gen, file, g, method, streamIndex) streamIndex++ } } mustOrShould := "must" if !*requireUnimplemented { mustOrShould = "should" } // Server interface. serverType := service.GoName + "Server" g.P("// ", serverType, " is the server API for ", service.GoName, " service.") g.P("// All implementations ", mustOrShould, " embed Unimplemented", serverType) g.P("// for forward compatibility") if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { g.P("//") g.P(deprecationComment) } g.Annotate(serverType, service.Location) g.P("type ", serverType, " interface {") for _, method := range service.Methods { g.Annotate(serverType+"."+method.GoName, method.Location) if method.Desc.Options().(*descriptorpb.MethodOptions).GetDeprecated() { g.P(deprecationComment) } g.P(method.Comments.Leading, serverSignature(g, method)) } if *requireUnimplemented { g.P("mustEmbedUnimplemented", serverType, "()") } g.P("}") g.P() // Server Unimplemented struct for forward compatibility. g.P("// Unimplemented", serverType, " ", mustOrShould, " be embedded to have forward compatible implementations.") g.P("type Unimplemented", serverType, " struct {") g.P("}") g.P() for _, method := range service.Methods { nilArg := "" if !method.Desc.IsStreamingClient() && !method.Desc.IsStreamingServer() { nilArg = "nil," } g.P("func (Unimplemented", serverType, ") ", serverSignature(g, method), "{") g.P("return ", nilArg, statusPackage.Ident("Errorf"), "(", codesPackage.Ident("Unimplemented"), `, "method `, method.GoName, ` not implemented")`) g.P("}") } if *requireUnimplemented { g.P("func (Unimplemented", serverType, ") mustEmbedUnimplemented", serverType, "() {}") } g.P() // Unsafe Server interface to opt-out of forward compatibility. g.P("// Unsafe", serverType, " may be embedded to opt out of forward compatibility for this service.") g.P("// Use of this interface is not recommended, as added methods to ", serverType, " will") g.P("// result in compilation errors.") g.P("type Unsafe", serverType, " interface {") g.P("mustEmbedUnimplemented", serverType, "()") g.P("}") // Server registration. if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { g.P(deprecationComment) } serviceDescVar := service.GoName + "_ServiceDesc" g.P("func Register", service.GoName, "Server(s ", grpcPackage.Ident("ServiceRegistrar"), ", srv ", serverType, ") {") g.P("s.RegisterService(&", serviceDescVar, `, srv)`) g.P("}") g.P() // Server handler implementations. var handlerNames []string for _, method := range service.Methods { hname := genServerMethod(gen, file, g, method) handlerNames = append(handlerNames, hname) } // Service descriptor. g.P("// ", serviceDescVar, " is the ", grpcPackage.Ident("ServiceDesc"), " for ", service.GoName, " service.") g.P("// It's only intended for direct use with ", grpcPackage.Ident("RegisterService"), ",") g.P("// and not to be introspected or modified (even as a copy)") g.P("var ", serviceDescVar, " = ", grpcPackage.Ident("ServiceDesc"), " {") g.P("ServiceName: ", strconv.Quote(string(service.Desc.FullName())), ",") g.P("HandlerType: (*", serverType, ")(nil),") g.P("Methods: []", grpcPackage.Ident("MethodDesc"), "{") for i, method := range service.Methods { if method.Desc.IsStreamingClient() || method.Desc.IsStreamingServer() { continue } g.P("{") g.P("MethodName: ", strconv.Quote(string(method.Desc.Name())), ",") g.P("Handler: ", handlerNames[i], ",") g.P("},") } g.P("},") g.P("Streams: []", grpcPackage.Ident("StreamDesc"), "{") for i, method := range service.Methods { if !method.Desc.IsStreamingClient() && !method.Desc.IsStreamingServer() { continue } g.P("{") g.P("StreamName: ", strconv.Quote(string(method.Desc.Name())), ",") g.P("Handler: ", handlerNames[i], ",") if method.Desc.IsStreamingServer() { g.P("ServerStreams: true,") } if method.Desc.IsStreamingClient() { g.P("ClientStreams: true,") } g.P("},") } g.P("},") g.P("Metadata: \"", file.Desc.Path(), "\",") g.P("}") g.P() } func clientSignature(g *generator.GeneratedFile, method *protogen.Method) string { s := method.GoName + "(ctx " + g.QualifiedGoIdent(contextPackage.Ident("Context")) if !method.Desc.IsStreamingClient() { s += ", in *" + g.QualifiedGoIdent(method.Input.GoIdent) } s += ", opts ..." + g.QualifiedGoIdent(grpcPackage.Ident("CallOption")) + ") (" if !method.Desc.IsStreamingClient() && !method.Desc.IsStreamingServer() { s += "*" + g.QualifiedGoIdent(method.Output.GoIdent) } else { s += method.Parent.GoName + "_" + method.GoName + "Client" } s += ", error)" return s } func genClientMethod(gen *protogen.Plugin, file *protogen.File, g *generator.GeneratedFile, method *protogen.Method, index int) { service := method.Parent sname := fmt.Sprintf("/%s/%s", service.Desc.FullName(), method.Desc.Name()) if method.Desc.Options().(*descriptorpb.MethodOptions).GetDeprecated() { g.P(deprecationComment) } g.P("func (c *", unexport(service.GoName), "Client) ", clientSignature(g, method), "{") if !method.Desc.IsStreamingServer() && !method.Desc.IsStreamingClient() { // g.P("out := new(", method.Output.GoIdent, ")") g.Alloc("out", method.Output, true) g.P(`err := c.cc.Invoke(ctx, "`, sname, `", in, out, opts...)`) g.P("if err != nil { return nil, err }") g.P("return out, nil") g.P("}") g.P() return } streamType := unexport(service.GoName) + method.GoName + "Client" serviceDescVar := service.GoName + "_ServiceDesc" g.P("stream, err := c.cc.NewStream(ctx, &", serviceDescVar, ".Streams[", index, `], "`, sname, `", opts...)`) g.P("if err != nil { return nil, err }") g.P("x := &", streamType, "{stream}") if !method.Desc.IsStreamingClient() { 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.Desc.IsStreamingClient() genRecv := method.Desc.IsStreamingServer() genCloseAndRecv := !method.Desc.IsStreamingServer() // Stream auxiliary types and methods. g.P("type ", service.GoName, "_", method.GoName, "Client interface {") if genSend { g.P("Send(*", method.Input.GoIdent, ") error") } if genRecv { g.P("Recv() (*", method.Output.GoIdent, ", error)") } if genCloseAndRecv { g.P("CloseAndRecv() (*", method.Output.GoIdent, ", error)") } g.P(grpcPackage.Ident("ClientStream")) g.P("}") g.P() g.P("type ", streamType, " struct {") g.P(grpcPackage.Ident("ClientStream")) g.P("}") g.P() if genSend { g.P("func (x *", streamType, ") Send(m *", method.Input.GoIdent, ") error {") g.P("return x.ClientStream.SendMsg(m)") g.P("}") g.P() } if genRecv { g.P("func (x *", streamType, ") Recv() (*", method.Output.GoIdent, ", error) {") // g.P("m := new(", method.Output.GoIdent, ")") g.Alloc("m", method.Output, true) 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() (*", method.Output.GoIdent, ", error) {") g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") // g.P("m := new(", method.Output.GoIdent, ")") g.Alloc("m", method.Output, true) g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") g.P("return m, nil") g.P("}") g.P() } } func serverSignature(g *generator.GeneratedFile, method *protogen.Method) string { var reqArgs []string ret := "error" if !method.Desc.IsStreamingClient() && !method.Desc.IsStreamingServer() { reqArgs = append(reqArgs, g.QualifiedGoIdent(contextPackage.Ident("Context"))) ret = "(*" + g.QualifiedGoIdent(method.Output.GoIdent) + ", error)" } if !method.Desc.IsStreamingClient() { reqArgs = append(reqArgs, "*"+g.QualifiedGoIdent(method.Input.GoIdent)) } if method.Desc.IsStreamingClient() || method.Desc.IsStreamingServer() { reqArgs = append(reqArgs, method.Parent.GoName+"_"+method.GoName+"Server") } return method.GoName + "(" + strings.Join(reqArgs, ", ") + ") " + ret } func genServerMethod(gen *protogen.Plugin, file *protogen.File, g *generator.GeneratedFile, method *protogen.Method) string { service := method.Parent hname := fmt.Sprintf("_%s_%s_Handler", service.GoName, method.GoName) if !method.Desc.IsStreamingClient() && !method.Desc.IsStreamingServer() { g.P("func ", hname, "(srv interface{}, ctx ", contextPackage.Ident("Context"), ", dec func(interface{}) error, interceptor ", grpcPackage.Ident("UnaryServerInterceptor"), ") (interface{}, error) {") // g.P("in := new(", method.Input.GoIdent, ")") g.Alloc("in", method.Input, true) g.P("if err := dec(in); err != nil { return nil, err }") g.P("if interceptor == nil { return srv.(", service.GoName, "Server).", method.GoName, "(ctx, in) }") g.P("info := &", grpcPackage.Ident("UnaryServerInfo"), "{") g.P("Server: srv,") g.P("FullMethod: ", strconv.Quote(fmt.Sprintf("/%s/%s", service.Desc.FullName(), method.Desc.Name())), ",") g.P("}") g.P("handler := func(ctx ", contextPackage.Ident("Context"), ", req interface{}) (interface{}, error) {") g.P("return srv.(", service.GoName, "Server).", method.GoName, "(ctx, req.(*", method.Input.GoIdent, "))") g.P("}") g.P("return interceptor(ctx, in, info, handler)") g.P("}") g.P() return hname } streamType := unexport(service.GoName) + method.GoName + "Server" g.P("func ", hname, "(srv interface{}, stream ", grpcPackage.Ident("ServerStream"), ") error {") if !method.Desc.IsStreamingClient() { // g.P("m := new(", method.Input.GoIdent, ")") g.Alloc("m", method.Input, true) g.P("if err := stream.RecvMsg(m); err != nil { return err }") g.P("return srv.(", service.GoName, "Server).", method.GoName, "(m, &", streamType, "{stream})") } else { g.P("return srv.(", service.GoName, "Server).", method.GoName, "(&", streamType, "{stream})") } g.P("}") g.P() genSend := method.Desc.IsStreamingServer() genSendAndClose := !method.Desc.IsStreamingServer() genRecv := method.Desc.IsStreamingClient() // Stream auxiliary types and methods. g.P("type ", service.GoName, "_", method.GoName, "Server interface {") if genSend { g.P("Send(*", method.Output.GoIdent, ") error") } if genSendAndClose { g.P("SendAndClose(*", method.Output.GoIdent, ") error") } if genRecv { g.P("Recv() (*", method.Input.GoIdent, ", error)") } g.P(grpcPackage.Ident("ServerStream")) g.P("}") g.P() g.P("type ", streamType, " struct {") g.P(grpcPackage.Ident("ServerStream")) g.P("}") g.P() if genSend { g.P("func (x *", streamType, ") Send(m *", method.Output.GoIdent, ") error {") g.P("return x.ServerStream.SendMsg(m)") g.P("}") g.P() } if genSendAndClose { g.P("func (x *", streamType, ") SendAndClose(m *", method.Output.GoIdent, ") error {") g.P("return x.ServerStream.SendMsg(m)") g.P("}") g.P() } if genRecv { g.P("func (x *", streamType, ") Recv() (*", method.Input.GoIdent, ", error) {") // g.P("m := new(", method.Input.GoIdent, ")") g.Alloc("m", method.Input, true) g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }") g.P("return m, nil") g.P("}") g.P() } return hname } const deprecationComment = "// Deprecated: Do not use." func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } golang-github-planetscale-vtprotobuf-0.6.0/features/grpc/grpc_plugin.go000066400000000000000000000014021455570004500263600ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package grpc import ( "github.com/planetscale/vtprotobuf/generator" "google.golang.org/protobuf/compiler/protogen" ) const version = "1.1.0-vtproto" var requireUnimplementedAlways = true var requireUnimplemented = &requireUnimplementedAlways func init() { generator.RegisterFeature("grpc", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &grpc{gen} }) } type grpc struct { *generator.GeneratedFile } func (g *grpc) GenerateFile(file *protogen.File) bool { if len(file.Services) == 0 { return false } generateFileContent(nil, file, g.GeneratedFile) return true } golang-github-planetscale-vtprotobuf-0.6.0/features/marshal/000077500000000000000000000000001455570004500242175ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/features/marshal/marshalto.go000066400000000000000000000537271455570004500265560ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Copyright (c) 2013, The GoGo Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package marshal import ( "fmt" "sort" "strconv" "strings" "github.com/planetscale/vtprotobuf/generator" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/reflect/protoreflect" ) func init() { generator.RegisterFeature("marshal", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &marshal{GeneratedFile: gen, Stable: false, strict: false} }) generator.RegisterFeature("marshal_strict", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &marshal{GeneratedFile: gen, Stable: false, strict: true} }) } type counter int func (cnt *counter) Next() string { *cnt++ return cnt.Current() } func (cnt *counter) Current() string { return strconv.Itoa(int(*cnt)) } type marshal struct { *generator.GeneratedFile Stable, once, strict bool } var _ generator.FeatureGenerator = (*marshal)(nil) func (p *marshal) GenerateFile(file *protogen.File) bool { for _, message := range file.Messages { p.message(message) } return p.once } func (p *marshal) encodeFixed64(varName ...string) { p.P(`i -= 8`) p.P(p.Ident("encoding/binary", "LittleEndian"), `.PutUint64(dAtA[i:], uint64(`, strings.Join(varName, ""), `))`) } func (p *marshal) encodeFixed32(varName ...string) { p.P(`i -= 4`) p.P(p.Ident("encoding/binary", "LittleEndian"), `.PutUint32(dAtA[i:], uint32(`, strings.Join(varName, ""), `))`) } func (p *marshal) encodeVarint(varName ...string) { p.P(`i = `, p.Helper("EncodeVarint"), `(dAtA, i, uint64(`, strings.Join(varName, ""), `))`) } func (p *marshal) encodeKey(fieldNumber protoreflect.FieldNumber, wireType protowire.Type) { 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 i = len(keybuf) - 1; i >= 0; i-- { p.P(`i--`) p.P(`dAtA[i] = `, fmt.Sprintf("%#v", keybuf[i])) } } func (p *marshal) mapField(kvField *protogen.Field, varName string) { switch kvField.Desc.Kind() { case protoreflect.DoubleKind: p.encodeFixed64(p.Ident("math", "Float64bits"), `(float64(`, varName, `))`) case protoreflect.FloatKind: p.encodeFixed32(p.Ident("math", "Float32bits"), `(float32(`, varName, `))`) case protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.EnumKind: p.encodeVarint(varName) case protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind: p.encodeFixed64(varName) case protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind: p.encodeFixed32(varName) case protoreflect.BoolKind: p.P(`i--`) p.P(`if `, varName, ` {`) p.P(`dAtA[i] = 1`) p.P(`} else {`) p.P(`dAtA[i] = 0`) p.P(`}`) case protoreflect.StringKind, protoreflect.BytesKind: p.P(`i -= len(`, varName, `)`) p.P(`copy(dAtA[i:], `, varName, `)`) p.encodeVarint(`len(`, varName, `)`) case protoreflect.Sint32Kind: p.encodeVarint(`(uint32(`, varName, `) << 1) ^ uint32((`, varName, ` >> 31))`) case protoreflect.Sint64Kind: p.encodeVarint(`(uint64(`, varName, `) << 1) ^ uint64((`, varName, ` >> 63))`) case protoreflect.MessageKind: p.marshalBackward(varName, true, kvField.Message) } } func (p *marshal) field(oneof bool, numGen *counter, field *protogen.Field) { fieldname := field.GoName nullable := field.Message != nil || (!oneof && field.Desc.HasPresence()) repeated := field.Desc.Cardinality() == protoreflect.Repeated if repeated { p.P(`if len(m.`, fieldname, `) > 0 {`) } else if nullable { if field.Desc.Cardinality() == protoreflect.Required { p.P(`if m.`, fieldname, ` == nil {`) p.P(`return 0, `, p.Ident("fmt", "Errorf"), `("proto: required field `, field.Desc.Name(), ` not set")`) p.P(`} else {`) } else { p.P(`if m.`, fieldname, ` != nil {`) } } packed := field.Desc.IsPacked() wireType := generator.ProtoWireType(field.Desc.Kind()) fieldNumber := field.Desc.Number() if packed { wireType = protowire.BytesType } switch field.Desc.Kind() { case protoreflect.DoubleKind: if packed { val := p.reverseListRange(`m.`, fieldname) p.P(`f`, numGen.Next(), ` := `, p.Ident("math", "Float64bits"), `(float64(`, val, `))`) p.encodeFixed64("f", numGen.Current()) p.P(`}`) p.encodeVarint(`len(m.`, fieldname, `) * 8`) p.encodeKey(fieldNumber, wireType) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.P(`f`, numGen.Next(), ` := `, p.Ident("math", "Float64bits"), `(float64(`, val, `))`) p.encodeFixed64("f", numGen.Current()) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.encodeFixed64(p.Ident("math", "Float64bits"), `(float64(*m.`+fieldname, `))`) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.encodeFixed64(p.Ident("math", "Float64bits"), `(float64(m.`, fieldname, `))`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.encodeFixed64(p.Ident("math", "Float64bits"), `(float64(m.`+fieldname, `))`) p.encodeKey(fieldNumber, wireType) } case protoreflect.FloatKind: if packed { val := p.reverseListRange(`m.`, fieldname) p.P(`f`, numGen.Next(), ` := `, p.Ident("math", "Float32bits"), `(float32(`, val, `))`) p.encodeFixed32("f" + numGen.Current()) p.P(`}`) p.encodeVarint(`len(m.`, fieldname, `) * 4`) p.encodeKey(fieldNumber, wireType) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.P(`f`, numGen.Next(), ` := `, p.Ident("math", "Float32bits"), `(float32(`, val, `))`) p.encodeFixed32("f" + numGen.Current()) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.encodeFixed32(p.Ident("math", "Float32bits"), `(float32(*m.`+fieldname, `))`) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.encodeFixed32(p.Ident("math", "Float32bits"), `(float32(m.`+fieldname, `))`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.encodeFixed32(p.Ident("math", "Float32bits"), `(float32(m.`+fieldname, `))`) p.encodeKey(fieldNumber, wireType) } case protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.EnumKind: if packed { jvar := "j" + numGen.Next() total := "pksize" + numGen.Next() p.P(`var `, total, ` int`) p.P(`for _, num := range m.`, fieldname, ` {`) p.P(total, ` += `, p.Helper("SizeOfVarint"), `(uint64(num))`) p.P(`}`) p.P(`i -= `, total) p.P(jvar, `:= i`) switch field.Desc.Kind() { case protoreflect.Int64Kind, protoreflect.Int32Kind, protoreflect.EnumKind: p.P(`for _, num1 := range m.`, fieldname, ` {`) p.P(`num := uint64(num1)`) default: p.P(`for _, num := range m.`, fieldname, ` {`) } p.P(`for num >= 1<<7 {`) p.P(`dAtA[`, jvar, `] = uint8(uint64(num)&0x7f|0x80)`) p.P(`num >>= 7`) p.P(jvar, `++`) p.P(`}`) p.P(`dAtA[`, jvar, `] = uint8(num)`) p.P(jvar, `++`) p.P(`}`) p.encodeVarint(total) p.encodeKey(fieldNumber, wireType) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.encodeVarint(val) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.encodeVarint(`*m.`, fieldname) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.encodeVarint(`m.`, fieldname) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.encodeVarint(`m.`, fieldname) p.encodeKey(fieldNumber, wireType) } case protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind: if packed { val := p.reverseListRange(`m.`, fieldname) p.encodeFixed64(val) p.P(`}`) p.encodeVarint(`len(m.`, fieldname, `) * 8`) p.encodeKey(fieldNumber, wireType) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.encodeFixed64(val) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.encodeFixed64("*m.", fieldname) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.encodeFixed64("m.", fieldname) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.encodeFixed64("m.", fieldname) p.encodeKey(fieldNumber, wireType) } case protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind: if packed { val := p.reverseListRange(`m.`, fieldname) p.encodeFixed32(val) p.P(`}`) p.encodeVarint(`len(m.`, fieldname, `) * 4`) p.encodeKey(fieldNumber, wireType) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.encodeFixed32(val) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.encodeFixed32("*m." + fieldname) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.encodeFixed32("m." + fieldname) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.encodeFixed32("m." + fieldname) p.encodeKey(fieldNumber, wireType) } case protoreflect.BoolKind: if packed { val := p.reverseListRange(`m.`, fieldname) p.P(`i--`) p.P(`if `, val, ` {`) p.P(`dAtA[i] = 1`) p.P(`} else {`) p.P(`dAtA[i] = 0`) p.P(`}`) p.P(`}`) p.encodeVarint(`len(m.`, fieldname, `)`) p.encodeKey(fieldNumber, wireType) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.P(`i--`) p.P(`if `, val, ` {`) p.P(`dAtA[i] = 1`) p.P(`} else {`) p.P(`dAtA[i] = 0`) p.P(`}`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.P(`i--`) p.P(`if *m.`, fieldname, ` {`) p.P(`dAtA[i] = 1`) p.P(`} else {`) p.P(`dAtA[i] = 0`) p.P(`}`) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if m.`, fieldname, ` {`) p.P(`i--`) p.P(`if m.`, fieldname, ` {`) p.P(`dAtA[i] = 1`) p.P(`} else {`) p.P(`dAtA[i] = 0`) p.P(`}`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.P(`i--`) p.P(`if m.`, fieldname, ` {`) p.P(`dAtA[i] = 1`) p.P(`} else {`) p.P(`dAtA[i] = 0`) p.P(`}`) p.encodeKey(fieldNumber, wireType) } case protoreflect.StringKind: if repeated { val := p.reverseListRange(`m.`, fieldname) p.P(`i -= len(`, val, `)`) p.P(`copy(dAtA[i:], `, val, `)`) p.encodeVarint(`len(`, val, `)`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.P(`i -= len(*m.`, fieldname, `)`) p.P(`copy(dAtA[i:], *m.`, fieldname, `)`) p.encodeVarint(`len(*m.`, fieldname, `)`) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if len(m.`, fieldname, `) > 0 {`) p.P(`i -= len(m.`, fieldname, `)`) p.P(`copy(dAtA[i:], m.`, fieldname, `)`) p.encodeVarint(`len(m.`, fieldname, `)`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.P(`i -= len(m.`, fieldname, `)`) p.P(`copy(dAtA[i:], m.`, fieldname, `)`) p.encodeVarint(`len(m.`, fieldname, `)`) p.encodeKey(fieldNumber, wireType) } case protoreflect.GroupKind: p.encodeKey(fieldNumber, protowire.EndGroupType) p.marshalBackward(`m.`+fieldname, false, field.Message) p.encodeKey(fieldNumber, protowire.StartGroupType) case protoreflect.MessageKind: if field.Desc.IsMap() { goTypK, _ := p.FieldGoType(field.Message.Fields[0]) keyKind := field.Message.Fields[0].Desc.Kind() valKind := field.Message.Fields[1].Desc.Kind() var val string if p.Stable && keyKind != protoreflect.BoolKind { keysName := `keysFor` + fieldname p.P(keysName, ` := make([]`, goTypK, `, 0, len(m.`, fieldname, `))`) p.P(`for k := range m.`, fieldname, ` {`) p.P(keysName, ` = append(`, keysName, `, `, goTypK, `(k))`) p.P(`}`) p.P(p.Ident("sort", "Slice"), `(`, keysName, `, func(i, j int) bool {`) p.P(`return `, keysName, `[i] < `, keysName, `[j]`) p.P(`})`) val = p.reverseListRange(keysName) } else { p.P(`for k := range m.`, fieldname, ` {`) val = "k" } if p.Stable { p.P(`v := m.`, fieldname, `[`, goTypK, `(`, val, `)]`) } else { p.P(`v := m.`, fieldname, `[`, val, `]`) } p.P(`baseI := i`) accessor := `v` p.mapField(field.Message.Fields[1], accessor) p.encodeKey(2, generator.ProtoWireType(valKind)) p.mapField(field.Message.Fields[0], val) p.encodeKey(1, generator.ProtoWireType(keyKind)) p.encodeVarint(`baseI - i`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.marshalBackward(val, true, field.Message) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.marshalBackward(`m.`+fieldname, true, field.Message) p.encodeKey(fieldNumber, wireType) } case protoreflect.BytesKind: if repeated { val := p.reverseListRange(`m.`, fieldname) p.P(`i -= len(`, val, `)`) p.P(`copy(dAtA[i:], `, val, `)`) p.encodeVarint(`len(`, val, `)`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if !oneof && !field.Desc.HasPresence() { p.P(`if len(m.`, fieldname, `) > 0 {`) p.P(`i -= len(m.`, fieldname, `)`) p.P(`copy(dAtA[i:], m.`, fieldname, `)`) p.encodeVarint(`len(m.`, fieldname, `)`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.P(`i -= len(m.`, fieldname, `)`) p.P(`copy(dAtA[i:], m.`, fieldname, `)`) p.encodeVarint(`len(m.`, fieldname, `)`) p.encodeKey(fieldNumber, wireType) } case protoreflect.Sint32Kind: if packed { jvar := "j" + numGen.Next() total := "pksize" + numGen.Next() p.P(`var `, total, ` int`) p.P(`for _, num := range m.`, fieldname, ` {`) p.P(total, ` += `, p.Helper("SizeOfZigzag"), `(uint64(num))`) p.P(`}`) p.P(`i -= `, total) p.P(jvar, `:= i`) p.P(`for _, num := range m.`, fieldname, ` {`) xvar := "x" + numGen.Next() p.P(xvar, ` := (uint32(num) << 1) ^ uint32((num >> 31))`) p.P(`for `, xvar, ` >= 1<<7 {`) p.P(`dAtA[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) p.P(jvar, `++`) p.P(xvar, ` >>= 7`) p.P(`}`) p.P(`dAtA[`, jvar, `] = uint8(`, xvar, `)`) p.P(jvar, `++`) p.P(`}`) p.encodeVarint(total) p.encodeKey(fieldNumber, wireType) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.P(`x`, numGen.Next(), ` := (uint32(`, val, `) << 1) ^ uint32((`, val, ` >> 31))`) p.encodeVarint(`x`, numGen.Current()) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.encodeVarint(`(uint32(*m.`, fieldname, `) << 1) ^ uint32((*m.`, fieldname, ` >> 31))`) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.encodeVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.encodeVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) p.encodeKey(fieldNumber, wireType) } case protoreflect.Sint64Kind: if packed { jvar := "j" + numGen.Next() total := "pksize" + numGen.Next() p.P(`var `, total, ` int`) p.P(`for _, num := range m.`, fieldname, ` {`) p.P(total, ` += `, p.Helper("SizeOfZigzag"), `(uint64(num))`) p.P(`}`) p.P(`i -= `, total) p.P(jvar, `:= i`) p.P(`for _, num := range m.`, fieldname, ` {`) xvar := "x" + numGen.Next() p.P(xvar, ` := (uint64(num) << 1) ^ uint64((num >> 63))`) p.P(`for `, xvar, ` >= 1<<7 {`) p.P(`dAtA[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) p.P(jvar, `++`) p.P(xvar, ` >>= 7`) p.P(`}`) p.P(`dAtA[`, jvar, `] = uint8(`, xvar, `)`) p.P(jvar, `++`) p.P(`}`) p.encodeVarint(total) p.encodeKey(fieldNumber, wireType) } else if repeated { val := p.reverseListRange(`m.`, fieldname) p.P(`x`, numGen.Next(), ` := (uint64(`, val, `) << 1) ^ uint64((`, val, ` >> 63))`) p.encodeVarint("x" + numGen.Current()) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else if nullable { p.encodeVarint(`(uint64(*m.`, fieldname, `) << 1) ^ uint64((*m.`, fieldname, ` >> 63))`) p.encodeKey(fieldNumber, wireType) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.encodeVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) p.encodeKey(fieldNumber, wireType) p.P(`}`) } else { p.encodeVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) p.encodeKey(fieldNumber, wireType) } default: panic("not implemented") } if repeated || nullable { p.P(`}`) } } func (p *marshal) methodMarshalToSizedBuffer() string { switch { case p.strict: return "MarshalToSizedBufferVTStrict" default: return "MarshalToSizedBufferVT" } } func (p *marshal) methodMarshalTo() string { switch { case p.strict: return "MarshalToVTStrict" default: return "MarshalToVT" } } func (p *marshal) methodMarshal() string { switch { case p.strict: return "MarshalVTStrict" default: return "MarshalVT" } } func (p *marshal) message(message *protogen.Message) { for _, nested := range message.Messages { p.message(nested) } if message.Desc.IsMapEntry() { return } p.once = true var numGen counter ccTypeName := message.GoIdent.GoName p.P(`func (m *`, ccTypeName, `) `, p.methodMarshal(), `() (dAtA []byte, err error) {`) p.P(`if m == nil {`) p.P(`return nil, nil`) p.P(`}`) p.P(`size := m.SizeVT()`) p.P(`dAtA = make([]byte, size)`) p.P(`n, err := m.`, p.methodMarshalToSizedBuffer(), `(dAtA[:size])`) p.P(`if err != nil {`) p.P(`return nil, err`) p.P(`}`) p.P(`return dAtA[:n], nil`) p.P(`}`) p.P(``) p.P(`func (m *`, ccTypeName, `) `, p.methodMarshalTo(), `(dAtA []byte) (int, error) {`) p.P(`size := m.SizeVT()`) p.P(`return m.`, p.methodMarshalToSizedBuffer(), `(dAtA[:size])`) p.P(`}`) p.P(``) p.P(`func (m *`, ccTypeName, `) `, p.methodMarshalToSizedBuffer(), `(dAtA []byte) (int, error) {`) p.P(`if m == nil {`) p.P(`return 0, nil`) p.P(`}`) p.P(`i := len(dAtA)`) p.P(`_ = i`) p.P(`var l int`) p.P(`_ = l`) if !p.Wrapper() { p.P(`if m.unknownFields != nil {`) p.P(`i -= len(m.unknownFields)`) p.P(`copy(dAtA[i:], m.unknownFields)`) p.P(`}`) } sort.Slice(message.Fields, func(i, j int) bool { return message.Fields[i].Desc.Number() < message.Fields[j].Desc.Number() }) marshalForwardOneOf := func(varname ...any) { l := []any{`size, err := `} l = append(l, varname...) l = append(l, `.`, p.methodMarshalToSizedBuffer(), `(dAtA[:i])`) p.P(l...) p.P(`if err != nil {`) p.P(`return 0, err`) p.P(`}`) p.P(`i -= size`) } if p.strict { for i := len(message.Fields) - 1; i >= 0; i-- { field := message.Fields[i] oneof := field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() if !oneof { p.field(false, &numGen, field) } else { if p.IsWellKnownType(message) { p.P(`if m, ok := m.`, field.Oneof.GoName, `.(*`, field.GoIdent, `); ok {`) p.P(`msg := ((*`, p.WellKnownFieldMap(field), `)(m))`) } else { p.P(`if msg, ok := m.`, field.Oneof.GoName, `.(*`, field.GoIdent.GoName, `); ok {`) } marshalForwardOneOf("msg") p.P(`}`) } } } else { // To match the wire format of proto.Marshal, oneofs have to be marshaled // before fields. See https://github.com/planetscale/vtprotobuf/pull/22 oneofs := make(map[string]struct{}, len(message.Fields)) for i := len(message.Fields) - 1; i >= 0; i-- { field := message.Fields[i] oneof := field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() if oneof { fieldname := field.Oneof.GoName if _, ok := oneofs[fieldname]; ok { continue } oneofs[fieldname] = struct{}{} if p.IsWellKnownType(message) { p.P(`switch c := m.`, fieldname, `.(type) {`) for _, f := range field.Oneof.Fields { p.P(`case *`, f.GoIdent, `:`) marshalForwardOneOf(`(*`, p.WellKnownFieldMap(f), `)(c)`) } p.P(`}`) } else { p.P(`if vtmsg, ok := m.`, fieldname, `.(interface{`) p.P(p.methodMarshalToSizedBuffer(), ` ([]byte) (int, error)`) p.P(`}); ok {`) marshalForwardOneOf("vtmsg") p.P(`}`) } } } for i := len(message.Fields) - 1; i >= 0; i-- { field := message.Fields[i] oneof := field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() if !oneof { p.field(false, &numGen, field) } } } p.P(`return len(dAtA) - i, nil`) p.P(`}`) p.P() //Generate MarshalToVT methods for oneof fields for _, field := range message.Fields { if field.Oneof == nil || field.Oneof.Desc.IsSynthetic() { continue } ccTypeName := field.GoIdent.GoName p.P(`func (m *`, ccTypeName, `) `, p.methodMarshalTo(), `(dAtA []byte) (int, error) {`) p.P(`size := m.SizeVT()`) p.P(`return m.`, p.methodMarshalToSizedBuffer(), `(dAtA[:size])`) p.P(`}`) p.P(``) p.P(`func (m *`, ccTypeName, `) `, p.methodMarshalToSizedBuffer(), `(dAtA []byte) (int, error) {`) p.P(`i := len(dAtA)`) p.field(true, &numGen, field) p.P(`return len(dAtA) - i, nil`) p.P(`}`) } } func (p *marshal) reverseListRange(expression ...string) string { exp := strings.Join(expression, "") p.P(`for iNdEx := len(`, exp, `) - 1; iNdEx >= 0; iNdEx-- {`) return exp + `[iNdEx]` } func (p *marshal) marshalBackwardSize(varInt bool) { p.P(`if err != nil {`) p.P(`return 0, err`) p.P(`}`) p.P(`i -= size`) if varInt { p.encodeVarint(`size`) } } func (p *marshal) marshalBackward(varName string, varInt bool, message *protogen.Message) { switch { case p.IsWellKnownType(message): p.P(`size, err := (*`, p.WellKnownTypeMap(message), `)(`, varName, `).`, p.methodMarshalToSizedBuffer(), `(dAtA[:i])`) p.marshalBackwardSize(varInt) case p.IsLocalMessage(message): p.P(`size, err := `, varName, `.`, p.methodMarshalToSizedBuffer(), `(dAtA[:i])`) p.marshalBackwardSize(varInt) default: p.P(`if vtmsg, ok := interface{}(`, varName, `).(interface{`) p.P(p.methodMarshalToSizedBuffer(), `([]byte) (int, error)`) p.P(`}); ok{`) p.P(`size, err := vtmsg.`, p.methodMarshalToSizedBuffer(), `(dAtA[:i])`) p.marshalBackwardSize(varInt) p.P(`} else {`) p.P(`encoded, err := `, p.Ident(generator.ProtoPkg, "Marshal"), `(`, varName, `)`) p.P(`if err != nil {`) p.P(`return 0, err`) p.P(`}`) p.P(`i -= len(encoded)`) p.P(`copy(dAtA[i:], encoded)`) if varInt { p.encodeVarint(`len(encoded)`) } p.P(`}`) } } golang-github-planetscale-vtprotobuf-0.6.0/features/pool/000077500000000000000000000000001455570004500235415ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/features/pool/pool.go000066400000000000000000000050311455570004500250400ustar00rootroot00000000000000package pool import ( "fmt" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/reflect/protoreflect" "github.com/planetscale/vtprotobuf/generator" ) func init() { generator.RegisterFeature("pool", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &pool{GeneratedFile: gen} }) } type pool struct { *generator.GeneratedFile once bool } var _ generator.FeatureGenerator = (*pool)(nil) func (p *pool) GenerateFile(file *protogen.File) bool { for _, message := range file.Messages { p.message(message) } return p.once } func (p *pool) message(message *protogen.Message) { for _, nested := range message.Messages { p.message(nested) } if message.Desc.IsMapEntry() || !p.ShouldPool(message) { return } p.once = true ccTypeName := message.GoIdent p.P(`var vtprotoPool_`, ccTypeName, ` = `, p.Ident("sync", "Pool"), `{`) p.P(`New: func() interface{} {`) p.P(`return &`, ccTypeName, `{}`) p.P(`},`) p.P(`}`) p.P(`func (m *`, ccTypeName, `) ResetVT() {`) p.P(`if m != nil {`) var saved []*protogen.Field for _, field := range message.Fields { fieldName := field.GoName if field.Desc.IsList() { switch field.Desc.Kind() { case protoreflect.MessageKind, protoreflect.GroupKind: p.P(`for _, mm := range m.`, fieldName, `{`) if p.ShouldPool(field.Message) { p.P(`mm.ResetVT()`) } else { p.P(`mm.Reset()`) } p.P(`}`) } p.P(fmt.Sprintf("f%d", len(saved)), ` := m.`, fieldName, `[:0]`) saved = append(saved, field) } else if field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() { if p.ShouldPool(field.Message) { p.P(`if oneof, ok := m.`, field.Oneof.GoName, `.(*`, field.GoIdent, `); ok {`) p.P(`oneof.`, fieldName, `.ReturnToVTPool()`) p.P(`}`) } } else { switch field.Desc.Kind() { case protoreflect.MessageKind, protoreflect.GroupKind: if !field.Desc.IsMap() && p.ShouldPool(field.Message) { p.P(`m.`, fieldName, `.ReturnToVTPool()`) } case protoreflect.BytesKind: p.P(fmt.Sprintf("f%d", len(saved)), ` := m.`, fieldName, `[:0]`) saved = append(saved, field) } } } p.P(`m.Reset()`) for i, field := range saved { p.P(`m.`, field.GoName, ` = `, fmt.Sprintf("f%d", i)) } p.P(`}`) p.P(`}`) p.P(`func (m *`, ccTypeName, `) ReturnToVTPool() {`) p.P(`if m != nil {`) p.P(`m.ResetVT()`) p.P(`vtprotoPool_`, ccTypeName, `.Put(m)`) p.P(`}`) p.P(`}`) p.P(`func `, ccTypeName, `FromVTPool() *`, ccTypeName, `{`) p.P(`return vtprotoPool_`, ccTypeName, `.Get().(*`, ccTypeName, `)`) p.P(`}`) } golang-github-planetscale-vtprotobuf-0.6.0/features/size/000077500000000000000000000000001455570004500235425ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/features/size/size.go000066400000000000000000000272671455570004500250610ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Copyright (c) 2013, The GoGo Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package size import ( "strconv" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/reflect/protoreflect" "github.com/planetscale/vtprotobuf/generator" ) func init() { generator.RegisterFeature("size", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &size{GeneratedFile: gen} }) } type size struct { *generator.GeneratedFile once bool } var _ generator.FeatureGenerator = (*size)(nil) func (p *size) Name() string { return "size" } func (p *size) GenerateFile(file *protogen.File) bool { for _, message := range file.Messages { p.message(message) } return p.once } func (p *size) messageSize(varName, sizeName string, message *protogen.Message) { switch { case p.IsWellKnownType(message): p.P(`l = (*`, p.WellKnownTypeMap(message), `)(`, varName, `).`, sizeName, `()`) case p.IsLocalMessage(message): p.P(`l = `, varName, `.`, sizeName, `()`) default: p.P(`if size, ok := interface{}(`, varName, `).(interface{`) p.P(sizeName, `() int`) p.P(`}); ok{`) p.P(`l = size.`, sizeName, `()`) p.P(`} else {`) p.P(`l = `, p.Ident(generator.ProtoPkg, "Size"), `(`, varName, `)`) p.P(`}`) } } func (p *size) field(oneof bool, field *protogen.Field, sizeName string) { fieldname := field.GoName nullable := field.Message != nil || (!oneof && field.Desc.HasPresence()) repeated := field.Desc.Cardinality() == protoreflect.Repeated if repeated { p.P(`if len(m.`, fieldname, `) > 0 {`) } else if nullable { p.P(`if m.`, fieldname, ` != nil {`) } packed := field.Desc.IsPacked() wireType := generator.ProtoWireType(field.Desc.Kind()) fieldNumber := field.Desc.Number() if packed { wireType = protowire.BytesType } key := generator.KeySize(fieldNumber, wireType) switch field.Desc.Kind() { case protoreflect.DoubleKind, protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind: if packed { p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(len(m.`, fieldname, `)*8))`, `+len(m.`, fieldname, `)*8`) } else if repeated { p.P(`n+=`, strconv.Itoa(key+8), `*len(m.`, fieldname, `)`) } else if !oneof && !nullable { p.P(`if m.`, fieldname, ` != 0 {`) p.P(`n+=`, strconv.Itoa(key+8)) p.P(`}`) } else { p.P(`n+=`, strconv.Itoa(key+8)) } case protoreflect.FloatKind, protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind: if packed { p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(len(m.`, fieldname, `)*4))`, `+len(m.`, fieldname, `)*4`) } else if repeated { p.P(`n+=`, strconv.Itoa(key+4), `*len(m.`, fieldname, `)`) } else if !oneof && !nullable { p.P(`if m.`, fieldname, ` != 0 {`) p.P(`n+=`, strconv.Itoa(key+4)) p.P(`}`) } else { p.P(`n+=`, strconv.Itoa(key+4)) } case protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Uint32Kind, protoreflect.EnumKind, protoreflect.Int32Kind: if packed { p.P(`l = 0`) p.P(`for _, e := range m.`, fieldname, ` {`) p.P(`l+=`, p.Helper("SizeOfVarint"), `(uint64(e))`) p.P(`}`) p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(l))+l`) } else if repeated { p.P(`for _, e := range m.`, fieldname, ` {`) p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(e))`) p.P(`}`) } else if nullable { p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(*m.`, fieldname, `))`) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(m.`, fieldname, `))`) p.P(`}`) } else { p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(m.`, fieldname, `))`) } case protoreflect.BoolKind: if packed { p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(len(m.`, fieldname, `)))`, `+len(m.`, fieldname, `)*1`) } else if repeated { p.P(`n+=`, strconv.Itoa(key+1), `*len(m.`, fieldname, `)`) } else if !oneof && !nullable { p.P(`if m.`, fieldname, ` {`) p.P(`n+=`, strconv.Itoa(key+1)) p.P(`}`) } else { p.P(`n+=`, strconv.Itoa(key+1)) } case protoreflect.StringKind: if repeated { p.P(`for _, s := range m.`, fieldname, ` { `) p.P(`l = len(s)`) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) p.P(`}`) } else if nullable { p.P(`l=len(*m.`, fieldname, `)`) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) } else if !oneof { p.P(`l=len(m.`, fieldname, `)`) p.P(`if l > 0 {`) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) p.P(`}`) } else { p.P(`l=len(m.`, fieldname, `)`) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) } case protoreflect.GroupKind: p.messageSize("m."+fieldname, sizeName, field.Message) p.P(`n+=l+`, strconv.Itoa(2*key)) case protoreflect.MessageKind: if field.Desc.IsMap() { fieldKeySize := generator.KeySize(field.Desc.Number(), generator.ProtoWireType(field.Desc.Kind())) keyKeySize := generator.KeySize(1, generator.ProtoWireType(field.Message.Fields[0].Desc.Kind())) valueKeySize := generator.KeySize(2, generator.ProtoWireType(field.Message.Fields[1].Desc.Kind())) p.P(`for k, v := range m.`, fieldname, ` { `) p.P(`_ = k`) p.P(`_ = v`) sum := []interface{}{strconv.Itoa(keyKeySize)} switch field.Message.Fields[0].Desc.Kind() { case protoreflect.DoubleKind, protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind: sum = append(sum, `8`) case protoreflect.FloatKind, protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind: sum = append(sum, `4`) case protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Uint32Kind, protoreflect.EnumKind, protoreflect.Int32Kind: sum = append(sum, p.Helper("SizeOfVarint"), `(uint64(k))`) case protoreflect.BoolKind: sum = append(sum, `1`) case protoreflect.StringKind, protoreflect.BytesKind: sum = append(sum, `len(k)`, p.Helper("SizeOfVarint"), `(uint64(len(k)))`) case protoreflect.Sint32Kind, protoreflect.Sint64Kind: sum = append(sum, p.Helper("SizeOfZigzag"), `(uint64(k))`) } switch field.Message.Fields[1].Desc.Kind() { case protoreflect.DoubleKind, protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind: sum = append(sum, strconv.Itoa(valueKeySize)) sum = append(sum, strconv.Itoa(8)) case protoreflect.FloatKind, protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind: sum = append(sum, strconv.Itoa(valueKeySize)) sum = append(sum, strconv.Itoa(4)) case protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Uint32Kind, protoreflect.EnumKind, protoreflect.Int32Kind: sum = append(sum, strconv.Itoa(valueKeySize)) sum = append(sum, p.Helper("SizeOfVarint"), `(uint64(v))`) case protoreflect.BoolKind: sum = append(sum, strconv.Itoa(valueKeySize)) sum = append(sum, `1`) case protoreflect.StringKind: sum = append(sum, strconv.Itoa(valueKeySize)) sum = append(sum, `len(v)`, p.Helper("SizeOfVarint"), `(uint64(len(v)))`) case protoreflect.BytesKind: p.P(`l = `, strconv.Itoa(valueKeySize), ` + len(v)+`, p.Helper("SizeOfVarint"), `(uint64(len(v)))`) sum = append(sum, `l`) case protoreflect.Sint32Kind, protoreflect.Sint64Kind: sum = append(sum, strconv.Itoa(valueKeySize)) sum = append(sum, p.Helper("SizeOfZigzag"), `(uint64(v))`) case protoreflect.MessageKind: p.P(`l = 0`) p.P(`if v != nil {`) p.messageSize("v", sizeName, field.Message.Fields[1].Message) p.P(`}`) p.P(`l += `, strconv.Itoa(valueKeySize), ` + `, p.Helper("SizeOfVarint"), `(uint64(l))`) sum = append(sum, `l`) } mapEntrySize := []interface{}{"mapEntrySize := "} for i, elt := range sum { mapEntrySize = append(mapEntrySize, elt) // if elt is not a string, then it is a helper function call if _, ok := elt.(string); ok && i < len(sum)-1 { mapEntrySize = append(mapEntrySize, "+") } } p.P(mapEntrySize...) p.P(`n+=mapEntrySize+`, fieldKeySize, `+`, p.Helper("SizeOfVarint"), `(uint64(mapEntrySize))`) p.P(`}`) } else if field.Desc.IsList() { p.P(`for _, e := range m.`, fieldname, ` { `) p.messageSize("e", sizeName, field.Message) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) p.P(`}`) } else { p.messageSize("m."+fieldname, sizeName, field.Message) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) } case protoreflect.BytesKind: if repeated { p.P(`for _, b := range m.`, fieldname, ` { `) p.P(`l = len(b)`) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) p.P(`}`) } else if !oneof && !field.Desc.HasPresence() { p.P(`l=len(m.`, fieldname, `)`) p.P(`if l > 0 {`) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) p.P(`}`) } else { p.P(`l=len(m.`, fieldname, `)`) p.P(`n+=`, strconv.Itoa(key), `+l+`, p.Helper("SizeOfVarint"), `(uint64(l))`) } case protoreflect.Sint32Kind, protoreflect.Sint64Kind: if packed { p.P(`l = 0`) p.P(`for _, e := range m.`, fieldname, ` {`) p.P(`l+=`, p.Helper("SizeOfZigzag"), `(uint64(e))`) p.P(`}`) p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfVarint"), `(uint64(l))+l`) } else if repeated { p.P(`for _, e := range m.`, fieldname, ` {`) p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfZigzag"), `(uint64(e))`) p.P(`}`) } else if nullable { p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfZigzag"), `(uint64(*m.`, fieldname, `))`) } else if !oneof { p.P(`if m.`, fieldname, ` != 0 {`) p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfZigzag"), `(uint64(m.`, fieldname, `))`) p.P(`}`) } else { p.P(`n+=`, strconv.Itoa(key), `+`, p.Helper("SizeOfZigzag"), `(uint64(m.`, fieldname, `))`) } default: panic("not implemented") } if repeated || nullable { p.P(`}`) } } func (p *size) message(message *protogen.Message) { for _, nested := range message.Messages { p.message(nested) } if message.Desc.IsMapEntry() { return } p.once = true sizeName := "SizeVT" ccTypeName := message.GoIdent.GoName p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`) p.P(`if m == nil {`) p.P(`return 0`) p.P(`}`) p.P(`var l int`) p.P(`_ = l`) oneofs := make(map[string]struct{}) for _, field := range message.Fields { oneof := field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() if !oneof { p.field(false, field, sizeName) } else { fieldname := field.Oneof.GoName if _, ok := oneofs[fieldname]; ok { continue } oneofs[fieldname] = struct{}{} if p.IsWellKnownType(message) { p.P(`switch c := m.`, fieldname, `.(type) {`) for _, f := range field.Oneof.Fields { p.P(`case *`, f.GoIdent, `:`) p.P(`n += (*`, p.WellKnownFieldMap(f), `)(c).`, sizeName, `()`) } p.P(`}`) } else { //if _, ok := oneofs[fieldname]; !ok { //oneofs[fieldname] = struct{}{} p.P(`if vtmsg, ok := m.`, fieldname, `.(interface{ SizeVT() int }); ok {`) p.P(`n+=vtmsg.`, sizeName, `()`) p.P(`}`) } } } if !p.Wrapper() { p.P(`n+=len(m.unknownFields)`) } p.P(`return n`) p.P(`}`) p.P() for _, field := range message.Fields { if field.Oneof == nil || field.Oneof.Desc.IsSynthetic() { continue } ccTypeName := field.GoIdent if p.IsWellKnownType(message) && p.IsLocalMessage(message) { ccTypeName.GoImportPath = "" } p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`) p.P(`if m == nil {`) p.P(`return 0`) p.P(`}`) p.P(`var l int`) p.P(`_ = l`) p.field(true, field, sizeName) p.P(`return n`) p.P(`}`) } } golang-github-planetscale-vtprotobuf-0.6.0/features/unmarshal/000077500000000000000000000000001455570004500245625ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/features/unmarshal/unmarshal.go000066400000000000000000000673721455570004500271220ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Copyright (c) 2013, The GoGo Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package unmarshal import ( "fmt" "strconv" "strings" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/reflect/protoreflect" "github.com/planetscale/vtprotobuf/generator" ) func init() { generator.RegisterFeature("unmarshal", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &unmarshal{GeneratedFile: gen} }) generator.RegisterFeature("unmarshal_unsafe", func(gen *generator.GeneratedFile) generator.FeatureGenerator { return &unmarshal{GeneratedFile: gen, unsafe: true} }) } type unmarshal struct { *generator.GeneratedFile unsafe bool once bool } var _ generator.FeatureGenerator = (*unmarshal)(nil) func (p *unmarshal) GenerateFile(file *protogen.File) bool { proto3 := file.Desc.Syntax() == protoreflect.Proto3 for _, message := range file.Messages { p.message(proto3, message) } return p.once } func (p *unmarshal) methodUnmarshal() string { if p.unsafe { return "UnmarshalVTUnsafe" } return "UnmarshalVT" } func (p *unmarshal) decodeMessage(varName, buf string, message *protogen.Message) { switch { case p.IsWellKnownType(message): p.P(`if err := (*`, p.WellKnownTypeMap(message), `)(`, varName, `).`, p.methodUnmarshal(), `(`, buf, `); err != nil {`) p.P(`return err`) p.P(`}`) case p.IsLocalMessage(message): p.P(`if err := `, varName, `.`, p.methodUnmarshal(), `(`, buf, `); err != nil {`) p.P(`return err`) p.P(`}`) default: p.P(`if unmarshal, ok := interface{}(`, varName, `).(interface{`) p.P(p.methodUnmarshal(), `([]byte) error`) p.P(`}); ok{`) p.P(`if err := unmarshal.`, p.methodUnmarshal(), `(`, buf, `); err != nil {`) p.P(`return err`) p.P(`}`) p.P(`} else {`) p.P(`if err := `, p.Ident(generator.ProtoPkg, "Unmarshal"), `(`, buf, `, `, varName, `); err != nil {`) p.P(`return err`) p.P(`}`) p.P(`}`) } } func (p *unmarshal) decodeVarint(varName string, typName string) { p.P(`for shift := uint(0); ; shift += 7 {`) p.P(`if shift >= 64 {`) p.P(`return `, p.Helper("ErrIntOverflow")) p.P(`}`) p.P(`if iNdEx >= l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) p.P(`b := dAtA[iNdEx]`) p.P(`iNdEx++`) p.P(varName, ` |= `, typName, `(b&0x7F) << shift`) p.P(`if b < 0x80 {`) p.P(`break`) p.P(`}`) p.P(`}`) } func (p *unmarshal) decodeFixed32(varName string, typeName string) { p.P(`if (iNdEx+4) > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) p.P(varName, ` = `, typeName, `(`, p.Ident("encoding/binary", "LittleEndian"), `.Uint32(dAtA[iNdEx:]))`) p.P(`iNdEx += 4`) } func (p *unmarshal) decodeFixed64(varName string, typeName string) { p.P(`if (iNdEx+8) > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) p.P(varName, ` = `, typeName, `(`, p.Ident("encoding/binary", "LittleEndian"), `.Uint64(dAtA[iNdEx:]))`) p.P(`iNdEx += 8`) } func (p *unmarshal) declareMapField(varName string, nullable bool, field *protogen.Field) { switch field.Desc.Kind() { case protoreflect.DoubleKind: p.P(`var `, varName, ` float64`) case protoreflect.FloatKind: p.P(`var `, varName, ` float32`) case protoreflect.Int64Kind: p.P(`var `, varName, ` int64`) case protoreflect.Uint64Kind: p.P(`var `, varName, ` uint64`) case protoreflect.Int32Kind: p.P(`var `, varName, ` int32`) case protoreflect.Fixed64Kind: p.P(`var `, varName, ` uint64`) case protoreflect.Fixed32Kind: p.P(`var `, varName, ` uint32`) case protoreflect.BoolKind: p.P(`var `, varName, ` bool`) case protoreflect.StringKind: p.P(`var `, varName, ` `, field.GoIdent) case protoreflect.MessageKind: msgname := field.GoIdent if nullable { p.P(`var `, varName, ` *`, msgname) } else { p.P(varName, ` := &`, msgname, `{}`) } case protoreflect.BytesKind: p.P(varName, ` := []byte{}`) case protoreflect.Uint32Kind: p.P(`var `, varName, ` uint32`) case protoreflect.EnumKind: p.P(`var `, varName, ` `, field.GoIdent) case protoreflect.Sfixed32Kind: p.P(`var `, varName, ` int32`) case protoreflect.Sfixed64Kind: p.P(`var `, varName, ` int64`) case protoreflect.Sint32Kind: p.P(`var `, varName, ` int32`) case protoreflect.Sint64Kind: p.P(`var `, varName, ` int64`) } } func (p *unmarshal) mapField(varName string, field *protogen.Field) { switch field.Desc.Kind() { case protoreflect.DoubleKind: p.P(`var `, varName, `temp uint64`) p.decodeFixed64(varName+"temp", "uint64") p.P(varName, ` = `, p.Ident("math", "Float64frombits"), `(`, varName, `temp)`) case protoreflect.FloatKind: p.P(`var `, varName, `temp uint32`) p.decodeFixed32(varName+"temp", "uint32") p.P(varName, ` = `, p.Ident("math", "Float32frombits"), `(`, varName, `temp)`) case protoreflect.Int64Kind: p.decodeVarint(varName, "int64") case protoreflect.Uint64Kind: p.decodeVarint(varName, "uint64") case protoreflect.Int32Kind: p.decodeVarint(varName, "int32") case protoreflect.Fixed64Kind: p.decodeFixed64(varName, "uint64") case protoreflect.Fixed32Kind: p.decodeFixed32(varName, "uint32") case protoreflect.BoolKind: p.P(`var `, varName, `temp int`) p.decodeVarint(varName+"temp", "int") p.P(varName, ` = bool(`, varName, `temp != 0)`) case protoreflect.StringKind: 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.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`postStringIndex`, varName, ` := iNdEx + intStringLen`, varName) p.P(`if postStringIndex`, varName, ` < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if postStringIndex`, varName, ` > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) if p.unsafe { p.P(`if intStringLen`, varName, ` == 0 {`) p.P(varName, ` = ""`) p.P(`} else {`) p.P(varName, ` = `, p.Ident("unsafe", `String`), `(&dAtA[iNdEx], intStringLen`, varName, `)`) p.P(`}`) } else { p.P(varName, ` = `, "string", `(dAtA[iNdEx:postStringIndex`, varName, `])`) } p.P(`iNdEx = postStringIndex`, varName) case protoreflect.MessageKind: p.P(`var mapmsglen int`) p.decodeVarint("mapmsglen", "int") p.P(`if mapmsglen < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`postmsgIndex := iNdEx + mapmsglen`) p.P(`if postmsgIndex < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if postmsgIndex > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) buf := `dAtA[iNdEx:postmsgIndex]` p.P(varName, ` = &`, p.noStarOrSliceType(field), `{}`) p.decodeMessage(varName, buf, field.Message) p.P(`iNdEx = postmsgIndex`) case protoreflect.BytesKind: p.P(`var mapbyteLen uint64`) p.decodeVarint("mapbyteLen", "uint64") p.P(`intMapbyteLen := int(mapbyteLen)`) p.P(`if intMapbyteLen < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`postbytesIndex := iNdEx + intMapbyteLen`) p.P(`if postbytesIndex < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if postbytesIndex > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) if p.unsafe { p.P(varName, ` = dAtA[iNdEx:postbytesIndex]`) } else { p.P(varName, ` = make([]byte, mapbyteLen)`) p.P(`copy(`, varName, `, dAtA[iNdEx:postbytesIndex])`) } p.P(`iNdEx = postbytesIndex`) case protoreflect.Uint32Kind: p.decodeVarint(varName, "uint32") case protoreflect.EnumKind: goTypV, _ := p.FieldGoType(field) p.decodeVarint(varName, goTypV) case protoreflect.Sfixed32Kind: p.decodeFixed32(varName, "int32") case protoreflect.Sfixed64Kind: p.decodeFixed64(varName, "int64") case protoreflect.Sint32Kind: 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 protoreflect.Sint64Kind: 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(field *protogen.Field) string { typ, _ := p.FieldGoType(field) if typ[0] == '[' && typ[1] == ']' { typ = typ[2:] } if typ[0] == '*' { typ = typ[1:] } return typ } func (p *unmarshal) fieldItem(field *protogen.Field, fieldname string, message *protogen.Message, proto3 bool) { repeated := field.Desc.Cardinality() == protoreflect.Repeated typ := p.noStarOrSliceType(field) oneof := field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() nullable := field.Oneof != nil && field.Oneof.Desc.IsSynthetic() switch field.Desc.Kind() { case protoreflect.DoubleKind: p.P(`var v uint64`) p.decodeFixed64("v", "uint64") if oneof { p.P(`m.`, fieldname, ` = &`, field.GoIdent, `{`, field.GoName, ": ", typ, "(", p.Ident("math", `Float64frombits`), `(v))}`) } else if repeated { p.P(`v2 := `, typ, "(", p.Ident("math", "Float64frombits"), `(v))`) p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) } else if proto3 && !nullable { p.P(`m.`, fieldname, ` = `, typ, "(", p.Ident("math", "Float64frombits"), `(v))`) } else { p.P(`v2 := `, typ, "(", p.Ident("math", "Float64frombits"), `(v))`) p.P(`m.`, fieldname, ` = &v2`) } case protoreflect.FloatKind: p.P(`var v uint32`) p.decodeFixed32("v", "uint32") if oneof { p.P(`m.`, fieldname, ` = &`, field.GoIdent, `{`, field.GoName, ": ", typ, "(", p.Ident("math", "Float32frombits"), `(v))}`) } else if repeated { p.P(`v2 := `, typ, "(", p.Ident("math", "Float32frombits"), `(v))`) p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) } else if proto3 && !nullable { p.P(`m.`, fieldname, ` = `, typ, "(", p.Ident("math", "Float32frombits"), `(v))`) } else { p.P(`v2 := `, typ, "(", p.Ident("math", "Float32frombits"), `(v))`) p.P(`m.`, fieldname, ` = &v2`) } case protoreflect.Int64Kind: if oneof { p.P(`var v `, typ) p.decodeVarint("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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 protoreflect.Uint64Kind: if oneof { p.P(`var v `, typ) p.decodeVarint("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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 protoreflect.Int32Kind: if oneof { p.P(`var v `, typ) p.decodeVarint("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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 protoreflect.Fixed64Kind: if oneof { p.P(`var v `, typ) p.decodeFixed64("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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`) } case protoreflect.Fixed32Kind: if oneof { p.P(`var v `, typ) p.decodeFixed32("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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`) } case protoreflect.BoolKind: p.P(`var v int`) p.decodeVarint("v", "int") if oneof { p.P(`b := `, typ, `(v != 0)`) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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 protoreflect.StringKind: p.P(`var stringLen uint64`) p.decodeVarint("stringLen", "uint64") p.P(`intStringLen := int(stringLen)`) p.P(`if intStringLen < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`postIndex := iNdEx + intStringLen`) p.P(`if postIndex < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if postIndex > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) str := "string(dAtA[iNdEx:postIndex])" if p.unsafe { str = "stringValue" p.P(`var stringValue string`) p.P(`if intStringLen > 0 {`) p.P(`stringValue = `, p.Ident("unsafe", `String`), `(&dAtA[iNdEx], intStringLen)`) p.P(`}`) } if oneof { p.P(`m.`, fieldname, ` = &`, field.GoIdent, `{`, field.GoName, ": ", str, `}`) } else if repeated { p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, str, `)`) } else if proto3 && !nullable { p.P(`m.`, fieldname, ` = `, str) } else { p.P(`s := `, str) p.P(`m.`, fieldname, ` = &s`) } p.P(`iNdEx = postIndex`) case protoreflect.GroupKind: p.P(`groupStart := iNdEx`) p.P(`for {`) p.P(`maybeGroupEnd := iNdEx`) p.P(`var groupFieldWire uint64`) p.decodeVarint("groupFieldWire", "uint64") p.P(`groupWireType := int(wire & 0x7)`) p.P(`if groupWireType == `, strconv.Itoa(int(protowire.EndGroupType)), `{`) p.decodeMessage("m."+fieldname, "dAtA[groupStart:maybeGroupEnd]", field.Message) p.P(`break`) p.P(`}`) p.P(`skippy, err := `, p.Helper("Skip"), `(dAtA[iNdEx:])`) p.P(`if err != nil {`) p.P(`return err`) p.P(`}`) p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`iNdEx += skippy`) p.P(`}`) case protoreflect.MessageKind: p.P(`var msglen int`) p.decodeVarint("msglen", "int") p.P(`if msglen < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`postIndex := iNdEx + msglen`) p.P(`if postIndex < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if postIndex > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) if oneof { buf := `dAtA[iNdEx:postIndex]` msgname := p.noStarOrSliceType(field) p.P(`if oneof, ok := m.`, fieldname, `.(*`, field.GoIdent, `); ok {`) p.decodeMessage("oneof."+field.GoName, buf, field.Message) p.P(`} else {`) if p.ShouldPool(message) && p.ShouldPool(field.Message) { p.P(`v := `, msgname, `FromVTPool()`) } else { p.P(`v := &`, msgname, `{}`) } p.decodeMessage("v", buf, field.Message) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: v}`) p.P(`}`) } else if field.Desc.IsMap() { goTyp, _ := p.FieldGoType(field) goTypK, _ := p.FieldGoType(field.Message.Fields[0]) goTypV, _ := p.FieldGoType(field.Message.Fields[1]) p.P(`if m.`, fieldname, ` == nil {`) p.P(`m.`, fieldname, ` = make(`, goTyp, `)`) p.P(`}`) p.P("var mapkey ", goTypK) p.P("var mapvalue ", goTypV) p.P(`for iNdEx < postIndex {`) p.P(`entryPreIndex := iNdEx`) p.P(`var wire uint64`) p.decodeVarint("wire", "uint64") p.P(`fieldNum := int32(wire >> 3)`) p.P(`if fieldNum == 1 {`) p.mapField("mapkey", field.Message.Fields[0]) p.P(`} else if fieldNum == 2 {`) p.mapField("mapvalue", field.Message.Fields[1]) p.P(`} else {`) p.P(`iNdEx = entryPreIndex`) p.P(`skippy, err := `, p.Helper("Skip"), `(dAtA[iNdEx:])`) p.P(`if err != nil {`) p.P(`return err`) p.P(`}`) p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if (iNdEx + skippy) > postIndex {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) p.P(`iNdEx += skippy`) p.P(`}`) p.P(`}`) p.P(`m.`, fieldname, `[mapkey] = mapvalue`) } else if repeated { if p.ShouldPool(message) { p.P(`if len(m.`, fieldname, `) == cap(m.`, fieldname, `) {`) p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, &`, field.Message.GoIdent, `{})`) p.P(`} else {`) p.P(`m.`, fieldname, ` = m.`, fieldname, `[:len(m.`, fieldname, `) + 1]`) p.P(`if m.`, fieldname, `[len(m.`, fieldname, `) - 1] == nil {`) p.P(`m.`, fieldname, `[len(m.`, fieldname, `) - 1] = &`, field.Message.GoIdent, `{}`) p.P(`}`) p.P(`}`) } else { p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, &`, field.Message.GoIdent, `{})`) } varname := fmt.Sprintf("m.%s[len(m.%s) - 1]", fieldname, fieldname) buf := `dAtA[iNdEx:postIndex]` p.decodeMessage(varname, buf, field.Message) } else { p.P(`if m.`, fieldname, ` == nil {`) if p.ShouldPool(message) && p.ShouldPool(field.Message) { p.P(`m.`, fieldname, ` = `, field.Message.GoIdent, `FromVTPool()`) } else { p.P(`m.`, fieldname, ` = &`, field.Message.GoIdent, `{}`) } p.P(`}`) p.decodeMessage("m."+fieldname, "dAtA[iNdEx:postIndex]", field.Message) } p.P(`iNdEx = postIndex`) case protoreflect.BytesKind: p.P(`var byteLen int`) p.decodeVarint("byteLen", "int") p.P(`if byteLen < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`postIndex := iNdEx + byteLen`) p.P(`if postIndex < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if postIndex > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) if oneof { if p.unsafe { p.P(`v := dAtA[iNdEx:postIndex]`) } else { p.P(`v := make([]byte, postIndex-iNdEx)`) p.P(`copy(v, dAtA[iNdEx:postIndex])`) } p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: v}`) } else if repeated { if p.unsafe { p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, dAtA[iNdEx:postIndex])`) } else { p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, make([]byte, postIndex-iNdEx))`) p.P(`copy(m.`, fieldname, `[len(m.`, fieldname, `)-1], dAtA[iNdEx:postIndex])`) } } else { if p.unsafe { p.P(`m.`, fieldname, ` = dAtA[iNdEx:postIndex]`) } else { p.P(`m.`, fieldname, ` = append(m.`, fieldname, `[:0] , dAtA[iNdEx:postIndex]...)`) p.P(`if m.`, fieldname, ` == nil {`) p.P(`m.`, fieldname, ` = []byte{}`) p.P(`}`) } } p.P(`iNdEx = postIndex`) case protoreflect.Uint32Kind: if oneof { p.P(`var v `, typ) p.decodeVarint("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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 protoreflect.EnumKind: if oneof { p.P(`var v `, typ) p.decodeVarint("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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 protoreflect.Sfixed32Kind: if oneof { p.P(`var v `, typ) p.decodeFixed32("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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`) } case protoreflect.Sfixed64Kind: if oneof { p.P(`var v `, typ) p.decodeFixed64("v", typ) p.P(`m.`, fieldname, ` = &`, field.GoIdent, "{", field.GoName, `: 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`) } case protoreflect.Sint32Kind: 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, ` = &`, field.GoIdent, "{", field.GoName, `: 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 protoreflect.Sint64Kind: 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, ` = &`, field.GoIdent, `{`, field.GoName, ": ", 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) field(proto3, oneof bool, field *protogen.Field, message *protogen.Message, required protoreflect.FieldNumbers) { fieldname := field.GoName errFieldname := fieldname if field.Oneof != nil && !field.Oneof.Desc.IsSynthetic() { fieldname = field.Oneof.GoName } p.P(`case `, strconv.Itoa(int(field.Desc.Number())), `:`) wireType := generator.ProtoWireType(field.Desc.Kind()) if field.Desc.IsList() && wireType != protowire.BytesType { p.P(`if wireType == `, strconv.Itoa(int(wireType)), `{`) p.fieldItem(field, fieldname, message, false) p.P(`} else if wireType == `, strconv.Itoa(int(protowire.BytesType)), `{`) p.P(`var packedLen int`) p.decodeVarint("packedLen", "int") p.P(`if packedLen < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`postIndex := iNdEx + packedLen`) p.P(`if postIndex < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if postIndex > l {`) p.P(`return `, p.Ident("io", "ErrUnexpectedEOF")) p.P(`}`) p.P(`var elementCount int`) switch field.Desc.Kind() { case protoreflect.DoubleKind, protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind: p.P(`elementCount = packedLen/`, 8) case protoreflect.FloatKind, protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind: p.P(`elementCount = packedLen/`, 4) case protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.Sint32Kind, protoreflect.Sint64Kind: p.P(`var count int`) p.P(`for _, integer := range dAtA[iNdEx:postIndex] {`) p.P(`if integer < 128 {`) p.P(`count++`) p.P(`}`) p.P(`}`) p.P(`elementCount = count`) case protoreflect.BoolKind: p.P(`elementCount = packedLen`) } if p.ShouldPool(message) { p.P(`if elementCount != 0 && len(m.`, fieldname, `) == 0 && cap(m.`, fieldname, `) < elementCount {`) } else { p.P(`if elementCount != 0 && len(m.`, fieldname, `) == 0 {`) } fieldtyp, _ := p.FieldGoType(field) p.P(`m.`, fieldname, ` = make(`, fieldtyp, `, 0, elementCount)`) p.P(`}`) p.P(`for iNdEx < postIndex {`) p.fieldItem(field, fieldname, message, false) p.P(`}`) p.P(`} else {`) p.P(`return `, p.Ident("fmt", "Errorf"), `("proto: wrong wireType = %d for field `, errFieldname, `", wireType)`) p.P(`}`) } else { p.P(`if wireType != `, strconv.Itoa(int(wireType)), `{`) p.P(`return `, p.Ident("fmt", "Errorf"), `("proto: wrong wireType = %d for field `, errFieldname, `", wireType)`) p.P(`}`) p.fieldItem(field, fieldname, message, proto3) } if field.Desc.Cardinality() == protoreflect.Required { var fieldBit int for fieldBit = 0; fieldBit < required.Len(); fieldBit++ { if required.Get(fieldBit) == field.Desc.Number() { break } } if fieldBit == required.Len() { panic("missing required field") } p.P(`hasFields[`, strconv.Itoa(fieldBit/64), `] |= uint64(`, fmt.Sprintf("0x%08x", uint64(1)<<(fieldBit%64)), `)`) } } func (p *unmarshal) message(proto3 bool, message *protogen.Message) { for _, nested := range message.Messages { p.message(proto3, nested) } if message.Desc.IsMapEntry() { return } p.once = true ccTypeName := message.GoIdent.GoName required := message.Desc.RequiredNumbers() p.P(`func (m *`, ccTypeName, `) `, p.methodUnmarshal(), `(dAtA []byte) error {`) if required.Len() > 0 { p.P(`var hasFields [`, strconv.Itoa(1+(required.Len()-1)/64), `]uint64`) } p.P(`l := len(dAtA)`) p.P(`iNdEx := 0`) p.P(`for iNdEx < l {`) p.P(`preIndex := iNdEx`) p.P(`var wire uint64`) p.decodeVarint("wire", "uint64") p.P(`fieldNum := int32(wire >> 3)`) p.P(`wireType := int(wire & 0x7)`) p.P(`if wireType == `, strconv.Itoa(int(protowire.EndGroupType)), ` {`) p.P(`return `, p.Ident("fmt", "Errorf"), `("proto: `, message.GoIdent.GoName, `: wiretype end group for non-group")`) p.P(`}`) p.P(`if fieldNum <= 0 {`) p.P(`return `, p.Ident("fmt", "Errorf"), `("proto: `, message.GoIdent.GoName, `: illegal tag %d (wire type %d)", fieldNum, wire)`) p.P(`}`) p.P(`switch fieldNum {`) for _, field := range message.Fields { p.field(proto3, false, field, message, required) } p.P(`default:`) p.P(`iNdEx=preIndex`) p.P(`skippy, err := `, p.Helper("Skip"), `(dAtA[iNdEx:])`) p.P(`if err != nil {`) p.P(`return err`) p.P(`}`) p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`) p.P(`return `, p.Helper("ErrInvalidLength")) p.P(`}`) p.P(`if (iNdEx + skippy) > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) if message.Desc.ExtensionRanges().Len() > 0 { c := []string{} eranges := message.Desc.ExtensionRanges() for e := 0; e < eranges.Len(); e++ { erange := eranges.Get(e) c = append(c, `((fieldNum >= `+strconv.Itoa(int(erange[0]))+`) && (fieldNum < `+strconv.Itoa(int(erange[1]))+`))`) } p.P(`if `, strings.Join(c, "||"), `{`) p.P(`err = `, p.Ident(generator.ProtoPkg, "UnmarshalOptions"), `{AllowPartial: true}.Unmarshal(dAtA[iNdEx:iNdEx+skippy], m)`) p.P(`if err != nil {`) p.P(`return err`) p.P(`}`) p.P(`iNdEx += skippy`) p.P(`} else {`) } if !p.Wrapper() { p.P(`m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)`) } p.P(`iNdEx += skippy`) if message.Desc.ExtensionRanges().Len() > 0 { p.P(`}`) } p.P(`}`) p.P(`}`) for _, field := range message.Fields { if field.Desc.Cardinality() != protoreflect.Required { continue } var fieldBit int for fieldBit = 0; fieldBit < required.Len(); fieldBit++ { if required.Get(fieldBit) == field.Desc.Number() { break } } if fieldBit == required.Len() { panic("missing required field") } p.P(`if hasFields[`, strconv.Itoa(int(fieldBit/64)), `] & uint64(`, fmt.Sprintf("0x%08x", uint64(1)<<(fieldBit%64)), `) == 0 {`) p.P(`return `, p.Ident("fmt", "Errorf"), `("proto: required field `, field.Desc.Name(), ` not set")`) p.P(`}`) } p.P() p.P(`if iNdEx > l {`) p.P(`return `, p.Ident("io", `ErrUnexpectedEOF`)) p.P(`}`) p.P(`return nil`) p.P(`}`) } golang-github-planetscale-vtprotobuf-0.6.0/generator/000077500000000000000000000000001455570004500227405ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/generator/features.go000066400000000000000000000023211455570004500251030ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package generator import ( "fmt" "sort" "google.golang.org/protobuf/compiler/protogen" ) var defaultFeatures = make(map[string]Feature) func findFeatures(featureNames []string) ([]Feature, error) { required := make(map[string]Feature) for _, name := range featureNames { if name == "all" { required = defaultFeatures break } feat, ok := defaultFeatures[name] if !ok { return nil, fmt.Errorf("unknown feature: %q", name) } required[name] = feat } type namefeat struct { name string feat Feature } var sorted []namefeat for name, feat := range required { sorted = append(sorted, namefeat{name, feat}) } sort.Slice(sorted, func(i, j int) bool { return sorted[i].name < sorted[j].name }) var features []Feature for _, sp := range sorted { features = append(features, sp.feat) } return features, nil } func RegisterFeature(name string, feat Feature) { defaultFeatures[name] = feat } type Feature func(gen *GeneratedFile) FeatureGenerator type FeatureGenerator interface { GenerateFile(file *protogen.File) bool } golang-github-planetscale-vtprotobuf-0.6.0/generator/generatedfile.go000066400000000000000000000165731455570004500261010ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package generator import ( "fmt" "github.com/planetscale/vtprotobuf/vtproto" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" ) type GeneratedFile struct { *protogen.GeneratedFile Config *Config LocalPackages map[protoreflect.FullName]bool } func (p *GeneratedFile) Ident(path, ident string) string { return p.QualifiedGoIdent(protogen.GoImportPath(path).Ident(ident)) } func (b *GeneratedFile) ShouldPool(message *protogen.Message) bool { // Do not generate pool if message is nil or message excluded by external rules if message == nil || b.Config.PoolableExclude.Contains(message.GoIdent) { return false } if b.Config.Poolable.Contains(message.GoIdent) { return true } ext := proto.GetExtension(message.Desc.Options(), vtproto.E_Mempool) if mempool, ok := ext.(bool); ok { return mempool } return false } func (b *GeneratedFile) Alloc(vname string, message *protogen.Message, isQualifiedIdent bool) { ident := message.GoIdent.GoName if isQualifiedIdent { ident = b.QualifiedGoIdent(message.GoIdent) } if b.ShouldPool(message) { b.P(vname, " := ", ident, `FromVTPool()`) } else { b.P(vname, " := new(", ident, `)`) } } func (p *GeneratedFile) FieldGoType(field *protogen.Field) (goType string, pointer bool) { if field.Desc.IsWeak() { return "struct{}", false } pointer = field.Desc.HasPresence() switch field.Desc.Kind() { case protoreflect.BoolKind: goType = "bool" case protoreflect.EnumKind: goType = p.QualifiedGoIdent(field.Enum.GoIdent) case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: goType = "int32" case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: goType = "uint32" case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: goType = "int64" case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: goType = "uint64" case protoreflect.FloatKind: goType = "float32" case protoreflect.DoubleKind: goType = "float64" case protoreflect.StringKind: goType = "string" case protoreflect.BytesKind: goType = "[]byte" pointer = false // rely on nullability of slices for presence case protoreflect.MessageKind, protoreflect.GroupKind: goType = "*" + p.QualifiedGoIdent(field.Message.GoIdent) pointer = false // pointer captured as part of the type } switch { case field.Desc.IsList(): return "[]" + goType, false case field.Desc.IsMap(): keyType, _ := p.FieldGoType(field.Message.Fields[0]) valType, _ := p.FieldGoType(field.Message.Fields[1]) return fmt.Sprintf("map[%v]%v", keyType, valType), false } return goType, pointer } func (p *GeneratedFile) IsLocalMessage(message *protogen.Message) bool { if message == nil { return false } pkg := message.Desc.ParentFile().Package() return p.LocalPackages[pkg] } func (p *GeneratedFile) IsLocalField(field *protogen.Field) bool { if field == nil { return false } pkg := field.Desc.ParentFile().Package() return p.LocalPackages[pkg] } const vtHelpersPackage = protogen.GoImportPath("github.com/planetscale/vtprotobuf/protohelpers") var helpers = map[string]protogen.GoIdent{ "EncodeVarint": {GoName: "EncodeVarint", GoImportPath: vtHelpersPackage}, "SizeOfVarint": {GoName: "SizeOfVarint", GoImportPath: vtHelpersPackage}, "SizeOfZigzag": {GoName: "SizeOfZigzag", GoImportPath: vtHelpersPackage}, "Skip": {GoName: "Skip", GoImportPath: vtHelpersPackage}, "ErrInvalidLength": {GoName: "ErrInvalidLength", GoImportPath: vtHelpersPackage}, "ErrIntOverflow": {GoName: "ErrIntOverflow", GoImportPath: vtHelpersPackage}, "ErrUnexpectedEndOfGroup": {GoName: "ErrUnexpectedEndOfGroup", GoImportPath: vtHelpersPackage}, } func (p *GeneratedFile) Helper(name string) protogen.GoIdent { return helpers[name] } const vtWellKnownPackage = protogen.GoImportPath("github.com/planetscale/vtprotobuf/types/known/") var wellKnownTypes = map[protoreflect.FullName]protogen.GoIdent{ "google.protobuf.Any": {GoName: "Any", GoImportPath: vtWellKnownPackage + "anypb"}, "google.protobuf.Duration": {GoName: "Duration", GoImportPath: vtWellKnownPackage + "durationpb"}, "google.protobuf.Empty": {GoName: "Empty", GoImportPath: vtWellKnownPackage + "emptypb"}, "google.protobuf.FieldMask": {GoName: "FieldMask", GoImportPath: vtWellKnownPackage + "fieldmaskpb"}, "google.protobuf.Timestamp": {GoName: "Timestamp", GoImportPath: vtWellKnownPackage + "timestamppb"}, "google.protobuf.DoubleValue": {GoName: "DoubleValue", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.FloatValue": {GoName: "FloatValue", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.Int64Value": {GoName: "Int64Value", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.UInt64Value": {GoName: "UInt64Value", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.Int32Value": {GoName: "Int32Value", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.UInt32Value": {GoName: "UInt32Value", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.BoolValue": {GoName: "BoolValue", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.StringValue": {GoName: "StringValue", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.BytesValue": {GoName: "BytesValue", GoImportPath: vtWellKnownPackage + "wrapperspb"}, "google.protobuf.Struct": {GoName: "Struct", GoImportPath: vtWellKnownPackage + "structpb"}, "google.protobuf.Value": {GoName: "Value", GoImportPath: vtWellKnownPackage + "structpb"}, "google.protobuf.ListValue": {GoName: "ListValue", GoImportPath: vtWellKnownPackage + "structpb"}, } var wellKnownFields = map[protoreflect.FullName]protogen.GoIdent{ "google.protobuf.Value.null_value": {GoName: "Value_NullValue", GoImportPath: vtWellKnownPackage + "structpb"}, "google.protobuf.Value.number_value": {GoName: "Value_NumberValue", GoImportPath: vtWellKnownPackage + "structpb"}, "google.protobuf.Value.string_value": {GoName: "Value_StringValue", GoImportPath: vtWellKnownPackage + "structpb"}, "google.protobuf.Value.bool_value": {GoName: "Value_BoolValue", GoImportPath: vtWellKnownPackage + "structpb"}, "google.protobuf.Value.struct_value": {GoName: "Value_StructValue", GoImportPath: vtWellKnownPackage + "structpb"}, "google.protobuf.Value.list_value": {GoName: "Value_ListValue", GoImportPath: vtWellKnownPackage + "structpb"}, } func (p *GeneratedFile) IsWellKnownType(message *protogen.Message) bool { if message == nil { return false } _, ok := wellKnownTypes[message.Desc.FullName()] return ok } func (p *GeneratedFile) WellKnownFieldMap(field *protogen.Field) protogen.GoIdent { if field == nil { return protogen.GoIdent{} } res, ff := wellKnownFields[field.Desc.FullName()] if !ff { panic(field.Desc.FullName()) } if p.IsLocalField(field) { res.GoImportPath = "" } return res } func (p *GeneratedFile) WellKnownTypeMap(message *protogen.Message) protogen.GoIdent { if message == nil { return protogen.GoIdent{} } res := wellKnownTypes[message.Desc.FullName()] if p.IsLocalMessage(message) { res.GoImportPath = "" } return res } func (p *GeneratedFile) Wrapper() bool { return p.Config.Wrap } golang-github-planetscale-vtprotobuf-0.6.0/generator/generator.go000066400000000000000000000100401455570004500252500ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package generator import ( "fmt" "runtime/debug" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoimpl" "google.golang.org/protobuf/types/pluginpb" "github.com/planetscale/vtprotobuf/generator/pattern" ) type ObjectSet struct { mp map[string]bool } func NewObjectSet() ObjectSet { return ObjectSet{ mp: map[string]bool{}, } } func (o ObjectSet) String() string { return fmt.Sprintf("%#v", o) } func (o ObjectSet) Contains(g protogen.GoIdent) bool { objectPath := fmt.Sprintf("%s.%s", string(g.GoImportPath), g.GoName) for wildcard := range o.mp { // Ignore malformed pattern error because pattern already checked in Set if ok, _ := pattern.Match(wildcard, objectPath); ok { return true } } return false } func (o ObjectSet) Set(s string) error { if !pattern.ValidatePattern(s) { return pattern.ErrBadPattern } o.mp[s] = true return nil } type Config struct { // Poolable rules determines if pool feature generate for particular message Poolable ObjectSet // PoolableExclude rules determines if pool feature disabled for particular message PoolableExclude ObjectSet Wrap bool WellKnownTypes bool AllowEmpty bool BuildTag string } type Generator struct { plugin *protogen.Plugin cfg *Config features []Feature local map[protoreflect.FullName]bool } const SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) func NewGenerator(plugin *protogen.Plugin, featureNames []string, cfg *Config) (*Generator, error) { plugin.SupportedFeatures = SupportedFeatures features, err := findFeatures(featureNames) if err != nil { return nil, err } local := make(map[protoreflect.FullName]bool) for _, f := range plugin.Files { if f.Generate { local[f.Desc.Package()] = true } } return &Generator{ plugin: plugin, cfg: cfg, features: features, local: local, }, nil } func (gen *Generator) Generate() { for _, file := range gen.plugin.Files { if !file.Generate { continue } var importPath protogen.GoImportPath if !gen.cfg.Wrap { importPath = file.GoImportPath } gf := gen.plugin.NewGeneratedFile(file.GeneratedFilenamePrefix+"_vtproto.pb.go", importPath) gen.generateFile(gf, file) } } func (gen *Generator) generateFile(gf *protogen.GeneratedFile, file *protogen.File) { p := &GeneratedFile{ GeneratedFile: gf, Config: gen.cfg, LocalPackages: gen.local, } if p.Config.BuildTag != "" { // Support both forms of tags for maximum compatibility p.P("//go:build ", p.Config.BuildTag) p.P("// +build ", p.Config.BuildTag) } p.P("// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.") if bi, ok := debug.ReadBuildInfo(); ok { p.P("// protoc-gen-go-vtproto version: ", bi.Main.Version) } p.P("// source: ", file.Desc.Path()) p.P() p.P("package ", file.GoPackageName) p.P() protoimplPackage := protogen.GoImportPath("google.golang.org/protobuf/runtime/protoimpl") p.P("const (") p.P("// Verify that this generated code is sufficiently up-to-date.") p.P("_ = ", protoimplPackage.Ident("EnforceVersion"), "(", protoimpl.GenVersion, " - ", protoimplPackage.Ident("MinVersion"), ")") p.P("// Verify that runtime/protoimpl is sufficiently up-to-date.") p.P("_ = ", protoimplPackage.Ident("EnforceVersion"), "(", protoimplPackage.Ident("MaxVersion"), " - ", protoimpl.GenVersion, ")") p.P(")") p.P() if p.Wrapper() { for _, msg := range file.Messages { p.P(`type `, msg.GoIdent.GoName, ` `, msg.GoIdent) for _, one := range msg.Oneofs { for _, field := range one.Fields { p.P(`type `, field.GoIdent.GoName, ` `, field.GoIdent) } } } } var generated bool for _, feat := range gen.features { featGenerator := feat(p) if featGenerator.GenerateFile(file) { generated = true } } if !generated && !gen.cfg.AllowEmpty { gf.Skip() } } golang-github-planetscale-vtprotobuf-0.6.0/generator/helpers.go000066400000000000000000000031041455570004500247270ustar00rootroot00000000000000// Copyright (c) 2021 PlanetScale Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package generator import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/reflect/protoreflect" ) const ProtoPkg = "google.golang.org/protobuf/proto" func KeySize(fieldNumber protoreflect.FieldNumber, wireType protowire.Type) int { x := uint32(fieldNumber)<<3 | uint32(wireType) size := 0 for size = 0; x > 127; size++ { x >>= 7 } size++ return size } var wireTypes = map[protoreflect.Kind]protowire.Type{ protoreflect.BoolKind: protowire.VarintType, protoreflect.EnumKind: protowire.VarintType, protoreflect.Int32Kind: protowire.VarintType, protoreflect.Sint32Kind: protowire.VarintType, protoreflect.Uint32Kind: protowire.VarintType, protoreflect.Int64Kind: protowire.VarintType, protoreflect.Sint64Kind: protowire.VarintType, protoreflect.Uint64Kind: protowire.VarintType, protoreflect.Sfixed32Kind: protowire.Fixed32Type, protoreflect.Fixed32Kind: protowire.Fixed32Type, protoreflect.FloatKind: protowire.Fixed32Type, protoreflect.Sfixed64Kind: protowire.Fixed64Type, protoreflect.Fixed64Kind: protowire.Fixed64Type, protoreflect.DoubleKind: protowire.Fixed64Type, protoreflect.StringKind: protowire.BytesType, protoreflect.BytesKind: protowire.BytesType, protoreflect.MessageKind: protowire.BytesType, protoreflect.GroupKind: protowire.StartGroupType, } func ProtoWireType(k protoreflect.Kind) protowire.Type { return wireTypes[k] } golang-github-planetscale-vtprotobuf-0.6.0/generator/pattern/000077500000000000000000000000001455570004500244155ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/generator/pattern/LICENSE000066400000000000000000000020651455570004500254250ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2014 Bob Matcuk 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. golang-github-planetscale-vtprotobuf-0.6.0/generator/pattern/match.go000066400000000000000000000307461455570004500260520ustar00rootroot00000000000000package pattern import ( "path" "unicode/utf8" ) var ErrBadPattern = path.ErrBadPattern // Match reports whether name matches the shell pattern. // The pattern syntax is: // // pattern: // { term } // term: // '*' matches any sequence of non-path-separators // '/**/' matches zero or more directories // '?' matches any single non-path-separator character // '[' [ '^' '!' ] { character-range } ']' // character class (must be non-empty) // starting with `^` or `!` negates the class // '{' { term } [ ',' { term } ... ] '}' // alternatives // c matches character c (c != '*', '?', '\\', '[') // '\\' c matches character c // // character-range: // c matches character c (c != '\\', '-', ']') // '\\' c matches character c // lo '-' hi matches character c for lo <= c <= hi // // Match returns true if `name` matches the file name `pattern`. `name` and // `pattern` are split on forward slash (`/`) characters and may be relative or // absolute. // // Match requires pattern to match all of name, not just a substring. // The only possible returned error is ErrBadPattern, when pattern // is malformed. // // A doublestar (`**`) should appear surrounded by path separators such as // `/**/`. A mid-pattern doublestar (`**`) behaves like bash's globstar // option: a pattern such as `path/to/**.txt` would return the same results as // `path/to/*.txt`. The pattern you're looking for is `path/to/**/*.txt`. // // Note: this is meant as a drop-in replacement for path.Match() which // always uses '/' as the path separator. If you want to support systems // which use a different path separator (such as Windows), what you want // is PathMatch(). Alternatively, you can run filepath.ToSlash() on both // pattern and name and then use this function. // // Note: users should _not_ count on the returned error, // doublestar.ErrBadPattern, being equal to path.ErrBadPattern. func Match(pattern, name string) (bool, error) { return matchWithSeparator(pattern, name, '/', true) } func matchWithSeparator(pattern, name string, separator rune, validate bool) (matched bool, err error) { return doMatchWithSeparator(pattern, name, separator, validate, -1, -1, -1, -1, 0, 0) } func doMatchWithSeparator(pattern, name string, separator rune, validate bool, doublestarPatternBacktrack, doublestarNameBacktrack, starPatternBacktrack, starNameBacktrack, patIdx, nameIdx int) (matched bool, err error) { patLen := len(pattern) nameLen := len(name) startOfSegment := true MATCH: for nameIdx < nameLen { if patIdx < patLen { switch pattern[patIdx] { case '*': if patIdx++; patIdx < patLen && pattern[patIdx] == '*' { // doublestar - must begin with a path separator, otherwise we'll // treat it like a single star like bash patIdx++ if startOfSegment { if patIdx >= patLen { // pattern ends in `/**`: return true return true, nil } // doublestar must also end with a path separator, otherwise we're // just going to treat the doublestar as a single star like bash patRune, patRuneLen := utf8.DecodeRuneInString(pattern[patIdx:]) if patRune == separator { patIdx += patRuneLen doublestarPatternBacktrack = patIdx doublestarNameBacktrack = nameIdx starPatternBacktrack = -1 starNameBacktrack = -1 continue } } } startOfSegment = false starPatternBacktrack = patIdx starNameBacktrack = nameIdx continue case '?': startOfSegment = false nameRune, nameRuneLen := utf8.DecodeRuneInString(name[nameIdx:]) if nameRune == separator { // `?` cannot match the separator break } patIdx++ nameIdx += nameRuneLen continue case '[': startOfSegment = false if patIdx++; patIdx >= patLen { // class didn't end return false, ErrBadPattern } nameRune, nameRuneLen := utf8.DecodeRuneInString(name[nameIdx:]) matched := false negate := pattern[patIdx] == '!' || pattern[patIdx] == '^' if negate { patIdx++ } if patIdx >= patLen || pattern[patIdx] == ']' { // class didn't end or empty character class return false, ErrBadPattern } last := utf8.MaxRune for patIdx < patLen && pattern[patIdx] != ']' { patRune, patRuneLen := utf8.DecodeRuneInString(pattern[patIdx:]) patIdx += patRuneLen // match a range if last < utf8.MaxRune && patRune == '-' && patIdx < patLen && pattern[patIdx] != ']' { if pattern[patIdx] == '\\' { // next character is escaped patIdx++ } patRune, patRuneLen = utf8.DecodeRuneInString(pattern[patIdx:]) patIdx += patRuneLen if last <= nameRune && nameRune <= patRune { matched = true break } // didn't match range - reset `last` last = utf8.MaxRune continue } // not a range - check if the next rune is escaped if patRune == '\\' { patRune, patRuneLen = utf8.DecodeRuneInString(pattern[patIdx:]) patIdx += patRuneLen } // check if the rune matches if patRune == nameRune { matched = true break } // no matches yet last = patRune } if matched == negate { // failed to match - if we reached the end of the pattern, that means // we never found a closing `]` if patIdx >= patLen { return false, ErrBadPattern } break } closingIdx := indexUnescapedByte(pattern[patIdx:], ']', true) if closingIdx == -1 { // no closing `]` return false, ErrBadPattern } patIdx += closingIdx + 1 nameIdx += nameRuneLen continue case '{': startOfSegment = false beforeIdx := patIdx patIdx++ closingIdx := indexMatchedClosingAlt(pattern[patIdx:], separator != '\\') if closingIdx == -1 { // no closing `}` return false, ErrBadPattern } closingIdx += patIdx for { commaIdx := indexNextAlt(pattern[patIdx:closingIdx], separator != '\\') if commaIdx == -1 { break } commaIdx += patIdx result, err := doMatchWithSeparator(pattern[:beforeIdx]+pattern[patIdx:commaIdx]+pattern[closingIdx+1:], name, separator, validate, doublestarPatternBacktrack, doublestarNameBacktrack, starPatternBacktrack, starNameBacktrack, beforeIdx, nameIdx) if result || err != nil { return result, err } patIdx = commaIdx + 1 } return doMatchWithSeparator(pattern[:beforeIdx]+pattern[patIdx:closingIdx]+pattern[closingIdx+1:], name, separator, validate, doublestarPatternBacktrack, doublestarNameBacktrack, starPatternBacktrack, starNameBacktrack, beforeIdx, nameIdx) case '\\': if separator != '\\' { // next rune is "escaped" in the pattern - literal match if patIdx++; patIdx >= patLen { // pattern ended return false, ErrBadPattern } } fallthrough default: patRune, patRuneLen := utf8.DecodeRuneInString(pattern[patIdx:]) nameRune, nameRuneLen := utf8.DecodeRuneInString(name[nameIdx:]) if patRune != nameRune { if separator != '\\' && patIdx > 0 && pattern[patIdx-1] == '\\' { // if this rune was meant to be escaped, we need to move patIdx // back to the backslash before backtracking or validating below patIdx-- } break } patIdx += patRuneLen nameIdx += nameRuneLen startOfSegment = patRune == separator continue } } if starPatternBacktrack >= 0 { // `*` backtrack, but only if the `name` rune isn't the separator nameRune, nameRuneLen := utf8.DecodeRuneInString(name[starNameBacktrack:]) if nameRune != separator { starNameBacktrack += nameRuneLen patIdx = starPatternBacktrack nameIdx = starNameBacktrack startOfSegment = false continue } } if doublestarPatternBacktrack >= 0 { // `**` backtrack, advance `name` past next separator nameIdx = doublestarNameBacktrack for nameIdx < nameLen { nameRune, nameRuneLen := utf8.DecodeRuneInString(name[nameIdx:]) nameIdx += nameRuneLen if nameRune == separator { doublestarNameBacktrack = nameIdx patIdx = doublestarPatternBacktrack startOfSegment = true continue MATCH } } } if validate && patIdx < patLen && !doValidatePattern(pattern[patIdx:], separator) { return false, ErrBadPattern } return false, nil } if nameIdx < nameLen { // we reached the end of `pattern` before the end of `name` return false, nil } // we've reached the end of `name`; we've successfully matched if we've also // reached the end of `pattern`, or if the rest of `pattern` can match a // zero-length string return isZeroLengthPattern(pattern[patIdx:], separator) } func isZeroLengthPattern(pattern string, separator rune) (ret bool, err error) { // `/**`, `**/`, and `/**/` are special cases - a pattern such as `path/to/a/**` or `path/to/a/**/` // *should* match `path/to/a` because `a` might be a directory if pattern == "" || pattern == "*" || pattern == "**" || pattern == string(separator)+"**" || pattern == "**"+string(separator) || pattern == string(separator)+"**"+string(separator) { return true, nil } if pattern[0] == '{' { closingIdx := indexMatchedClosingAlt(pattern[1:], separator != '\\') if closingIdx == -1 { // no closing '}' return false, ErrBadPattern } closingIdx += 1 patIdx := 1 for { commaIdx := indexNextAlt(pattern[patIdx:closingIdx], separator != '\\') if commaIdx == -1 { break } commaIdx += patIdx ret, err = isZeroLengthPattern(pattern[patIdx:commaIdx]+pattern[closingIdx+1:], separator) if ret || err != nil { return } patIdx = commaIdx + 1 } return isZeroLengthPattern(pattern[patIdx:closingIdx]+pattern[closingIdx+1:], separator) } // no luck - validate the rest of the pattern if !doValidatePattern(pattern, separator) { return false, ErrBadPattern } return false, nil } // Finds the next comma, but ignores any commas that appear inside nested `{}`. // Assumes that each opening bracket has a corresponding closing bracket. func indexNextAlt(s string, allowEscaping bool) int { alts := 1 l := len(s) for i := 0; i < l; i++ { if allowEscaping && s[i] == '\\' { // skip next byte i++ } else if s[i] == '{' { alts++ } else if s[i] == '}' { alts-- } else if s[i] == ',' && alts == 1 { return i } } return -1 } // Finds the index of the first unescaped byte `c`, or negative 1. func indexUnescapedByte(s string, c byte, allowEscaping bool) int { l := len(s) for i := 0; i < l; i++ { if allowEscaping && s[i] == '\\' { // skip next byte i++ } else if s[i] == c { return i } } return -1 } // Assuming the byte before the beginning of `s` is an opening `{`, this // function will find the index of the matching `}`. That is, it'll skip over // any nested `{}` and account for escaping func indexMatchedClosingAlt(s string, allowEscaping bool) int { alts := 1 l := len(s) for i := 0; i < l; i++ { if allowEscaping && s[i] == '\\' { // skip next byte i++ } else if s[i] == '{' { alts++ } else if s[i] == '}' { if alts--; alts == 0 { return i } } } return -1 } // Validate a pattern. Patterns are validated while they run in Match(), // PathMatch(), and Glob(), so, you normally wouldn't need to call this. // However, there are cases where this might be useful: for example, if your // program allows a user to enter a pattern that you'll run at a later time, // you might want to validate it. // // ValidatePattern assumes your pattern uses '/' as the path separator. func ValidatePattern(s string) bool { return doValidatePattern(s, '/') } func doValidatePattern(s string, separator rune) bool { altDepth := 0 l := len(s) VALIDATE: for i := 0; i < l; i++ { switch s[i] { case '\\': if separator != '\\' { // skip the next byte - return false if there is no next byte if i++; i >= l { return false } } continue case '[': if i++; i >= l { // class didn't end return false } if s[i] == '^' || s[i] == '!' { i++ } if i >= l || s[i] == ']' { // class didn't end or empty character class return false } for ; i < l; i++ { if separator != '\\' && s[i] == '\\' { i++ } else if s[i] == ']' { // looks good continue VALIDATE } } // class didn't end return false case '{': altDepth++ continue case '}': if altDepth == 0 { // alt end without a corresponding start return false } altDepth-- continue } } // valid as long as all alts are closed return altDepth == 0 } golang-github-planetscale-vtprotobuf-0.6.0/go.mod000066400000000000000000000010661455570004500220630ustar00rootroot00000000000000module github.com/planetscale/vtprotobuf go 1.20 require ( github.com/stretchr/testify v1.8.4 google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/net v0.14.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) golang-github-planetscale-vtprotobuf-0.6.0/go.sum000066400000000000000000000051441455570004500221110ustar00rootroot00000000000000github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= golang-github-planetscale-vtprotobuf-0.6.0/include/000077500000000000000000000000001455570004500223755ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/include/github.com/000077500000000000000000000000001455570004500244345ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/include/github.com/planetscale/000077500000000000000000000000001455570004500267275ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/include/github.com/planetscale/vtprotobuf/000077500000000000000000000000001455570004500311415ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/include/github.com/planetscale/vtprotobuf/vtproto/000077500000000000000000000000001455570004500326565ustar00rootroot00000000000000ext.proto000066400000000000000000000004631455570004500344670ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/include/github.com/planetscale/vtprotobuf/vtprotosyntax = "proto2"; package vtproto; import "google/protobuf/descriptor.proto"; option java_package = "com.google.protobuf"; option java_outer_classname = "VTProto"; option go_package = "github.com/planetscale/vtprotobuf/vtproto"; extend google.protobuf.MessageOptions { optional bool mempool = 64101; }golang-github-planetscale-vtprotobuf-0.6.0/protobuf.sh000077500000000000000000000012371455570004500231540ustar00rootroot00000000000000#!/bin/bash set -e PROTOBUF_VERSION=21.12 ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) PROTOBUF_PATH="${ROOT}/_vendor/protobuf-${PROTOBUF_VERSION}" if [ -f "$PROTOBUF_PATH/src/protoc" ]; then echo "protoc found in $PROTOBUF_PATH" exit 0 fi mkdir -p _vendor curl -sS -L -o "$ROOT/_vendor/pb.tar.gz" http://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-all-${PROTOBUF_VERSION}.tar.gz cd "$ROOT/_vendor" tar zxf pb.tar.gz cd protobuf-${PROTOBUF_VERSION} ./configure make make -C conformance echo "Dowloaded and compiled protobuf $PROTOBUF_VERSION to $PROTOBUF_PATH" ls -l src/ ls -l conformance/ golang-github-planetscale-vtprotobuf-0.6.0/protohelpers/000077500000000000000000000000001455570004500235005ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/protohelpers/protohelpers.go000066400000000000000000000055541455570004500265660ustar00rootroot00000000000000// Package protohelpers provides helper functions for encoding and decoding protobuf messages. // The spec can be found at https://protobuf.dev/programming-guides/encoding/. package protohelpers import ( "fmt" "io" "math/bits" ) var ( // ErrInvalidLength is returned when decoding a negative length. ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") // ErrIntOverflow is returned when decoding a varint representation of an integer that overflows 64 bits. ErrIntOverflow = fmt.Errorf("proto: integer overflow") // ErrUnexpectedEndOfGroup is returned when decoding a group end without a corresponding group start. ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") ) // EncodeVarint encodes a uint64 into a varint-encoded byte slice and returns the offset of the encoded value. // The provided offset is the offset after the last byte of the encoded value. func EncodeVarint(dAtA []byte, offset int, v uint64) int { offset -= SizeOfVarint(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } // SizeOfVarint returns the size of the varint-encoded value. func SizeOfVarint(x uint64) (n int) { return (bits.Len64(x|1) + 6) / 7 } // SizeOfZigzag returns the size of the zigzag-encoded value. func SizeOfZigzag(x uint64) (n int) { return SizeOfVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } // Skip the first record of the byte slice and return the offset of the next record. func Skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflow } 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, ErrIntOverflow } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflow } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLength } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroup } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLength } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } golang-github-planetscale-vtprotobuf-0.6.0/testproto/000077500000000000000000000000001455570004500230155ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/buildtag/000077500000000000000000000000001455570004500246105ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/buildtag/empty/000077500000000000000000000000001455570004500257465ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/buildtag/empty/empty_vtproto.pb.go000066400000000000000000000007741455570004500316400ustar00rootroot00000000000000//go:build vtprotobuf // +build vtprotobuf // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: empty/empty.proto package empty import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) golang-github-planetscale-vtprotobuf-0.6.0/testproto/empty/000077500000000000000000000000001455570004500241535ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/empty/empty.pb.go000066400000000000000000000036641455570004500262510ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: empty/empty.proto package empty import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) var File_empty_empty_proto protoreflect.FileDescriptor var file_empty_empty_proto_rawDesc = []byte{ 0x0a, 0x11, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x11, 0x5a, 0x0f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_empty_empty_proto_goTypes = []interface{}{} var file_empty_empty_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_empty_empty_proto_init() } func file_empty_empty_proto_init() { if File_empty_empty_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_empty_empty_proto_rawDesc, NumEnums: 0, NumMessages: 0, NumExtensions: 0, NumServices: 0, }, GoTypes: file_empty_empty_proto_goTypes, DependencyIndexes: file_empty_empty_proto_depIdxs, }.Build() File_empty_empty_proto = out.File file_empty_empty_proto_rawDesc = nil file_empty_empty_proto_goTypes = nil file_empty_empty_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/empty/empty.proto000066400000000000000000000000721455570004500263750ustar00rootroot00000000000000syntax = "proto3"; option go_package = "testproto/empty"; golang-github-planetscale-vtprotobuf-0.6.0/testproto/empty/empty_vtproto.pb.go000066400000000000000000000007201455570004500300340ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: empty/empty.proto package empty import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) golang-github-planetscale-vtprotobuf-0.6.0/testproto/grpc/000077500000000000000000000000001455570004500237505ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/grpc/grpc.pb.go000066400000000000000000000177501455570004500256440ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: testproto/grpc/grpc.proto package grpc import ( inner "github.com/planetscale/vtprotobuf/testproto/grpc/inner" _ "github.com/planetscale/vtprotobuf/vtproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type LocalTestMessageRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *LocalTestMessageRequest) Reset() { *x = LocalTestMessageRequest{} if protoimpl.UnsafeEnabled { mi := &file_testproto_grpc_grpc_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *LocalTestMessageRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*LocalTestMessageRequest) ProtoMessage() {} func (x *LocalTestMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_testproto_grpc_grpc_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use LocalTestMessageRequest.ProtoReflect.Descriptor instead. func (*LocalTestMessageRequest) Descriptor() ([]byte, []int) { return file_testproto_grpc_grpc_proto_rawDescGZIP(), []int{0} } type LocalTestMessageResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *LocalTestMessageResponse) Reset() { *x = LocalTestMessageResponse{} if protoimpl.UnsafeEnabled { mi := &file_testproto_grpc_grpc_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *LocalTestMessageResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*LocalTestMessageResponse) ProtoMessage() {} func (x *LocalTestMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_testproto_grpc_grpc_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use LocalTestMessageResponse.ProtoReflect.Descriptor instead. func (*LocalTestMessageResponse) Descriptor() ([]byte, []int) { return file_testproto_grpc_grpc_proto_rawDescGZIP(), []int{1} } var File_testproto_grpc_grpc_proto protoreflect.FileDescriptor var file_testproto_grpc_grpc_proto_rawDesc = []byte{ 0x0a, 0x19, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, 0x0a, 0x17, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x22, 0x20, 0x0a, 0x18, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x32, 0x51, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x52, 0x50, 0x43, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0x59, 0x0a, 0x10, 0x54, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x45, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x52, 0x50, 0x43, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x18, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_testproto_grpc_grpc_proto_rawDescOnce sync.Once file_testproto_grpc_grpc_proto_rawDescData = file_testproto_grpc_grpc_proto_rawDesc ) func file_testproto_grpc_grpc_proto_rawDescGZIP() []byte { file_testproto_grpc_grpc_proto_rawDescOnce.Do(func() { file_testproto_grpc_grpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_testproto_grpc_grpc_proto_rawDescData) }) return file_testproto_grpc_grpc_proto_rawDescData } var file_testproto_grpc_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_testproto_grpc_grpc_proto_goTypes = []interface{}{ (*LocalTestMessageRequest)(nil), // 0: LocalTestMessageRequest (*LocalTestMessageResponse)(nil), // 1: LocalTestMessageResponse (*inner.TestMessageRequest)(nil), // 2: inner.TestMessageRequest (*inner.TestMessageResponse)(nil), // 3: inner.TestMessageResponse } var file_testproto_grpc_grpc_proto_depIdxs = []int32{ 2, // 0: TestService.TestRPC:input_type -> inner.TestMessageRequest 0, // 1: TestServiceLocal.TestRPCLocal:input_type -> LocalTestMessageRequest 3, // 2: TestService.TestRPC:output_type -> inner.TestMessageResponse 1, // 3: TestServiceLocal.TestRPCLocal:output_type -> LocalTestMessageResponse 2, // [2:4] is the sub-list for method output_type 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_testproto_grpc_grpc_proto_init() } func file_testproto_grpc_grpc_proto_init() { if File_testproto_grpc_grpc_proto != nil { return } if !protoimpl.UnsafeEnabled { file_testproto_grpc_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LocalTestMessageRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_testproto_grpc_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LocalTestMessageResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_testproto_grpc_grpc_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 2, }, GoTypes: file_testproto_grpc_grpc_proto_goTypes, DependencyIndexes: file_testproto_grpc_grpc_proto_depIdxs, MessageInfos: file_testproto_grpc_grpc_proto_msgTypes, }.Build() File_testproto_grpc_grpc_proto = out.File file_testproto_grpc_grpc_proto_rawDesc = nil file_testproto_grpc_grpc_proto_goTypes = nil file_testproto_grpc_grpc_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/grpc/grpc.proto000066400000000000000000000010121455570004500257620ustar00rootroot00000000000000syntax = "proto3"; option go_package = "testproto/grpc"; import "testproto/grpc/inner/inner.proto"; import "github.com/planetscale/vtprotobuf/vtproto/ext.proto"; message LocalTestMessageRequest { option (vtproto.mempool) = true; } message LocalTestMessageResponse { option (vtproto.mempool) = true; } service TestService{ rpc TestRPC(inner.TestMessageRequest) returns (inner.TestMessageResponse){} } service TestServiceLocal{ rpc TestRPCLocal(LocalTestMessageRequest) returns (LocalTestMessageResponse){} }golang-github-planetscale-vtprotobuf-0.6.0/testproto/grpc/grpc_vtproto.pb.go000066400000000000000000000433751455570004500274430ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: testproto/grpc/grpc.proto package grpc import ( context "context" fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" inner "github.com/planetscale/vtprotobuf/testproto/grpc/inner" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *LocalTestMessageRequest) CloneVT() *LocalTestMessageRequest { if m == nil { return (*LocalTestMessageRequest)(nil) } r := LocalTestMessageRequestFromVTPool() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *LocalTestMessageRequest) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *LocalTestMessageResponse) CloneVT() *LocalTestMessageResponse { if m == nil { return (*LocalTestMessageResponse)(nil) } r := LocalTestMessageResponseFromVTPool() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *LocalTestMessageResponse) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *LocalTestMessageRequest) EqualVT(that *LocalTestMessageRequest) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *LocalTestMessageRequest) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*LocalTestMessageRequest) if !ok { return false } return this.EqualVT(that) } func (this *LocalTestMessageResponse) EqualVT(that *LocalTestMessageResponse) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *LocalTestMessageResponse) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*LocalTestMessageResponse) if !ok { return false } return this.EqualVT(that) } // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // TestServiceClient is the client API for TestService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type TestServiceClient interface { TestRPC(ctx context.Context, in *inner.TestMessageRequest, opts ...grpc.CallOption) (*inner.TestMessageResponse, error) } type testServiceClient struct { cc grpc.ClientConnInterface } func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient { return &testServiceClient{cc} } func (c *testServiceClient) TestRPC(ctx context.Context, in *inner.TestMessageRequest, opts ...grpc.CallOption) (*inner.TestMessageResponse, error) { out := inner.TestMessageResponseFromVTPool() err := c.cc.Invoke(ctx, "/TestService/TestRPC", in, out, opts...) if err != nil { return nil, err } return out, nil } // TestServiceServer is the server API for TestService service. // All implementations must embed UnimplementedTestServiceServer // for forward compatibility type TestServiceServer interface { TestRPC(context.Context, *inner.TestMessageRequest) (*inner.TestMessageResponse, error) mustEmbedUnimplementedTestServiceServer() } // UnimplementedTestServiceServer must be embedded to have forward compatible implementations. type UnimplementedTestServiceServer struct { } func (UnimplementedTestServiceServer) TestRPC(context.Context, *inner.TestMessageRequest) (*inner.TestMessageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestRPC not implemented") } func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {} // UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TestServiceServer will // result in compilation errors. type UnsafeTestServiceServer interface { mustEmbedUnimplementedTestServiceServer() } func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) { s.RegisterService(&TestService_ServiceDesc, srv) } func _TestService_TestRPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := inner.TestMessageRequestFromVTPool() if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TestServiceServer).TestRPC(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/TestService/TestRPC", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TestServiceServer).TestRPC(ctx, req.(*inner.TestMessageRequest)) } return interceptor(ctx, in, info, handler) } // TestService_ServiceDesc is the grpc.ServiceDesc for TestService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var TestService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "TestService", HandlerType: (*TestServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TestRPC", Handler: _TestService_TestRPC_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "testproto/grpc/grpc.proto", } // TestServiceLocalClient is the client API for TestServiceLocal service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type TestServiceLocalClient interface { TestRPCLocal(ctx context.Context, in *LocalTestMessageRequest, opts ...grpc.CallOption) (*LocalTestMessageResponse, error) } type testServiceLocalClient struct { cc grpc.ClientConnInterface } func NewTestServiceLocalClient(cc grpc.ClientConnInterface) TestServiceLocalClient { return &testServiceLocalClient{cc} } func (c *testServiceLocalClient) TestRPCLocal(ctx context.Context, in *LocalTestMessageRequest, opts ...grpc.CallOption) (*LocalTestMessageResponse, error) { out := LocalTestMessageResponseFromVTPool() err := c.cc.Invoke(ctx, "/TestServiceLocal/TestRPCLocal", in, out, opts...) if err != nil { return nil, err } return out, nil } // TestServiceLocalServer is the server API for TestServiceLocal service. // All implementations must embed UnimplementedTestServiceLocalServer // for forward compatibility type TestServiceLocalServer interface { TestRPCLocal(context.Context, *LocalTestMessageRequest) (*LocalTestMessageResponse, error) mustEmbedUnimplementedTestServiceLocalServer() } // UnimplementedTestServiceLocalServer must be embedded to have forward compatible implementations. type UnimplementedTestServiceLocalServer struct { } func (UnimplementedTestServiceLocalServer) TestRPCLocal(context.Context, *LocalTestMessageRequest) (*LocalTestMessageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestRPCLocal not implemented") } func (UnimplementedTestServiceLocalServer) mustEmbedUnimplementedTestServiceLocalServer() {} // UnsafeTestServiceLocalServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TestServiceLocalServer will // result in compilation errors. type UnsafeTestServiceLocalServer interface { mustEmbedUnimplementedTestServiceLocalServer() } func RegisterTestServiceLocalServer(s grpc.ServiceRegistrar, srv TestServiceLocalServer) { s.RegisterService(&TestServiceLocal_ServiceDesc, srv) } func _TestServiceLocal_TestRPCLocal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := LocalTestMessageRequestFromVTPool() if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TestServiceLocalServer).TestRPCLocal(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/TestServiceLocal/TestRPCLocal", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TestServiceLocalServer).TestRPCLocal(ctx, req.(*LocalTestMessageRequest)) } return interceptor(ctx, in, info, handler) } // TestServiceLocal_ServiceDesc is the grpc.ServiceDesc for TestServiceLocal service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var TestServiceLocal_ServiceDesc = grpc.ServiceDesc{ ServiceName: "TestServiceLocal", HandlerType: (*TestServiceLocalServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TestRPCLocal", Handler: _TestServiceLocal_TestRPCLocal_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "testproto/grpc/grpc.proto", } func (m *LocalTestMessageRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LocalTestMessageRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *LocalTestMessageRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *LocalTestMessageResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LocalTestMessageResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *LocalTestMessageResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *LocalTestMessageRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LocalTestMessageRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *LocalTestMessageRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *LocalTestMessageResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LocalTestMessageResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *LocalTestMessageResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } var vtprotoPool_LocalTestMessageRequest = sync.Pool{ New: func() interface{} { return &LocalTestMessageRequest{} }, } func (m *LocalTestMessageRequest) ResetVT() { if m != nil { m.Reset() } } func (m *LocalTestMessageRequest) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_LocalTestMessageRequest.Put(m) } } func LocalTestMessageRequestFromVTPool() *LocalTestMessageRequest { return vtprotoPool_LocalTestMessageRequest.Get().(*LocalTestMessageRequest) } var vtprotoPool_LocalTestMessageResponse = sync.Pool{ New: func() interface{} { return &LocalTestMessageResponse{} }, } func (m *LocalTestMessageResponse) ResetVT() { if m != nil { m.Reset() } } func (m *LocalTestMessageResponse) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_LocalTestMessageResponse.Put(m) } } func LocalTestMessageResponseFromVTPool() *LocalTestMessageResponse { return vtprotoPool_LocalTestMessageResponse.Get().(*LocalTestMessageResponse) } func (m *LocalTestMessageRequest) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *LocalTestMessageResponse) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *LocalTestMessageRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LocalTestMessageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LocalTestMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LocalTestMessageResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LocalTestMessageResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LocalTestMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LocalTestMessageRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LocalTestMessageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LocalTestMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LocalTestMessageResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LocalTestMessageResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LocalTestMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/grpc/inner/000077500000000000000000000000001455570004500250635ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/grpc/inner/inner.pb.go000066400000000000000000000147131455570004500271330ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: testproto/grpc/inner/inner.proto package inner import ( _ "github.com/planetscale/vtprotobuf/vtproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type TestMessageRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TestMessageRequest) Reset() { *x = TestMessageRequest{} if protoimpl.UnsafeEnabled { mi := &file_testproto_grpc_inner_inner_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestMessageRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestMessageRequest) ProtoMessage() {} func (x *TestMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_testproto_grpc_inner_inner_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestMessageRequest.ProtoReflect.Descriptor instead. func (*TestMessageRequest) Descriptor() ([]byte, []int) { return file_testproto_grpc_inner_inner_proto_rawDescGZIP(), []int{0} } type TestMessageResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *TestMessageResponse) Reset() { *x = TestMessageResponse{} if protoimpl.UnsafeEnabled { mi := &file_testproto_grpc_inner_inner_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestMessageResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestMessageResponse) ProtoMessage() {} func (x *TestMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_testproto_grpc_inner_inner_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TestMessageResponse.ProtoReflect.Descriptor instead. func (*TestMessageResponse) Descriptor() ([]byte, []int) { return file_testproto_grpc_inner_inner_proto_rawDescGZIP(), []int{1} } var File_testproto_grpc_inner_inner_proto protoreflect.FileDescriptor var file_testproto_grpc_inner_inner_proto_rawDesc = []byte{ 0x0a, 0x20, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x1a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x22, 0x1b, 0x0a, 0x13, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x42, 0x16, 0x5a, 0x14, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_testproto_grpc_inner_inner_proto_rawDescOnce sync.Once file_testproto_grpc_inner_inner_proto_rawDescData = file_testproto_grpc_inner_inner_proto_rawDesc ) func file_testproto_grpc_inner_inner_proto_rawDescGZIP() []byte { file_testproto_grpc_inner_inner_proto_rawDescOnce.Do(func() { file_testproto_grpc_inner_inner_proto_rawDescData = protoimpl.X.CompressGZIP(file_testproto_grpc_inner_inner_proto_rawDescData) }) return file_testproto_grpc_inner_inner_proto_rawDescData } var file_testproto_grpc_inner_inner_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_testproto_grpc_inner_inner_proto_goTypes = []interface{}{ (*TestMessageRequest)(nil), // 0: inner.TestMessageRequest (*TestMessageResponse)(nil), // 1: inner.TestMessageResponse } var file_testproto_grpc_inner_inner_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_testproto_grpc_inner_inner_proto_init() } func file_testproto_grpc_inner_inner_proto_init() { if File_testproto_grpc_inner_inner_proto != nil { return } if !protoimpl.UnsafeEnabled { file_testproto_grpc_inner_inner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestMessageRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_testproto_grpc_inner_inner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestMessageResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_testproto_grpc_inner_inner_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_testproto_grpc_inner_inner_proto_goTypes, DependencyIndexes: file_testproto_grpc_inner_inner_proto_depIdxs, MessageInfos: file_testproto_grpc_inner_inner_proto_msgTypes, }.Build() File_testproto_grpc_inner_inner_proto = out.File file_testproto_grpc_inner_inner_proto_rawDesc = nil file_testproto_grpc_inner_inner_proto_goTypes = nil file_testproto_grpc_inner_inner_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/grpc/inner/inner.proto000066400000000000000000000004231455570004500272620ustar00rootroot00000000000000syntax = "proto3"; package inner; option go_package = "testproto/grpc/inner"; import "github.com/planetscale/vtprotobuf/vtproto/ext.proto"; message TestMessageRequest{ option (vtproto.mempool) = true; } message TestMessageResponse{ option (vtproto.mempool) = true; }golang-github-planetscale-vtprotobuf-0.6.0/testproto/grpc/inner/inner_vtproto.pb.go000066400000000000000000000250301455570004500307220ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: testproto/grpc/inner/inner.proto package inner import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *TestMessageRequest) CloneVT() *TestMessageRequest { if m == nil { return (*TestMessageRequest)(nil) } r := TestMessageRequestFromVTPool() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestMessageRequest) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *TestMessageResponse) CloneVT() *TestMessageResponse { if m == nil { return (*TestMessageResponse)(nil) } r := TestMessageResponseFromVTPool() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *TestMessageResponse) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *TestMessageRequest) EqualVT(that *TestMessageRequest) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestMessageRequest) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestMessageRequest) if !ok { return false } return this.EqualVT(that) } func (this *TestMessageResponse) EqualVT(that *TestMessageResponse) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *TestMessageResponse) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*TestMessageResponse) if !ok { return false } return this.EqualVT(that) } func (m *TestMessageRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestMessageRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestMessageRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *TestMessageResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestMessageResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *TestMessageResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *TestMessageRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestMessageRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestMessageRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *TestMessageResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TestMessageResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *TestMessageResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } var vtprotoPool_TestMessageRequest = sync.Pool{ New: func() interface{} { return &TestMessageRequest{} }, } func (m *TestMessageRequest) ResetVT() { if m != nil { m.Reset() } } func (m *TestMessageRequest) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_TestMessageRequest.Put(m) } } func TestMessageRequestFromVTPool() *TestMessageRequest { return vtprotoPool_TestMessageRequest.Get().(*TestMessageRequest) } var vtprotoPool_TestMessageResponse = sync.Pool{ New: func() interface{} { return &TestMessageResponse{} }, } func (m *TestMessageResponse) ResetVT() { if m != nil { m.Reset() } } func (m *TestMessageResponse) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_TestMessageResponse.Put(m) } } func TestMessageResponseFromVTPool() *TestMessageResponse { return vtprotoPool_TestMessageResponse.Get().(*TestMessageResponse) } func (m *TestMessageRequest) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *TestMessageResponse) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *TestMessageRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestMessageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestMessageResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestMessageResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestMessageRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestMessageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TestMessageResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TestMessageResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TestMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/000077500000000000000000000000001455570004500237665ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool.pb.go000066400000000000000000000156211455570004500256730ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: pool/pool.proto package pool import ( _ "github.com/planetscale/vtprotobuf/vtproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type OptionalMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *OptionalMessage) Reset() { *x = OptionalMessage{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OptionalMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*OptionalMessage) ProtoMessage() {} func (x *OptionalMessage) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OptionalMessage.ProtoReflect.Descriptor instead. func (*OptionalMessage) Descriptor() ([]byte, []int) { return file_pool_pool_proto_rawDescGZIP(), []int{0} } type MemoryPoolExtension struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Foo1 string `protobuf:"bytes,1,opt,name=foo1,proto3" json:"foo1,omitempty"` Foo2 uint64 `protobuf:"varint,2,opt,name=foo2,proto3" json:"foo2,omitempty"` Foo3 *OptionalMessage `protobuf:"bytes,3,opt,name=foo3,proto3,oneof" json:"foo3,omitempty"` } func (x *MemoryPoolExtension) Reset() { *x = MemoryPoolExtension{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MemoryPoolExtension) String() string { return protoimpl.X.MessageStringOf(x) } func (*MemoryPoolExtension) ProtoMessage() {} func (x *MemoryPoolExtension) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MemoryPoolExtension.ProtoReflect.Descriptor instead. func (*MemoryPoolExtension) Descriptor() ([]byte, []int) { return file_pool_pool_proto_rawDescGZIP(), []int{1} } func (x *MemoryPoolExtension) GetFoo1() string { if x != nil { return x.Foo1 } return "" } func (x *MemoryPoolExtension) GetFoo2() uint64 { if x != nil { return x.Foo2 } return 0 } func (x *MemoryPoolExtension) GetFoo3() *OptionalMessage { if x != nil { return x.Foo3 } return nil } var File_pool_pool_proto protoreflect.FileDescriptor var file_pool_pool_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x22, 0x77, 0x0a, 0x13, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x12, 0x29, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x33, 0x88, 0x01, 0x01, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x66, 0x6f, 0x6f, 0x33, 0x42, 0x10, 0x5a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_pool_pool_proto_rawDescOnce sync.Once file_pool_pool_proto_rawDescData = file_pool_pool_proto_rawDesc ) func file_pool_pool_proto_rawDescGZIP() []byte { file_pool_pool_proto_rawDescOnce.Do(func() { file_pool_pool_proto_rawDescData = protoimpl.X.CompressGZIP(file_pool_pool_proto_rawDescData) }) return file_pool_pool_proto_rawDescData } var file_pool_pool_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_pool_pool_proto_goTypes = []interface{}{ (*OptionalMessage)(nil), // 0: OptionalMessage (*MemoryPoolExtension)(nil), // 1: MemoryPoolExtension } var file_pool_pool_proto_depIdxs = []int32{ 0, // 0: MemoryPoolExtension.foo3:type_name -> OptionalMessage 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_pool_pool_proto_init() } func file_pool_pool_proto_init() { if File_pool_pool_proto != nil { return } if !protoimpl.UnsafeEnabled { file_pool_pool_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OptionalMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pool_pool_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MemoryPoolExtension); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_pool_pool_proto_msgTypes[1].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pool_pool_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_pool_pool_proto_goTypes, DependencyIndexes: file_pool_pool_proto_depIdxs, MessageInfos: file_pool_pool_proto_msgTypes, }.Build() File_pool_pool_proto = out.File file_pool_pool_proto_rawDesc = nil file_pool_pool_proto_goTypes = nil file_pool_pool_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool.proto000066400000000000000000000005061455570004500260250ustar00rootroot00000000000000syntax = "proto3"; option go_package = "testproto/pool"; import "github.com/planetscale/vtprotobuf/vtproto/ext.proto"; message OptionalMessage{ option (vtproto.mempool) = true; } message MemoryPoolExtension { option (vtproto.mempool) = true; string foo1 = 1; uint64 foo2 = 2; optional OptionalMessage foo3 = 3; } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool_test.go000066400000000000000000000075731455570004500263410ustar00rootroot00000000000000package pool import ( "log" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" ) func Test_Pool_slice_data_override(t *testing.T) { dataRequest := Test1{ Sl: []string{"a", "b", "c"}, } dataReqBytes, err := dataRequest.MarshalVT() require.NoError(t, err) nilRequest := Test1{ Sl: []string{}, } nilReqBytes, err := nilRequest.MarshalVT() require.NoError(t, err) req := Test1FromVTPool() err = req.UnmarshalVT(dataReqBytes) require.NoError(t, err) req.ReturnToVTPool() req = Test1FromVTPool() err = req.UnmarshalVT(nilReqBytes) require.NoError(t, err) assert.Equal(t, []string{}, req.Sl) } func Test_Pool_slice_recreation(t *testing.T) { var b int32 = 10 dataRequest := Test2{ Sl: []*Slice2{ { A: map[int64]int64{ 22: 33, }, B: &b, C: []string{"one", "two"}, D: &Element2{ A: 10, }, E: "something", F: 123, }, }, } dataReqBytes, err := dataRequest.MarshalVT() require.NoError(t, err) nilRequest := Test2{ Sl: []*Slice2{ { A: nil, B: nil, C: nil, D: nil, E: "", F: 0, }, }, } nilReqBytes, err := nilRequest.MarshalVT() require.NoError(t, err) req := Test2FromVTPool() err = req.UnmarshalVT(dataReqBytes) log.Println(req) require.NoError(t, err) req.ReturnToVTPool() req = Test2FromVTPool() err = req.UnmarshalVT(nilReqBytes) require.NoError(t, err) assert.Nil(t, req.Sl[0].A) assert.Nil(t, req.Sl[0].B) assert.Nil(t, req.Sl[0].D) assert.Nil(t, req.Sl[0].C) assert.Zero(t, req.Sl[0].E) assert.Zero(t, req.Sl[0].F) } func Test_Pool_Oneof(t *testing.T) { t1_t_t1 := &OneofTest_Test1{ A: 42, } t1_t := &OneofTest_Test1_{ Test1: t1_t_t1, } t1 := &OneofTest{ Test: t1_t, } t2_t_t2 := &OneofTest_Test2{ B: []string{"str1", "str2", "str3"}, } t2_t := &OneofTest_Test2_{ Test2: t2_t_t2, } t2 := &OneofTest{ Test: t2_t, } t3_t_t3_c := &OneofTest_Test3_Element2{ D: 51, } t3_t_t3 := &OneofTest_Test3{ C: t3_t_t3_c, } t3_t := &OneofTest_Test3_{ Test3: t3_t_t3, } t3 := &OneofTest{ Test: t3_t, } t4 := &OneofTest{Test: nil} t1Bytes, err := t1.MarshalVT() require.NoError(t, err) t2Bytes, err := t2.MarshalVT() require.NoError(t, err) t3Bytes, err := t3.MarshalVT() require.NoError(t, err) t4Bytes, err := t4.MarshalVT() require.NoError(t, err) t1.ReturnToVTPool() t5 := OneofTestFromVTPool() require.NoError(t, t5.UnmarshalVT(t1Bytes)) require.Equal(t, &t1, &t5) require.Equal(t, t1_t, t5.Test.(*OneofTest_Test1_)) require.Equal(t, t1_t_t1, t5.Test.(*OneofTest_Test1_).Test1) require.Equal(t, &t1_t_t1, &t5.Test.(*OneofTest_Test1_).Test1) t2.ReturnToVTPool() t6 := OneofTestFromVTPool() require.NoError(t, t6.UnmarshalVT(t2Bytes)) require.Equal(t, &t2, &t6) require.Equal(t, t2_t, t6.Test.(*OneofTest_Test2_)) require.Equal(t, t2_t_t2, t6.Test.(*OneofTest_Test2_).Test2) require.Equal(t, &t2_t_t2, &t6.Test.(*OneofTest_Test2_).Test2) t3.ReturnToVTPool() t7 := OneofTestFromVTPool() require.NoError(t, t7.UnmarshalVT(t3Bytes)) require.Equal(t, &t3, &t7) require.Equal(t, t3_t, t7.Test.(*OneofTest_Test3_)) require.Equal(t, t3_t_t3, t7.Test.(*OneofTest_Test3_).Test3) require.Equal(t, &t3_t_t3, &t7.Test.(*OneofTest_Test3_).Test3) require.Equal(t, &t3_t_t3_c, &t7.Test.(*OneofTest_Test3_).Test3.C) t4.ReturnToVTPool() t8 := OneofTestFromVTPool() require.NoError(t, t8.UnmarshalVT(t4Bytes)) require.Equal(t, &t4, &t8) } func Test_Pool_Optional(t *testing.T) { m := &MemoryPoolExtension{ Foo1: "foo1", Foo2: 123, Foo3: &OptionalMessage{}, } mBytes, err := m.MarshalVT() require.NoError(t, err) mUnmarshal := &MemoryPoolExtension{} err = proto.Unmarshal(mBytes, mUnmarshal) require.NoError(t, err) require.True(t, m.EqualVT(mUnmarshal)) m.ReturnToVTPool() mFromPool := MemoryPoolExtensionFromVTPool() require.True(t, mFromPool.EqualVT(&MemoryPoolExtension{})) } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool_vtproto.pb.go000066400000000000000000000373661455570004500275020ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: pool/pool.proto package pool import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *OptionalMessage) CloneVT() *OptionalMessage { if m == nil { return (*OptionalMessage)(nil) } r := OptionalMessageFromVTPool() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *OptionalMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *MemoryPoolExtension) CloneVT() *MemoryPoolExtension { if m == nil { return (*MemoryPoolExtension)(nil) } r := MemoryPoolExtensionFromVTPool() r.Foo1 = m.Foo1 r.Foo2 = m.Foo2 r.Foo3 = m.Foo3.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *MemoryPoolExtension) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *OptionalMessage) EqualVT(that *OptionalMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *OptionalMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*OptionalMessage) if !ok { return false } return this.EqualVT(that) } func (this *MemoryPoolExtension) EqualVT(that *MemoryPoolExtension) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Foo1 != that.Foo1 { return false } if this.Foo2 != that.Foo2 { return false } if !this.Foo3.EqualVT(that.Foo3) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *MemoryPoolExtension) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*MemoryPoolExtension) if !ok { return false } return this.EqualVT(that) } func (m *OptionalMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OptionalMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OptionalMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *MemoryPoolExtension) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MemoryPoolExtension) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *MemoryPoolExtension) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Foo3 != nil { size, err := m.Foo3.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if m.Foo2 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Foo2)) i-- dAtA[i] = 0x10 } if len(m.Foo1) > 0 { i -= len(m.Foo1) copy(dAtA[i:], m.Foo1) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Foo1))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *OptionalMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OptionalMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OptionalMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } return len(dAtA) - i, nil } func (m *MemoryPoolExtension) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MemoryPoolExtension) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *MemoryPoolExtension) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Foo3 != nil { size, err := m.Foo3.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if m.Foo2 != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Foo2)) i-- dAtA[i] = 0x10 } if len(m.Foo1) > 0 { i -= len(m.Foo1) copy(dAtA[i:], m.Foo1) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Foo1))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } var vtprotoPool_OptionalMessage = sync.Pool{ New: func() interface{} { return &OptionalMessage{} }, } func (m *OptionalMessage) ResetVT() { if m != nil { m.Reset() } } func (m *OptionalMessage) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_OptionalMessage.Put(m) } } func OptionalMessageFromVTPool() *OptionalMessage { return vtprotoPool_OptionalMessage.Get().(*OptionalMessage) } var vtprotoPool_MemoryPoolExtension = sync.Pool{ New: func() interface{} { return &MemoryPoolExtension{} }, } func (m *MemoryPoolExtension) ResetVT() { if m != nil { m.Foo3.ReturnToVTPool() m.Reset() } } func (m *MemoryPoolExtension) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_MemoryPoolExtension.Put(m) } } func MemoryPoolExtensionFromVTPool() *MemoryPoolExtension { return vtprotoPool_MemoryPoolExtension.Get().(*MemoryPoolExtension) } func (m *OptionalMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += len(m.unknownFields) return n } func (m *MemoryPoolExtension) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Foo1) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Foo2 != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Foo2)) } if m.Foo3 != nil { l = m.Foo3.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } func (m *OptionalMessage) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OptionalMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OptionalMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MemoryPoolExtension) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MemoryPoolExtension: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MemoryPoolExtension: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Foo1", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Foo1 = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Foo2", wireType) } m.Foo2 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Foo2 |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Foo3", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Foo3 == nil { m.Foo3 = OptionalMessageFromVTPool() } if err := m.Foo3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OptionalMessage) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OptionalMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OptionalMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MemoryPoolExtension) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MemoryPoolExtension: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MemoryPoolExtension: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Foo1", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Foo1 = stringValue iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Foo2", wireType) } m.Foo2 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Foo2 |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Foo3", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Foo3 == nil { m.Foo3 = OptionalMessageFromVTPool() } if err := m.Foo3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool_with_oneof.pb.go000066400000000000000000000342641455570004500301200ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: pool/pool_with_oneof.proto package pool import ( _ "github.com/planetscale/vtprotobuf/vtproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type OneofTest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Test: // // *OneofTest_Test1_ // *OneofTest_Test2_ // *OneofTest_Test3_ // *OneofTest_Test4 Test isOneofTest_Test `protobuf_oneof:"test"` } func (x *OneofTest) Reset() { *x = OneofTest{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_oneof_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OneofTest) String() string { return protoimpl.X.MessageStringOf(x) } func (*OneofTest) ProtoMessage() {} func (x *OneofTest) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_oneof_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OneofTest.ProtoReflect.Descriptor instead. func (*OneofTest) Descriptor() ([]byte, []int) { return file_pool_pool_with_oneof_proto_rawDescGZIP(), []int{0} } func (m *OneofTest) GetTest() isOneofTest_Test { if m != nil { return m.Test } return nil } func (x *OneofTest) GetTest1() *OneofTest_Test1 { if x, ok := x.GetTest().(*OneofTest_Test1_); ok { return x.Test1 } return nil } func (x *OneofTest) GetTest2() *OneofTest_Test2 { if x, ok := x.GetTest().(*OneofTest_Test2_); ok { return x.Test2 } return nil } func (x *OneofTest) GetTest3() *OneofTest_Test3 { if x, ok := x.GetTest().(*OneofTest_Test3_); ok { return x.Test3 } return nil } func (x *OneofTest) GetTest4() []byte { if x, ok := x.GetTest().(*OneofTest_Test4); ok { return x.Test4 } return nil } type isOneofTest_Test interface { isOneofTest_Test() } type OneofTest_Test1_ struct { Test1 *OneofTest_Test1 `protobuf:"bytes,1,opt,name=test1,proto3,oneof"` } type OneofTest_Test2_ struct { Test2 *OneofTest_Test2 `protobuf:"bytes,2,opt,name=test2,proto3,oneof"` } type OneofTest_Test3_ struct { Test3 *OneofTest_Test3 `protobuf:"bytes,3,opt,name=test3,proto3,oneof"` } type OneofTest_Test4 struct { Test4 []byte `protobuf:"bytes,4,opt,name=test4,proto3,oneof"` } func (*OneofTest_Test1_) isOneofTest_Test() {} func (*OneofTest_Test2_) isOneofTest_Test() {} func (*OneofTest_Test3_) isOneofTest_Test() {} func (*OneofTest_Test4) isOneofTest_Test() {} type OneofTest_Test1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields A int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` } func (x *OneofTest_Test1) Reset() { *x = OneofTest_Test1{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_oneof_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OneofTest_Test1) String() string { return protoimpl.X.MessageStringOf(x) } func (*OneofTest_Test1) ProtoMessage() {} func (x *OneofTest_Test1) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_oneof_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OneofTest_Test1.ProtoReflect.Descriptor instead. func (*OneofTest_Test1) Descriptor() ([]byte, []int) { return file_pool_pool_with_oneof_proto_rawDescGZIP(), []int{0, 0} } func (x *OneofTest_Test1) GetA() int64 { if x != nil { return x.A } return 0 } type OneofTest_Test2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields B []string `protobuf:"bytes,1,rep,name=b,proto3" json:"b,omitempty"` } func (x *OneofTest_Test2) Reset() { *x = OneofTest_Test2{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_oneof_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OneofTest_Test2) String() string { return protoimpl.X.MessageStringOf(x) } func (*OneofTest_Test2) ProtoMessage() {} func (x *OneofTest_Test2) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_oneof_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OneofTest_Test2.ProtoReflect.Descriptor instead. func (*OneofTest_Test2) Descriptor() ([]byte, []int) { return file_pool_pool_with_oneof_proto_rawDescGZIP(), []int{0, 1} } func (x *OneofTest_Test2) GetB() []string { if x != nil { return x.B } return nil } type OneofTest_Test3 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields C *OneofTest_Test3_Element2 `protobuf:"bytes,1,opt,name=c,proto3" json:"c,omitempty"` } func (x *OneofTest_Test3) Reset() { *x = OneofTest_Test3{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_oneof_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OneofTest_Test3) String() string { return protoimpl.X.MessageStringOf(x) } func (*OneofTest_Test3) ProtoMessage() {} func (x *OneofTest_Test3) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_oneof_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OneofTest_Test3.ProtoReflect.Descriptor instead. func (*OneofTest_Test3) Descriptor() ([]byte, []int) { return file_pool_pool_with_oneof_proto_rawDescGZIP(), []int{0, 2} } func (x *OneofTest_Test3) GetC() *OneofTest_Test3_Element2 { if x != nil { return x.C } return nil } type OneofTest_Test3_Element2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields D int64 `protobuf:"varint,1,opt,name=d,proto3" json:"d,omitempty"` } func (x *OneofTest_Test3_Element2) Reset() { *x = OneofTest_Test3_Element2{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_oneof_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OneofTest_Test3_Element2) String() string { return protoimpl.X.MessageStringOf(x) } func (*OneofTest_Test3_Element2) ProtoMessage() {} func (x *OneofTest_Test3_Element2) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_oneof_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OneofTest_Test3_Element2.ProtoReflect.Descriptor instead. func (*OneofTest_Test3_Element2) Descriptor() ([]byte, []int) { return file_pool_pool_with_oneof_proto_rawDescGZIP(), []int{0, 2, 0} } func (x *OneofTest_Test3_Element2) GetD() int64 { if x != nil { return x.D } return 0 } var File_pool_pool_with_oneof_proto protoreflect.FileDescriptor var file_pool_pool_with_oneof_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x02, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x54, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x65, 0x73, 0x74, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x31, 0x48, 0x00, 0x52, 0x05, 0x74, 0x65, 0x73, 0x74, 0x31, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x65, 0x73, 0x74, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x32, 0x48, 0x00, 0x52, 0x05, 0x74, 0x65, 0x73, 0x74, 0x32, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x65, 0x73, 0x74, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x33, 0x48, 0x00, 0x52, 0x05, 0x74, 0x65, 0x73, 0x74, 0x33, 0x12, 0x16, 0x0a, 0x05, 0x74, 0x65, 0x73, 0x74, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x74, 0x65, 0x73, 0x74, 0x34, 0x1a, 0x1b, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x31, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x61, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x1a, 0x1b, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x32, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x01, 0x62, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x1a, 0x56, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x33, 0x12, 0x27, 0x0a, 0x01, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x33, 0x2e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x52, 0x01, 0x63, 0x1a, 0x1e, 0x0a, 0x08, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x12, 0x0c, 0x0a, 0x01, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x64, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x65, 0x73, 0x74, 0x42, 0x10, 0x5a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_pool_pool_with_oneof_proto_rawDescOnce sync.Once file_pool_pool_with_oneof_proto_rawDescData = file_pool_pool_with_oneof_proto_rawDesc ) func file_pool_pool_with_oneof_proto_rawDescGZIP() []byte { file_pool_pool_with_oneof_proto_rawDescOnce.Do(func() { file_pool_pool_with_oneof_proto_rawDescData = protoimpl.X.CompressGZIP(file_pool_pool_with_oneof_proto_rawDescData) }) return file_pool_pool_with_oneof_proto_rawDescData } var file_pool_pool_with_oneof_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_pool_pool_with_oneof_proto_goTypes = []interface{}{ (*OneofTest)(nil), // 0: OneofTest (*OneofTest_Test1)(nil), // 1: OneofTest.Test1 (*OneofTest_Test2)(nil), // 2: OneofTest.Test2 (*OneofTest_Test3)(nil), // 3: OneofTest.Test3 (*OneofTest_Test3_Element2)(nil), // 4: OneofTest.Test3.Element2 } var file_pool_pool_with_oneof_proto_depIdxs = []int32{ 1, // 0: OneofTest.test1:type_name -> OneofTest.Test1 2, // 1: OneofTest.test2:type_name -> OneofTest.Test2 3, // 2: OneofTest.test3:type_name -> OneofTest.Test3 4, // 3: OneofTest.Test3.c:type_name -> OneofTest.Test3.Element2 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_pool_pool_with_oneof_proto_init() } func file_pool_pool_with_oneof_proto_init() { if File_pool_pool_with_oneof_proto != nil { return } if !protoimpl.UnsafeEnabled { file_pool_pool_with_oneof_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneofTest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pool_pool_with_oneof_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneofTest_Test1); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pool_pool_with_oneof_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneofTest_Test2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pool_pool_with_oneof_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneofTest_Test3); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pool_pool_with_oneof_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneofTest_Test3_Element2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_pool_pool_with_oneof_proto_msgTypes[0].OneofWrappers = []interface{}{ (*OneofTest_Test1_)(nil), (*OneofTest_Test2_)(nil), (*OneofTest_Test3_)(nil), (*OneofTest_Test4)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pool_pool_with_oneof_proto_rawDesc, NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, GoTypes: file_pool_pool_with_oneof_proto_goTypes, DependencyIndexes: file_pool_pool_with_oneof_proto_depIdxs, MessageInfos: file_pool_pool_with_oneof_proto_msgTypes, }.Build() File_pool_pool_with_oneof_proto = out.File file_pool_pool_with_oneof_proto_rawDesc = nil file_pool_pool_with_oneof_proto_goTypes = nil file_pool_pool_with_oneof_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool_with_oneof.proto000066400000000000000000000011471455570004500302500ustar00rootroot00000000000000syntax = "proto3"; option go_package = "testproto/pool"; import "github.com/planetscale/vtprotobuf/vtproto/ext.proto"; message OneofTest { option (vtproto.mempool) = true; message Test1 { option (vtproto.mempool) = true; int64 a = 1; } message Test2 { option (vtproto.mempool) = true; repeated string b = 1; } message Test3 { option (vtproto.mempool) = true; message Element2 { option (vtproto.mempool) = true; int64 d = 1; } Element2 c = 1; } oneof test { Test1 test1 = 1; Test2 test2 = 2; Test3 test3 = 3; bytes test4 = 4; } } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool_with_oneof_vtproto.pb.go000066400000000000000000001362541455570004500317170ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: pool/pool_with_oneof.proto package pool import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *OneofTest_Test1) CloneVT() *OneofTest_Test1 { if m == nil { return (*OneofTest_Test1)(nil) } r := OneofTest_Test1FromVTPool() r.A = m.A if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *OneofTest_Test1) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *OneofTest_Test2) CloneVT() *OneofTest_Test2 { if m == nil { return (*OneofTest_Test2)(nil) } r := OneofTest_Test2FromVTPool() if rhs := m.B; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.B = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *OneofTest_Test2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *OneofTest_Test3_Element2) CloneVT() *OneofTest_Test3_Element2 { if m == nil { return (*OneofTest_Test3_Element2)(nil) } r := OneofTest_Test3_Element2FromVTPool() r.D = m.D if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *OneofTest_Test3_Element2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *OneofTest_Test3) CloneVT() *OneofTest_Test3 { if m == nil { return (*OneofTest_Test3)(nil) } r := OneofTest_Test3FromVTPool() r.C = m.C.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *OneofTest_Test3) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *OneofTest) CloneVT() *OneofTest { if m == nil { return (*OneofTest)(nil) } r := OneofTestFromVTPool() if m.Test != nil { r.Test = m.Test.(interface{ CloneVT() isOneofTest_Test }).CloneVT() } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *OneofTest) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *OneofTest_Test1_) CloneVT() isOneofTest_Test { if m == nil { return (*OneofTest_Test1_)(nil) } r := new(OneofTest_Test1_) r.Test1 = m.Test1.CloneVT() return r } func (m *OneofTest_Test2_) CloneVT() isOneofTest_Test { if m == nil { return (*OneofTest_Test2_)(nil) } r := new(OneofTest_Test2_) r.Test2 = m.Test2.CloneVT() return r } func (m *OneofTest_Test3_) CloneVT() isOneofTest_Test { if m == nil { return (*OneofTest_Test3_)(nil) } r := new(OneofTest_Test3_) r.Test3 = m.Test3.CloneVT() return r } func (m *OneofTest_Test4) CloneVT() isOneofTest_Test { if m == nil { return (*OneofTest_Test4)(nil) } r := new(OneofTest_Test4) if rhs := m.Test4; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.Test4 = tmpBytes } return r } func (this *OneofTest_Test1) EqualVT(that *OneofTest_Test1) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.A != that.A { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *OneofTest_Test1) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*OneofTest_Test1) if !ok { return false } return this.EqualVT(that) } func (this *OneofTest_Test2) EqualVT(that *OneofTest_Test2) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.B) != len(that.B) { return false } for i, vx := range this.B { vy := that.B[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *OneofTest_Test2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*OneofTest_Test2) if !ok { return false } return this.EqualVT(that) } func (this *OneofTest_Test3_Element2) EqualVT(that *OneofTest_Test3_Element2) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.D != that.D { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *OneofTest_Test3_Element2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*OneofTest_Test3_Element2) if !ok { return false } return this.EqualVT(that) } func (this *OneofTest_Test3) EqualVT(that *OneofTest_Test3) bool { if this == that { return true } else if this == nil || that == nil { return false } if !this.C.EqualVT(that.C) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *OneofTest_Test3) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*OneofTest_Test3) if !ok { return false } return this.EqualVT(that) } func (this *OneofTest) EqualVT(that *OneofTest) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Test == nil && that.Test != nil { return false } else if this.Test != nil { if that.Test == nil { return false } if !this.Test.(interface{ EqualVT(isOneofTest_Test) bool }).EqualVT(that.Test) { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *OneofTest) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*OneofTest) if !ok { return false } return this.EqualVT(that) } func (this *OneofTest_Test1_) EqualVT(thatIface isOneofTest_Test) bool { that, ok := thatIface.(*OneofTest_Test1_) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.Test1, that.Test1; p != q { if p == nil { p = &OneofTest_Test1{} } if q == nil { q = &OneofTest_Test1{} } if !p.EqualVT(q) { return false } } return true } func (this *OneofTest_Test2_) EqualVT(thatIface isOneofTest_Test) bool { that, ok := thatIface.(*OneofTest_Test2_) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.Test2, that.Test2; p != q { if p == nil { p = &OneofTest_Test2{} } if q == nil { q = &OneofTest_Test2{} } if !p.EqualVT(q) { return false } } return true } func (this *OneofTest_Test3_) EqualVT(thatIface isOneofTest_Test) bool { that, ok := thatIface.(*OneofTest_Test3_) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.Test3, that.Test3; p != q { if p == nil { p = &OneofTest_Test3{} } if q == nil { q = &OneofTest_Test3{} } if !p.EqualVT(q) { return false } } return true } func (this *OneofTest_Test4) EqualVT(thatIface isOneofTest_Test) bool { that, ok := thatIface.(*OneofTest_Test4) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if string(this.Test4) != string(that.Test4) { return false } return true } func (m *OneofTest_Test1) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest_Test1) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest_Test1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.A != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *OneofTest_Test2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest_Test2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest_Test2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.B) > 0 { for iNdEx := len(m.B) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.B[iNdEx]) copy(dAtA[i:], m.B[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.B[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *OneofTest_Test3_Element2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest_Test3_Element2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest_Test3_Element2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.D != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.D)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *OneofTest_Test3) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest_Test3) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest_Test3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.C != nil { size, err := m.C.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *OneofTest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if vtmsg, ok := m.Test.(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *OneofTest_Test1_) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest_Test1_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.Test1 != nil { size, err := m.Test1.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *OneofTest_Test2_) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest_Test2_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.Test2 != nil { size, err := m.Test2.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *OneofTest_Test3_) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest_Test3_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.Test3 != nil { size, err := m.Test3.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *OneofTest_Test4) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OneofTest_Test4) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.Test4) copy(dAtA[i:], m.Test4) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Test4))) i-- dAtA[i] = 0x22 return len(dAtA) - i, nil } func (m *OneofTest_Test1) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest_Test1) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest_Test1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.A != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *OneofTest_Test2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest_Test2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest_Test2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.B) > 0 { for iNdEx := len(m.B) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.B[iNdEx]) copy(dAtA[i:], m.B[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.B[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *OneofTest_Test3_Element2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest_Test3_Element2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest_Test3_Element2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.D != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.D)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *OneofTest_Test3) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest_Test3) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest_Test3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.C != nil { size, err := m.C.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *OneofTest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OneofTest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if msg, ok := m.Test.(*OneofTest_Test4); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Test.(*OneofTest_Test3_); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Test.(*OneofTest_Test2_); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Test.(*OneofTest_Test1_); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *OneofTest_Test1_) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest_Test1_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.Test1 != nil { size, err := m.Test1.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *OneofTest_Test2_) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest_Test2_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.Test2 != nil { size, err := m.Test2.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *OneofTest_Test3_) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest_Test3_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.Test3 != nil { size, err := m.Test3.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *OneofTest_Test4) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OneofTest_Test4) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.Test4) copy(dAtA[i:], m.Test4) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Test4))) i-- dAtA[i] = 0x22 return len(dAtA) - i, nil } var vtprotoPool_OneofTest_Test1 = sync.Pool{ New: func() interface{} { return &OneofTest_Test1{} }, } func (m *OneofTest_Test1) ResetVT() { if m != nil { m.Reset() } } func (m *OneofTest_Test1) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_OneofTest_Test1.Put(m) } } func OneofTest_Test1FromVTPool() *OneofTest_Test1 { return vtprotoPool_OneofTest_Test1.Get().(*OneofTest_Test1) } var vtprotoPool_OneofTest_Test2 = sync.Pool{ New: func() interface{} { return &OneofTest_Test2{} }, } func (m *OneofTest_Test2) ResetVT() { if m != nil { f0 := m.B[:0] m.Reset() m.B = f0 } } func (m *OneofTest_Test2) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_OneofTest_Test2.Put(m) } } func OneofTest_Test2FromVTPool() *OneofTest_Test2 { return vtprotoPool_OneofTest_Test2.Get().(*OneofTest_Test2) } var vtprotoPool_OneofTest_Test3_Element2 = sync.Pool{ New: func() interface{} { return &OneofTest_Test3_Element2{} }, } func (m *OneofTest_Test3_Element2) ResetVT() { if m != nil { m.Reset() } } func (m *OneofTest_Test3_Element2) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_OneofTest_Test3_Element2.Put(m) } } func OneofTest_Test3_Element2FromVTPool() *OneofTest_Test3_Element2 { return vtprotoPool_OneofTest_Test3_Element2.Get().(*OneofTest_Test3_Element2) } var vtprotoPool_OneofTest_Test3 = sync.Pool{ New: func() interface{} { return &OneofTest_Test3{} }, } func (m *OneofTest_Test3) ResetVT() { if m != nil { m.C.ReturnToVTPool() m.Reset() } } func (m *OneofTest_Test3) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_OneofTest_Test3.Put(m) } } func OneofTest_Test3FromVTPool() *OneofTest_Test3 { return vtprotoPool_OneofTest_Test3.Get().(*OneofTest_Test3) } var vtprotoPool_OneofTest = sync.Pool{ New: func() interface{} { return &OneofTest{} }, } func (m *OneofTest) ResetVT() { if m != nil { if oneof, ok := m.Test.(*OneofTest_Test1_); ok { oneof.Test1.ReturnToVTPool() } if oneof, ok := m.Test.(*OneofTest_Test2_); ok { oneof.Test2.ReturnToVTPool() } if oneof, ok := m.Test.(*OneofTest_Test3_); ok { oneof.Test3.ReturnToVTPool() } m.Reset() } } func (m *OneofTest) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_OneofTest.Put(m) } } func OneofTestFromVTPool() *OneofTest { return vtprotoPool_OneofTest.Get().(*OneofTest) } func (m *OneofTest_Test1) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.A != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.A)) } n += len(m.unknownFields) return n } func (m *OneofTest_Test2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.B) > 0 { for _, s := range m.B { l = len(s) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *OneofTest_Test3_Element2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.D != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.D)) } n += len(m.unknownFields) return n } func (m *OneofTest_Test3) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.C != nil { l = m.C.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } func (m *OneofTest) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if vtmsg, ok := m.Test.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } n += len(m.unknownFields) return n } func (m *OneofTest_Test1_) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Test1 != nil { l = m.Test1.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *OneofTest_Test2_) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Test2 != nil { l = m.Test2.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *OneofTest_Test3_) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Test3 != nil { l = m.Test3.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *OneofTest_Test4) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Test4) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *OneofTest_Test1) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest_Test1: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest_Test1: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } m.A = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.A |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest_Test2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest_Test2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest_Test2: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.B = append(m.B, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest_Test3_Element2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest_Test3_Element2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest_Test3_Element2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) } m.D = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.D |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest_Test3) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest_Test3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest_Test3: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.C == nil { m.C = OneofTest_Test3_Element2FromVTPool() } if err := m.C.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Test1", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Test.(*OneofTest_Test1_); ok { if err := oneof.Test1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := OneofTest_Test1FromVTPool() if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Test = &OneofTest_Test1_{Test1: v} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Test2", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Test.(*OneofTest_Test2_); ok { if err := oneof.Test2.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := OneofTest_Test2FromVTPool() if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Test = &OneofTest_Test2_{Test2: v} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Test3", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Test.(*OneofTest_Test3_); ok { if err := oneof.Test3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := OneofTest_Test3FromVTPool() if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Test = &OneofTest_Test3_{Test3: v} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Test4", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := make([]byte, postIndex-iNdEx) copy(v, dAtA[iNdEx:postIndex]) m.Test = &OneofTest_Test4{Test4: v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest_Test1) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest_Test1: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest_Test1: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } m.A = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.A |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest_Test2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest_Test2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest_Test2: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.B = append(m.B, stringValue) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest_Test3_Element2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest_Test3_Element2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest_Test3_Element2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) } m.D = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.D |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest_Test3) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest_Test3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest_Test3: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.C == nil { m.C = OneofTest_Test3_Element2FromVTPool() } if err := m.C.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OneofTest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OneofTest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OneofTest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Test1", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Test.(*OneofTest_Test1_); ok { if err := oneof.Test1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := OneofTest_Test1FromVTPool() if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Test = &OneofTest_Test1_{Test1: v} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Test2", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Test.(*OneofTest_Test2_); ok { if err := oneof.Test2.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := OneofTest_Test2FromVTPool() if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Test = &OneofTest_Test2_{Test2: v} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Test3", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Test.(*OneofTest_Test3_); ok { if err := oneof.Test3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := OneofTest_Test3FromVTPool() if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Test = &OneofTest_Test3_{Test3: v} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Test4", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := dAtA[iNdEx:postIndex] m.Test = &OneofTest_Test4{Test4: v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool_with_slice_reuse.pb.go000066400000000000000000000272311455570004500313100ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: pool/pool_with_slice_reuse.proto package pool import ( _ "github.com/planetscale/vtprotobuf/vtproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Test1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Sl []string `protobuf:"bytes,1,rep,name=Sl,proto3" json:"Sl,omitempty"` } func (x *Test1) Reset() { *x = Test1{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_slice_reuse_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Test1) String() string { return protoimpl.X.MessageStringOf(x) } func (*Test1) ProtoMessage() {} func (x *Test1) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_slice_reuse_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Test1.ProtoReflect.Descriptor instead. func (*Test1) Descriptor() ([]byte, []int) { return file_pool_pool_with_slice_reuse_proto_rawDescGZIP(), []int{0} } func (x *Test1) GetSl() []string { if x != nil { return x.Sl } return nil } type Test2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Sl []*Slice2 `protobuf:"bytes,1,rep,name=Sl,proto3" json:"Sl,omitempty"` } func (x *Test2) Reset() { *x = Test2{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_slice_reuse_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Test2) String() string { return protoimpl.X.MessageStringOf(x) } func (*Test2) ProtoMessage() {} func (x *Test2) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_slice_reuse_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Test2.ProtoReflect.Descriptor instead. func (*Test2) Descriptor() ([]byte, []int) { return file_pool_pool_with_slice_reuse_proto_rawDescGZIP(), []int{1} } func (x *Test2) GetSl() []*Slice2 { if x != nil { return x.Sl } return nil } type Slice2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields A map[int64]int64 `protobuf:"bytes,1,rep,name=a,proto3" json:"a,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` B *int32 `protobuf:"varint,2,opt,name=b,proto3,oneof" json:"b,omitempty"` C []string `protobuf:"bytes,3,rep,name=c,proto3" json:"c,omitempty"` D *Element2 `protobuf:"bytes,4,opt,name=d,proto3" json:"d,omitempty"` E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` F int64 `protobuf:"varint,6,opt,name=f,proto3" json:"f,omitempty"` } func (x *Slice2) Reset() { *x = Slice2{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_slice_reuse_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Slice2) String() string { return protoimpl.X.MessageStringOf(x) } func (*Slice2) ProtoMessage() {} func (x *Slice2) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_slice_reuse_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Slice2.ProtoReflect.Descriptor instead. func (*Slice2) Descriptor() ([]byte, []int) { return file_pool_pool_with_slice_reuse_proto_rawDescGZIP(), []int{2} } func (x *Slice2) GetA() map[int64]int64 { if x != nil { return x.A } return nil } func (x *Slice2) GetB() int32 { if x != nil && x.B != nil { return *x.B } return 0 } func (x *Slice2) GetC() []string { if x != nil { return x.C } return nil } func (x *Slice2) GetD() *Element2 { if x != nil { return x.D } return nil } func (x *Slice2) GetE() string { if x != nil { return x.E } return "" } func (x *Slice2) GetF() int64 { if x != nil { return x.F } return 0 } type Element2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` } func (x *Element2) Reset() { *x = Element2{} if protoimpl.UnsafeEnabled { mi := &file_pool_pool_with_slice_reuse_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Element2) String() string { return protoimpl.X.MessageStringOf(x) } func (*Element2) ProtoMessage() {} func (x *Element2) ProtoReflect() protoreflect.Message { mi := &file_pool_pool_with_slice_reuse_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Element2.ProtoReflect.Descriptor instead. func (*Element2) Descriptor() ([]byte, []int) { return file_pool_pool_with_slice_reuse_proto_rawDescGZIP(), []int{3} } func (x *Element2) GetA() int32 { if x != nil { return x.A } return 0 } var File_pool_pool_with_slice_reuse_proto protoreflect.FileDescriptor var file_pool_pool_with_slice_reuse_proto_rawDesc = []byte{ 0x0a, 0x20, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x53, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x53, 0x6c, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x22, 0x26, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x32, 0x12, 0x17, 0x0a, 0x02, 0x53, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x32, 0x52, 0x02, 0x53, 0x6c, 0x3a, 0x04, 0xa8, 0xa6, 0x1f, 0x01, 0x22, 0xb8, 0x01, 0x0a, 0x06, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x32, 0x12, 0x1c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x32, 0x2e, 0x41, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x01, 0x61, 0x12, 0x11, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x01, 0x62, 0x88, 0x01, 0x01, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x01, 0x63, 0x12, 0x17, 0x0a, 0x01, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x52, 0x01, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x66, 0x1a, 0x34, 0x0a, 0x06, 0x41, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x04, 0x0a, 0x02, 0x5f, 0x62, 0x22, 0x18, 0x0a, 0x08, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x42, 0x10, 0x5a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_pool_pool_with_slice_reuse_proto_rawDescOnce sync.Once file_pool_pool_with_slice_reuse_proto_rawDescData = file_pool_pool_with_slice_reuse_proto_rawDesc ) func file_pool_pool_with_slice_reuse_proto_rawDescGZIP() []byte { file_pool_pool_with_slice_reuse_proto_rawDescOnce.Do(func() { file_pool_pool_with_slice_reuse_proto_rawDescData = protoimpl.X.CompressGZIP(file_pool_pool_with_slice_reuse_proto_rawDescData) }) return file_pool_pool_with_slice_reuse_proto_rawDescData } var file_pool_pool_with_slice_reuse_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_pool_pool_with_slice_reuse_proto_goTypes = []interface{}{ (*Test1)(nil), // 0: Test1 (*Test2)(nil), // 1: Test2 (*Slice2)(nil), // 2: Slice2 (*Element2)(nil), // 3: Element2 nil, // 4: Slice2.AEntry } var file_pool_pool_with_slice_reuse_proto_depIdxs = []int32{ 2, // 0: Test2.Sl:type_name -> Slice2 4, // 1: Slice2.a:type_name -> Slice2.AEntry 3, // 2: Slice2.d:type_name -> Element2 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name } func init() { file_pool_pool_with_slice_reuse_proto_init() } func file_pool_pool_with_slice_reuse_proto_init() { if File_pool_pool_with_slice_reuse_proto != nil { return } if !protoimpl.UnsafeEnabled { file_pool_pool_with_slice_reuse_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Test1); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pool_pool_with_slice_reuse_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Test2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pool_pool_with_slice_reuse_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Slice2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pool_pool_with_slice_reuse_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Element2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_pool_pool_with_slice_reuse_proto_msgTypes[2].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pool_pool_with_slice_reuse_proto_rawDesc, NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, GoTypes: file_pool_pool_with_slice_reuse_proto_goTypes, DependencyIndexes: file_pool_pool_with_slice_reuse_proto_depIdxs, MessageInfos: file_pool_pool_with_slice_reuse_proto_msgTypes, }.Build() File_pool_pool_with_slice_reuse_proto = out.File file_pool_pool_with_slice_reuse_proto_rawDesc = nil file_pool_pool_with_slice_reuse_proto_goTypes = nil file_pool_pool_with_slice_reuse_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool_with_slice_reuse.proto000066400000000000000000000007131455570004500314420ustar00rootroot00000000000000syntax = "proto3"; option go_package = "testproto/pool"; import "github.com/planetscale/vtprotobuf/vtproto/ext.proto"; message Test1 { option (vtproto.mempool) = true; repeated string Sl = 1; } message Test2 { option (vtproto.mempool) = true; repeated Slice2 Sl = 1; } message Slice2 { map a = 1; optional int32 b = 2; repeated string c = 3; Element2 d = 4; string e = 5; int64 f = 6; } message Element2 { int32 a = 1; }golang-github-planetscale-vtprotobuf-0.6.0/testproto/pool/pool_with_slice_reuse_vtproto.pb.go000066400000000000000000001155771455570004500331200ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: pool/pool_with_slice_reuse.proto package pool import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *Test1) CloneVT() *Test1 { if m == nil { return (*Test1)(nil) } r := Test1FromVTPool() if rhs := m.Sl; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.Sl = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Test1) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Test2) CloneVT() *Test2 { if m == nil { return (*Test2)(nil) } r := Test2FromVTPool() if rhs := m.Sl; rhs != nil { tmpContainer := make([]*Slice2, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Sl = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Test2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Slice2) CloneVT() *Slice2 { if m == nil { return (*Slice2)(nil) } r := new(Slice2) r.D = m.D.CloneVT() r.E = m.E r.F = m.F if rhs := m.A; rhs != nil { tmpContainer := make(map[int64]int64, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.A = tmpContainer } if rhs := m.B; rhs != nil { tmpVal := *rhs r.B = &tmpVal } if rhs := m.C; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.C = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Slice2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Element2) CloneVT() *Element2 { if m == nil { return (*Element2)(nil) } r := new(Element2) r.A = m.A if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Element2) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *Test1) EqualVT(that *Test1) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Sl) != len(that.Sl) { return false } for i, vx := range this.Sl { vy := that.Sl[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Test1) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Test1) if !ok { return false } return this.EqualVT(that) } func (this *Test2) EqualVT(that *Test2) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Sl) != len(that.Sl) { return false } for i, vx := range this.Sl { vy := that.Sl[i] if p, q := vx, vy; p != q { if p == nil { p = &Slice2{} } if q == nil { q = &Slice2{} } if !p.EqualVT(q) { return false } } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Test2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Test2) if !ok { return false } return this.EqualVT(that) } func (this *Slice2) EqualVT(that *Slice2) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.A) != len(that.A) { return false } for i, vx := range this.A { vy, ok := that.A[i] if !ok { return false } if vx != vy { return false } } if p, q := this.B, that.B; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.C) != len(that.C) { return false } for i, vx := range this.C { vy := that.C[i] if vx != vy { return false } } if !this.D.EqualVT(that.D) { return false } if this.E != that.E { return false } if this.F != that.F { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *Slice2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Slice2) if !ok { return false } return this.EqualVT(that) } func (this *Element2) EqualVT(that *Element2) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.A != that.A { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *Element2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Element2) if !ok { return false } return this.EqualVT(that) } func (m *Test1) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Test1) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Test1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Sl) > 0 { for iNdEx := len(m.Sl) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Sl[iNdEx]) copy(dAtA[i:], m.Sl[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Sl[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Test2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Test2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Test2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Sl) > 0 { for iNdEx := len(m.Sl) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Sl[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Slice2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Slice2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Slice2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.F != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.F)) i-- dAtA[i] = 0x30 } if len(m.E) > 0 { i -= len(m.E) copy(dAtA[i:], m.E) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.E))) i-- dAtA[i] = 0x2a } if m.D != nil { size, err := m.D.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } if len(m.C) > 0 { for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.C[iNdEx]) copy(dAtA[i:], m.C[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.C[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.B != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.B)) i-- dAtA[i] = 0x10 } if len(m.A) > 0 { for k := range m.A { v := m.A[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Element2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Element2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Element2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.A != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Test1) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Test1) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Test1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Sl) > 0 { for iNdEx := len(m.Sl) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Sl[iNdEx]) copy(dAtA[i:], m.Sl[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Sl[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Test2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Test2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Test2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Sl) > 0 { for iNdEx := len(m.Sl) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Sl[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Slice2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Slice2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Slice2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.F != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.F)) i-- dAtA[i] = 0x30 } if len(m.E) > 0 { i -= len(m.E) copy(dAtA[i:], m.E) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.E))) i-- dAtA[i] = 0x2a } if m.D != nil { size, err := m.D.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } if len(m.C) > 0 { for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.C[iNdEx]) copy(dAtA[i:], m.C[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.C[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.B != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.B)) i-- dAtA[i] = 0x10 } if len(m.A) > 0 { for k := range m.A { v := m.A[k] baseI := i i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Element2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Element2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Element2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.A != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.A)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } var vtprotoPool_Test1 = sync.Pool{ New: func() interface{} { return &Test1{} }, } func (m *Test1) ResetVT() { if m != nil { f0 := m.Sl[:0] m.Reset() m.Sl = f0 } } func (m *Test1) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_Test1.Put(m) } } func Test1FromVTPool() *Test1 { return vtprotoPool_Test1.Get().(*Test1) } var vtprotoPool_Test2 = sync.Pool{ New: func() interface{} { return &Test2{} }, } func (m *Test2) ResetVT() { if m != nil { for _, mm := range m.Sl { mm.Reset() } f0 := m.Sl[:0] m.Reset() m.Sl = f0 } } func (m *Test2) ReturnToVTPool() { if m != nil { m.ResetVT() vtprotoPool_Test2.Put(m) } } func Test2FromVTPool() *Test2 { return vtprotoPool_Test2.Get().(*Test2) } func (m *Test1) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Sl) > 0 { for _, s := range m.Sl { l = len(s) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *Test2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Sl) > 0 { for _, e := range m.Sl { l = e.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *Slice2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.A) > 0 { for k, v := range m.A { _ = k _ = v mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if m.B != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.B)) } if len(m.C) > 0 { for _, s := range m.C { l = len(s) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.D != nil { l = m.D.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.E) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.F != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.F)) } n += len(m.unknownFields) return n } func (m *Element2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.A != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.A)) } n += len(m.unknownFields) return n } func (m *Test1) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Test1: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Test1: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sl", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Sl = append(m.Sl, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Test2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Test2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Test2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sl", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if len(m.Sl) == cap(m.Sl) { m.Sl = append(m.Sl, &Slice2{}) } else { m.Sl = m.Sl[:len(m.Sl)+1] if m.Sl[len(m.Sl)-1] == nil { m.Sl[len(m.Sl)-1] = &Slice2{} } } if err := m.Sl[len(m.Sl)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Slice2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Slice2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Slice2: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.A == nil { m.A = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.A[mapkey] = mapvalue iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(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 stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.C = append(m.C, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.D == nil { m.D = &Element2{} } if err := m.D.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field E", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.E = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) } m.F = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.F |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Element2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Element2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Element2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } m.A = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.A |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Test1) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Test1: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Test1: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sl", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Sl = append(m.Sl, stringValue) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Test2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Test2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Test2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sl", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if len(m.Sl) == cap(m.Sl) { m.Sl = append(m.Sl, &Slice2{}) } else { m.Sl = m.Sl[:len(m.Sl)+1] if m.Sl[len(m.Sl)-1] == nil { m.Sl[len(m.Sl)-1] = &Slice2{} } } if err := m.Sl[len(m.Sl)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Slice2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Slice2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Slice2: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.A == nil { m.A = make(map[int64]int64) } var mapkey int64 var mapvalue int64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } } } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.A[mapkey] = mapvalue iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(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 stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.C = append(m.C, stringValue) iNdEx = postIndex case 4: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.D == nil { m.D = &Element2{} } if err := m.D.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field E", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.E = stringValue iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) } m.F = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.F |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Element2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Element2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Element2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } m.A = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.A |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto2/000077500000000000000000000000001455570004500242425ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto2/scalars.pb.go000066400000000000000000001710061455570004500266260ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: proto2/scalars.proto package proto2 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type EnumMessage_Num int32 const ( EnumMessage_TEN EnumMessage_Num = 10 EnumMessage_NINE EnumMessage_Num = 9 EnumMessage_EIGHT EnumMessage_Num = 8 EnumMessage_SEVEN EnumMessage_Num = 7 ) // Enum value maps for EnumMessage_Num. var ( EnumMessage_Num_name = map[int32]string{ 10: "TEN", 9: "NINE", 8: "EIGHT", 7: "SEVEN", } EnumMessage_Num_value = map[string]int32{ "TEN": 10, "NINE": 9, "EIGHT": 8, "SEVEN": 7, } ) func (x EnumMessage_Num) Enum() *EnumMessage_Num { p := new(EnumMessage_Num) *p = x return p } func (x EnumMessage_Num) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (EnumMessage_Num) Descriptor() protoreflect.EnumDescriptor { return file_proto2_scalars_proto_enumTypes[0].Descriptor() } func (EnumMessage_Num) Type() protoreflect.EnumType { return &file_proto2_scalars_proto_enumTypes[0] } func (x EnumMessage_Num) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *EnumMessage_Num) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = EnumMessage_Num(num) return nil } // Deprecated: Use EnumMessage_Num.Descriptor instead. func (EnumMessage_Num) EnumDescriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{15, 0} } type DoubleMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *float64 `protobuf:"fixed64,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *float64 `protobuf:"fixed64,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []float64 `protobuf:"fixed64,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []float64 `protobuf:"fixed64,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for DoubleMessage fields. const ( Default_DoubleMessage_RequiredField = float64(1) Default_DoubleMessage_OptionalField = float64(2) ) func (x *DoubleMessage) Reset() { *x = DoubleMessage{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DoubleMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*DoubleMessage) ProtoMessage() {} func (x *DoubleMessage) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DoubleMessage.ProtoReflect.Descriptor instead. func (*DoubleMessage) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{0} } func (x *DoubleMessage) GetRequiredField() float64 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_DoubleMessage_RequiredField } func (x *DoubleMessage) GetOptionalField() float64 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_DoubleMessage_OptionalField } func (x *DoubleMessage) GetRepeatedField() []float64 { if x != nil { return x.RepeatedField } return nil } func (x *DoubleMessage) GetPackedField() []float64 { if x != nil { return x.PackedField } return nil } type FloatMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *float32 `protobuf:"fixed32,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *float32 `protobuf:"fixed32,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []float32 `protobuf:"fixed32,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []float32 `protobuf:"fixed32,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for FloatMessage fields. const ( Default_FloatMessage_RequiredField = float32(1) Default_FloatMessage_OptionalField = float32(2) ) func (x *FloatMessage) Reset() { *x = FloatMessage{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FloatMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*FloatMessage) ProtoMessage() {} func (x *FloatMessage) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FloatMessage.ProtoReflect.Descriptor instead. func (*FloatMessage) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{1} } func (x *FloatMessage) GetRequiredField() float32 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_FloatMessage_RequiredField } func (x *FloatMessage) GetOptionalField() float32 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_FloatMessage_OptionalField } func (x *FloatMessage) GetRepeatedField() []float32 { if x != nil { return x.RepeatedField } return nil } func (x *FloatMessage) GetPackedField() []float32 { if x != nil { return x.PackedField } return nil } type Int32Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *int32 `protobuf:"varint,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *int32 `protobuf:"varint,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []int32 `protobuf:"varint,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []int32 `protobuf:"varint,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Int32Message fields. const ( Default_Int32Message_RequiredField = int32(1) Default_Int32Message_OptionalField = int32(2) ) func (x *Int32Message) Reset() { *x = Int32Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Int32Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Int32Message) ProtoMessage() {} func (x *Int32Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Int32Message.ProtoReflect.Descriptor instead. func (*Int32Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{2} } func (x *Int32Message) GetRequiredField() int32 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Int32Message_RequiredField } func (x *Int32Message) GetOptionalField() int32 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Int32Message_OptionalField } func (x *Int32Message) GetRepeatedField() []int32 { if x != nil { return x.RepeatedField } return nil } func (x *Int32Message) GetPackedField() []int32 { if x != nil { return x.PackedField } return nil } type Int64Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *int64 `protobuf:"varint,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *int64 `protobuf:"varint,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []int64 `protobuf:"varint,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []int64 `protobuf:"varint,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Int64Message fields. const ( Default_Int64Message_RequiredField = int64(1) Default_Int64Message_OptionalField = int64(2) ) func (x *Int64Message) Reset() { *x = Int64Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Int64Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Int64Message) ProtoMessage() {} func (x *Int64Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Int64Message.ProtoReflect.Descriptor instead. func (*Int64Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{3} } func (x *Int64Message) GetRequiredField() int64 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Int64Message_RequiredField } func (x *Int64Message) GetOptionalField() int64 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Int64Message_OptionalField } func (x *Int64Message) GetRepeatedField() []int64 { if x != nil { return x.RepeatedField } return nil } func (x *Int64Message) GetPackedField() []int64 { if x != nil { return x.PackedField } return nil } type Uint32Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *uint32 `protobuf:"varint,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *uint32 `protobuf:"varint,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []uint32 `protobuf:"varint,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []uint32 `protobuf:"varint,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Uint32Message fields. const ( Default_Uint32Message_RequiredField = uint32(1) Default_Uint32Message_OptionalField = uint32(2) ) func (x *Uint32Message) Reset() { *x = Uint32Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Uint32Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Uint32Message) ProtoMessage() {} func (x *Uint32Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Uint32Message.ProtoReflect.Descriptor instead. func (*Uint32Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{4} } func (x *Uint32Message) GetRequiredField() uint32 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Uint32Message_RequiredField } func (x *Uint32Message) GetOptionalField() uint32 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Uint32Message_OptionalField } func (x *Uint32Message) GetRepeatedField() []uint32 { if x != nil { return x.RepeatedField } return nil } func (x *Uint32Message) GetPackedField() []uint32 { if x != nil { return x.PackedField } return nil } type Uint64Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *uint64 `protobuf:"varint,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *uint64 `protobuf:"varint,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []uint64 `protobuf:"varint,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []uint64 `protobuf:"varint,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Uint64Message fields. const ( Default_Uint64Message_RequiredField = uint64(1) Default_Uint64Message_OptionalField = uint64(2) ) func (x *Uint64Message) Reset() { *x = Uint64Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Uint64Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Uint64Message) ProtoMessage() {} func (x *Uint64Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Uint64Message.ProtoReflect.Descriptor instead. func (*Uint64Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{5} } func (x *Uint64Message) GetRequiredField() uint64 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Uint64Message_RequiredField } func (x *Uint64Message) GetOptionalField() uint64 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Uint64Message_OptionalField } func (x *Uint64Message) GetRepeatedField() []uint64 { if x != nil { return x.RepeatedField } return nil } func (x *Uint64Message) GetPackedField() []uint64 { if x != nil { return x.PackedField } return nil } type Sint32Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *int32 `protobuf:"zigzag32,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *int32 `protobuf:"zigzag32,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []int32 `protobuf:"zigzag32,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []int32 `protobuf:"zigzag32,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Sint32Message fields. const ( Default_Sint32Message_RequiredField = int32(1) Default_Sint32Message_OptionalField = int32(2) ) func (x *Sint32Message) Reset() { *x = Sint32Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Sint32Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Sint32Message) ProtoMessage() {} func (x *Sint32Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Sint32Message.ProtoReflect.Descriptor instead. func (*Sint32Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{6} } func (x *Sint32Message) GetRequiredField() int32 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Sint32Message_RequiredField } func (x *Sint32Message) GetOptionalField() int32 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Sint32Message_OptionalField } func (x *Sint32Message) GetRepeatedField() []int32 { if x != nil { return x.RepeatedField } return nil } func (x *Sint32Message) GetPackedField() []int32 { if x != nil { return x.PackedField } return nil } type Sint64Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *int64 `protobuf:"zigzag64,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *int64 `protobuf:"zigzag64,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []int64 `protobuf:"zigzag64,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []int64 `protobuf:"zigzag64,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Sint64Message fields. const ( Default_Sint64Message_RequiredField = int64(1) Default_Sint64Message_OptionalField = int64(2) ) func (x *Sint64Message) Reset() { *x = Sint64Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Sint64Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Sint64Message) ProtoMessage() {} func (x *Sint64Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Sint64Message.ProtoReflect.Descriptor instead. func (*Sint64Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{7} } func (x *Sint64Message) GetRequiredField() int64 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Sint64Message_RequiredField } func (x *Sint64Message) GetOptionalField() int64 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Sint64Message_OptionalField } func (x *Sint64Message) GetRepeatedField() []int64 { if x != nil { return x.RepeatedField } return nil } func (x *Sint64Message) GetPackedField() []int64 { if x != nil { return x.PackedField } return nil } type Fixed32Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *uint32 `protobuf:"fixed32,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *uint32 `protobuf:"fixed32,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []uint32 `protobuf:"fixed32,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []uint32 `protobuf:"fixed32,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Fixed32Message fields. const ( Default_Fixed32Message_RequiredField = uint32(1) Default_Fixed32Message_OptionalField = uint32(2) ) func (x *Fixed32Message) Reset() { *x = Fixed32Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Fixed32Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Fixed32Message) ProtoMessage() {} func (x *Fixed32Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Fixed32Message.ProtoReflect.Descriptor instead. func (*Fixed32Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{8} } func (x *Fixed32Message) GetRequiredField() uint32 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Fixed32Message_RequiredField } func (x *Fixed32Message) GetOptionalField() uint32 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Fixed32Message_OptionalField } func (x *Fixed32Message) GetRepeatedField() []uint32 { if x != nil { return x.RepeatedField } return nil } func (x *Fixed32Message) GetPackedField() []uint32 { if x != nil { return x.PackedField } return nil } type Fixed64Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *uint64 `protobuf:"fixed64,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *uint64 `protobuf:"fixed64,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []uint64 `protobuf:"fixed64,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []uint64 `protobuf:"fixed64,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Fixed64Message fields. const ( Default_Fixed64Message_RequiredField = uint64(1) Default_Fixed64Message_OptionalField = uint64(2) ) func (x *Fixed64Message) Reset() { *x = Fixed64Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Fixed64Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Fixed64Message) ProtoMessage() {} func (x *Fixed64Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Fixed64Message.ProtoReflect.Descriptor instead. func (*Fixed64Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{9} } func (x *Fixed64Message) GetRequiredField() uint64 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Fixed64Message_RequiredField } func (x *Fixed64Message) GetOptionalField() uint64 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Fixed64Message_OptionalField } func (x *Fixed64Message) GetRepeatedField() []uint64 { if x != nil { return x.RepeatedField } return nil } func (x *Fixed64Message) GetPackedField() []uint64 { if x != nil { return x.PackedField } return nil } type Sfixed32Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *int32 `protobuf:"fixed32,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *int32 `protobuf:"fixed32,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []int32 `protobuf:"fixed32,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []int32 `protobuf:"fixed32,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Sfixed32Message fields. const ( Default_Sfixed32Message_RequiredField = int32(1) Default_Sfixed32Message_OptionalField = int32(2) ) func (x *Sfixed32Message) Reset() { *x = Sfixed32Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Sfixed32Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Sfixed32Message) ProtoMessage() {} func (x *Sfixed32Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Sfixed32Message.ProtoReflect.Descriptor instead. func (*Sfixed32Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{10} } func (x *Sfixed32Message) GetRequiredField() int32 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Sfixed32Message_RequiredField } func (x *Sfixed32Message) GetOptionalField() int32 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Sfixed32Message_OptionalField } func (x *Sfixed32Message) GetRepeatedField() []int32 { if x != nil { return x.RepeatedField } return nil } func (x *Sfixed32Message) GetPackedField() []int32 { if x != nil { return x.PackedField } return nil } type Sfixed64Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *int64 `protobuf:"fixed64,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *int64 `protobuf:"fixed64,2,opt,name=optional_field,json=optionalField,def=2" json:"optional_field,omitempty"` RepeatedField []int64 `protobuf:"fixed64,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []int64 `protobuf:"fixed64,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for Sfixed64Message fields. const ( Default_Sfixed64Message_RequiredField = int64(1) Default_Sfixed64Message_OptionalField = int64(2) ) func (x *Sfixed64Message) Reset() { *x = Sfixed64Message{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Sfixed64Message) String() string { return protoimpl.X.MessageStringOf(x) } func (*Sfixed64Message) ProtoMessage() {} func (x *Sfixed64Message) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Sfixed64Message.ProtoReflect.Descriptor instead. func (*Sfixed64Message) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{11} } func (x *Sfixed64Message) GetRequiredField() int64 { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_Sfixed64Message_RequiredField } func (x *Sfixed64Message) GetOptionalField() int64 { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_Sfixed64Message_OptionalField } func (x *Sfixed64Message) GetRepeatedField() []int64 { if x != nil { return x.RepeatedField } return nil } func (x *Sfixed64Message) GetPackedField() []int64 { if x != nil { return x.PackedField } return nil } type BoolMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *bool `protobuf:"varint,1,req,name=required_field,json=requiredField,def=1" json:"required_field,omitempty"` OptionalField *bool `protobuf:"varint,2,opt,name=optional_field,json=optionalField" json:"optional_field,omitempty"` RepeatedField []bool `protobuf:"varint,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` PackedField []bool `protobuf:"varint,4,rep,packed,name=packed_field,json=packedField" json:"packed_field,omitempty"` } // Default values for BoolMessage fields. const ( Default_BoolMessage_RequiredField = bool(true) ) func (x *BoolMessage) Reset() { *x = BoolMessage{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *BoolMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*BoolMessage) ProtoMessage() {} func (x *BoolMessage) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use BoolMessage.ProtoReflect.Descriptor instead. func (*BoolMessage) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{12} } func (x *BoolMessage) GetRequiredField() bool { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_BoolMessage_RequiredField } func (x *BoolMessage) GetOptionalField() bool { if x != nil && x.OptionalField != nil { return *x.OptionalField } return false } func (x *BoolMessage) GetRepeatedField() []bool { if x != nil { return x.RepeatedField } return nil } func (x *BoolMessage) GetPackedField() []bool { if x != nil { return x.PackedField } return nil } type StringMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *string `protobuf:"bytes,1,req,name=required_field,json=requiredField,def=req" json:"required_field,omitempty"` OptionalField *string `protobuf:"bytes,2,opt,name=optional_field,json=optionalField,def=opt" json:"optional_field,omitempty"` RepeatedField []string `protobuf:"bytes,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` } // Default values for StringMessage fields. const ( Default_StringMessage_RequiredField = string("req") Default_StringMessage_OptionalField = string("opt") ) func (x *StringMessage) Reset() { *x = StringMessage{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StringMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*StringMessage) ProtoMessage() {} func (x *StringMessage) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use StringMessage.ProtoReflect.Descriptor instead. func (*StringMessage) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{13} } func (x *StringMessage) GetRequiredField() string { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_StringMessage_RequiredField } func (x *StringMessage) GetOptionalField() string { if x != nil && x.OptionalField != nil { return *x.OptionalField } return Default_StringMessage_OptionalField } func (x *StringMessage) GetRepeatedField() []string { if x != nil { return x.RepeatedField } return nil } type BytesMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField []byte `protobuf:"bytes,1,req,name=required_field,json=requiredField,def=req" json:"required_field,omitempty"` OptionalField []byte `protobuf:"bytes,2,opt,name=optional_field,json=optionalField,def=opt" json:"optional_field,omitempty"` RepeatedField [][]byte `protobuf:"bytes,3,rep,name=repeated_field,json=repeatedField" json:"repeated_field,omitempty"` } // Default values for BytesMessage fields. var ( Default_BytesMessage_RequiredField = []byte("req") Default_BytesMessage_OptionalField = []byte("opt") ) func (x *BytesMessage) Reset() { *x = BytesMessage{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *BytesMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*BytesMessage) ProtoMessage() {} func (x *BytesMessage) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use BytesMessage.ProtoReflect.Descriptor instead. func (*BytesMessage) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{14} } func (x *BytesMessage) GetRequiredField() []byte { if x != nil && x.RequiredField != nil { return x.RequiredField } return append([]byte(nil), Default_BytesMessage_RequiredField...) } func (x *BytesMessage) GetOptionalField() []byte { if x != nil && x.OptionalField != nil { return x.OptionalField } return append([]byte(nil), Default_BytesMessage_OptionalField...) } func (x *BytesMessage) GetRepeatedField() [][]byte { if x != nil { return x.RepeatedField } return nil } type EnumMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RequiredField *EnumMessage_Num `protobuf:"varint,1,req,name=required_field,json=requiredField,enum=EnumMessage_Num,def=7" json:"required_field,omitempty"` OptionalField *EnumMessage_Num `protobuf:"varint,2,opt,name=optional_field,json=optionalField,enum=EnumMessage_Num" json:"optional_field,omitempty"` RepeatedField []EnumMessage_Num `protobuf:"varint,3,rep,name=repeated_field,json=repeatedField,enum=EnumMessage_Num" json:"repeated_field,omitempty"` PackedField []EnumMessage_Num `protobuf:"varint,4,rep,packed,name=packed_field,json=packedField,enum=EnumMessage_Num" json:"packed_field,omitempty"` } // Default values for EnumMessage fields. const ( Default_EnumMessage_RequiredField = EnumMessage_SEVEN ) func (x *EnumMessage) Reset() { *x = EnumMessage{} if protoimpl.UnsafeEnabled { mi := &file_proto2_scalars_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EnumMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*EnumMessage) ProtoMessage() {} func (x *EnumMessage) ProtoReflect() protoreflect.Message { mi := &file_proto2_scalars_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use EnumMessage.ProtoReflect.Descriptor instead. func (*EnumMessage) Descriptor() ([]byte, []int) { return file_proto2_scalars_proto_rawDescGZIP(), []int{15} } func (x *EnumMessage) GetRequiredField() EnumMessage_Num { if x != nil && x.RequiredField != nil { return *x.RequiredField } return Default_EnumMessage_RequiredField } func (x *EnumMessage) GetOptionalField() EnumMessage_Num { if x != nil && x.OptionalField != nil { return *x.OptionalField } return EnumMessage_TEN } func (x *EnumMessage) GetRepeatedField() []EnumMessage_Num { if x != nil { return x.RepeatedField } return nil } func (x *EnumMessage) GetPackedField() []EnumMessage_Num { if x != nil { return x.PackedField } return nil } var File_proto2_scalars_proto protoreflect.FileDescriptor var file_proto2_scalars_proto_rawDesc = []byte{ 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x0d, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x01, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x01, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x02, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x02, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x02, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x0d, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x0d, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x0d, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x11, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x11, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x11, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x0d, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x12, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x12, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x0e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x07, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x07, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x0e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x06, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x06, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x06, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb3, 0x01, 0x0a, 0x0f, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0f, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb3, 0x01, 0x0a, 0x0f, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x10, 0x3a, 0x01, 0x31, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x10, 0x3a, 0x01, 0x32, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x10, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x10, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xaf, 0x01, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x08, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x8e, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x3a, 0x03, 0x72, 0x65, 0x71, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x03, 0x6f, 0x70, 0x74, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x0c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x3a, 0x03, 0x72, 0x65, 0x71, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x3a, 0x03, 0x6f, 0x70, 0x74, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4e, 0x75, 0x6d, 0x3a, 0x05, 0x53, 0x45, 0x56, 0x45, 0x4e, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4e, 0x75, 0x6d, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4e, 0x75, 0x6d, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4e, 0x75, 0x6d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x2e, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x45, 0x4e, 0x10, 0x0a, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x49, 0x4e, 0x45, 0x10, 0x09, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x49, 0x47, 0x48, 0x54, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x45, 0x56, 0x45, 0x4e, 0x10, 0x07, 0x42, 0x12, 0x5a, 0x10, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, } var ( file_proto2_scalars_proto_rawDescOnce sync.Once file_proto2_scalars_proto_rawDescData = file_proto2_scalars_proto_rawDesc ) func file_proto2_scalars_proto_rawDescGZIP() []byte { file_proto2_scalars_proto_rawDescOnce.Do(func() { file_proto2_scalars_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto2_scalars_proto_rawDescData) }) return file_proto2_scalars_proto_rawDescData } var file_proto2_scalars_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_proto2_scalars_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_proto2_scalars_proto_goTypes = []interface{}{ (EnumMessage_Num)(0), // 0: EnumMessage.Num (*DoubleMessage)(nil), // 1: DoubleMessage (*FloatMessage)(nil), // 2: FloatMessage (*Int32Message)(nil), // 3: Int32Message (*Int64Message)(nil), // 4: Int64Message (*Uint32Message)(nil), // 5: Uint32Message (*Uint64Message)(nil), // 6: Uint64Message (*Sint32Message)(nil), // 7: Sint32Message (*Sint64Message)(nil), // 8: Sint64Message (*Fixed32Message)(nil), // 9: Fixed32Message (*Fixed64Message)(nil), // 10: Fixed64Message (*Sfixed32Message)(nil), // 11: Sfixed32Message (*Sfixed64Message)(nil), // 12: Sfixed64Message (*BoolMessage)(nil), // 13: BoolMessage (*StringMessage)(nil), // 14: StringMessage (*BytesMessage)(nil), // 15: BytesMessage (*EnumMessage)(nil), // 16: EnumMessage } var file_proto2_scalars_proto_depIdxs = []int32{ 0, // 0: EnumMessage.required_field:type_name -> EnumMessage.Num 0, // 1: EnumMessage.optional_field:type_name -> EnumMessage.Num 0, // 2: EnumMessage.repeated_field:type_name -> EnumMessage.Num 0, // 3: EnumMessage.packed_field:type_name -> EnumMessage.Num 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_proto2_scalars_proto_init() } func file_proto2_scalars_proto_init() { if File_proto2_scalars_proto != nil { return } if !protoimpl.UnsafeEnabled { file_proto2_scalars_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DoubleMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FloatMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Int32Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Int64Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Uint32Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Uint64Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Sint32Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Sint64Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Fixed32Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Fixed64Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Sfixed32Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Sfixed64Message); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BoolMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StringMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BytesMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto2_scalars_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumMessage); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto2_scalars_proto_rawDesc, NumEnums: 1, NumMessages: 16, NumExtensions: 0, NumServices: 0, }, GoTypes: file_proto2_scalars_proto_goTypes, DependencyIndexes: file_proto2_scalars_proto_depIdxs, EnumInfos: file_proto2_scalars_proto_enumTypes, MessageInfos: file_proto2_scalars_proto_msgTypes, }.Build() File_proto2_scalars_proto = out.File file_proto2_scalars_proto_rawDesc = nil file_proto2_scalars_proto_goTypes = nil file_proto2_scalars_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto2/scalars.proto000066400000000000000000000070261455570004500267640ustar00rootroot00000000000000syntax = "proto2"; option go_package = "testproto/proto2"; message DoubleMessage { required double required_field = 1 [default=1]; optional double optional_field = 2 [default=2]; repeated double repeated_field = 3; repeated double packed_field = 4 [packed=true]; } message FloatMessage { required float required_field = 1 [default=1]; optional float optional_field = 2 [default=2]; repeated float repeated_field = 3; repeated float packed_field = 4 [packed=true]; } message Int32Message { required int32 required_field = 1 [default=1]; optional int32 optional_field = 2 [default=2]; repeated int32 repeated_field = 3; repeated int32 packed_field = 4 [packed=true]; } message Int64Message { required int64 required_field = 1 [default=1]; optional int64 optional_field = 2 [default=2]; repeated int64 repeated_field = 3; repeated int64 packed_field = 4 [packed=true]; } message Uint32Message { required uint32 required_field = 1 [default=1]; optional uint32 optional_field = 2 [default=2]; repeated uint32 repeated_field = 3; repeated uint32 packed_field = 4 [packed=true]; } message Uint64Message { required uint64 required_field = 1 [default=1]; optional uint64 optional_field = 2 [default=2]; repeated uint64 repeated_field = 3; repeated uint64 packed_field = 4 [packed=true]; } message Sint32Message { required sint32 required_field = 1 [default=1]; optional sint32 optional_field = 2 [default=2]; repeated sint32 repeated_field = 3; repeated sint32 packed_field = 4 [packed=true]; } message Sint64Message { required sint64 required_field = 1 [default=1]; optional sint64 optional_field = 2 [default=2]; repeated sint64 repeated_field = 3; repeated sint64 packed_field = 4 [packed=true]; } message Fixed32Message { required fixed32 required_field = 1 [default=1]; optional fixed32 optional_field = 2 [default=2]; repeated fixed32 repeated_field = 3; repeated fixed32 packed_field = 4 [packed=true]; } message Fixed64Message { required fixed64 required_field = 1 [default=1]; optional fixed64 optional_field = 2 [default=2]; repeated fixed64 repeated_field = 3; repeated fixed64 packed_field = 4 [packed=true]; } message Sfixed32Message { required sfixed32 required_field = 1 [default=1]; optional sfixed32 optional_field = 2 [default=2]; repeated sfixed32 repeated_field = 3; repeated sfixed32 packed_field = 4 [packed=true]; } message Sfixed64Message { required sfixed64 required_field = 1 [default=1]; optional sfixed64 optional_field = 2 [default=2]; repeated sfixed64 repeated_field = 3; repeated sfixed64 packed_field = 4 [packed=true]; } message BoolMessage { required bool required_field = 1 [default=true]; optional bool optional_field = 2; repeated bool repeated_field = 3; repeated bool packed_field = 4 [packed=true]; } message StringMessage { required string required_field = 1 [default="req"]; optional string optional_field = 2 [default="opt"]; repeated string repeated_field = 3; } message BytesMessage { required bytes required_field = 1 [default="req"]; optional bytes optional_field = 2 [default="opt"]; repeated bytes repeated_field = 3; } message EnumMessage { enum Num { TEN = 10; NINE = 9; EIGHT = 8; SEVEN = 7; } required Num required_field = 1 [default=SEVEN]; optional Num optional_field = 2; repeated Num repeated_field = 3; repeated Num packed_field = 4 [packed=true]; } golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto2/scalars_vtproto.pb.go000066400000000000000000007515371455570004500304400ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: proto2/scalars.proto package proto2 import ( binary "encoding/binary" fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" math "math" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *DoubleMessage) CloneVT() *DoubleMessage { if m == nil { return (*DoubleMessage)(nil) } r := new(DoubleMessage) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]float64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]float64, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *DoubleMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *FloatMessage) CloneVT() *FloatMessage { if m == nil { return (*FloatMessage)(nil) } r := new(FloatMessage) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *FloatMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Int32Message) CloneVT() *Int32Message { if m == nil { return (*Int32Message)(nil) } r := new(Int32Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Int32Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Int64Message) CloneVT() *Int64Message { if m == nil { return (*Int64Message)(nil) } r := new(Int64Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Int64Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Uint32Message) CloneVT() *Uint32Message { if m == nil { return (*Uint32Message)(nil) } r := new(Uint32Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Uint32Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Uint64Message) CloneVT() *Uint64Message { if m == nil { return (*Uint64Message)(nil) } r := new(Uint64Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Uint64Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Sint32Message) CloneVT() *Sint32Message { if m == nil { return (*Sint32Message)(nil) } r := new(Sint32Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Sint32Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Sint64Message) CloneVT() *Sint64Message { if m == nil { return (*Sint64Message)(nil) } r := new(Sint64Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Sint64Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Fixed32Message) CloneVT() *Fixed32Message { if m == nil { return (*Fixed32Message)(nil) } r := new(Fixed32Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]uint32, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Fixed32Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Fixed64Message) CloneVT() *Fixed64Message { if m == nil { return (*Fixed64Message)(nil) } r := new(Fixed64Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]uint64, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Fixed64Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Sfixed32Message) CloneVT() *Sfixed32Message { if m == nil { return (*Sfixed32Message)(nil) } r := new(Sfixed32Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]int32, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Sfixed32Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Sfixed64Message) CloneVT() *Sfixed64Message { if m == nil { return (*Sfixed64Message)(nil) } r := new(Sfixed64Message) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Sfixed64Message) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *BoolMessage) CloneVT() *BoolMessage { if m == nil { return (*BoolMessage)(nil) } r := new(BoolMessage) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]bool, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]bool, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *BoolMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *StringMessage) CloneVT() *StringMessage { if m == nil { return (*StringMessage)(nil) } r := new(StringMessage) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *StringMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *BytesMessage) CloneVT() *BytesMessage { if m == nil { return (*BytesMessage)(nil) } r := new(BytesMessage) if rhs := m.RequiredField; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.RequiredField = tmpBytes } if rhs := m.OptionalField; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.OptionalField = tmpBytes } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([][]byte, len(rhs)) for k, v := range rhs { tmpBytes := make([]byte, len(v)) copy(tmpBytes, v) tmpContainer[k] = tmpBytes } r.RepeatedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *BytesMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *EnumMessage) CloneVT() *EnumMessage { if m == nil { return (*EnumMessage)(nil) } r := new(EnumMessage) if rhs := m.RequiredField; rhs != nil { tmpVal := *rhs r.RequiredField = &tmpVal } if rhs := m.OptionalField; rhs != nil { tmpVal := *rhs r.OptionalField = &tmpVal } if rhs := m.RepeatedField; rhs != nil { tmpContainer := make([]EnumMessage_Num, len(rhs)) copy(tmpContainer, rhs) r.RepeatedField = tmpContainer } if rhs := m.PackedField; rhs != nil { tmpContainer := make([]EnumMessage_Num, len(rhs)) copy(tmpContainer, rhs) r.PackedField = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *EnumMessage) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *DoubleMessage) EqualVT(that *DoubleMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *DoubleMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*DoubleMessage) if !ok { return false } return this.EqualVT(that) } func (this *FloatMessage) EqualVT(that *FloatMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *FloatMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*FloatMessage) if !ok { return false } return this.EqualVT(that) } func (this *Int32Message) EqualVT(that *Int32Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Int32Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Int32Message) if !ok { return false } return this.EqualVT(that) } func (this *Int64Message) EqualVT(that *Int64Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Int64Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Int64Message) if !ok { return false } return this.EqualVT(that) } func (this *Uint32Message) EqualVT(that *Uint32Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Uint32Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Uint32Message) if !ok { return false } return this.EqualVT(that) } func (this *Uint64Message) EqualVT(that *Uint64Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Uint64Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Uint64Message) if !ok { return false } return this.EqualVT(that) } func (this *Sint32Message) EqualVT(that *Sint32Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Sint32Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Sint32Message) if !ok { return false } return this.EqualVT(that) } func (this *Sint64Message) EqualVT(that *Sint64Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Sint64Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Sint64Message) if !ok { return false } return this.EqualVT(that) } func (this *Fixed32Message) EqualVT(that *Fixed32Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Fixed32Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Fixed32Message) if !ok { return false } return this.EqualVT(that) } func (this *Fixed64Message) EqualVT(that *Fixed64Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Fixed64Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Fixed64Message) if !ok { return false } return this.EqualVT(that) } func (this *Sfixed32Message) EqualVT(that *Sfixed32Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Sfixed32Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Sfixed32Message) if !ok { return false } return this.EqualVT(that) } func (this *Sfixed64Message) EqualVT(that *Sfixed64Message) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Sfixed64Message) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Sfixed64Message) if !ok { return false } return this.EqualVT(that) } func (this *BoolMessage) EqualVT(that *BoolMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *BoolMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*BoolMessage) if !ok { return false } return this.EqualVT(that) } func (this *StringMessage) EqualVT(that *StringMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *StringMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*StringMessage) if !ok { return false } return this.EqualVT(that) } func (this *BytesMessage) EqualVT(that *BytesMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if string(vx) != string(vy) { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *BytesMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*BytesMessage) if !ok { return false } return this.EqualVT(that) } func (this *EnumMessage) EqualVT(that *EnumMessage) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.RequiredField, that.RequiredField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalField, that.OptionalField; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if len(this.RepeatedField) != len(that.RepeatedField) { return false } for i, vx := range this.RepeatedField { vy := that.RepeatedField[i] if vx != vy { return false } } if len(this.PackedField) != len(that.PackedField) { return false } for i, vx := range this.PackedField { vy := that.PackedField[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *EnumMessage) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*EnumMessage) if !ok { return false } return this.EqualVT(that) } func (m *DoubleMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DoubleMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *DoubleMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { f1 := math.Float64bits(float64(m.PackedField[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*8)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { f2 := math.Float64bits(float64(m.RepeatedField[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f2)) i-- dAtA[i] = 0x19 } } if m.OptionalField != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.OptionalField)))) i-- dAtA[i] = 0x11 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.RequiredField)))) i-- dAtA[i] = 0x9 } return len(dAtA) - i, nil } func (m *FloatMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FloatMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *FloatMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { f1 := math.Float32bits(float32(m.PackedField[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f1)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*4)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { f2 := math.Float32bits(float32(m.RepeatedField[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) i-- dAtA[i] = 0x1d } } if m.OptionalField != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.OptionalField)))) i-- dAtA[i] = 0x15 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.RequiredField)))) i-- dAtA[i] = 0xd } return len(dAtA) - i, nil } func (m *Int32Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Int32Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Int32Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num1 := range m.PackedField { num := uint64(num1) for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Int64Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Int64Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Int64Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num1 := range m.PackedField { num := uint64(num1) for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Uint32Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Uint32Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Uint32Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num := range m.PackedField { for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Uint64Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Uint64Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Uint64Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num := range m.PackedField { for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Sint32Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sint32Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Sint32Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize2 j1 := i for _, num := range m.PackedField { x3 := (uint32(num) << 1) ^ uint32((num >> 31)) for x3 >= 1<<7 { dAtA[j1] = uint8(uint64(x3)&0x7f | 0x80) j1++ x3 >>= 7 } dAtA[j1] = uint8(x3) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { x4 := (uint32(m.RepeatedField[iNdEx]) << 1) ^ uint32((m.RepeatedField[iNdEx] >> 31)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x4)) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.OptionalField)<<1)^uint32((*m.OptionalField>>31)))) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.RequiredField)<<1)^uint32((*m.RequiredField>>31)))) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Sint64Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sint64Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Sint64Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize2 j1 := i for _, num := range m.PackedField { x3 := (uint64(num) << 1) ^ uint64((num >> 63)) for x3 >= 1<<7 { dAtA[j1] = uint8(uint64(x3)&0x7f | 0x80) j1++ x3 >>= 7 } dAtA[j1] = uint8(x3) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { x4 := (uint64(m.RepeatedField[iNdEx]) << 1) ^ uint64((m.RepeatedField[iNdEx] >> 63)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x4)) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.OptionalField)<<1)^uint64((*m.OptionalField>>63)))) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.RequiredField)<<1)^uint64((*m.RequiredField>>63)))) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Fixed32Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Fixed32Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Fixed32Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedField[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*4)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x1d } } if m.OptionalField != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalField)) i-- dAtA[i] = 0x15 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.RequiredField)) i-- dAtA[i] = 0xd } return len(dAtA) - i, nil } func (m *Fixed64Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Fixed64Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Fixed64Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedField[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*8)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x19 } } if m.OptionalField != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalField)) i-- dAtA[i] = 0x11 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.RequiredField)) i-- dAtA[i] = 0x9 } return len(dAtA) - i, nil } func (m *Sfixed32Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sfixed32Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Sfixed32Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedField[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*4)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x1d } } if m.OptionalField != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalField)) i-- dAtA[i] = 0x15 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.RequiredField)) i-- dAtA[i] = 0xd } return len(dAtA) - i, nil } func (m *Sfixed64Message) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sfixed64Message) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Sfixed64Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedField[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*8)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x19 } } if m.OptionalField != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalField)) i-- dAtA[i] = 0x11 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.RequiredField)) i-- dAtA[i] = 0x9 } return len(dAtA) - i, nil } func (m *BoolMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BoolMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *BoolMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i-- if m.PackedField[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField))) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i-- if m.RepeatedField[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i-- if *m.OptionalField { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i-- if *m.RequiredField { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *StringMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StringMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *StringMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedField[iNdEx]) copy(dAtA[i:], m.RepeatedField[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedField[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.OptionalField != nil { i -= len(*m.OptionalField) copy(dAtA[i:], *m.OptionalField) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalField))) i-- dAtA[i] = 0x12 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= len(*m.RequiredField) copy(dAtA[i:], *m.RequiredField) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.RequiredField))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *BytesMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BytesMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *BytesMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedField[iNdEx]) copy(dAtA[i:], m.RepeatedField[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedField[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.OptionalField != nil { i -= len(m.OptionalField) copy(dAtA[i:], m.OptionalField) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalField))) i-- dAtA[i] = 0x12 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= len(m.RequiredField) copy(dAtA[i:], m.RequiredField) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequiredField))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *EnumMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *EnumMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *EnumMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num1 := range m.PackedField { num := uint64(num1) for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *DoubleMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DoubleMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *DoubleMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { f1 := math.Float64bits(float64(m.PackedField[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*8)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { f2 := math.Float64bits(float64(m.RepeatedField[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f2)) i-- dAtA[i] = 0x19 } } if m.OptionalField != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.OptionalField)))) i-- dAtA[i] = 0x11 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.RequiredField)))) i-- dAtA[i] = 0x9 } return len(dAtA) - i, nil } func (m *FloatMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FloatMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *FloatMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { f1 := math.Float32bits(float32(m.PackedField[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f1)) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*4)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { f2 := math.Float32bits(float32(m.RepeatedField[iNdEx])) i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) i-- dAtA[i] = 0x1d } } if m.OptionalField != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.OptionalField)))) i-- dAtA[i] = 0x15 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.RequiredField)))) i-- dAtA[i] = 0xd } return len(dAtA) - i, nil } func (m *Int32Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Int32Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Int32Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num1 := range m.PackedField { num := uint64(num1) for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Int64Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Int64Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Int64Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num1 := range m.PackedField { num := uint64(num1) for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Uint32Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Uint32Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Uint32Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num := range m.PackedField { for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Uint64Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Uint64Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Uint64Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num := range m.PackedField { for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Sint32Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sint32Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Sint32Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize2 j1 := i for _, num := range m.PackedField { x3 := (uint32(num) << 1) ^ uint32((num >> 31)) for x3 >= 1<<7 { dAtA[j1] = uint8(uint64(x3)&0x7f | 0x80) j1++ x3 >>= 7 } dAtA[j1] = uint8(x3) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { x4 := (uint32(m.RepeatedField[iNdEx]) << 1) ^ uint32((m.RepeatedField[iNdEx] >> 31)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x4)) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.OptionalField)<<1)^uint32((*m.OptionalField>>31)))) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.RequiredField)<<1)^uint32((*m.RequiredField>>31)))) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Sint64Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sint64Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Sint64Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfZigzag(uint64(num)) } i -= pksize2 j1 := i for _, num := range m.PackedField { x3 := (uint64(num) << 1) ^ uint64((num >> 63)) for x3 >= 1<<7 { dAtA[j1] = uint8(uint64(x3)&0x7f | 0x80) j1++ x3 >>= 7 } dAtA[j1] = uint8(x3) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { x4 := (uint64(m.RepeatedField[iNdEx]) << 1) ^ uint64((m.RepeatedField[iNdEx] >> 63)) i = protohelpers.EncodeVarint(dAtA, i, uint64(x4)) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.OptionalField)<<1)^uint64((*m.OptionalField>>63)))) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.RequiredField)<<1)^uint64((*m.RequiredField>>63)))) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Fixed32Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Fixed32Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Fixed32Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedField[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*4)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x1d } } if m.OptionalField != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalField)) i-- dAtA[i] = 0x15 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.RequiredField)) i-- dAtA[i] = 0xd } return len(dAtA) - i, nil } func (m *Fixed64Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Fixed64Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Fixed64Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedField[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*8)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x19 } } if m.OptionalField != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalField)) i-- dAtA[i] = 0x11 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.RequiredField)) i-- dAtA[i] = 0x9 } return len(dAtA) - i, nil } func (m *Sfixed32Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sfixed32Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Sfixed32Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.PackedField[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*4)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x1d } } if m.OptionalField != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalField)) i-- dAtA[i] = 0x15 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.RequiredField)) i-- dAtA[i] = 0xd } return len(dAtA) - i, nil } func (m *Sfixed64Message) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sfixed64Message) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Sfixed64Message) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.PackedField[iNdEx])) } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField)*8)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x19 } } if m.OptionalField != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalField)) i-- dAtA[i] = 0x11 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.RequiredField)) i-- dAtA[i] = 0x9 } return len(dAtA) - i, nil } func (m *BoolMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BoolMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *BoolMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { for iNdEx := len(m.PackedField) - 1; iNdEx >= 0; iNdEx-- { i-- if m.PackedField[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PackedField))) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i-- if m.RepeatedField[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i-- if *m.OptionalField { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i-- if *m.RequiredField { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *StringMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StringMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *StringMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedField[iNdEx]) copy(dAtA[i:], m.RepeatedField[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedField[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.OptionalField != nil { i -= len(*m.OptionalField) copy(dAtA[i:], *m.OptionalField) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalField))) i-- dAtA[i] = 0x12 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= len(*m.RequiredField) copy(dAtA[i:], *m.RequiredField) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.RequiredField))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *BytesMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BytesMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *BytesMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.RepeatedField[iNdEx]) copy(dAtA[i:], m.RepeatedField[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RepeatedField[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.OptionalField != nil { i -= len(m.OptionalField) copy(dAtA[i:], m.OptionalField) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalField))) i-- dAtA[i] = 0x12 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i -= len(m.RequiredField) copy(dAtA[i:], m.RequiredField) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequiredField))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *EnumMessage) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *EnumMessage) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *EnumMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.PackedField) > 0 { var pksize2 int for _, num := range m.PackedField { pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i for _, num1 := range m.PackedField { num := uint64(num1) for num >= 1<<7 { dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j1++ } dAtA[j1] = uint8(num) j1++ } i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x22 } if len(m.RepeatedField) > 0 { for iNdEx := len(m.RepeatedField) - 1; iNdEx >= 0; iNdEx-- { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RepeatedField[iNdEx])) i-- dAtA[i] = 0x18 } } if m.OptionalField != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalField)) i-- dAtA[i] = 0x10 } if m.RequiredField == nil { return 0, fmt.Errorf("proto: required field required_field not set") } else { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredField)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *DoubleMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 9 } if m.OptionalField != nil { n += 9 } if len(m.RepeatedField) > 0 { n += 9 * len(m.RepeatedField) } if len(m.PackedField) > 0 { n += 1 + protohelpers.SizeOfVarint(uint64(len(m.PackedField)*8)) + len(m.PackedField)*8 } n += len(m.unknownFields) return n } func (m *FloatMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 5 } if m.OptionalField != nil { n += 5 } if len(m.RepeatedField) > 0 { n += 5 * len(m.RepeatedField) } if len(m.PackedField) > 0 { n += 1 + protohelpers.SizeOfVarint(uint64(len(m.PackedField)*4)) + len(m.PackedField)*4 } n += len(m.unknownFields) return n } func (m *Int32Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredField)) } if m.OptionalField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalField)) } if len(m.RepeatedField) > 0 { for _, e := range m.RepeatedField { n += 1 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.PackedField) > 0 { l = 0 for _, e := range m.PackedField { l += protohelpers.SizeOfVarint(uint64(e)) } n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n } func (m *Int64Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredField)) } if m.OptionalField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalField)) } if len(m.RepeatedField) > 0 { for _, e := range m.RepeatedField { n += 1 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.PackedField) > 0 { l = 0 for _, e := range m.PackedField { l += protohelpers.SizeOfVarint(uint64(e)) } n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n } func (m *Uint32Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredField)) } if m.OptionalField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalField)) } if len(m.RepeatedField) > 0 { for _, e := range m.RepeatedField { n += 1 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.PackedField) > 0 { l = 0 for _, e := range m.PackedField { l += protohelpers.SizeOfVarint(uint64(e)) } n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n } func (m *Uint64Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredField)) } if m.OptionalField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalField)) } if len(m.RepeatedField) > 0 { for _, e := range m.RepeatedField { n += 1 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.PackedField) > 0 { l = 0 for _, e := range m.PackedField { l += protohelpers.SizeOfVarint(uint64(e)) } n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n } func (m *Sint32Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 1 + protohelpers.SizeOfZigzag(uint64(*m.RequiredField)) } if m.OptionalField != nil { n += 1 + protohelpers.SizeOfZigzag(uint64(*m.OptionalField)) } if len(m.RepeatedField) > 0 { for _, e := range m.RepeatedField { n += 1 + protohelpers.SizeOfZigzag(uint64(e)) } } if len(m.PackedField) > 0 { l = 0 for _, e := range m.PackedField { l += protohelpers.SizeOfZigzag(uint64(e)) } n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n } func (m *Sint64Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 1 + protohelpers.SizeOfZigzag(uint64(*m.RequiredField)) } if m.OptionalField != nil { n += 1 + protohelpers.SizeOfZigzag(uint64(*m.OptionalField)) } if len(m.RepeatedField) > 0 { for _, e := range m.RepeatedField { n += 1 + protohelpers.SizeOfZigzag(uint64(e)) } } if len(m.PackedField) > 0 { l = 0 for _, e := range m.PackedField { l += protohelpers.SizeOfZigzag(uint64(e)) } n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n } func (m *Fixed32Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 5 } if m.OptionalField != nil { n += 5 } if len(m.RepeatedField) > 0 { n += 5 * len(m.RepeatedField) } if len(m.PackedField) > 0 { n += 1 + protohelpers.SizeOfVarint(uint64(len(m.PackedField)*4)) + len(m.PackedField)*4 } n += len(m.unknownFields) return n } func (m *Fixed64Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 9 } if m.OptionalField != nil { n += 9 } if len(m.RepeatedField) > 0 { n += 9 * len(m.RepeatedField) } if len(m.PackedField) > 0 { n += 1 + protohelpers.SizeOfVarint(uint64(len(m.PackedField)*8)) + len(m.PackedField)*8 } n += len(m.unknownFields) return n } func (m *Sfixed32Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 5 } if m.OptionalField != nil { n += 5 } if len(m.RepeatedField) > 0 { n += 5 * len(m.RepeatedField) } if len(m.PackedField) > 0 { n += 1 + protohelpers.SizeOfVarint(uint64(len(m.PackedField)*4)) + len(m.PackedField)*4 } n += len(m.unknownFields) return n } func (m *Sfixed64Message) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 9 } if m.OptionalField != nil { n += 9 } if len(m.RepeatedField) > 0 { n += 9 * len(m.RepeatedField) } if len(m.PackedField) > 0 { n += 1 + protohelpers.SizeOfVarint(uint64(len(m.PackedField)*8)) + len(m.PackedField)*8 } n += len(m.unknownFields) return n } func (m *BoolMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 2 } if m.OptionalField != nil { n += 2 } if len(m.RepeatedField) > 0 { n += 2 * len(m.RepeatedField) } if len(m.PackedField) > 0 { n += 1 + protohelpers.SizeOfVarint(uint64(len(m.PackedField))) + len(m.PackedField)*1 } n += len(m.unknownFields) return n } func (m *StringMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { l = len(*m.RequiredField) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalField != nil { l = len(*m.OptionalField) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.RepeatedField) > 0 { for _, s := range m.RepeatedField { l = len(s) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *BytesMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { l = len(m.RequiredField) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalField != nil { l = len(m.OptionalField) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.RepeatedField) > 0 { for _, b := range m.RepeatedField { l = len(b) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *EnumMessage) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.RequiredField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredField)) } if m.OptionalField != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalField)) } if len(m.RepeatedField) > 0 { for _, e := range m.RepeatedField { n += 1 + protohelpers.SizeOfVarint(uint64(e)) } } if len(m.PackedField) > 0 { l = 0 for _, e := range m.PackedField { l += protohelpers.SizeOfVarint(uint64(e)) } n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n } func (m *DoubleMessage) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DoubleMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DoubleMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RequiredField = &v2 hasFields[0] |= uint64(0x00000001) case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.OptionalField = &v2 case 3: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedField = append(m.RepeatedField, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedField = append(m.RepeatedField, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedField = append(m.PackedField, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedField = append(m.PackedField, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FloatMessage) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: FloatMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FloatMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RequiredField = &v2 hasFields[0] |= uint64(0x00000001) case 2: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.OptionalField = &v2 case 3: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedField = append(m.RepeatedField, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedField = append(m.RepeatedField, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedField = append(m.PackedField, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedField = append(m.PackedField, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Int32Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Int32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Int32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Int64Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Int64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Int64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Uint32Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Uint32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Uint32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Uint64Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Uint64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Uint64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sint32Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Sint32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sint32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalField = &v case 3: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sint64Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Sint64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sint64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RequiredField = &v2 hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalField = &v2 case 3: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedField = append(m.RepeatedField, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedField = append(m.RepeatedField, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedField = append(m.PackedField, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedField = append(m.PackedField, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Fixed32Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Fixed32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Fixed32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalField = &v case 3: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Fixed64Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Fixed64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Fixed64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalField = &v case 3: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sfixed32Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Sfixed32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sfixed32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalField = &v case 3: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sfixed64Message) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Sfixed64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sfixed64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalField = &v case 3: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BoolMessage) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BoolMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BoolMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.RequiredField = &b hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OptionalField = &b case 3: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StringMessage) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StringMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StringMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.RequiredField = &s iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.OptionalField = &s iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedField = append(m.RepeatedField, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BytesMessage) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BytesMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BytesMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RequiredField = append(m.RequiredField[:0], dAtA[iNdEx:postIndex]...) if m.RequiredField == nil { m.RequiredField = []byte{} } iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalField = append(m.OptionalField[:0], dAtA[iNdEx:postIndex]...) if m.OptionalField == nil { m.OptionalField = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedField = append(m.RepeatedField, make([]byte, postIndex-iNdEx)) copy(m.RepeatedField[len(m.RepeatedField)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EnumMessage) UnmarshalVT(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: EnumMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EnumMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]EnumMessage_Num, 0, elementCount) } for iNdEx < postIndex { var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]EnumMessage_Num, 0, elementCount) } for iNdEx < postIndex { var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DoubleMessage) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DoubleMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DoubleMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RequiredField = &v2 hasFields[0] |= uint64(0x00000001) case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.OptionalField = &v2 case 3: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedField = append(m.RepeatedField, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.RepeatedField = append(m.RepeatedField, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedField = append(m.PackedField, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]float64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PackedField = append(m.PackedField, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FloatMessage) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: FloatMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FloatMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RequiredField = &v2 hasFields[0] |= uint64(0x00000001) case 2: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.OptionalField = &v2 case 3: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedField = append(m.RepeatedField, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.RepeatedField = append(m.RepeatedField, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedField = append(m.PackedField, v2) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]float32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.PackedField = append(m.PackedField, v2) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Int32Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Int32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Int32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Int64Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Int64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Int64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Uint32Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Uint32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Uint32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Uint64Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Uint64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Uint64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sint32Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Sint32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sint32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalField = &v case 3: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sint64Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Sint64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sint64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RequiredField = &v2 hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalField = &v2 case 3: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedField = append(m.RepeatedField, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.RepeatedField = append(m.RepeatedField, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedField = append(m.PackedField, int64(v)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.PackedField = append(m.PackedField, int64(v)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Fixed32Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Fixed32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Fixed32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalField = &v case 3: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 5 { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]uint32, 0, elementCount) } for iNdEx < postIndex { var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Fixed64Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Fixed64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Fixed64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalField = &v case 3: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 1 { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sfixed32Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Sfixed32Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sfixed32Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalField = &v case 3: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 5 { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 4 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sfixed64Message) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Sfixed64Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sfixed64Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalField = &v case 3: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 1 { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen / 8 if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BoolMessage) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BoolMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BoolMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.RequiredField = &b hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OptionalField = &b case 3: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StringMessage) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StringMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StringMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.RequiredField = &s iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.OptionalField = &s iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.RepeatedField = append(m.RepeatedField, stringValue) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BytesMessage) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BytesMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BytesMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RequiredField = dAtA[iNdEx:postIndex] iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalField = dAtA[iNdEx:postIndex] iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.RepeatedField = append(m.RepeatedField, dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *EnumMessage) UnmarshalVTUnsafe(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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: EnumMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: EnumMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequiredField", wireType) } var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.RequiredField = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalField", wireType) } var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.OptionalField = &v case 3: if wireType == 0 { var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.RepeatedField) == 0 { m.RepeatedField = make([]EnumMessage_Num, 0, elementCount) } for iNdEx < postIndex { var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.RepeatedField = append(m.RepeatedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field RepeatedField", wireType) } case 4: if wireType == 0 { var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int if elementCount != 0 && len(m.PackedField) == 0 { m.PackedField = make([]EnumMessage_Num, 0, elementCount) } for iNdEx < postIndex { var v EnumMessage_Num for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= EnumMessage_Num(b&0x7F) << shift if b < 0x80 { break } } m.PackedField = append(m.PackedField, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field PackedField", wireType) } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return fmt.Errorf("proto: required field required_field not set") } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto3opt/000077500000000000000000000000001455570004500247665ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto3opt/opt.pb.go000066400000000000000000000407311455570004500265240ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: proto3opt/opt.proto package proto3opt import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type SimpleEnum int32 const ( SimpleEnum_ENUM1 SimpleEnum = 0 SimpleEnum_ENUM2 SimpleEnum = 1 SimpleEnum_ENUM3 SimpleEnum = 2 ) // Enum value maps for SimpleEnum. var ( SimpleEnum_name = map[int32]string{ 0: "ENUM1", 1: "ENUM2", 2: "ENUM3", } SimpleEnum_value = map[string]int32{ "ENUM1": 0, "ENUM2": 1, "ENUM3": 2, } ) func (x SimpleEnum) Enum() *SimpleEnum { p := new(SimpleEnum) *p = x return p } func (x SimpleEnum) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (SimpleEnum) Descriptor() protoreflect.EnumDescriptor { return file_proto3opt_opt_proto_enumTypes[0].Descriptor() } func (SimpleEnum) Type() protoreflect.EnumType { return &file_proto3opt_opt_proto_enumTypes[0] } func (x SimpleEnum) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use SimpleEnum.Descriptor instead. func (SimpleEnum) EnumDescriptor() ([]byte, []int) { return file_proto3opt_opt_proto_rawDescGZIP(), []int{0} } type OptionalFieldInProto3 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields OptionalInt32 *int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32,proto3,oneof" json:"optional_int32,omitempty"` OptionalInt64 *int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64,proto3,oneof" json:"optional_int64,omitempty"` OptionalUint32 *uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32,proto3,oneof" json:"optional_uint32,omitempty"` OptionalUint64 *uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64,proto3,oneof" json:"optional_uint64,omitempty"` OptionalSint32 *int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32,proto3,oneof" json:"optional_sint32,omitempty"` OptionalSint64 *int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64,proto3,oneof" json:"optional_sint64,omitempty"` OptionalFixed32 *uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32,proto3,oneof" json:"optional_fixed32,omitempty"` OptionalFixed64 *uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64,proto3,oneof" json:"optional_fixed64,omitempty"` OptionalSfixed32 *int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3,oneof" json:"optional_sfixed32,omitempty"` OptionalSfixed64 *int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64,proto3,oneof" json:"optional_sfixed64,omitempty"` OptionalFloat *float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3,oneof" json:"optional_float,omitempty"` OptionalDouble *float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble,proto3,oneof" json:"optional_double,omitempty"` OptionalBool *bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool,proto3,oneof" json:"optional_bool,omitempty"` OptionalString *string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString,proto3,oneof" json:"optional_string,omitempty"` OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3,oneof" json:"optional_bytes,omitempty"` OptionalEnum *SimpleEnum `protobuf:"varint,16,opt,name=optional_enum,json=optionalEnum,proto3,enum=SimpleEnum,oneof" json:"optional_enum,omitempty"` } func (x *OptionalFieldInProto3) Reset() { *x = OptionalFieldInProto3{} if protoimpl.UnsafeEnabled { mi := &file_proto3opt_opt_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *OptionalFieldInProto3) String() string { return protoimpl.X.MessageStringOf(x) } func (*OptionalFieldInProto3) ProtoMessage() {} func (x *OptionalFieldInProto3) ProtoReflect() protoreflect.Message { mi := &file_proto3opt_opt_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OptionalFieldInProto3.ProtoReflect.Descriptor instead. func (*OptionalFieldInProto3) Descriptor() ([]byte, []int) { return file_proto3opt_opt_proto_rawDescGZIP(), []int{0} } func (x *OptionalFieldInProto3) GetOptionalInt32() int32 { if x != nil && x.OptionalInt32 != nil { return *x.OptionalInt32 } return 0 } func (x *OptionalFieldInProto3) GetOptionalInt64() int64 { if x != nil && x.OptionalInt64 != nil { return *x.OptionalInt64 } return 0 } func (x *OptionalFieldInProto3) GetOptionalUint32() uint32 { if x != nil && x.OptionalUint32 != nil { return *x.OptionalUint32 } return 0 } func (x *OptionalFieldInProto3) GetOptionalUint64() uint64 { if x != nil && x.OptionalUint64 != nil { return *x.OptionalUint64 } return 0 } func (x *OptionalFieldInProto3) GetOptionalSint32() int32 { if x != nil && x.OptionalSint32 != nil { return *x.OptionalSint32 } return 0 } func (x *OptionalFieldInProto3) GetOptionalSint64() int64 { if x != nil && x.OptionalSint64 != nil { return *x.OptionalSint64 } return 0 } func (x *OptionalFieldInProto3) GetOptionalFixed32() uint32 { if x != nil && x.OptionalFixed32 != nil { return *x.OptionalFixed32 } return 0 } func (x *OptionalFieldInProto3) GetOptionalFixed64() uint64 { if x != nil && x.OptionalFixed64 != nil { return *x.OptionalFixed64 } return 0 } func (x *OptionalFieldInProto3) GetOptionalSfixed32() int32 { if x != nil && x.OptionalSfixed32 != nil { return *x.OptionalSfixed32 } return 0 } func (x *OptionalFieldInProto3) GetOptionalSfixed64() int64 { if x != nil && x.OptionalSfixed64 != nil { return *x.OptionalSfixed64 } return 0 } func (x *OptionalFieldInProto3) GetOptionalFloat() float32 { if x != nil && x.OptionalFloat != nil { return *x.OptionalFloat } return 0 } func (x *OptionalFieldInProto3) GetOptionalDouble() float64 { if x != nil && x.OptionalDouble != nil { return *x.OptionalDouble } return 0 } func (x *OptionalFieldInProto3) GetOptionalBool() bool { if x != nil && x.OptionalBool != nil { return *x.OptionalBool } return false } func (x *OptionalFieldInProto3) GetOptionalString() string { if x != nil && x.OptionalString != nil { return *x.OptionalString } return "" } func (x *OptionalFieldInProto3) GetOptionalBytes() []byte { if x != nil { return x.OptionalBytes } return nil } func (x *OptionalFieldInProto3) GetOptionalEnum() SimpleEnum { if x != nil && x.OptionalEnum != nil { return *x.OptionalEnum } return SimpleEnum_ENUM1 } var File_proto3opt_opt_proto protoreflect.FileDescriptor var file_proto3opt_opt_proto_rawDesc = []byte{ 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x70, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x08, 0x0a, 0x15, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x48, 0x04, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x12, 0x48, 0x05, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x07, 0x48, 0x06, 0x52, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x06, 0x48, 0x07, 0x52, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0f, 0x48, 0x08, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x10, 0x48, 0x09, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x48, 0x0a, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x48, 0x0b, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x48, 0x0c, 0x52, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x0d, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x0e, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x0f, 0x52, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2a, 0x2d, 0x0a, 0x0a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4e, 0x55, 0x4d, 0x31, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4e, 0x55, 0x4d, 0x32, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4e, 0x55, 0x4d, 0x33, 0x10, 0x02, 0x42, 0x15, 0x5a, 0x13, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x70, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_proto3opt_opt_proto_rawDescOnce sync.Once file_proto3opt_opt_proto_rawDescData = file_proto3opt_opt_proto_rawDesc ) func file_proto3opt_opt_proto_rawDescGZIP() []byte { file_proto3opt_opt_proto_rawDescOnce.Do(func() { file_proto3opt_opt_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto3opt_opt_proto_rawDescData) }) return file_proto3opt_opt_proto_rawDescData } var file_proto3opt_opt_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_proto3opt_opt_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_proto3opt_opt_proto_goTypes = []interface{}{ (SimpleEnum)(0), // 0: SimpleEnum (*OptionalFieldInProto3)(nil), // 1: OptionalFieldInProto3 } var file_proto3opt_opt_proto_depIdxs = []int32{ 0, // 0: OptionalFieldInProto3.optional_enum:type_name -> SimpleEnum 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_proto3opt_opt_proto_init() } func file_proto3opt_opt_proto_init() { if File_proto3opt_opt_proto != nil { return } if !protoimpl.UnsafeEnabled { file_proto3opt_opt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OptionalFieldInProto3); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_proto3opt_opt_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto3opt_opt_proto_rawDesc, NumEnums: 1, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_proto3opt_opt_proto_goTypes, DependencyIndexes: file_proto3opt_opt_proto_depIdxs, EnumInfos: file_proto3opt_opt_proto_enumTypes, MessageInfos: file_proto3opt_opt_proto_msgTypes, }.Build() File_proto3opt_opt_proto = out.File file_proto3opt_opt_proto_rawDesc = nil file_proto3opt_opt_proto_goTypes = nil file_proto3opt_opt_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto3opt/opt.proto000066400000000000000000000014271455570004500266610ustar00rootroot00000000000000syntax = "proto3"; option go_package = "testproto/proto3opt"; enum SimpleEnum { ENUM1 = 0; ENUM2 = 1; ENUM3 = 2; } message OptionalFieldInProto3 { optional int32 optional_int32 = 1; optional int64 optional_int64 = 2; optional uint32 optional_uint32 = 3; optional uint64 optional_uint64 = 4; optional sint32 optional_sint32 = 5; optional sint64 optional_sint64 = 6; optional fixed32 optional_fixed32 = 7; optional fixed64 optional_fixed64 = 8; optional sfixed32 optional_sfixed32 = 9; optional sfixed64 optional_sfixed64 = 10; optional float optional_float = 11; optional double optional_double = 12; optional bool optional_bool = 13; optional string optional_string = 14; optional bytes optional_bytes = 15; optional SimpleEnum optional_enum = 16; } golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto3opt/opt_vtproto.pb.go000066400000000000000000000706041455570004500303230ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: proto3opt/opt.proto package proto3opt import ( binary "encoding/binary" fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" math "math" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *OptionalFieldInProto3) CloneVT() *OptionalFieldInProto3 { if m == nil { return (*OptionalFieldInProto3)(nil) } r := new(OptionalFieldInProto3) if rhs := m.OptionalInt32; rhs != nil { tmpVal := *rhs r.OptionalInt32 = &tmpVal } if rhs := m.OptionalInt64; rhs != nil { tmpVal := *rhs r.OptionalInt64 = &tmpVal } if rhs := m.OptionalUint32; rhs != nil { tmpVal := *rhs r.OptionalUint32 = &tmpVal } if rhs := m.OptionalUint64; rhs != nil { tmpVal := *rhs r.OptionalUint64 = &tmpVal } if rhs := m.OptionalSint32; rhs != nil { tmpVal := *rhs r.OptionalSint32 = &tmpVal } if rhs := m.OptionalSint64; rhs != nil { tmpVal := *rhs r.OptionalSint64 = &tmpVal } if rhs := m.OptionalFixed32; rhs != nil { tmpVal := *rhs r.OptionalFixed32 = &tmpVal } if rhs := m.OptionalFixed64; rhs != nil { tmpVal := *rhs r.OptionalFixed64 = &tmpVal } if rhs := m.OptionalSfixed32; rhs != nil { tmpVal := *rhs r.OptionalSfixed32 = &tmpVal } if rhs := m.OptionalSfixed64; rhs != nil { tmpVal := *rhs r.OptionalSfixed64 = &tmpVal } if rhs := m.OptionalFloat; rhs != nil { tmpVal := *rhs r.OptionalFloat = &tmpVal } if rhs := m.OptionalDouble; rhs != nil { tmpVal := *rhs r.OptionalDouble = &tmpVal } if rhs := m.OptionalBool; rhs != nil { tmpVal := *rhs r.OptionalBool = &tmpVal } if rhs := m.OptionalString; rhs != nil { tmpVal := *rhs r.OptionalString = &tmpVal } if rhs := m.OptionalBytes; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.OptionalBytes = tmpBytes } if rhs := m.OptionalEnum; rhs != nil { tmpVal := *rhs r.OptionalEnum = &tmpVal } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *OptionalFieldInProto3) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *OptionalFieldInProto3) EqualVT(that *OptionalFieldInProto3) bool { if this == that { return true } else if this == nil || that == nil { return false } if p, q := this.OptionalInt32, that.OptionalInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalInt64, that.OptionalInt64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalUint32, that.OptionalUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalUint64, that.OptionalUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalSint32, that.OptionalSint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalSint64, that.OptionalSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalFixed32, that.OptionalFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalFixed64, that.OptionalFixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalSfixed32, that.OptionalSfixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalSfixed64, that.OptionalSfixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalFloat, that.OptionalFloat; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalDouble, that.OptionalDouble; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalBool, that.OptionalBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalString, that.OptionalString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } if p, q := this.OptionalBytes, that.OptionalBytes; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { return false } if p, q := this.OptionalEnum, that.OptionalEnum; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *OptionalFieldInProto3) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*OptionalFieldInProto3) if !ok { return false } return this.EqualVT(that) } func (m *OptionalFieldInProto3) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OptionalFieldInProto3) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *OptionalFieldInProto3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.OptionalEnum != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x80 } if m.OptionalBytes != nil { i -= len(m.OptionalBytes) copy(dAtA[i:], m.OptionalBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalBytes))) i-- dAtA[i] = 0x7a } if m.OptionalString != nil { i -= len(*m.OptionalString) copy(dAtA[i:], *m.OptionalString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalString))) i-- dAtA[i] = 0x72 } if m.OptionalBool != nil { i-- if *m.OptionalBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x68 } if m.OptionalDouble != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.OptionalDouble)))) i-- dAtA[i] = 0x61 } if m.OptionalFloat != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.OptionalFloat)))) i-- dAtA[i] = 0x5d } if m.OptionalSfixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalSfixed64)) i-- dAtA[i] = 0x51 } if m.OptionalSfixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalSfixed32)) i-- dAtA[i] = 0x4d } if m.OptionalFixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalFixed64)) i-- dAtA[i] = 0x41 } if m.OptionalFixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalFixed32)) i-- dAtA[i] = 0x3d } if m.OptionalSint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.OptionalSint64)<<1)^uint64((*m.OptionalSint64>>63)))) i-- dAtA[i] = 0x30 } if m.OptionalSint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.OptionalSint32)<<1)^uint32((*m.OptionalSint32>>31)))) i-- dAtA[i] = 0x28 } if m.OptionalUint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint64)) i-- dAtA[i] = 0x20 } if m.OptionalUint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint32)) i-- dAtA[i] = 0x18 } if m.OptionalInt64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt64)) i-- dAtA[i] = 0x10 } if m.OptionalInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt32)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *OptionalFieldInProto3) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *OptionalFieldInProto3) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *OptionalFieldInProto3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.OptionalEnum != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalEnum)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x80 } if m.OptionalBytes != nil { i -= len(m.OptionalBytes) copy(dAtA[i:], m.OptionalBytes) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalBytes))) i-- dAtA[i] = 0x7a } if m.OptionalString != nil { i -= len(*m.OptionalString) copy(dAtA[i:], *m.OptionalString) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalString))) i-- dAtA[i] = 0x72 } if m.OptionalBool != nil { i-- if *m.OptionalBool { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x68 } if m.OptionalDouble != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.OptionalDouble)))) i-- dAtA[i] = 0x61 } if m.OptionalFloat != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.OptionalFloat)))) i-- dAtA[i] = 0x5d } if m.OptionalSfixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalSfixed64)) i-- dAtA[i] = 0x51 } if m.OptionalSfixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalSfixed32)) i-- dAtA[i] = 0x4d } if m.OptionalFixed64 != nil { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalFixed64)) i-- dAtA[i] = 0x41 } if m.OptionalFixed32 != nil { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalFixed32)) i-- dAtA[i] = 0x3d } if m.OptionalSint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.OptionalSint64)<<1)^uint64((*m.OptionalSint64>>63)))) i-- dAtA[i] = 0x30 } if m.OptionalSint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.OptionalSint32)<<1)^uint32((*m.OptionalSint32>>31)))) i-- dAtA[i] = 0x28 } if m.OptionalUint64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint64)) i-- dAtA[i] = 0x20 } if m.OptionalUint32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint32)) i-- dAtA[i] = 0x18 } if m.OptionalInt64 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt64)) i-- dAtA[i] = 0x10 } if m.OptionalInt32 != nil { i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt32)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *OptionalFieldInProto3) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.OptionalInt32 != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalInt32)) } if m.OptionalInt64 != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalInt64)) } if m.OptionalUint32 != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalUint32)) } if m.OptionalUint64 != nil { n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalUint64)) } if m.OptionalSint32 != nil { n += 1 + protohelpers.SizeOfZigzag(uint64(*m.OptionalSint32)) } if m.OptionalSint64 != nil { n += 1 + protohelpers.SizeOfZigzag(uint64(*m.OptionalSint64)) } if m.OptionalFixed32 != nil { n += 5 } if m.OptionalFixed64 != nil { n += 9 } if m.OptionalSfixed32 != nil { n += 5 } if m.OptionalSfixed64 != nil { n += 9 } if m.OptionalFloat != nil { n += 5 } if m.OptionalDouble != nil { n += 9 } if m.OptionalBool != nil { n += 2 } if m.OptionalString != nil { l = len(*m.OptionalString) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalBytes != nil { l = len(m.OptionalBytes) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalEnum != nil { n += 2 + protohelpers.SizeOfVarint(uint64(*m.OptionalEnum)) } n += len(m.unknownFields) return n } func (m *OptionalFieldInProto3) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OptionalFieldInProto3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OptionalFieldInProto3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt32 = &v case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt64", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt64 = &v case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalUint32 = &v case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalUint64 = &v case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint32 = &v case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint64 = &v2 case 7: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed32", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalFixed32 = &v case 8: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed64", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalFixed64 = &v case 9: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed32", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalSfixed32 = &v case 10: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed64", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalSfixed64 = &v case 11: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.OptionalFloat = &v2 case 12: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.OptionalDouble = &v2 case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OptionalBool = &b case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.OptionalString = &s iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalBytes = append(m.OptionalBytes[:0], dAtA[iNdEx:postIndex]...) if m.OptionalBytes == nil { m.OptionalBytes = []byte{} } iNdEx = postIndex case 16: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalEnum", wireType) } var v SimpleEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= SimpleEnum(b&0x7F) << shift if b < 0x80 { break } } m.OptionalEnum = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OptionalFieldInProto3) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OptionalFieldInProto3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OptionalFieldInProto3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt32 = &v case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt64", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalInt64 = &v case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint32(b&0x7F) << shift if b < 0x80 { break } } m.OptionalUint32 = &v case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.OptionalUint64 = &v case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint32 = &v case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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.OptionalSint64 = &v2 case 7: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed32", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalFixed32 = &v case 8: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFixed64", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalFixed64 = &v case 9: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed32", wireType) } var v int32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.OptionalSfixed32 = &v case 10: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalSfixed64", wireType) } var v int64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.OptionalSfixed64 = &v case 11: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalFloat", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) m.OptionalFloat = &v2 case 12: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalDouble", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.OptionalDouble = &v2 case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.OptionalBool = &b case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue m.OptionalString = &s iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytes", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OptionalBytes = dAtA[iNdEx:postIndex] iNdEx = postIndex case 16: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OptionalEnum", wireType) } var v SimpleEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= SimpleEnum(b&0x7F) << shift if b < 0x80 { break } } m.OptionalEnum = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/proto3opt/proto3opt_test.go000066400000000000000000000010411455570004500303210ustar00rootroot00000000000000package proto3opt import ( "testing" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" ) func TestEmptyBytesMarshalling(t *testing.T) { a := &OptionalFieldInProto3{ OptionalBytes: nil, } b := &OptionalFieldInProto3{ OptionalBytes: []byte{}, } type Message interface { proto.Message MarshalVT() ([]byte, error) } for _, msg := range []Message{a, b} { vt, err := msg.MarshalVT() require.NoError(t, err) goog, err := proto.Marshal(msg) require.NoError(t, err) require.Equal(t, goog, vt) } } golang-github-planetscale-vtprotobuf-0.6.0/testproto/unsafe/000077500000000000000000000000001455570004500242765ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/unsafe/unsafe.pb.go000066400000000000000000000441601455570004500265130ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: unsafe/unsafe.proto package unsafe import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type UnsafeTest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Sub: // // *UnsafeTest_Sub1_ // *UnsafeTest_Sub2_ // *UnsafeTest_Sub3_ // *UnsafeTest_Sub4_ // *UnsafeTest_Sub5_ Sub isUnsafeTest_Sub `protobuf_oneof:"sub"` } func (x *UnsafeTest) Reset() { *x = UnsafeTest{} if protoimpl.UnsafeEnabled { mi := &file_unsafe_unsafe_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnsafeTest) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnsafeTest) ProtoMessage() {} func (x *UnsafeTest) ProtoReflect() protoreflect.Message { mi := &file_unsafe_unsafe_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UnsafeTest.ProtoReflect.Descriptor instead. func (*UnsafeTest) Descriptor() ([]byte, []int) { return file_unsafe_unsafe_proto_rawDescGZIP(), []int{0} } func (m *UnsafeTest) GetSub() isUnsafeTest_Sub { if m != nil { return m.Sub } return nil } func (x *UnsafeTest) GetSub1() *UnsafeTest_Sub1 { if x, ok := x.GetSub().(*UnsafeTest_Sub1_); ok { return x.Sub1 } return nil } func (x *UnsafeTest) GetSub2() *UnsafeTest_Sub2 { if x, ok := x.GetSub().(*UnsafeTest_Sub2_); ok { return x.Sub2 } return nil } func (x *UnsafeTest) GetSub3() *UnsafeTest_Sub3 { if x, ok := x.GetSub().(*UnsafeTest_Sub3_); ok { return x.Sub3 } return nil } func (x *UnsafeTest) GetSub4() *UnsafeTest_Sub4 { if x, ok := x.GetSub().(*UnsafeTest_Sub4_); ok { return x.Sub4 } return nil } func (x *UnsafeTest) GetSub5() *UnsafeTest_Sub5 { if x, ok := x.GetSub().(*UnsafeTest_Sub5_); ok { return x.Sub5 } return nil } type isUnsafeTest_Sub interface { isUnsafeTest_Sub() } type UnsafeTest_Sub1_ struct { Sub1 *UnsafeTest_Sub1 `protobuf:"bytes,1,opt,name=sub1,proto3,oneof"` } type UnsafeTest_Sub2_ struct { Sub2 *UnsafeTest_Sub2 `protobuf:"bytes,2,opt,name=sub2,proto3,oneof"` } type UnsafeTest_Sub3_ struct { Sub3 *UnsafeTest_Sub3 `protobuf:"bytes,3,opt,name=sub3,proto3,oneof"` } type UnsafeTest_Sub4_ struct { Sub4 *UnsafeTest_Sub4 `protobuf:"bytes,4,opt,name=sub4,proto3,oneof"` } type UnsafeTest_Sub5_ struct { Sub5 *UnsafeTest_Sub5 `protobuf:"bytes,5,opt,name=sub5,proto3,oneof"` } func (*UnsafeTest_Sub1_) isUnsafeTest_Sub() {} func (*UnsafeTest_Sub2_) isUnsafeTest_Sub() {} func (*UnsafeTest_Sub3_) isUnsafeTest_Sub() {} func (*UnsafeTest_Sub4_) isUnsafeTest_Sub() {} func (*UnsafeTest_Sub5_) isUnsafeTest_Sub() {} type UnsafeTest_Sub1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields S string `protobuf:"bytes,1,opt,name=s,proto3" json:"s,omitempty"` B []byte `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"` } func (x *UnsafeTest_Sub1) Reset() { *x = UnsafeTest_Sub1{} if protoimpl.UnsafeEnabled { mi := &file_unsafe_unsafe_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnsafeTest_Sub1) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnsafeTest_Sub1) ProtoMessage() {} func (x *UnsafeTest_Sub1) ProtoReflect() protoreflect.Message { mi := &file_unsafe_unsafe_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UnsafeTest_Sub1.ProtoReflect.Descriptor instead. func (*UnsafeTest_Sub1) Descriptor() ([]byte, []int) { return file_unsafe_unsafe_proto_rawDescGZIP(), []int{0, 0} } func (x *UnsafeTest_Sub1) GetS() string { if x != nil { return x.S } return "" } func (x *UnsafeTest_Sub1) GetB() []byte { if x != nil { return x.B } return nil } type UnsafeTest_Sub2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields S []string `protobuf:"bytes,1,rep,name=s,proto3" json:"s,omitempty"` B [][]byte `protobuf:"bytes,2,rep,name=b,proto3" json:"b,omitempty"` } func (x *UnsafeTest_Sub2) Reset() { *x = UnsafeTest_Sub2{} if protoimpl.UnsafeEnabled { mi := &file_unsafe_unsafe_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnsafeTest_Sub2) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnsafeTest_Sub2) ProtoMessage() {} func (x *UnsafeTest_Sub2) ProtoReflect() protoreflect.Message { mi := &file_unsafe_unsafe_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UnsafeTest_Sub2.ProtoReflect.Descriptor instead. func (*UnsafeTest_Sub2) Descriptor() ([]byte, []int) { return file_unsafe_unsafe_proto_rawDescGZIP(), []int{0, 1} } func (x *UnsafeTest_Sub2) GetS() []string { if x != nil { return x.S } return nil } func (x *UnsafeTest_Sub2) GetB() [][]byte { if x != nil { return x.B } return nil } type UnsafeTest_Sub3 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Foo map[string][]byte `protobuf:"bytes,1,rep,name=foo,proto3" json:"foo,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *UnsafeTest_Sub3) Reset() { *x = UnsafeTest_Sub3{} if protoimpl.UnsafeEnabled { mi := &file_unsafe_unsafe_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnsafeTest_Sub3) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnsafeTest_Sub3) ProtoMessage() {} func (x *UnsafeTest_Sub3) ProtoReflect() protoreflect.Message { mi := &file_unsafe_unsafe_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UnsafeTest_Sub3.ProtoReflect.Descriptor instead. func (*UnsafeTest_Sub3) Descriptor() ([]byte, []int) { return file_unsafe_unsafe_proto_rawDescGZIP(), []int{0, 2} } func (x *UnsafeTest_Sub3) GetFoo() map[string][]byte { if x != nil { return x.Foo } return nil } type UnsafeTest_Sub4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Foo: // // *UnsafeTest_Sub4_S // *UnsafeTest_Sub4_B Foo isUnsafeTest_Sub4_Foo `protobuf_oneof:"foo"` } func (x *UnsafeTest_Sub4) Reset() { *x = UnsafeTest_Sub4{} if protoimpl.UnsafeEnabled { mi := &file_unsafe_unsafe_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnsafeTest_Sub4) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnsafeTest_Sub4) ProtoMessage() {} func (x *UnsafeTest_Sub4) ProtoReflect() protoreflect.Message { mi := &file_unsafe_unsafe_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UnsafeTest_Sub4.ProtoReflect.Descriptor instead. func (*UnsafeTest_Sub4) Descriptor() ([]byte, []int) { return file_unsafe_unsafe_proto_rawDescGZIP(), []int{0, 3} } func (m *UnsafeTest_Sub4) GetFoo() isUnsafeTest_Sub4_Foo { if m != nil { return m.Foo } return nil } func (x *UnsafeTest_Sub4) GetS() string { if x, ok := x.GetFoo().(*UnsafeTest_Sub4_S); ok { return x.S } return "" } func (x *UnsafeTest_Sub4) GetB() []byte { if x, ok := x.GetFoo().(*UnsafeTest_Sub4_B); ok { return x.B } return nil } type isUnsafeTest_Sub4_Foo interface { isUnsafeTest_Sub4_Foo() } type UnsafeTest_Sub4_S struct { S string `protobuf:"bytes,1,opt,name=s,proto3,oneof"` } type UnsafeTest_Sub4_B struct { B []byte `protobuf:"bytes,2,opt,name=b,proto3,oneof"` } func (*UnsafeTest_Sub4_S) isUnsafeTest_Sub4_Foo() {} func (*UnsafeTest_Sub4_B) isUnsafeTest_Sub4_Foo() {} type UnsafeTest_Sub5 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Foo map[string]string `protobuf:"bytes,1,rep,name=foo,proto3" json:"foo,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *UnsafeTest_Sub5) Reset() { *x = UnsafeTest_Sub5{} if protoimpl.UnsafeEnabled { mi := &file_unsafe_unsafe_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UnsafeTest_Sub5) String() string { return protoimpl.X.MessageStringOf(x) } func (*UnsafeTest_Sub5) ProtoMessage() {} func (x *UnsafeTest_Sub5) ProtoReflect() protoreflect.Message { mi := &file_unsafe_unsafe_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UnsafeTest_Sub5.ProtoReflect.Descriptor instead. func (*UnsafeTest_Sub5) Descriptor() ([]byte, []int) { return file_unsafe_unsafe_proto_rawDescGZIP(), []int{0, 4} } func (x *UnsafeTest_Sub5) GetFoo() map[string]string { if x != nil { return x.Foo } return nil } var File_unsafe_unsafe_proto protoreflect.FileDescriptor var file_unsafe_unsafe_proto_rawDesc = []byte{ 0x0a, 0x13, 0x75, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x2f, 0x75, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x04, 0x0a, 0x0a, 0x55, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x54, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x75, 0x62, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x55, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x31, 0x48, 0x00, 0x52, 0x04, 0x73, 0x75, 0x62, 0x31, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x75, 0x62, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x55, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x32, 0x48, 0x00, 0x52, 0x04, 0x73, 0x75, 0x62, 0x32, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x75, 0x62, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x55, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x33, 0x48, 0x00, 0x52, 0x04, 0x73, 0x75, 0x62, 0x33, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x75, 0x62, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x55, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x34, 0x48, 0x00, 0x52, 0x04, 0x73, 0x75, 0x62, 0x34, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x75, 0x62, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x55, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x35, 0x48, 0x00, 0x52, 0x04, 0x73, 0x75, 0x62, 0x35, 0x1a, 0x22, 0x0a, 0x04, 0x53, 0x75, 0x62, 0x31, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x62, 0x1a, 0x22, 0x0a, 0x04, 0x53, 0x75, 0x62, 0x32, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x01, 0x62, 0x1a, 0x6b, 0x0a, 0x04, 0x53, 0x75, 0x62, 0x33, 0x12, 0x2b, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x55, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x33, 0x2e, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1a, 0x36, 0x0a, 0x08, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x2d, 0x0a, 0x04, 0x53, 0x75, 0x62, 0x34, 0x12, 0x0e, 0x0a, 0x01, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x01, 0x73, 0x12, 0x0e, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x01, 0x62, 0x42, 0x05, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x1a, 0x6b, 0x0a, 0x04, 0x53, 0x75, 0x62, 0x35, 0x12, 0x2b, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x55, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x35, 0x2e, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1a, 0x36, 0x0a, 0x08, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x62, 0x42, 0x12, 0x5a, 0x10, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_unsafe_unsafe_proto_rawDescOnce sync.Once file_unsafe_unsafe_proto_rawDescData = file_unsafe_unsafe_proto_rawDesc ) func file_unsafe_unsafe_proto_rawDescGZIP() []byte { file_unsafe_unsafe_proto_rawDescOnce.Do(func() { file_unsafe_unsafe_proto_rawDescData = protoimpl.X.CompressGZIP(file_unsafe_unsafe_proto_rawDescData) }) return file_unsafe_unsafe_proto_rawDescData } var file_unsafe_unsafe_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_unsafe_unsafe_proto_goTypes = []interface{}{ (*UnsafeTest)(nil), // 0: UnsafeTest (*UnsafeTest_Sub1)(nil), // 1: UnsafeTest.Sub1 (*UnsafeTest_Sub2)(nil), // 2: UnsafeTest.Sub2 (*UnsafeTest_Sub3)(nil), // 3: UnsafeTest.Sub3 (*UnsafeTest_Sub4)(nil), // 4: UnsafeTest.Sub4 (*UnsafeTest_Sub5)(nil), // 5: UnsafeTest.Sub5 nil, // 6: UnsafeTest.Sub3.FooEntry nil, // 7: UnsafeTest.Sub5.FooEntry } var file_unsafe_unsafe_proto_depIdxs = []int32{ 1, // 0: UnsafeTest.sub1:type_name -> UnsafeTest.Sub1 2, // 1: UnsafeTest.sub2:type_name -> UnsafeTest.Sub2 3, // 2: UnsafeTest.sub3:type_name -> UnsafeTest.Sub3 4, // 3: UnsafeTest.sub4:type_name -> UnsafeTest.Sub4 5, // 4: UnsafeTest.sub5:type_name -> UnsafeTest.Sub5 6, // 5: UnsafeTest.Sub3.foo:type_name -> UnsafeTest.Sub3.FooEntry 7, // 6: UnsafeTest.Sub5.foo:type_name -> UnsafeTest.Sub5.FooEntry 7, // [7:7] is the sub-list for method output_type 7, // [7:7] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name 7, // [7:7] is the sub-list for extension extendee 0, // [0:7] is the sub-list for field type_name } func init() { file_unsafe_unsafe_proto_init() } func file_unsafe_unsafe_proto_init() { if File_unsafe_unsafe_proto != nil { return } if !protoimpl.UnsafeEnabled { file_unsafe_unsafe_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnsafeTest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_unsafe_unsafe_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnsafeTest_Sub1); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_unsafe_unsafe_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnsafeTest_Sub2); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_unsafe_unsafe_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnsafeTest_Sub3); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_unsafe_unsafe_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnsafeTest_Sub4); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_unsafe_unsafe_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnsafeTest_Sub5); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_unsafe_unsafe_proto_msgTypes[0].OneofWrappers = []interface{}{ (*UnsafeTest_Sub1_)(nil), (*UnsafeTest_Sub2_)(nil), (*UnsafeTest_Sub3_)(nil), (*UnsafeTest_Sub4_)(nil), (*UnsafeTest_Sub5_)(nil), } file_unsafe_unsafe_proto_msgTypes[4].OneofWrappers = []interface{}{ (*UnsafeTest_Sub4_S)(nil), (*UnsafeTest_Sub4_B)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_unsafe_unsafe_proto_rawDesc, NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 0, }, GoTypes: file_unsafe_unsafe_proto_goTypes, DependencyIndexes: file_unsafe_unsafe_proto_depIdxs, MessageInfos: file_unsafe_unsafe_proto_msgTypes, }.Build() File_unsafe_unsafe_proto = out.File file_unsafe_unsafe_proto_rawDesc = nil file_unsafe_unsafe_proto_goTypes = nil file_unsafe_unsafe_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/unsafe/unsafe.proto000066400000000000000000000011401455570004500266400ustar00rootroot00000000000000syntax = "proto3"; option go_package = "testproto/unsafe"; message UnsafeTest { message Sub1 { string s = 1; bytes b = 2; } message Sub2 { repeated string s = 1; repeated bytes b = 2; } message Sub3 { map foo = 1; } message Sub4 { oneof foo { string s = 1; bytes b = 2; } } message Sub5 { map foo = 1; } oneof sub { Sub1 sub1 = 1; Sub2 sub2 = 2; Sub3 sub3 = 3; Sub4 sub4 = 4; Sub5 sub5 = 5; } } golang-github-planetscale-vtprotobuf-0.6.0/testproto/unsafe/unsafe_test.go000066400000000000000000000200361455570004500271460ustar00rootroot00000000000000package unsafe import ( "testing" "unsafe" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // assertStringIsOriginal asserts whether the underlying array of s belongs to originalData. // // Note: performing checks on the uintptr to the underlying arrays works as long as the garbage // collector doesn't move memory. To provide guarantee that this test works, consider using // https://pkg.go.dev/runtime#Pinner when upgrading Go to >= 1.21. func assertStringIsOriginal(t *testing.T, s string, belongs bool, originalData []byte) { start := uintptr(unsafe.Pointer(unsafe.StringData(s))) // empty string has no underlying array, compare pointer to nil if len(s) == 0 { assert.Equal(t, uintptr(unsafe.Pointer(nil)), start) return } end := start + uintptr(len(s)) - 1 originalStart := uintptr(unsafe.Pointer(unsafe.SliceData(originalData))) originalEnd := originalStart + uintptr(len(originalData)) - 1 assert.Equal(t, belongs, start >= originalStart && start < originalEnd) assert.Equal(t, belongs, end > originalStart && end <= originalEnd) } // assertBytesAreOriginal is the same as assertStringIsOriginal for a []byte. func assertBytesAreOriginal(t *testing.T, b []byte, belongs bool, originalData []byte) { originalStart := uintptr(unsafe.Pointer(unsafe.SliceData(originalData))) originalEnd := originalStart + uintptr(len(originalData)) - 1 start := uintptr(unsafe.Pointer(unsafe.SliceData(b))) end := start + uintptr(len(b)) - 1 assert.Equal(t, belongs, start >= originalStart && start < originalEnd) assert.Equal(t, belongs, end > originalStart && end <= originalEnd) } func Test_UnmarshalVTUnsafe(t *testing.T) { testString := "⚡速いA6@wdkyAiX!7Ls7Tp9_NÉŠŻ⚡" testBytes := []byte{8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8} // simple case t1Orig := &UnsafeTest{ Sub: &UnsafeTest_Sub1_{ Sub1: &UnsafeTest_Sub1{ S: testString, B: testBytes, }, }, } originalData1, err := t1Orig.MarshalVT() require.NoError(t, err) t1Safe := &UnsafeTest{} require.NoError(t, t1Safe.UnmarshalVT(originalData1)) assert.Equal(t, (t1Orig.Sub).(*UnsafeTest_Sub1_).Sub1.S, (t1Safe.Sub).(*UnsafeTest_Sub1_).Sub1.S) assert.Equal(t, (t1Orig.Sub).(*UnsafeTest_Sub1_).Sub1.B, (t1Safe.Sub).(*UnsafeTest_Sub1_).Sub1.B) assertStringIsOriginal(t, (t1Safe.Sub).(*UnsafeTest_Sub1_).Sub1.S, false, originalData1) assertBytesAreOriginal(t, (t1Safe.Sub).(*UnsafeTest_Sub1_).Sub1.B, false, originalData1) t1Unsafe := &UnsafeTest{} require.NoError(t, t1Unsafe.UnmarshalVTUnsafe(originalData1)) assert.Equal(t, (t1Orig.Sub).(*UnsafeTest_Sub1_).Sub1.S, (t1Unsafe.Sub).(*UnsafeTest_Sub1_).Sub1.S) assert.Equal(t, (t1Orig.Sub).(*UnsafeTest_Sub1_).Sub1.B, (t1Unsafe.Sub).(*UnsafeTest_Sub1_).Sub1.B) assertStringIsOriginal(t, (t1Unsafe.Sub).(*UnsafeTest_Sub1_).Sub1.S, true, originalData1) assertBytesAreOriginal(t, (t1Unsafe.Sub).(*UnsafeTest_Sub1_).Sub1.B, true, originalData1) // repeated field t2Orig := &UnsafeTest{ Sub: &UnsafeTest_Sub2_{ Sub2: &UnsafeTest_Sub2{ S: []string{testString, testString, testString}, B: [][]byte{testBytes, testBytes, testBytes}, }, }, } originalData2, err := t2Orig.MarshalVT() require.NoError(t, err) t2Safe := &UnsafeTest{} require.NoError(t, t2Safe.UnmarshalVT(originalData2)) assert.Equal(t, (t2Orig.Sub).(*UnsafeTest_Sub2_).Sub2.S, (t2Safe.Sub).(*UnsafeTest_Sub2_).Sub2.S) assert.Equal(t, (t2Orig.Sub).(*UnsafeTest_Sub2_).Sub2.B, (t2Safe.Sub).(*UnsafeTest_Sub2_).Sub2.B) for i := 0; i < 3; i++ { assertStringIsOriginal(t, (t2Safe.Sub).(*UnsafeTest_Sub2_).Sub2.S[i], false, originalData2) assertBytesAreOriginal(t, (t2Safe.Sub).(*UnsafeTest_Sub2_).Sub2.B[i], false, originalData2) } t2Unsafe := &UnsafeTest{} require.NoError(t, t2Unsafe.UnmarshalVTUnsafe(originalData2)) assert.Equal(t, (t2Orig.Sub).(*UnsafeTest_Sub2_).Sub2.S, (t2Unsafe.Sub).(*UnsafeTest_Sub2_).Sub2.S) assert.Equal(t, (t2Orig.Sub).(*UnsafeTest_Sub2_).Sub2.B, (t2Unsafe.Sub).(*UnsafeTest_Sub2_).Sub2.B) for i := 0; i < 3; i++ { assertStringIsOriginal(t, (t2Unsafe.Sub).(*UnsafeTest_Sub2_).Sub2.S[i], true, originalData2) assertBytesAreOriginal(t, (t2Unsafe.Sub).(*UnsafeTest_Sub2_).Sub2.B[i], true, originalData2) } // map[string]bytes field t3Orig := &UnsafeTest{ Sub: &UnsafeTest_Sub3_{ Sub3: &UnsafeTest_Sub3{ Foo: map[string][]byte{testString: testBytes}, }, }, } originalData3, err := t3Orig.MarshalVT() require.NoError(t, err) t3Safe := &UnsafeTest{} require.NoError(t, t3Safe.UnmarshalVT(originalData3)) assert.Equal(t, (t3Orig.Sub).(*UnsafeTest_Sub3_).Sub3.Foo, (t3Safe.Sub).(*UnsafeTest_Sub3_).Sub3.Foo) for k, v := range (t3Safe.Sub).(*UnsafeTest_Sub3_).Sub3.Foo { assertStringIsOriginal(t, k, false, originalData3) assertBytesAreOriginal(t, v, false, originalData3) } t3Unsafe := &UnsafeTest{} require.NoError(t, t3Unsafe.UnmarshalVTUnsafe(originalData3)) assert.Equal(t, (t3Orig.Sub).(*UnsafeTest_Sub3_).Sub3.Foo, (t3Unsafe.Sub).(*UnsafeTest_Sub3_).Sub3.Foo) for k, v := range (t3Unsafe.Sub).(*UnsafeTest_Sub3_).Sub3.Foo { assertStringIsOriginal(t, k, true, originalData3) assertBytesAreOriginal(t, v, true, originalData3) } // oneof field for _, stringVal := range []string{ testString, "", } { t4OrigS := &UnsafeTest{ Sub: &UnsafeTest_Sub4_{ Sub4: &UnsafeTest_Sub4{ Foo: &UnsafeTest_Sub4_S{ S: stringVal, }, }, }, } originalData4S, err := t4OrigS.MarshalVT() require.NoError(t, err) t4SafeS := &UnsafeTest{} require.NoError(t, t4SafeS.UnmarshalVT(originalData4S)) assert.Equal(t, (t4OrigS.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_S).S, (t4SafeS.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_S).S) assertStringIsOriginal(t, (t4SafeS.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_S).S, false, originalData4S) t4UnsafeS := &UnsafeTest{} require.NoError(t, t4UnsafeS.UnmarshalVTUnsafe(originalData4S)) assert.Equal(t, (t4OrigS.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_S).S, (t4UnsafeS.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_S).S) assertStringIsOriginal(t, (t4UnsafeS.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_S).S, true, originalData4S) } t4OrigB := &UnsafeTest{ Sub: &UnsafeTest_Sub4_{ Sub4: &UnsafeTest_Sub4{ Foo: &UnsafeTest_Sub4_B{ B: testBytes, }, }, }, } originalData4B, err := t4OrigB.MarshalVT() require.NoError(t, err) t4SafeB := &UnsafeTest{} require.NoError(t, t4SafeB.UnmarshalVT(originalData4B)) assert.Equal(t, (t4OrigB.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_B).B, (t4SafeB.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_B).B) assertBytesAreOriginal(t, (t4SafeB.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_B).B, false, originalData4B) t4UnsafeB := &UnsafeTest{} require.NoError(t, t4UnsafeB.UnmarshalVTUnsafe(originalData4B)) assert.Equal(t, (t4OrigB.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_B).B, (t4UnsafeB.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_B).B) assertBytesAreOriginal(t, (t4UnsafeB.Sub).(*UnsafeTest_Sub4_).Sub4.Foo.(*UnsafeTest_Sub4_B).B, true, originalData4B) // map[string]string field for _, stringVal := range []string{ testString, "", } { t5Orig := &UnsafeTest{ Sub: &UnsafeTest_Sub5_{ Sub5: &UnsafeTest_Sub5{ Foo: map[string]string{testString: stringVal}, }, }, } originalData5, err := t5Orig.MarshalVT() require.NoError(t, err) t5Safe := &UnsafeTest{} require.NoError(t, t5Safe.UnmarshalVT(originalData5)) assert.Equal(t, (t5Orig.Sub).(*UnsafeTest_Sub5_).Sub5.Foo, (t5Safe.Sub).(*UnsafeTest_Sub5_).Sub5.Foo) for k, v := range (t5Safe.Sub).(*UnsafeTest_Sub5_).Sub5.Foo { assertStringIsOriginal(t, k, false, originalData5) assertStringIsOriginal(t, v, false, originalData5) } t5Unsafe := &UnsafeTest{} require.NoError(t, t5Unsafe.UnmarshalVTUnsafe(originalData5)) assert.Equal(t, (t5Orig.Sub).(*UnsafeTest_Sub5_).Sub5.Foo, (t5Unsafe.Sub).(*UnsafeTest_Sub5_).Sub5.Foo) for k, v := range (t5Unsafe.Sub).(*UnsafeTest_Sub5_).Sub5.Foo { assertStringIsOriginal(t, k, true, originalData5) assertStringIsOriginal(t, v, true, originalData5) } } } golang-github-planetscale-vtprotobuf-0.6.0/testproto/unsafe/unsafe_vtproto.pb.go000066400000000000000000002330421455570004500303070ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: unsafe/unsafe.proto package unsafe import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *UnsafeTest_Sub1) CloneVT() *UnsafeTest_Sub1 { if m == nil { return (*UnsafeTest_Sub1)(nil) } r := new(UnsafeTest_Sub1) r.S = m.S if rhs := m.B; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.B = tmpBytes } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *UnsafeTest_Sub1) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *UnsafeTest_Sub2) CloneVT() *UnsafeTest_Sub2 { if m == nil { return (*UnsafeTest_Sub2)(nil) } r := new(UnsafeTest_Sub2) if rhs := m.S; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.S = tmpContainer } if rhs := m.B; rhs != nil { tmpContainer := make([][]byte, len(rhs)) for k, v := range rhs { tmpBytes := make([]byte, len(v)) copy(tmpBytes, v) tmpContainer[k] = tmpBytes } r.B = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *UnsafeTest_Sub2) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *UnsafeTest_Sub3) CloneVT() *UnsafeTest_Sub3 { if m == nil { return (*UnsafeTest_Sub3)(nil) } r := new(UnsafeTest_Sub3) if rhs := m.Foo; rhs != nil { tmpContainer := make(map[string][]byte, len(rhs)) for k, v := range rhs { tmpBytes := make([]byte, len(v)) copy(tmpBytes, v) tmpContainer[k] = tmpBytes } r.Foo = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *UnsafeTest_Sub3) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *UnsafeTest_Sub4) CloneVT() *UnsafeTest_Sub4 { if m == nil { return (*UnsafeTest_Sub4)(nil) } r := new(UnsafeTest_Sub4) if m.Foo != nil { r.Foo = m.Foo.(interface{ CloneVT() isUnsafeTest_Sub4_Foo }).CloneVT() } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *UnsafeTest_Sub4) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *UnsafeTest_Sub4_S) CloneVT() isUnsafeTest_Sub4_Foo { if m == nil { return (*UnsafeTest_Sub4_S)(nil) } r := new(UnsafeTest_Sub4_S) r.S = m.S return r } func (m *UnsafeTest_Sub4_B) CloneVT() isUnsafeTest_Sub4_Foo { if m == nil { return (*UnsafeTest_Sub4_B)(nil) } r := new(UnsafeTest_Sub4_B) if rhs := m.B; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.B = tmpBytes } return r } func (m *UnsafeTest_Sub5) CloneVT() *UnsafeTest_Sub5 { if m == nil { return (*UnsafeTest_Sub5)(nil) } r := new(UnsafeTest_Sub5) if rhs := m.Foo; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.Foo = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *UnsafeTest_Sub5) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *UnsafeTest) CloneVT() *UnsafeTest { if m == nil { return (*UnsafeTest)(nil) } r := new(UnsafeTest) if m.Sub != nil { r.Sub = m.Sub.(interface{ CloneVT() isUnsafeTest_Sub }).CloneVT() } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *UnsafeTest) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *UnsafeTest_Sub1_) CloneVT() isUnsafeTest_Sub { if m == nil { return (*UnsafeTest_Sub1_)(nil) } r := new(UnsafeTest_Sub1_) r.Sub1 = m.Sub1.CloneVT() return r } func (m *UnsafeTest_Sub2_) CloneVT() isUnsafeTest_Sub { if m == nil { return (*UnsafeTest_Sub2_)(nil) } r := new(UnsafeTest_Sub2_) r.Sub2 = m.Sub2.CloneVT() return r } func (m *UnsafeTest_Sub3_) CloneVT() isUnsafeTest_Sub { if m == nil { return (*UnsafeTest_Sub3_)(nil) } r := new(UnsafeTest_Sub3_) r.Sub3 = m.Sub3.CloneVT() return r } func (m *UnsafeTest_Sub4_) CloneVT() isUnsafeTest_Sub { if m == nil { return (*UnsafeTest_Sub4_)(nil) } r := new(UnsafeTest_Sub4_) r.Sub4 = m.Sub4.CloneVT() return r } func (m *UnsafeTest_Sub5_) CloneVT() isUnsafeTest_Sub { if m == nil { return (*UnsafeTest_Sub5_)(nil) } r := new(UnsafeTest_Sub5_) r.Sub5 = m.Sub5.CloneVT() return r } func (this *UnsafeTest_Sub1) EqualVT(that *UnsafeTest_Sub1) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.S != that.S { return false } if string(this.B) != string(that.B) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *UnsafeTest_Sub1) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*UnsafeTest_Sub1) if !ok { return false } return this.EqualVT(that) } func (this *UnsafeTest_Sub2) EqualVT(that *UnsafeTest_Sub2) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.S) != len(that.S) { return false } for i, vx := range this.S { vy := that.S[i] if vx != vy { return false } } if len(this.B) != len(that.B) { return false } for i, vx := range this.B { vy := that.B[i] if string(vx) != string(vy) { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *UnsafeTest_Sub2) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*UnsafeTest_Sub2) if !ok { return false } return this.EqualVT(that) } func (this *UnsafeTest_Sub3) EqualVT(that *UnsafeTest_Sub3) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Foo) != len(that.Foo) { return false } for i, vx := range this.Foo { vy, ok := that.Foo[i] if !ok { return false } if string(vx) != string(vy) { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *UnsafeTest_Sub3) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*UnsafeTest_Sub3) if !ok { return false } return this.EqualVT(that) } func (this *UnsafeTest_Sub4) EqualVT(that *UnsafeTest_Sub4) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Foo == nil && that.Foo != nil { return false } else if this.Foo != nil { if that.Foo == nil { return false } if !this.Foo.(interface { EqualVT(isUnsafeTest_Sub4_Foo) bool }).EqualVT(that.Foo) { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *UnsafeTest_Sub4) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*UnsafeTest_Sub4) if !ok { return false } return this.EqualVT(that) } func (this *UnsafeTest_Sub4_S) EqualVT(thatIface isUnsafeTest_Sub4_Foo) bool { that, ok := thatIface.(*UnsafeTest_Sub4_S) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.S != that.S { return false } return true } func (this *UnsafeTest_Sub4_B) EqualVT(thatIface isUnsafeTest_Sub4_Foo) bool { that, ok := thatIface.(*UnsafeTest_Sub4_B) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if string(this.B) != string(that.B) { return false } return true } func (this *UnsafeTest_Sub5) EqualVT(that *UnsafeTest_Sub5) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Foo) != len(that.Foo) { return false } for i, vx := range this.Foo { vy, ok := that.Foo[i] if !ok { return false } if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *UnsafeTest_Sub5) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*UnsafeTest_Sub5) if !ok { return false } return this.EqualVT(that) } func (this *UnsafeTest) EqualVT(that *UnsafeTest) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Sub == nil && that.Sub != nil { return false } else if this.Sub != nil { if that.Sub == nil { return false } if !this.Sub.(interface{ EqualVT(isUnsafeTest_Sub) bool }).EqualVT(that.Sub) { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *UnsafeTest) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*UnsafeTest) if !ok { return false } return this.EqualVT(that) } func (this *UnsafeTest_Sub1_) EqualVT(thatIface isUnsafeTest_Sub) bool { that, ok := thatIface.(*UnsafeTest_Sub1_) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.Sub1, that.Sub1; p != q { if p == nil { p = &UnsafeTest_Sub1{} } if q == nil { q = &UnsafeTest_Sub1{} } if !p.EqualVT(q) { return false } } return true } func (this *UnsafeTest_Sub2_) EqualVT(thatIface isUnsafeTest_Sub) bool { that, ok := thatIface.(*UnsafeTest_Sub2_) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.Sub2, that.Sub2; p != q { if p == nil { p = &UnsafeTest_Sub2{} } if q == nil { q = &UnsafeTest_Sub2{} } if !p.EqualVT(q) { return false } } return true } func (this *UnsafeTest_Sub3_) EqualVT(thatIface isUnsafeTest_Sub) bool { that, ok := thatIface.(*UnsafeTest_Sub3_) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.Sub3, that.Sub3; p != q { if p == nil { p = &UnsafeTest_Sub3{} } if q == nil { q = &UnsafeTest_Sub3{} } if !p.EqualVT(q) { return false } } return true } func (this *UnsafeTest_Sub4_) EqualVT(thatIface isUnsafeTest_Sub) bool { that, ok := thatIface.(*UnsafeTest_Sub4_) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.Sub4, that.Sub4; p != q { if p == nil { p = &UnsafeTest_Sub4{} } if q == nil { q = &UnsafeTest_Sub4{} } if !p.EqualVT(q) { return false } } return true } func (this *UnsafeTest_Sub5_) EqualVT(thatIface isUnsafeTest_Sub) bool { that, ok := thatIface.(*UnsafeTest_Sub5_) if !ok { return false } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.Sub5, that.Sub5; p != q { if p == nil { p = &UnsafeTest_Sub5{} } if q == nil { q = &UnsafeTest_Sub5{} } if !p.EqualVT(q) { return false } } return true } func (m *UnsafeTest_Sub1) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub1) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.B) > 0 { i -= len(m.B) copy(dAtA[i:], m.B) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.B))) i-- dAtA[i] = 0x12 } if len(m.S) > 0 { i -= len(m.S) copy(dAtA[i:], m.S) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.S))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.B) > 0 { for iNdEx := len(m.B) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.B[iNdEx]) copy(dAtA[i:], m.B[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.B[iNdEx]))) i-- dAtA[i] = 0x12 } } if len(m.S) > 0 { for iNdEx := len(m.S) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.S[iNdEx]) copy(dAtA[i:], m.S[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.S[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub3) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub3) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Foo) > 0 { for k := range m.Foo { v := m.Foo[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub4) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub4) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub4) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if vtmsg, ok := m.Foo.(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub4_S) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub4_S) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.S) copy(dAtA[i:], m.S) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.S))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *UnsafeTest_Sub4_B) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub4_B) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.B) copy(dAtA[i:], m.B) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.B))) i-- dAtA[i] = 0x12 return len(dAtA) - i, nil } func (m *UnsafeTest_Sub5) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub5) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub5) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Foo) > 0 { for k := range m.Foo { v := m.Foo[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *UnsafeTest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if vtmsg, ok := m.Sub.(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub1_) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub1_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub1 != nil { size, err := m.Sub1.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub2_) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub2_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub2 != nil { size, err := m.Sub2.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub3_) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub3_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub3 != nil { size, err := m.Sub3.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub4_) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub4_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub4 != nil { size, err := m.Sub4.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub5_) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UnsafeTest_Sub5_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub5 != nil { size, err := m.Sub5.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub1) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub1) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.B) > 0 { i -= len(m.B) copy(dAtA[i:], m.B) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.B))) i-- dAtA[i] = 0x12 } if len(m.S) > 0 { i -= len(m.S) copy(dAtA[i:], m.S) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.S))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub2) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.B) > 0 { for iNdEx := len(m.B) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.B[iNdEx]) copy(dAtA[i:], m.B[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.B[iNdEx]))) i-- dAtA[i] = 0x12 } } if len(m.S) > 0 { for iNdEx := len(m.S) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.S[iNdEx]) copy(dAtA[i:], m.S[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.S[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub3) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub3) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Foo) > 0 { for k := range m.Foo { v := m.Foo[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub4) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub4) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub4) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if msg, ok := m.Foo.(*UnsafeTest_Sub4_B); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Foo.(*UnsafeTest_Sub4_S); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub4_S) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub4_S) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.S) copy(dAtA[i:], m.S) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.S))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *UnsafeTest_Sub4_B) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub4_B) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.B) copy(dAtA[i:], m.B) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.B))) i-- dAtA[i] = 0x12 return len(dAtA) - i, nil } func (m *UnsafeTest_Sub5) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest_Sub5) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub5) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Foo) > 0 { for k := range m.Foo { v := m.Foo[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *UnsafeTest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UnsafeTest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if msg, ok := m.Sub.(*UnsafeTest_Sub5_); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Sub.(*UnsafeTest_Sub4_); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Sub.(*UnsafeTest_Sub3_); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Sub.(*UnsafeTest_Sub2_); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if msg, ok := m.Sub.(*UnsafeTest_Sub1_); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub1_) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub1_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub1 != nil { size, err := m.Sub1.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub2_) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub2_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub2 != nil { size, err := m.Sub2.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub3_) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub3_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub3 != nil { size, err := m.Sub3.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub4_) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub4_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub4 != nil { size, err := m.Sub4.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub5_) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UnsafeTest_Sub5_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.Sub5 != nil { size, err := m.Sub5.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } return len(dAtA) - i, nil } func (m *UnsafeTest_Sub1) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.S) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.B) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } func (m *UnsafeTest_Sub2) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.S) > 0 { for _, s := range m.S { l = len(s) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.B) > 0 { for _, b := range m.B { l = len(b) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *UnsafeTest_Sub3) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Foo) > 0 { for k, v := range m.Foo { _ = k _ = v l = 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) return n } func (m *UnsafeTest_Sub4) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if vtmsg, ok := m.Foo.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } n += len(m.unknownFields) return n } func (m *UnsafeTest_Sub4_S) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.S) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *UnsafeTest_Sub4_B) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.B) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *UnsafeTest_Sub5) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Foo) > 0 { for k, v := range m.Foo { _ = k _ = v mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) return n } func (m *UnsafeTest) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if vtmsg, ok := m.Sub.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } n += len(m.unknownFields) return n } func (m *UnsafeTest_Sub1_) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Sub1 != nil { l = m.Sub1.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *UnsafeTest_Sub2_) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Sub2 != nil { l = m.Sub2.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *UnsafeTest_Sub3_) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Sub3 != nil { l = m.Sub3.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *UnsafeTest_Sub4_) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Sub4 != nil { l = m.Sub4.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *UnsafeTest_Sub5_) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Sub5 != nil { l = m.Sub5.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *UnsafeTest_Sub1) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub1: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub1: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.S = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.B = append(m.B[:0], dAtA[iNdEx:postIndex]...) if m.B == nil { m.B = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub2) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.S = append(m.S, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.B = append(m.B, make([]byte, postIndex-iNdEx)) copy(m.B[len(m.B)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub3) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Foo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Foo == nil { m.Foo = make(map[string][]byte) } var mapkey string var mapvalue []byte for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postbytesIndex := iNdEx + intMapbyteLen if postbytesIndex < 0 { return protohelpers.ErrInvalidLength } if postbytesIndex > l { return io.ErrUnexpectedEOF } mapvalue = make([]byte, mapbyteLen) copy(mapvalue, dAtA[iNdEx:postbytesIndex]) iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Foo[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub4) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub4: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub4: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Foo = &UnsafeTest_Sub4_S{S: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := make([]byte, postIndex-iNdEx) copy(v, dAtA[iNdEx:postIndex]) m.Foo = &UnsafeTest_Sub4_B{B: v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub5) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub5: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub5: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Foo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Foo == nil { m.Foo = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Foo[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub1", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub1_); ok { if err := oneof.Sub1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub1{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub1_{Sub1: v} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub2", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub2_); ok { if err := oneof.Sub2.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub2{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub2_{Sub2: v} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub3", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub3_); ok { if err := oneof.Sub3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub3{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub3_{Sub3: v} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub4", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub4_); ok { if err := oneof.Sub4.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub4{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub4_{Sub4: v} } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub5", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub5_); ok { if err := oneof.Sub5.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub5{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub5_{Sub5: v} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub1) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub1: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub1: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.S = stringValue iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.B = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub2: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.S = append(m.S, stringValue) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.B = append(m.B, dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub3) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub3: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Foo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Foo == nil { m.Foo = make(map[string][]byte) } var mapkey string var mapvalue []byte for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postbytesIndex := iNdEx + intMapbyteLen if postbytesIndex < 0 { return protohelpers.ErrInvalidLength } if postbytesIndex > l { return io.ErrUnexpectedEOF } mapvalue = dAtA[iNdEx:postbytesIndex] iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Foo[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub4) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub4: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub4: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Foo = &UnsafeTest_Sub4_S{S: stringValue} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } v := dAtA[iNdEx:postIndex] m.Foo = &UnsafeTest_Sub4_B{B: v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest_Sub5) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest_Sub5: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest_Sub5: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Foo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Foo == nil { m.Foo = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } if intStringLenmapvalue == 0 { mapvalue = "" } else { mapvalue = unsafe.String(&dAtA[iNdEx], intStringLenmapvalue) } iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Foo[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UnsafeTest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnsafeTest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnsafeTest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub1", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub1_); ok { if err := oneof.Sub1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub1{} if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub1_{Sub1: v} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub2", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub2_); ok { if err := oneof.Sub2.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub2{} if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub2_{Sub2: v} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub3", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub3_); ok { if err := oneof.Sub3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub3{} if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub3_{Sub3: v} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub4", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub4_); ok { if err := oneof.Sub4.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub4{} if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub4_{Sub4: v} } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sub5", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Sub.(*UnsafeTest_Sub5_); ok { if err := oneof.Sub5.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &UnsafeTest_Sub5{} if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sub = &UnsafeTest_Sub5_{Sub5: v} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/wkt/000077500000000000000000000000001455570004500236225ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/testproto/wkt/wkt.pb.go000066400000000000000000000452251455570004500253660ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: wkt/wkt.proto package wkt import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" durationpb "google.golang.org/protobuf/types/known/durationpb" emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type MessageWithWKT struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Any *anypb.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"` Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"` Empty *emptypb.Empty `protobuf:"bytes,3,opt,name=empty,proto3" json:"empty,omitempty"` FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,4,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` DoubleValue *wrapperspb.DoubleValue `protobuf:"bytes,6,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"` FloatValue *wrapperspb.FloatValue `protobuf:"bytes,7,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"` Int64Value *wrapperspb.Int64Value `protobuf:"bytes,8,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"` Uint64Value *wrapperspb.UInt64Value `protobuf:"bytes,9,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"` Int32Value *wrapperspb.Int32Value `protobuf:"bytes,10,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"` Uint32Value *wrapperspb.UInt32Value `protobuf:"bytes,11,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"` BoolValue *wrapperspb.BoolValue `protobuf:"bytes,12,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"` StringValue *wrapperspb.StringValue `protobuf:"bytes,13,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` BytesValue *wrapperspb.BytesValue `protobuf:"bytes,14,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"` StructValue *structpb.Struct `protobuf:"bytes,15,opt,name=struct_value,json=structValue,proto3" json:"struct_value,omitempty"` ValueValue *structpb.Value `protobuf:"bytes,16,opt,name=value_value,json=valueValue,proto3" json:"value_value,omitempty"` ListvalueValue *structpb.ListValue `protobuf:"bytes,17,opt,name=listvalue_value,json=listvalueValue,proto3" json:"listvalue_value,omitempty"` NullValue structpb.NullValue `protobuf:"varint,18,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue" json:"null_value,omitempty"` } func (x *MessageWithWKT) Reset() { *x = MessageWithWKT{} if protoimpl.UnsafeEnabled { mi := &file_wkt_wkt_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MessageWithWKT) String() string { return protoimpl.X.MessageStringOf(x) } func (*MessageWithWKT) ProtoMessage() {} func (x *MessageWithWKT) ProtoReflect() protoreflect.Message { mi := &file_wkt_wkt_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MessageWithWKT.ProtoReflect.Descriptor instead. func (*MessageWithWKT) Descriptor() ([]byte, []int) { return file_wkt_wkt_proto_rawDescGZIP(), []int{0} } func (x *MessageWithWKT) GetAny() *anypb.Any { if x != nil { return x.Any } return nil } func (x *MessageWithWKT) GetDuration() *durationpb.Duration { if x != nil { return x.Duration } return nil } func (x *MessageWithWKT) GetEmpty() *emptypb.Empty { if x != nil { return x.Empty } return nil } func (x *MessageWithWKT) GetFieldMask() *fieldmaskpb.FieldMask { if x != nil { return x.FieldMask } return nil } func (x *MessageWithWKT) GetTimestamp() *timestamppb.Timestamp { if x != nil { return x.Timestamp } return nil } func (x *MessageWithWKT) GetDoubleValue() *wrapperspb.DoubleValue { if x != nil { return x.DoubleValue } return nil } func (x *MessageWithWKT) GetFloatValue() *wrapperspb.FloatValue { if x != nil { return x.FloatValue } return nil } func (x *MessageWithWKT) GetInt64Value() *wrapperspb.Int64Value { if x != nil { return x.Int64Value } return nil } func (x *MessageWithWKT) GetUint64Value() *wrapperspb.UInt64Value { if x != nil { return x.Uint64Value } return nil } func (x *MessageWithWKT) GetInt32Value() *wrapperspb.Int32Value { if x != nil { return x.Int32Value } return nil } func (x *MessageWithWKT) GetUint32Value() *wrapperspb.UInt32Value { if x != nil { return x.Uint32Value } return nil } func (x *MessageWithWKT) GetBoolValue() *wrapperspb.BoolValue { if x != nil { return x.BoolValue } return nil } func (x *MessageWithWKT) GetStringValue() *wrapperspb.StringValue { if x != nil { return x.StringValue } return nil } func (x *MessageWithWKT) GetBytesValue() *wrapperspb.BytesValue { if x != nil { return x.BytesValue } return nil } func (x *MessageWithWKT) GetStructValue() *structpb.Struct { if x != nil { return x.StructValue } return nil } func (x *MessageWithWKT) GetValueValue() *structpb.Value { if x != nil { return x.ValueValue } return nil } func (x *MessageWithWKT) GetListvalueValue() *structpb.ListValue { if x != nil { return x.ListvalueValue } return nil } func (x *MessageWithWKT) GetNullValue() structpb.NullValue { if x != nil { return x.NullValue } return structpb.NullValue(0) } var File_wkt_wkt_proto protoreflect.FileDescriptor var file_wkt_wkt_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x77, 0x6b, 0x74, 0x2f, 0x77, 0x6b, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x08, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x57, 0x4b, 0x54, 0x12, 0x26, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6c, 0x69, 0x73, 0x74, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0x5a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x77, 0x6b, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_wkt_wkt_proto_rawDescOnce sync.Once file_wkt_wkt_proto_rawDescData = file_wkt_wkt_proto_rawDesc ) func file_wkt_wkt_proto_rawDescGZIP() []byte { file_wkt_wkt_proto_rawDescOnce.Do(func() { file_wkt_wkt_proto_rawDescData = protoimpl.X.CompressGZIP(file_wkt_wkt_proto_rawDescData) }) return file_wkt_wkt_proto_rawDescData } var file_wkt_wkt_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_wkt_wkt_proto_goTypes = []interface{}{ (*MessageWithWKT)(nil), // 0: MessageWithWKT (*anypb.Any)(nil), // 1: google.protobuf.Any (*durationpb.Duration)(nil), // 2: google.protobuf.Duration (*emptypb.Empty)(nil), // 3: google.protobuf.Empty (*fieldmaskpb.FieldMask)(nil), // 4: google.protobuf.FieldMask (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp (*wrapperspb.DoubleValue)(nil), // 6: google.protobuf.DoubleValue (*wrapperspb.FloatValue)(nil), // 7: google.protobuf.FloatValue (*wrapperspb.Int64Value)(nil), // 8: google.protobuf.Int64Value (*wrapperspb.UInt64Value)(nil), // 9: google.protobuf.UInt64Value (*wrapperspb.Int32Value)(nil), // 10: google.protobuf.Int32Value (*wrapperspb.UInt32Value)(nil), // 11: google.protobuf.UInt32Value (*wrapperspb.BoolValue)(nil), // 12: google.protobuf.BoolValue (*wrapperspb.StringValue)(nil), // 13: google.protobuf.StringValue (*wrapperspb.BytesValue)(nil), // 14: google.protobuf.BytesValue (*structpb.Struct)(nil), // 15: google.protobuf.Struct (*structpb.Value)(nil), // 16: google.protobuf.Value (*structpb.ListValue)(nil), // 17: google.protobuf.ListValue (structpb.NullValue)(0), // 18: google.protobuf.NullValue } var file_wkt_wkt_proto_depIdxs = []int32{ 1, // 0: MessageWithWKT.any:type_name -> google.protobuf.Any 2, // 1: MessageWithWKT.duration:type_name -> google.protobuf.Duration 3, // 2: MessageWithWKT.empty:type_name -> google.protobuf.Empty 4, // 3: MessageWithWKT.field_mask:type_name -> google.protobuf.FieldMask 5, // 4: MessageWithWKT.timestamp:type_name -> google.protobuf.Timestamp 6, // 5: MessageWithWKT.double_value:type_name -> google.protobuf.DoubleValue 7, // 6: MessageWithWKT.float_value:type_name -> google.protobuf.FloatValue 8, // 7: MessageWithWKT.int64_value:type_name -> google.protobuf.Int64Value 9, // 8: MessageWithWKT.uint64_value:type_name -> google.protobuf.UInt64Value 10, // 9: MessageWithWKT.int32_value:type_name -> google.protobuf.Int32Value 11, // 10: MessageWithWKT.uint32_value:type_name -> google.protobuf.UInt32Value 12, // 11: MessageWithWKT.bool_value:type_name -> google.protobuf.BoolValue 13, // 12: MessageWithWKT.string_value:type_name -> google.protobuf.StringValue 14, // 13: MessageWithWKT.bytes_value:type_name -> google.protobuf.BytesValue 15, // 14: MessageWithWKT.struct_value:type_name -> google.protobuf.Struct 16, // 15: MessageWithWKT.value_value:type_name -> google.protobuf.Value 17, // 16: MessageWithWKT.listvalue_value:type_name -> google.protobuf.ListValue 18, // 17: MessageWithWKT.null_value:type_name -> google.protobuf.NullValue 18, // [18:18] is the sub-list for method output_type 18, // [18:18] is the sub-list for method input_type 18, // [18:18] is the sub-list for extension type_name 18, // [18:18] is the sub-list for extension extendee 0, // [0:18] is the sub-list for field type_name } func init() { file_wkt_wkt_proto_init() } func file_wkt_wkt_proto_init() { if File_wkt_wkt_proto != nil { return } if !protoimpl.UnsafeEnabled { file_wkt_wkt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MessageWithWKT); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_wkt_wkt_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_wkt_wkt_proto_goTypes, DependencyIndexes: file_wkt_wkt_proto_depIdxs, MessageInfos: file_wkt_wkt_proto_msgTypes, }.Build() File_wkt_wkt_proto = out.File file_wkt_wkt_proto_rawDesc = nil file_wkt_wkt_proto_goTypes = nil file_wkt_wkt_proto_depIdxs = nil } golang-github-planetscale-vtprotobuf-0.6.0/testproto/wkt/wkt.proto000066400000000000000000000022151455570004500255140ustar00rootroot00000000000000syntax = "proto3"; option go_package = "testproto/wkt"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/protobuf/struct.proto"; message MessageWithWKT { google.protobuf.Any any = 1; google.protobuf.Duration duration = 2; google.protobuf.Empty empty = 3; google.protobuf.FieldMask field_mask = 4; google.protobuf.Timestamp timestamp = 5; google.protobuf.DoubleValue double_value = 6; google.protobuf.FloatValue float_value = 7; google.protobuf.Int64Value int64_value = 8; google.protobuf.UInt64Value uint64_value = 9; google.protobuf.Int32Value int32_value = 10; google.protobuf.UInt32Value uint32_value = 11; google.protobuf.BoolValue bool_value = 12; google.protobuf.StringValue string_value = 13; google.protobuf.BytesValue bytes_value = 14; google.protobuf.Struct struct_value = 15; google.protobuf.Value value_value = 16; google.protobuf.ListValue listvalue_value = 17; google.protobuf.NullValue null_value = 18; } golang-github-planetscale-vtprotobuf-0.6.0/testproto/wkt/wkt_test.go000066400000000000000000000034671455570004500260270ustar00rootroot00000000000000package wkt import ( "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/fieldmaskpb" "google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/wrapperspb" ) func TestWellKnownTypes(t *testing.T) { dur := durationpb.New(4*time.Hour + 2*time.Second) anyVal, err := anypb.New(dur) require.NoError(t, err) fieldMask, err := fieldmaskpb.New(dur, "seconds") require.NoError(t, err) m := &MessageWithWKT{ Any: anyVal, Duration: dur, Empty: &emptypb.Empty{}, FieldMask: fieldMask, Timestamp: timestamppb.Now(), DoubleValue: wrapperspb.Double(123456789.123456789), FloatValue: wrapperspb.Float(123456789.123456789), Int64Value: wrapperspb.Int64(123456789), Uint64Value: wrapperspb.UInt64(123456789), Int32Value: wrapperspb.Int32(123456789), Uint32Value: wrapperspb.UInt32(123456789), BoolValue: wrapperspb.Bool(true), StringValue: wrapperspb.String("String marshalling and unmarshalling test"), BytesValue: wrapperspb.Bytes([]byte("Bytes marshalling and unmarshalling test")), } golangBytes, err := proto.Marshal(m) require.NoError(t, err) vtProtoBytes, err := m.MarshalVT() require.NoError(t, err) require.NotEmpty(t, golangBytes) require.NotEmpty(t, vtProtoBytes) assert.Equal(t, golangBytes, vtProtoBytes) var ( golangMsg = &MessageWithWKT{} vtProtoMsg = &MessageWithWKT{} ) require.NoError(t, proto.Unmarshal(golangBytes, golangMsg)) require.NoError(t, vtProtoMsg.UnmarshalVT(vtProtoBytes)) assert.Equal(t, golangMsg.String(), vtProtoMsg.String()) } golang-github-planetscale-vtprotobuf-0.6.0/testproto/wkt/wkt_vtproto.pb.go000066400000000000000000001423321455570004500271600ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: wkt/wkt.proto package wkt import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" anypb1 "github.com/planetscale/vtprotobuf/types/known/anypb" durationpb1 "github.com/planetscale/vtprotobuf/types/known/durationpb" emptypb1 "github.com/planetscale/vtprotobuf/types/known/emptypb" fieldmaskpb1 "github.com/planetscale/vtprotobuf/types/known/fieldmaskpb" structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb" timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb" wrapperspb1 "github.com/planetscale/vtprotobuf/types/known/wrapperspb" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" durationpb "google.golang.org/protobuf/types/known/durationpb" emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" io "io" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *MessageWithWKT) CloneVT() *MessageWithWKT { if m == nil { return (*MessageWithWKT)(nil) } r := new(MessageWithWKT) r.Any = (*anypb.Any)((*anypb1.Any)(m.Any).CloneVT()) r.Duration = (*durationpb.Duration)((*durationpb1.Duration)(m.Duration).CloneVT()) r.Empty = (*emptypb.Empty)((*emptypb1.Empty)(m.Empty).CloneVT()) r.FieldMask = (*fieldmaskpb.FieldMask)((*fieldmaskpb1.FieldMask)(m.FieldMask).CloneVT()) r.Timestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Timestamp).CloneVT()) r.DoubleValue = (*wrapperspb.DoubleValue)((*wrapperspb1.DoubleValue)(m.DoubleValue).CloneVT()) r.FloatValue = (*wrapperspb.FloatValue)((*wrapperspb1.FloatValue)(m.FloatValue).CloneVT()) r.Int64Value = (*wrapperspb.Int64Value)((*wrapperspb1.Int64Value)(m.Int64Value).CloneVT()) r.Uint64Value = (*wrapperspb.UInt64Value)((*wrapperspb1.UInt64Value)(m.Uint64Value).CloneVT()) r.Int32Value = (*wrapperspb.Int32Value)((*wrapperspb1.Int32Value)(m.Int32Value).CloneVT()) r.Uint32Value = (*wrapperspb.UInt32Value)((*wrapperspb1.UInt32Value)(m.Uint32Value).CloneVT()) r.BoolValue = (*wrapperspb.BoolValue)((*wrapperspb1.BoolValue)(m.BoolValue).CloneVT()) r.StringValue = (*wrapperspb.StringValue)((*wrapperspb1.StringValue)(m.StringValue).CloneVT()) r.BytesValue = (*wrapperspb.BytesValue)((*wrapperspb1.BytesValue)(m.BytesValue).CloneVT()) r.StructValue = (*structpb.Struct)((*structpb1.Struct)(m.StructValue).CloneVT()) r.ValueValue = (*structpb.Value)((*structpb1.Value)(m.ValueValue).CloneVT()) r.ListvalueValue = (*structpb.ListValue)((*structpb1.ListValue)(m.ListvalueValue).CloneVT()) r.NullValue = m.NullValue if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *MessageWithWKT) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *MessageWithWKT) EqualVT(that *MessageWithWKT) bool { if this == that { return true } else if this == nil || that == nil { return false } if !(*anypb1.Any)(this.Any).EqualVT((*anypb1.Any)(that.Any)) { return false } if !(*durationpb1.Duration)(this.Duration).EqualVT((*durationpb1.Duration)(that.Duration)) { return false } if !(*emptypb1.Empty)(this.Empty).EqualVT((*emptypb1.Empty)(that.Empty)) { return false } if !(*fieldmaskpb1.FieldMask)(this.FieldMask).EqualVT((*fieldmaskpb1.FieldMask)(that.FieldMask)) { return false } if !(*timestamppb1.Timestamp)(this.Timestamp).EqualVT((*timestamppb1.Timestamp)(that.Timestamp)) { return false } if !(*wrapperspb1.DoubleValue)(this.DoubleValue).EqualVT((*wrapperspb1.DoubleValue)(that.DoubleValue)) { return false } if !(*wrapperspb1.FloatValue)(this.FloatValue).EqualVT((*wrapperspb1.FloatValue)(that.FloatValue)) { return false } if !(*wrapperspb1.Int64Value)(this.Int64Value).EqualVT((*wrapperspb1.Int64Value)(that.Int64Value)) { return false } if !(*wrapperspb1.UInt64Value)(this.Uint64Value).EqualVT((*wrapperspb1.UInt64Value)(that.Uint64Value)) { return false } if !(*wrapperspb1.Int32Value)(this.Int32Value).EqualVT((*wrapperspb1.Int32Value)(that.Int32Value)) { return false } if !(*wrapperspb1.UInt32Value)(this.Uint32Value).EqualVT((*wrapperspb1.UInt32Value)(that.Uint32Value)) { return false } if !(*wrapperspb1.BoolValue)(this.BoolValue).EqualVT((*wrapperspb1.BoolValue)(that.BoolValue)) { return false } if !(*wrapperspb1.StringValue)(this.StringValue).EqualVT((*wrapperspb1.StringValue)(that.StringValue)) { return false } if !(*wrapperspb1.BytesValue)(this.BytesValue).EqualVT((*wrapperspb1.BytesValue)(that.BytesValue)) { return false } if !(*structpb1.Struct)(this.StructValue).EqualVT((*structpb1.Struct)(that.StructValue)) { return false } if !(*structpb1.Value)(this.ValueValue).EqualVT((*structpb1.Value)(that.ValueValue)) { return false } if !(*structpb1.ListValue)(this.ListvalueValue).EqualVT((*structpb1.ListValue)(that.ListvalueValue)) { return false } if this.NullValue != that.NullValue { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *MessageWithWKT) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*MessageWithWKT) if !ok { return false } return this.EqualVT(that) } func (m *MessageWithWKT) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MessageWithWKT) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *MessageWithWKT) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.NullValue != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NullValue)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x90 } if m.ListvalueValue != nil { size, err := (*structpb1.ListValue)(m.ListvalueValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x8a } if m.ValueValue != nil { size, err := (*structpb1.Value)(m.ValueValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x82 } if m.StructValue != nil { size, err := (*structpb1.Struct)(m.StructValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7a } if m.BytesValue != nil { size, err := (*wrapperspb1.BytesValue)(m.BytesValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x72 } if m.StringValue != nil { size, err := (*wrapperspb1.StringValue)(m.StringValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x6a } if m.BoolValue != nil { size, err := (*wrapperspb1.BoolValue)(m.BoolValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x62 } if m.Uint32Value != nil { size, err := (*wrapperspb1.UInt32Value)(m.Uint32Value).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x5a } if m.Int32Value != nil { size, err := (*wrapperspb1.Int32Value)(m.Int32Value).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x52 } if m.Uint64Value != nil { size, err := (*wrapperspb1.UInt64Value)(m.Uint64Value).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x4a } if m.Int64Value != nil { size, err := (*wrapperspb1.Int64Value)(m.Int64Value).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x42 } if m.FloatValue != nil { size, err := (*wrapperspb1.FloatValue)(m.FloatValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3a } if m.DoubleValue != nil { size, err := (*wrapperspb1.DoubleValue)(m.DoubleValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } if m.Timestamp != nil { size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } if m.FieldMask != nil { size, err := (*fieldmaskpb1.FieldMask)(m.FieldMask).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } if m.Empty != nil { size, err := (*emptypb1.Empty)(m.Empty).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if m.Duration != nil { size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Any != nil { size, err := (*anypb1.Any)(m.Any).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MessageWithWKT) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MessageWithWKT) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *MessageWithWKT) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.NullValue != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NullValue)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x90 } if m.ListvalueValue != nil { size, err := (*structpb1.ListValue)(m.ListvalueValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x8a } if m.ValueValue != nil { size, err := (*structpb1.Value)(m.ValueValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x82 } if m.StructValue != nil { size, err := (*structpb1.Struct)(m.StructValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7a } if m.BytesValue != nil { size, err := (*wrapperspb1.BytesValue)(m.BytesValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x72 } if m.StringValue != nil { size, err := (*wrapperspb1.StringValue)(m.StringValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x6a } if m.BoolValue != nil { size, err := (*wrapperspb1.BoolValue)(m.BoolValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x62 } if m.Uint32Value != nil { size, err := (*wrapperspb1.UInt32Value)(m.Uint32Value).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x5a } if m.Int32Value != nil { size, err := (*wrapperspb1.Int32Value)(m.Int32Value).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x52 } if m.Uint64Value != nil { size, err := (*wrapperspb1.UInt64Value)(m.Uint64Value).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x4a } if m.Int64Value != nil { size, err := (*wrapperspb1.Int64Value)(m.Int64Value).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x42 } if m.FloatValue != nil { size, err := (*wrapperspb1.FloatValue)(m.FloatValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3a } if m.DoubleValue != nil { size, err := (*wrapperspb1.DoubleValue)(m.DoubleValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } if m.Timestamp != nil { size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } if m.FieldMask != nil { size, err := (*fieldmaskpb1.FieldMask)(m.FieldMask).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } if m.Empty != nil { size, err := (*emptypb1.Empty)(m.Empty).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if m.Duration != nil { size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Any != nil { size, err := (*anypb1.Any)(m.Any).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MessageWithWKT) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Any != nil { l = (*anypb1.Any)(m.Any).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Duration != nil { l = (*durationpb1.Duration)(m.Duration).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Empty != nil { l = (*emptypb1.Empty)(m.Empty).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.FieldMask != nil { l = (*fieldmaskpb1.FieldMask)(m.FieldMask).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Timestamp != nil { l = (*timestamppb1.Timestamp)(m.Timestamp).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DoubleValue != nil { l = (*wrapperspb1.DoubleValue)(m.DoubleValue).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.FloatValue != nil { l = (*wrapperspb1.FloatValue)(m.FloatValue).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Int64Value != nil { l = (*wrapperspb1.Int64Value)(m.Int64Value).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Uint64Value != nil { l = (*wrapperspb1.UInt64Value)(m.Uint64Value).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Int32Value != nil { l = (*wrapperspb1.Int32Value)(m.Int32Value).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Uint32Value != nil { l = (*wrapperspb1.UInt32Value)(m.Uint32Value).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.BoolValue != nil { l = (*wrapperspb1.BoolValue)(m.BoolValue).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.StringValue != nil { l = (*wrapperspb1.StringValue)(m.StringValue).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.BytesValue != nil { l = (*wrapperspb1.BytesValue)(m.BytesValue).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.StructValue != nil { l = (*structpb1.Struct)(m.StructValue).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ValueValue != nil { l = (*structpb1.Value)(m.ValueValue).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ListvalueValue != nil { l = (*structpb1.ListValue)(m.ListvalueValue).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.NullValue != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.NullValue)) } n += len(m.unknownFields) return n } func (m *MessageWithWKT) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MessageWithWKT: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MessageWithWKT: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Any", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Any == nil { m.Any = &anypb.Any{} } if err := (*anypb1.Any)(m.Any).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Duration == nil { m.Duration = &durationpb.Duration{} } if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Empty", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Empty == nil { m.Empty = &emptypb.Empty{} } if err := (*emptypb1.Empty)(m.Empty).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FieldMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.FieldMask == nil { m.FieldMask = &fieldmaskpb.FieldMask{} } if err := (*fieldmaskpb1.FieldMask)(m.FieldMask).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Timestamp == nil { m.Timestamp = ×tamppb.Timestamp{} } if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.DoubleValue == nil { m.DoubleValue = &wrapperspb.DoubleValue{} } if err := (*wrapperspb1.DoubleValue)(m.DoubleValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FloatValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.FloatValue == nil { m.FloatValue = &wrapperspb.FloatValue{} } if err := (*wrapperspb1.FloatValue)(m.FloatValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Int64Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Int64Value == nil { m.Int64Value = &wrapperspb.Int64Value{} } if err := (*wrapperspb1.Int64Value)(m.Int64Value).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Uint64Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Uint64Value == nil { m.Uint64Value = &wrapperspb.UInt64Value{} } if err := (*wrapperspb1.UInt64Value)(m.Uint64Value).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Int32Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Int32Value == nil { m.Int32Value = &wrapperspb.Int32Value{} } if err := (*wrapperspb1.Int32Value)(m.Int32Value).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Uint32Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Uint32Value == nil { m.Uint32Value = &wrapperspb.UInt32Value{} } if err := (*wrapperspb1.UInt32Value)(m.Uint32Value).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.BoolValue == nil { m.BoolValue = &wrapperspb.BoolValue{} } if err := (*wrapperspb1.BoolValue)(m.BoolValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.StringValue == nil { m.StringValue = &wrapperspb.StringValue{} } if err := (*wrapperspb1.StringValue)(m.StringValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BytesValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.BytesValue == nil { m.BytesValue = &wrapperspb.BytesValue{} } if err := (*wrapperspb1.BytesValue)(m.BytesValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.StructValue == nil { m.StructValue = &structpb.Struct{} } if err := (*structpb1.Struct)(m.StructValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 16: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValueValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.ValueValue == nil { m.ValueValue = &structpb.Value{} } if err := (*structpb1.Value)(m.ValueValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 17: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListvalueValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.ListvalueValue == nil { m.ListvalueValue = &structpb.ListValue{} } if err := (*structpb1.ListValue)(m.ListvalueValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 18: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) } m.NullValue = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.NullValue |= structpb.NullValue(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MessageWithWKT) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MessageWithWKT: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MessageWithWKT: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Any", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Any == nil { m.Any = &anypb.Any{} } if err := (*anypb1.Any)(m.Any).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Duration == nil { m.Duration = &durationpb.Duration{} } if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Empty", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Empty == nil { m.Empty = &emptypb.Empty{} } if err := (*emptypb1.Empty)(m.Empty).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FieldMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.FieldMask == nil { m.FieldMask = &fieldmaskpb.FieldMask{} } if err := (*fieldmaskpb1.FieldMask)(m.FieldMask).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Timestamp == nil { m.Timestamp = ×tamppb.Timestamp{} } if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.DoubleValue == nil { m.DoubleValue = &wrapperspb.DoubleValue{} } if err := (*wrapperspb1.DoubleValue)(m.DoubleValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FloatValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.FloatValue == nil { m.FloatValue = &wrapperspb.FloatValue{} } if err := (*wrapperspb1.FloatValue)(m.FloatValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Int64Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Int64Value == nil { m.Int64Value = &wrapperspb.Int64Value{} } if err := (*wrapperspb1.Int64Value)(m.Int64Value).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Uint64Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Uint64Value == nil { m.Uint64Value = &wrapperspb.UInt64Value{} } if err := (*wrapperspb1.UInt64Value)(m.Uint64Value).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Int32Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Int32Value == nil { m.Int32Value = &wrapperspb.Int32Value{} } if err := (*wrapperspb1.Int32Value)(m.Int32Value).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Uint32Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Uint32Value == nil { m.Uint32Value = &wrapperspb.UInt32Value{} } if err := (*wrapperspb1.UInt32Value)(m.Uint32Value).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.BoolValue == nil { m.BoolValue = &wrapperspb.BoolValue{} } if err := (*wrapperspb1.BoolValue)(m.BoolValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.StringValue == nil { m.StringValue = &wrapperspb.StringValue{} } if err := (*wrapperspb1.StringValue)(m.StringValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BytesValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.BytesValue == nil { m.BytesValue = &wrapperspb.BytesValue{} } if err := (*wrapperspb1.BytesValue)(m.BytesValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.StructValue == nil { m.StructValue = &structpb.Struct{} } if err := (*structpb1.Struct)(m.StructValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 16: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValueValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.ValueValue == nil { m.ValueValue = &structpb.Value{} } if err := (*structpb1.Value)(m.ValueValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 17: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListvalueValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.ListvalueValue == nil { m.ListvalueValue = &structpb.ListValue{} } if err := (*structpb1.ListValue)(m.ListvalueValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 18: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) } m.NullValue = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.NullValue |= structpb.NullValue(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/types/000077500000000000000000000000001455570004500221165ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/000077500000000000000000000000001455570004500232525ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/anypb/000077500000000000000000000000001455570004500243635ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/anypb/any_vtproto.pb.go000066400000000000000000000201641455570004500277010ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: google/protobuf/any.proto package anypb import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" io "io" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Any anypb.Any func (m *Any) CloneVT() *Any { if m == nil { return (*Any)(nil) } r := new(Any) r.TypeUrl = m.TypeUrl if rhs := m.Value; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.Value = tmpBytes } return r } func (this *Any) EqualVT(that *Any) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.TypeUrl != that.TypeUrl { return false } if string(this.Value) != string(that.Value) { return false } return true } func (m *Any) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Any) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Any) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Value) > 0 { i -= len(m.Value) copy(dAtA[i:], m.Value) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) i-- dAtA[i] = 0x12 } if len(m.TypeUrl) > 0 { i -= len(m.TypeUrl) copy(dAtA[i:], m.TypeUrl) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TypeUrl))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Any) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Any) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Any) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Value) > 0 { i -= len(m.Value) copy(dAtA[i:], m.Value) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) i-- dAtA[i] = 0x12 } if len(m.TypeUrl) > 0 { i -= len(m.TypeUrl) copy(dAtA[i:], m.TypeUrl) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TypeUrl))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Any) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.TypeUrl) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Value) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *Any) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Any: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.TypeUrl = string(dAtA[iNdEx:postIndex]) 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) if m.Value == nil { m.Value = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Any) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Any: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.TypeUrl = stringValue 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Value = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/types/known/durationpb/000077500000000000000000000000001455570004500254215ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/durationpb/duration_vtproto.pb.go000066400000000000000000000147631455570004500320050ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: google/protobuf/duration.proto package durationpb import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" io "io" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Duration durationpb.Duration func (m *Duration) CloneVT() *Duration { if m == nil { return (*Duration)(nil) } r := new(Duration) r.Seconds = m.Seconds r.Nanos = m.Nanos return r } func (this *Duration) EqualVT(that *Duration) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Seconds != that.Seconds { return false } if this.Nanos != that.Nanos { return false } return true } func (m *Duration) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Duration) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Duration) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Nanos != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Nanos)) i-- dAtA[i] = 0x10 } if m.Seconds != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Seconds)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Duration) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Duration) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Duration) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Nanos != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Nanos)) i-- dAtA[i] = 0x10 } if m.Seconds != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Seconds)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Duration) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Seconds != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Seconds)) } if m.Nanos != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Nanos)) } return n } func (m *Duration) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Duration: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) } m.Seconds = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Seconds |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) } m.Nanos = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Nanos |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Duration) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Duration: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) } m.Seconds = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Seconds |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) } m.Nanos = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Nanos |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/types/known/emptypb/000077500000000000000000000000001455570004500247325ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/emptypb/empty_vtproto.pb.go000066400000000000000000000101631455570004500306150ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: google/protobuf/empty.proto package emptypb import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" io "io" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Empty emptypb.Empty func (m *Empty) CloneVT() *Empty { if m == nil { return (*Empty)(nil) } r := new(Empty) return r } func (this *Empty) EqualVT(that *Empty) bool { if this == that { return true } else if this == nil || that == nil { return false } return true } func (m *Empty) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Empty) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Empty) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *Empty) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Empty) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Empty) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *Empty) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *Empty) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Empty: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Empty) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Empty: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/types/known/fieldmaskpb/000077500000000000000000000000001455570004500255335ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/fieldmaskpb/field_mask_vtproto.pb.go000066400000000000000000000153131455570004500323600ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: google/protobuf/field_mask.proto package fieldmaskpb import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" protoimpl "google.golang.org/protobuf/runtime/protoimpl" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" io "io" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type FieldMask fieldmaskpb.FieldMask func (m *FieldMask) CloneVT() *FieldMask { if m == nil { return (*FieldMask)(nil) } r := new(FieldMask) if rhs := m.Paths; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.Paths = tmpContainer } return r } func (this *FieldMask) EqualVT(that *FieldMask) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Paths) != len(that.Paths) { return false } for i, vx := range this.Paths { vy := that.Paths[i] if vx != vy { return false } } return true } func (m *FieldMask) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FieldMask) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *FieldMask) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Paths) > 0 { for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Paths[iNdEx]) copy(dAtA[i:], m.Paths[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Paths[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *FieldMask) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FieldMask) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *FieldMask) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Paths) > 0 { for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Paths[iNdEx]) copy(dAtA[i:], m.Paths[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Paths[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *FieldMask) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Paths) > 0 { for _, s := range m.Paths { l = len(s) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } return n } func (m *FieldMask) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: FieldMask: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FieldMask: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FieldMask) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: FieldMask: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FieldMask: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Paths = append(m.Paths, stringValue) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/types/known/structpb/000077500000000000000000000000001455570004500251205ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/structpb/struct_vtproto.pb.go000066400000000000000000001313221455570004500311720ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: google/protobuf/struct.proto package structpb import ( binary "encoding/binary" fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" io "io" math "math" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Struct structpb.Struct type Value structpb.Value type Value_NullValue structpb.Value_NullValue type Value_NumberValue structpb.Value_NumberValue type Value_StringValue structpb.Value_StringValue type Value_BoolValue structpb.Value_BoolValue type Value_StructValue structpb.Value_StructValue type Value_ListValue structpb.Value_ListValue type ListValue structpb.ListValue func (m *Struct) CloneVT() *Struct { if m == nil { return (*Struct)(nil) } r := new(Struct) if rhs := m.Fields; rhs != nil { tmpContainer := make(map[string]*structpb.Value, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*structpb.Value)((*Value)(v).CloneVT()) } r.Fields = tmpContainer } return r } func (m *Value) CloneVT() *Value { if m == nil { return (*Value)(nil) } r := new(Value) if m.Kind != nil { switch c := m.Kind.(type) { case *structpb.Value_NullValue: r.Kind = (*structpb.Value_NullValue)((*Value_NullValue)(c).CloneVT()) case *structpb.Value_NumberValue: r.Kind = (*structpb.Value_NumberValue)((*Value_NumberValue)(c).CloneVT()) case *structpb.Value_StringValue: r.Kind = (*structpb.Value_StringValue)((*Value_StringValue)(c).CloneVT()) case *structpb.Value_BoolValue: r.Kind = (*structpb.Value_BoolValue)((*Value_BoolValue)(c).CloneVT()) case *structpb.Value_StructValue: r.Kind = (*structpb.Value_StructValue)((*Value_StructValue)(c).CloneVT()) case *structpb.Value_ListValue: r.Kind = (*structpb.Value_ListValue)((*Value_ListValue)(c).CloneVT()) } } return r } func (m *Value_NullValue) CloneVT() *Value_NullValue { if m == nil { return (*Value_NullValue)(nil) } r := new(Value_NullValue) r.NullValue = m.NullValue return r } func (m *Value_NumberValue) CloneVT() *Value_NumberValue { if m == nil { return (*Value_NumberValue)(nil) } r := new(Value_NumberValue) r.NumberValue = m.NumberValue return r } func (m *Value_StringValue) CloneVT() *Value_StringValue { if m == nil { return (*Value_StringValue)(nil) } r := new(Value_StringValue) r.StringValue = m.StringValue return r } func (m *Value_BoolValue) CloneVT() *Value_BoolValue { if m == nil { return (*Value_BoolValue)(nil) } r := new(Value_BoolValue) r.BoolValue = m.BoolValue return r } func (m *Value_StructValue) CloneVT() *Value_StructValue { if m == nil { return (*Value_StructValue)(nil) } r := new(Value_StructValue) r.StructValue = (*structpb.Struct)((*Struct)(m.StructValue).CloneVT()) return r } func (m *Value_ListValue) CloneVT() *Value_ListValue { if m == nil { return (*Value_ListValue)(nil) } r := new(Value_ListValue) r.ListValue = (*structpb.ListValue)((*ListValue)(m.ListValue).CloneVT()) return r } func (m *ListValue) CloneVT() *ListValue { if m == nil { return (*ListValue)(nil) } r := new(ListValue) if rhs := m.Values; rhs != nil { tmpContainer := make([]*structpb.Value, len(rhs)) for k, v := range rhs { tmpContainer[k] = (*structpb.Value)((*Value)(v).CloneVT()) } r.Values = tmpContainer } return r } func (this *Struct) EqualVT(that *Struct) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Fields) != len(that.Fields) { return false } for i, vx := range this.Fields { vy, ok := that.Fields[i] if !ok { return false } if p, q := vx, vy; p != q { if p == nil { p = &structpb.Value{} } if q == nil { q = &structpb.Value{} } if !(*Value)(p).EqualVT((*Value)(q)) { return false } } } return true } func (this *Value) EqualVT(that *Value) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Kind == nil && that.Kind != nil { return false } else if this.Kind != nil { if that.Kind == nil { return false } switch c := this.Kind.(type) { case *structpb.Value_NullValue: if !(*Value_NullValue)(c).EqualVT(that.Kind) { return false } case *structpb.Value_NumberValue: if !(*Value_NumberValue)(c).EqualVT(that.Kind) { return false } case *structpb.Value_StringValue: if !(*Value_StringValue)(c).EqualVT(that.Kind) { return false } case *structpb.Value_BoolValue: if !(*Value_BoolValue)(c).EqualVT(that.Kind) { return false } case *structpb.Value_StructValue: if !(*Value_StructValue)(c).EqualVT(that.Kind) { return false } case *structpb.Value_ListValue: if !(*Value_ListValue)(c).EqualVT(that.Kind) { return false } } } return true } func (this *Value_NullValue) EqualVT(thatIface any) bool { that, ok := thatIface.(*Value_NullValue) if !ok { if ot, ok := thatIface.(*structpb.Value_NullValue); ok { that = (*Value_NullValue)(ot) } else { return false } } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.NullValue != that.NullValue { return false } return true } func (this *Value_NumberValue) EqualVT(thatIface any) bool { that, ok := thatIface.(*Value_NumberValue) if !ok { if ot, ok := thatIface.(*structpb.Value_NumberValue); ok { that = (*Value_NumberValue)(ot) } else { return false } } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.NumberValue != that.NumberValue { return false } return true } func (this *Value_StringValue) EqualVT(thatIface any) bool { that, ok := thatIface.(*Value_StringValue) if !ok { if ot, ok := thatIface.(*structpb.Value_StringValue); ok { that = (*Value_StringValue)(ot) } else { return false } } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.StringValue != that.StringValue { return false } return true } func (this *Value_BoolValue) EqualVT(thatIface any) bool { that, ok := thatIface.(*Value_BoolValue) if !ok { if ot, ok := thatIface.(*structpb.Value_BoolValue); ok { that = (*Value_BoolValue)(ot) } else { return false } } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if this.BoolValue != that.BoolValue { return false } return true } func (this *Value_StructValue) EqualVT(thatIface any) bool { that, ok := thatIface.(*Value_StructValue) if !ok { if ot, ok := thatIface.(*structpb.Value_StructValue); ok { that = (*Value_StructValue)(ot) } else { return false } } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.StructValue, that.StructValue; p != q { if p == nil { p = &structpb.Struct{} } if q == nil { q = &structpb.Struct{} } if !(*Struct)(p).EqualVT((*Struct)(q)) { return false } } return true } func (this *Value_ListValue) EqualVT(thatIface any) bool { that, ok := thatIface.(*Value_ListValue) if !ok { if ot, ok := thatIface.(*structpb.Value_ListValue); ok { that = (*Value_ListValue)(ot) } else { return false } } if this == that { return true } if this == nil && that != nil || this != nil && that == nil { return false } if p, q := this.ListValue, that.ListValue; p != q { if p == nil { p = &structpb.ListValue{} } if q == nil { q = &structpb.ListValue{} } if !(*ListValue)(p).EqualVT((*ListValue)(q)) { return false } } return true } func (this *ListValue) EqualVT(that *ListValue) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Values) != len(that.Values) { return false } for i, vx := range this.Values { vy := that.Values[i] if p, q := vx, vy; p != q { if p == nil { p = &structpb.Value{} } if q == nil { q = &structpb.Value{} } if !(*Value)(p).EqualVT((*Value)(q)) { return false } } } return true } func (m *Struct) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Struct) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Struct) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Fields) > 0 { for k := range m.Fields { v := m.Fields[k] baseI := i size, err := (*Value)(v).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Value) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Value) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Value) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l switch c := m.Kind.(type) { case *structpb.Value_NullValue: size, err := (*Value_NullValue)(c).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size case *structpb.Value_NumberValue: size, err := (*Value_NumberValue)(c).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size case *structpb.Value_StringValue: size, err := (*Value_StringValue)(c).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size case *structpb.Value_BoolValue: size, err := (*Value_BoolValue)(c).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size case *structpb.Value_StructValue: size, err := (*Value_StructValue)(c).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size case *structpb.Value_ListValue: size, err := (*Value_ListValue)(c).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *Value_NullValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Value_NullValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NullValue)) i-- dAtA[i] = 0x8 return len(dAtA) - i, nil } func (m *Value_NumberValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Value_NumberValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue)))) i-- dAtA[i] = 0x11 return len(dAtA) - i, nil } func (m *Value_StringValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Value_StringValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.StringValue) copy(dAtA[i:], m.StringValue) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StringValue))) i-- dAtA[i] = 0x1a return len(dAtA) - i, nil } func (m *Value_BoolValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Value_BoolValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i-- if m.BoolValue { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x20 return len(dAtA) - i, nil } func (m *Value_StructValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Value_StructValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.StructValue != nil { size, err := (*Struct)(m.StructValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } return len(dAtA) - i, nil } func (m *Value_ListValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Value_ListValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.ListValue != nil { size, err := (*ListValue)(m.ListValue).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } return len(dAtA) - i, nil } func (m *ListValue) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ListValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Values) > 0 { for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { size, err := (*Value)(m.Values[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Struct) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Struct) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Struct) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Fields) > 0 { for k := range m.Fields { v := m.Fields[k] baseI := i size, err := (*Value)(v).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Value) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Value) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Value) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m, ok := m.Kind.(*structpb.Value_ListValue); ok { msg := ((*Value_ListValue)(m)) size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if m, ok := m.Kind.(*structpb.Value_StructValue); ok { msg := ((*Value_StructValue)(m)) size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if m, ok := m.Kind.(*structpb.Value_BoolValue); ok { msg := ((*Value_BoolValue)(m)) size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if m, ok := m.Kind.(*structpb.Value_StringValue); ok { msg := ((*Value_StringValue)(m)) size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if m, ok := m.Kind.(*structpb.Value_NumberValue); ok { msg := ((*Value_NumberValue)(m)) size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } if m, ok := m.Kind.(*structpb.Value_NullValue); ok { msg := ((*Value_NullValue)(m)) size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size } return len(dAtA) - i, nil } func (m *Value_NullValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Value_NullValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NullValue)) i-- dAtA[i] = 0x8 return len(dAtA) - i, nil } func (m *Value_NumberValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Value_NumberValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue)))) i-- dAtA[i] = 0x11 return len(dAtA) - i, nil } func (m *Value_StringValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Value_StringValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.StringValue) copy(dAtA[i:], m.StringValue) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StringValue))) i-- dAtA[i] = 0x1a return len(dAtA) - i, nil } func (m *Value_BoolValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Value_BoolValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) i-- if m.BoolValue { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x20 return len(dAtA) - i, nil } func (m *Value_StructValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Value_StructValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.StructValue != nil { size, err := (*Struct)(m.StructValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } return len(dAtA) - i, nil } func (m *Value_ListValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Value_ListValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) if m.ListValue != nil { size, err := (*ListValue)(m.ListValue).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } return len(dAtA) - i, nil } func (m *ListValue) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *ListValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Values) > 0 { for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { size, err := (*Value)(m.Values[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Struct) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Fields) > 0 { for k, v := range m.Fields { _ = k _ = v l = 0 if v != nil { l = (*Value)(v).SizeVT() } l += 1 + protohelpers.SizeOfVarint(uint64(l)) mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } return n } func (m *Value) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l switch c := m.Kind.(type) { case *structpb.Value_NullValue: n += (*Value_NullValue)(c).SizeVT() case *structpb.Value_NumberValue: n += (*Value_NumberValue)(c).SizeVT() case *structpb.Value_StringValue: n += (*Value_StringValue)(c).SizeVT() case *structpb.Value_BoolValue: n += (*Value_BoolValue)(c).SizeVT() case *structpb.Value_StructValue: n += (*Value_StructValue)(c).SizeVT() case *structpb.Value_ListValue: n += (*Value_ListValue)(c).SizeVT() } return n } func (m *Value_NullValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 1 + protohelpers.SizeOfVarint(uint64(m.NullValue)) return n } func (m *Value_NumberValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 9 return n } func (m *Value_StringValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.StringValue) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *Value_BoolValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l n += 2 return n } func (m *Value_StructValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.StructValue != nil { l = (*Struct)(m.StructValue).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *Value_ListValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.ListValue != nil { l = (*ListValue)(m.ListValue).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *ListValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Values) > 0 { for _, e := range m.Values { l = (*Value)(e).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } return n } func (m *Struct) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Struct: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Struct: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Fields == nil { m.Fields = make(map[string]*structpb.Value) } var mapkey string var mapvalue *structpb.Value for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &structpb.Value{} if err := (*Value)(mapvalue).UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Fields[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Value) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) } var v structpb.NullValue for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= structpb.NullValue(b&0x7F) << shift if b < 0x80 { break } } m.Kind = &structpb.Value_NullValue{NullValue: v} case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Kind = &structpb.Value_NumberValue{NumberValue: float64(math.Float64frombits(v))} case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Kind = &structpb.Value_StringValue{StringValue: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.Kind = &structpb.Value_BoolValue{BoolValue: b} case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Kind.(*structpb.Value_StructValue); ok { if err := (*Struct)(oneof.StructValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &structpb.Struct{} if err := (*Struct)(v).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Kind = &structpb.Value_StructValue{StructValue: v} } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Kind.(*structpb.Value_ListValue); ok { if err := (*ListValue)(oneof.ListValue).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &structpb.ListValue{} if err := (*ListValue)(v).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } m.Kind = &structpb.Value_ListValue{ListValue: v} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListValue) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Values = append(m.Values, &structpb.Value{}) if err := (*Value)(m.Values[len(m.Values)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Struct) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Struct: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Struct: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Fields == nil { m.Fields = make(map[string]*structpb.Value) } var mapkey string var mapvalue *structpb.Value for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } 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 protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } if intStringLenmapkey == 0 { mapkey = "" } else { mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &structpb.Value{} if err := (*Value)(mapvalue).UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Fields[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Value) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) } var v structpb.NullValue for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= structpb.NullValue(b&0x7F) << shift if b < 0x80 { break } } m.Kind = &structpb.Value_NullValue{NullValue: v} case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Kind = &structpb.Value_NumberValue{NumberValue: float64(math.Float64frombits(v))} case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Kind = &structpb.Value_StringValue{StringValue: stringValue} iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.Kind = &structpb.Value_BoolValue{BoolValue: b} case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Kind.(*structpb.Value_StructValue); ok { if err := (*Struct)(oneof.StructValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &structpb.Struct{} if err := (*Struct)(v).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Kind = &structpb.Value_StructValue{StructValue: v} } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if oneof, ok := m.Kind.(*structpb.Value_ListValue); ok { if err := (*ListValue)(oneof.ListValue).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } } else { v := &structpb.ListValue{} if err := (*ListValue)(v).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } m.Kind = &structpb.Value_ListValue{ListValue: v} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListValue) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Values = append(m.Values, &structpb.Value{}) if err := (*Value)(m.Values[len(m.Values)-1]).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/types/known/timestamppb/000077500000000000000000000000001455570004500255775ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/timestamppb/timestamp_vtproto.pb.go000066400000000000000000000150151455570004500323300ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: google/protobuf/timestamp.proto package timestamppb import ( fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Timestamp timestamppb.Timestamp func (m *Timestamp) CloneVT() *Timestamp { if m == nil { return (*Timestamp)(nil) } r := new(Timestamp) r.Seconds = m.Seconds r.Nanos = m.Nanos return r } func (this *Timestamp) EqualVT(that *Timestamp) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Seconds != that.Seconds { return false } if this.Nanos != that.Nanos { return false } return true } func (m *Timestamp) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Timestamp) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Timestamp) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Nanos != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Nanos)) i-- dAtA[i] = 0x10 } if m.Seconds != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Seconds)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Timestamp) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Timestamp) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Timestamp) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Nanos != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Nanos)) i-- dAtA[i] = 0x10 } if m.Seconds != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Seconds)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Timestamp) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Seconds != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Seconds)) } if m.Nanos != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Nanos)) } return n } func (m *Timestamp) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Timestamp: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) } m.Seconds = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Seconds |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) } m.Nanos = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Nanos |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Timestamp) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Timestamp: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) } m.Seconds = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Seconds |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) } m.Nanos = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Nanos |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/types/known/wrapperspb/000077500000000000000000000000001455570004500254375ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/types/known/wrapperspb/wrappers_vtproto.pb.go000066400000000000000000001315401455570004500320320ustar00rootroot00000000000000// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: (devel) // source: google/protobuf/wrappers.proto package wrapperspb import ( binary "encoding/binary" fmt "fmt" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" protoimpl "google.golang.org/protobuf/runtime/protoimpl" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" io "io" math "math" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type DoubleValue wrapperspb.DoubleValue type FloatValue wrapperspb.FloatValue type Int64Value wrapperspb.Int64Value type UInt64Value wrapperspb.UInt64Value type Int32Value wrapperspb.Int32Value type UInt32Value wrapperspb.UInt32Value type BoolValue wrapperspb.BoolValue type StringValue wrapperspb.StringValue type BytesValue wrapperspb.BytesValue func (m *DoubleValue) CloneVT() *DoubleValue { if m == nil { return (*DoubleValue)(nil) } r := new(DoubleValue) r.Value = m.Value return r } func (m *FloatValue) CloneVT() *FloatValue { if m == nil { return (*FloatValue)(nil) } r := new(FloatValue) r.Value = m.Value return r } func (m *Int64Value) CloneVT() *Int64Value { if m == nil { return (*Int64Value)(nil) } r := new(Int64Value) r.Value = m.Value return r } func (m *UInt64Value) CloneVT() *UInt64Value { if m == nil { return (*UInt64Value)(nil) } r := new(UInt64Value) r.Value = m.Value return r } func (m *Int32Value) CloneVT() *Int32Value { if m == nil { return (*Int32Value)(nil) } r := new(Int32Value) r.Value = m.Value return r } func (m *UInt32Value) CloneVT() *UInt32Value { if m == nil { return (*UInt32Value)(nil) } r := new(UInt32Value) r.Value = m.Value return r } func (m *BoolValue) CloneVT() *BoolValue { if m == nil { return (*BoolValue)(nil) } r := new(BoolValue) r.Value = m.Value return r } func (m *StringValue) CloneVT() *StringValue { if m == nil { return (*StringValue)(nil) } r := new(StringValue) r.Value = m.Value return r } func (m *BytesValue) CloneVT() *BytesValue { if m == nil { return (*BytesValue)(nil) } r := new(BytesValue) if rhs := m.Value; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) r.Value = tmpBytes } return r } func (this *DoubleValue) EqualVT(that *DoubleValue) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Value != that.Value { return false } return true } func (this *FloatValue) EqualVT(that *FloatValue) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Value != that.Value { return false } return true } func (this *Int64Value) EqualVT(that *Int64Value) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Value != that.Value { return false } return true } func (this *UInt64Value) EqualVT(that *UInt64Value) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Value != that.Value { return false } return true } func (this *Int32Value) EqualVT(that *Int32Value) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Value != that.Value { return false } return true } func (this *UInt32Value) EqualVT(that *UInt32Value) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Value != that.Value { return false } return true } func (this *BoolValue) EqualVT(that *BoolValue) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Value != that.Value { return false } return true } func (this *StringValue) EqualVT(that *StringValue) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Value != that.Value { return false } return true } func (this *BytesValue) EqualVT(that *BytesValue) bool { if this == that { return true } else if this == nil || that == nil { return false } if string(this.Value) != string(that.Value) { return false } return true } func (m *DoubleValue) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DoubleValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *DoubleValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) i-- dAtA[i] = 0x9 } return len(dAtA) - i, nil } func (m *FloatValue) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FloatValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *FloatValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Value)))) i-- dAtA[i] = 0xd } return len(dAtA) - i, nil } func (m *Int64Value) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Int64Value) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Int64Value) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Value)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UInt64Value) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UInt64Value) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UInt64Value) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Value)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Int32Value) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Int32Value) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Int32Value) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Value)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UInt32Value) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UInt32Value) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *UInt32Value) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Value)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *BoolValue) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BoolValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *BoolValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value { i-- if m.Value { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *StringValue) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StringValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *StringValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Value) > 0 { i -= len(m.Value) copy(dAtA[i:], m.Value) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *BytesValue) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BytesValue) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *BytesValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Value) > 0 { i -= len(m.Value) copy(dAtA[i:], m.Value) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *DoubleValue) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DoubleValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *DoubleValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) i-- dAtA[i] = 0x9 } return len(dAtA) - i, nil } func (m *FloatValue) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FloatValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *FloatValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Value)))) i-- dAtA[i] = 0xd } return len(dAtA) - i, nil } func (m *Int64Value) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Int64Value) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Int64Value) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Value)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UInt64Value) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UInt64Value) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UInt64Value) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Value)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Int32Value) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Int32Value) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Int32Value) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Value)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UInt32Value) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UInt32Value) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *UInt32Value) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Value)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *BoolValue) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BoolValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *BoolValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.Value { i-- if m.Value { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *StringValue) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StringValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *StringValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Value) > 0 { i -= len(m.Value) copy(dAtA[i:], m.Value) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *BytesValue) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *BytesValue) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *BytesValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if len(m.Value) > 0 { i -= len(m.Value) copy(dAtA[i:], m.Value) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *DoubleValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Value != 0 { n += 9 } return n } func (m *FloatValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Value != 0 { n += 5 } return n } func (m *Int64Value) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Value != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Value)) } return n } func (m *UInt64Value) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Value != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Value)) } return n } func (m *Int32Value) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Value != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Value)) } return n } func (m *UInt32Value) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Value != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Value)) } return n } func (m *BoolValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Value { n += 2 } return n } func (m *StringValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Value) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *BytesValue) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Value) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } func (m *DoubleValue) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DoubleValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DoubleValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Value = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FloatValue) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: FloatValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FloatValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.Value = float32(math.Float32frombits(v)) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Int64Value) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Int64Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Int64Value: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UInt64Value) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UInt64Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UInt64Value: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Int32Value) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Int32Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Int32Value: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UInt32Value) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UInt32Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UInt32Value: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= uint32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BoolValue) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BoolValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BoolValue: 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) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Value = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StringValue) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StringValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StringValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Value = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BytesValue) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BytesValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BytesValue: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) if m.Value == nil { m.Value = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DoubleValue) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DoubleValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DoubleValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Value = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *FloatValue) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: FloatValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FloatValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.Value = float32(math.Float32frombits(v)) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Int64Value) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Int64Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Int64Value: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UInt64Value) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UInt64Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UInt64Value: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Int32Value) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Int32Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Int32Value: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UInt32Value) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UInt32Value: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UInt32Value: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= uint32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BoolValue) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BoolValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BoolValue: 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) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Value = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StringValue) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StringValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StringValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } var stringValue string if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } m.Value = stringValue iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *BytesValue) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: BytesValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BytesValue: 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 protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Value = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } golang-github-planetscale-vtprotobuf-0.6.0/vtproto/000077500000000000000000000000001455570004500224675ustar00rootroot00000000000000golang-github-planetscale-vtprotobuf-0.6.0/vtproto/ext.pb.go000066400000000000000000000105561455570004500242250ustar00rootroot00000000000000// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 // protoc v3.21.12 // source: github.com/planetscale/vtprotobuf/vtproto/ext.proto package vtproto import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) var file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64101, Name: "vtproto.mempool", Tag: "varint,64101,opt,name=mempool", Filename: "github.com/planetscale/vtprotobuf/vtproto/ext.proto", }, } // Extension fields to descriptorpb.MessageOptions. var ( // optional bool mempool = 64101; E_Mempool = &file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_extTypes[0] ) var File_github_com_planetscale_vtprotobuf_vtproto_ext_proto protoreflect.FileDescriptor var file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_rawDesc = []byte{ 0x0a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3b, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe5, 0xf4, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x42, 0x49, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x07, 0x56, 0x54, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, } var file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_goTypes = []interface{}{ (*descriptorpb.MessageOptions)(nil), // 0: google.protobuf.MessageOptions } var file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_depIdxs = []int32{ 0, // 0: vtproto.mempool:extendee -> google.protobuf.MessageOptions 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 0, // [0:1] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_init() } func file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_init() { if File_github_com_planetscale_vtprotobuf_vtproto_ext_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_rawDesc, NumEnums: 0, NumMessages: 0, NumExtensions: 1, NumServices: 0, }, GoTypes: file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_goTypes, DependencyIndexes: file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_depIdxs, ExtensionInfos: file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_extTypes, }.Build() File_github_com_planetscale_vtprotobuf_vtproto_ext_proto = out.File file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_rawDesc = nil file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_goTypes = nil file_github_com_planetscale_vtprotobuf_vtproto_ext_proto_depIdxs = nil }