diff --git a/Makefile b/Makefile index 4c9f6c0a..180357de 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ export GOBIN=$(PWD)/bin -export PROTOBUF_ROOT=$(PWD)/_vendor/protobuf-21.12 +export PROTOBUF_ROOT=$(PWD)/_vendor/protobuf-30.1 +export PROTOC_PATH=$(PROTOBUF_ROOT)/protoc .PHONY: install test gen-conformance gen-include gen-wkt genall bin/protoc-gen-go bin/protoc-gen-go-vtproto @@ -9,10 +10,10 @@ bin/protoc-gen-go-vtproto: go install -buildvcs=false -tags protolegacy ./cmd/protoc-gen-go-vtproto bin/protoc-gen-go: - go install -tags protolegacy google.golang.org/protobuf/cmd/protoc-gen-go + go install -tags protolegacy google.golang.org/protobuf/cmd/protoc-gen-go@latest gen-conformance: install - $(PROTOBUF_ROOT)/src/protoc \ + $(PROTOC_PATH) \ --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" \ @@ -28,7 +29,7 @@ gen-conformance: install conformance/conformance.proto gen-include: bin/protoc-gen-go - $(PROTOBUF_ROOT)/src/protoc \ + $(PROTOC_PATH) \ --proto_path=include \ --go_out=include --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ -I$(PROTOBUF_ROOT)/src \ @@ -36,7 +37,7 @@ gen-include: bin/protoc-gen-go mv include/github.com/planetscale/vtprotobuf/vtproto/*.go ./vtproto gen-wkt: bin/protoc-gen-go-vtproto - $(PROTOBUF_ROOT)/src/protoc \ + $(PROTOC_PATH) \ -I$(PROTOBUF_ROOT)/src \ --plugin protoc-gen-go-vtproto="${GOBIN}/protoc-gen-go-vtproto" \ --go-vtproto_out=. \ @@ -50,7 +51,7 @@ gen-wkt: bin/protoc-gen-go-vtproto $(PROTOBUF_ROOT)/src/google/protobuf/struct.proto gen-testproto: get-grpc-testproto gen-wkt-testproto install - $(PROTOBUF_ROOT)/src/protoc \ + $(PROTOC_PATH) \ --proto_path=testproto \ --proto_path=include \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ @@ -66,7 +67,7 @@ gen-testproto: get-grpc-testproto gen-wkt-testproto install testproto/unsafe/unsafe.proto \ testproto/unique/unique.proto \ || exit 1; - $(PROTOBUF_ROOT)/src/protoc \ + $(PROTOC_PATH) \ --proto_path=testproto \ --proto_path=include \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ @@ -78,7 +79,7 @@ gen-testproto: get-grpc-testproto gen-wkt-testproto install || exit 1; get-grpc-testproto: install - $(PROTOBUF_ROOT)/src/protoc \ + $(PROTOC_PATH) \ --proto_path=. \ --proto_path=include \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ @@ -94,7 +95,7 @@ get-grpc-testproto: install || exit 1; gen-wkt-testproto: install - $(PROTOBUF_ROOT)/src/protoc \ + $(PROTOC_PATH) \ --proto_path=testproto \ --proto_path=include \ --go_out=. --plugin protoc-gen-go="${GOBIN}/protoc-gen-go" \ diff --git a/conformance/conformance_test.go b/conformance/conformance_test.go index 8dc3594f..f336b322 100644 --- a/conformance/conformance_test.go +++ b/conformance/conformance_test.go @@ -44,7 +44,7 @@ func Test(t *testing.T) { if !*execute || testing.Short() { t.SkipNow() } - binPath := filepath.Join(*protoRoot, "conformance", "conformance-test-runner") + binPath := filepath.Join(*protoRoot, "conformance_test_runner") cmd := exec.Command(binPath, // "--failure_list", "failing_tests.txt", "--text_format_failure_list", "failing_tests_text_format.txt", diff --git a/conformance/internal/conformance/conformance.pb.go b/conformance/internal/conformance/conformance.pb.go index 10a4962d..8e558d64 100644 --- a/conformance/internal/conformance/conformance.pb.go +++ b/conformance/internal/conformance/conformance.pb.go @@ -1,37 +1,14 @@ // 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. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v3.21.12 +// protoc-gen-go v1.36.5 +// protoc v6.30.1 // source: conformance/conformance.proto package conformance @@ -41,6 +18,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -56,7 +34,7 @@ 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_JSPB WireFormat = 3 // Only used inside Google. Opensource testees just skip it. WireFormat_TEXT_FORMAT WireFormat = 4 ) @@ -117,7 +95,8 @@ const ( // 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. + // Test jspb wire format. Only used inside Google. 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. @@ -171,24 +150,86 @@ func (TestCategory) EnumDescriptor() ([]byte, []int) { return file_conformance_conformance_proto_rawDescGZIP(), []int{1} } +// Meant to encapsulate all types of tests: successes, skips, failures, etc. +// Therefore, this may or may not have a failure message. Failure messages +// may be truncated for our failure lists. +type TestStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + FailureMessage string `protobuf:"bytes,2,opt,name=failure_message,json=failureMessage,proto3" json:"failure_message,omitempty"` + // What an actual test name matched to in a failure list. Can be wildcarded or + // an exact match without wildcards. + MatchedName string `protobuf:"bytes,3,opt,name=matched_name,json=matchedName,proto3" json:"matched_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestStatus) Reset() { + *x = TestStatus{} + mi := &file_conformance_conformance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestStatus) ProtoMessage() {} + +func (x *TestStatus) ProtoReflect() protoreflect.Message { + mi := &file_conformance_conformance_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestStatus.ProtoReflect.Descriptor instead. +func (*TestStatus) Descriptor() ([]byte, []int) { + return file_conformance_conformance_proto_rawDescGZIP(), []int{0} +} + +func (x *TestStatus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TestStatus) GetFailureMessage() string { + if x != nil { + return x.FailureMessage + } + return "" +} + +func (x *TestStatus) GetMatchedName() string { + if x != nil { + return x.MatchedName + } + return "" +} + // 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 + state protoimpl.MessageState `protogen:"open.v1"` + Test []*TestStatus `protobuf:"bytes,2,rep,name=test,proto3" json:"test,omitempty"` unknownFields protoimpl.UnknownFields - - Failure []string `protobuf:"bytes,1,rep,name=failure,proto3" json:"failure,omitempty"` + sizeCache protoimpl.SizeCache } 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) - } + mi := &file_conformance_conformance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailureSet) String() string { @@ -198,8 +239,8 @@ func (x *FailureSet) String() string { func (*FailureSet) ProtoMessage() {} func (x *FailureSet) ProtoReflect() protoreflect.Message { - mi := &file_conformance_conformance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_conformance_conformance_proto_msgTypes[1] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,12 +252,12 @@ func (x *FailureSet) ProtoReflect() protoreflect.Message { // Deprecated: Use FailureSet.ProtoReflect.Descriptor instead. func (*FailureSet) Descriptor() ([]byte, []int) { - return file_conformance_conformance_proto_rawDescGZIP(), []int{0} + return file_conformance_conformance_proto_rawDescGZIP(), []int{1} } -func (x *FailureSet) GetFailure() []string { +func (x *FailureSet) GetTest() []*TestStatus { if x != nil { - return x.Failure + return x.Test } return nil } @@ -227,19 +268,12 @@ func (x *FailureSet) GetFailure() []string { // 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 - + state protoimpl.MessageState `protogen:"open.v1"` // 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: + // Types that are valid to be assigned to Payload: // // *ConformanceRequest_ProtobufPayload // *ConformanceRequest_JsonPayload @@ -250,26 +284,29 @@ type ConformanceRequest struct { 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. + // protobuf_test_messages.proto2.TestAllTypesProto2 or + // protobuf_test_messages.editions.proto2.TestAllTypesProto2 or + // protobuf_test_messages.editions.proto3.TestAllTypesProto3 or + // protobuf_test_messages.editions.TestAllTypesEdition2023. 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. + // 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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + mi := &file_conformance_conformance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConformanceRequest) String() string { @@ -279,8 +316,8 @@ func (x *ConformanceRequest) String() string { func (*ConformanceRequest) ProtoMessage() {} func (x *ConformanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_conformance_conformance_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_conformance_conformance_proto_msgTypes[2] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,40 +329,48 @@ func (x *ConformanceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ConformanceRequest.ProtoReflect.Descriptor instead. func (*ConformanceRequest) Descriptor() ([]byte, []int) { - return file_conformance_conformance_proto_rawDescGZIP(), []int{1} + return file_conformance_conformance_proto_rawDescGZIP(), []int{2} } -func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload { - if m != nil { - return m.Payload +func (x *ConformanceRequest) GetPayload() isConformanceRequest_Payload { + if x != nil { + return x.Payload } return nil } func (x *ConformanceRequest) GetProtobufPayload() []byte { - if x, ok := x.GetPayload().(*ConformanceRequest_ProtobufPayload); ok { - return x.ProtobufPayload + if x != nil { + if x, ok := x.Payload.(*ConformanceRequest_ProtobufPayload); ok { + return x.ProtobufPayload + } } return nil } func (x *ConformanceRequest) GetJsonPayload() string { - if x, ok := x.GetPayload().(*ConformanceRequest_JsonPayload); ok { - return x.JsonPayload + if x != nil { + if x, ok := x.Payload.(*ConformanceRequest_JsonPayload); ok { + return x.JsonPayload + } } return "" } func (x *ConformanceRequest) GetJspbPayload() string { - if x, ok := x.GetPayload().(*ConformanceRequest_JspbPayload); ok { - return x.JspbPayload + if x != nil { + if x, ok := x.Payload.(*ConformanceRequest_JspbPayload); ok { + return x.JspbPayload + } } return "" } func (x *ConformanceRequest) GetTextPayload() string { - if x, ok := x.GetPayload().(*ConformanceRequest_TextPayload); ok { - return x.TextPayload + if x != nil { + if x, ok := x.Payload.(*ConformanceRequest_TextPayload); ok { + return x.TextPayload + } } return "" } @@ -378,7 +423,7 @@ type ConformanceRequest_JsonPayload struct { } type ConformanceRequest_JspbPayload struct { - // Google internal only. Opensource testees just skip it. + // Only used inside Google. Opensource testees just skip it. JspbPayload string `protobuf:"bytes,7,opt,name=jspb_payload,json=jspbPayload,proto3,oneof"` } @@ -396,30 +441,28 @@ 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: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Result: // // *ConformanceResponse_ParseError // *ConformanceResponse_SerializeError + // *ConformanceResponse_TimeoutError // *ConformanceResponse_RuntimeError // *ConformanceResponse_ProtobufPayload // *ConformanceResponse_JsonPayload // *ConformanceResponse_Skipped // *ConformanceResponse_JspbPayload // *ConformanceResponse_TextPayload - Result isConformanceResponse_Result `protobuf_oneof:"result"` + Result isConformanceResponse_Result `protobuf_oneof:"result"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + mi := &file_conformance_conformance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConformanceResponse) String() string { @@ -429,8 +472,8 @@ func (x *ConformanceResponse) String() string { func (*ConformanceResponse) ProtoMessage() {} func (x *ConformanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_conformance_conformance_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_conformance_conformance_proto_msgTypes[3] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,68 +485,93 @@ func (x *ConformanceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ConformanceResponse.ProtoReflect.Descriptor instead. func (*ConformanceResponse) Descriptor() ([]byte, []int) { - return file_conformance_conformance_proto_rawDescGZIP(), []int{2} + return file_conformance_conformance_proto_rawDescGZIP(), []int{3} } -func (m *ConformanceResponse) GetResult() isConformanceResponse_Result { - if m != nil { - return m.Result +func (x *ConformanceResponse) GetResult() isConformanceResponse_Result { + if x != nil { + return x.Result } return nil } func (x *ConformanceResponse) GetParseError() string { - if x, ok := x.GetResult().(*ConformanceResponse_ParseError); ok { - return x.ParseError + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_ParseError); ok { + return x.ParseError + } } return "" } func (x *ConformanceResponse) GetSerializeError() string { - if x, ok := x.GetResult().(*ConformanceResponse_SerializeError); ok { - return x.SerializeError + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_SerializeError); ok { + return x.SerializeError + } + } + return "" +} + +func (x *ConformanceResponse) GetTimeoutError() string { + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_TimeoutError); ok { + return x.TimeoutError + } } return "" } func (x *ConformanceResponse) GetRuntimeError() string { - if x, ok := x.GetResult().(*ConformanceResponse_RuntimeError); ok { - return x.RuntimeError + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_RuntimeError); ok { + return x.RuntimeError + } } return "" } func (x *ConformanceResponse) GetProtobufPayload() []byte { - if x, ok := x.GetResult().(*ConformanceResponse_ProtobufPayload); ok { - return x.ProtobufPayload + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_ProtobufPayload); ok { + return x.ProtobufPayload + } } return nil } func (x *ConformanceResponse) GetJsonPayload() string { - if x, ok := x.GetResult().(*ConformanceResponse_JsonPayload); ok { - return x.JsonPayload + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_JsonPayload); ok { + return x.JsonPayload + } } return "" } func (x *ConformanceResponse) GetSkipped() string { - if x, ok := x.GetResult().(*ConformanceResponse_Skipped); ok { - return x.Skipped + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_Skipped); ok { + return x.Skipped + } } return "" } func (x *ConformanceResponse) GetJspbPayload() string { - if x, ok := x.GetResult().(*ConformanceResponse_JspbPayload); ok { - return x.JspbPayload + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_JspbPayload); ok { + return x.JspbPayload + } } return "" } func (x *ConformanceResponse) GetTextPayload() string { - if x, ok := x.GetResult().(*ConformanceResponse_TextPayload); ok { - return x.TextPayload + if x != nil { + if x, ok := x.Result.(*ConformanceResponse_TextPayload); ok { + return x.TextPayload + } } return "" } @@ -528,6 +596,13 @@ type ConformanceResponse_SerializeError struct { SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"` } +type ConformanceResponse_TimeoutError struct { + // This should be set if the test program timed out. The string should + // provide more information about what the child process was doing when it + // was killed. + TimeoutError string `protobuf:"bytes,9,opt,name=timeout_error,json=timeoutError,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 @@ -555,8 +630,8 @@ type ConformanceResponse_Skipped struct { 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. + // serialize to JSPB and set it in this field. JSPB is only used inside + // Google. Opensource testees can just skip it. JspbPayload string `protobuf:"bytes,7,opt,name=jspb_payload,json=jspbPayload,proto3,oneof"` } @@ -570,6 +645,8 @@ func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} +func (*ConformanceResponse_TimeoutError) isConformanceResponse_Result() {} + func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {} @@ -584,21 +661,18 @@ func (*ConformanceResponse_TextPayload) isConformanceResponse_Result() {} // Encoding options for jspb format. type JspbEncodingConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // 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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + mi := &file_conformance_conformance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JspbEncodingConfig) String() string { @@ -608,8 +682,8 @@ func (x *JspbEncodingConfig) String() string { func (*JspbEncodingConfig) ProtoMessage() {} func (x *JspbEncodingConfig) ProtoReflect() protoreflect.Message { - mi := &file_conformance_conformance_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_conformance_conformance_proto_msgTypes[4] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -621,7 +695,7 @@ func (x *JspbEncodingConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use JspbEncodingConfig.ProtoReflect.Descriptor instead. func (*JspbEncodingConfig) Descriptor() ([]byte, []int) { - return file_conformance_conformance_proto_rawDescGZIP(), []int{3} + return file_conformance_conformance_proto_rawDescGZIP(), []int{4} } func (x *JspbEncodingConfig) GetUseJspbArrayAnyFormat() bool { @@ -633,120 +707,134 @@ func (x *JspbEncodingConfig) GetUseJspbArrayAnyFormat() bool { var File_conformance_conformance_proto protoreflect.FileDescriptor -var file_conformance_conformance_proto_rawDesc = []byte{ +var file_conformance_conformance_proto_rawDesc = string([]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, + 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x6c, 0x0a, 0x0a, + 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, + 0x0a, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3f, 0x0a, 0x0a, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x65, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x04, 0x74, 0x65, 0x73, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 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, 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, -} + 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, 0xf3, 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, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 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, 0x2f, + 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, 0xa2, 0x02, 0x0b, 0x43, 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 + file_conformance_conformance_proto_rawDescData []byte ) 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) + file_conformance_conformance_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_conformance_conformance_proto_rawDesc), len(file_conformance_conformance_proto_rawDesc))) }) 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{}{ +var file_conformance_conformance_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_conformance_conformance_proto_goTypes = []any{ (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 + (*TestStatus)(nil), // 2: conformance.TestStatus + (*FailureSet)(nil), // 3: conformance.FailureSet + (*ConformanceRequest)(nil), // 4: conformance.ConformanceRequest + (*ConformanceResponse)(nil), // 5: conformance.ConformanceResponse + (*JspbEncodingConfig)(nil), // 6: 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 + 2, // 0: conformance.FailureSet.test:type_name -> conformance.TestStatus + 0, // 1: conformance.ConformanceRequest.requested_output_format:type_name -> conformance.WireFormat + 1, // 2: conformance.ConformanceRequest.test_category:type_name -> conformance.TestCategory + 6, // 3: conformance.ConformanceRequest.jspb_encoding_options:type_name -> conformance.JspbEncodingConfig + 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_conformance_conformance_proto_init() } @@ -754,65 +842,16 @@ 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{}{ + file_conformance_conformance_proto_msgTypes[2].OneofWrappers = []any{ (*ConformanceRequest_ProtobufPayload)(nil), (*ConformanceRequest_JsonPayload)(nil), (*ConformanceRequest_JspbPayload)(nil), (*ConformanceRequest_TextPayload)(nil), } - file_conformance_conformance_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_conformance_conformance_proto_msgTypes[3].OneofWrappers = []any{ (*ConformanceResponse_ParseError)(nil), (*ConformanceResponse_SerializeError)(nil), + (*ConformanceResponse_TimeoutError)(nil), (*ConformanceResponse_RuntimeError)(nil), (*ConformanceResponse_ProtobufPayload)(nil), (*ConformanceResponse_JsonPayload)(nil), @@ -824,9 +863,9 @@ func file_conformance_conformance_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_conformance_conformance_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_conformance_conformance_proto_rawDesc), len(file_conformance_conformance_proto_rawDesc)), NumEnums: 2, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, @@ -836,7 +875,6 @@ func file_conformance_conformance_proto_init() { 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 } diff --git a/conformance/internal/conformance/conformance_vtproto.pb.go b/conformance/internal/conformance/conformance_vtproto.pb.go index 26232f3b..ae948c2a 100644 --- a/conformance/internal/conformance/conformance_vtproto.pb.go +++ b/conformance/internal/conformance/conformance_vtproto.pb.go @@ -20,15 +20,36 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +func (m *TestStatus) CloneVT() *TestStatus { + if m == nil { + return (*TestStatus)(nil) + } + r := new(TestStatus) + r.Name = m.Name + r.FailureMessage = m.FailureMessage + r.MatchedName = m.MatchedName + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *TestStatus) CloneMessageVT() proto.Message { + return m.CloneVT() +} + 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 rhs := m.Test; rhs != nil { + tmpContainer := make([]*TestStatus, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Test = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -146,6 +167,15 @@ func (m *ConformanceResponse_SerializeError) CloneVT() isConformanceResponse_Res return r } +func (m *ConformanceResponse_TimeoutError) CloneVT() isConformanceResponse_Result { + if m == nil { + return (*ConformanceResponse_TimeoutError)(nil) + } + r := new(ConformanceResponse_TimeoutError) + r.TimeoutError = m.TimeoutError + return r +} + func (m *ConformanceResponse_RuntimeError) CloneVT() isConformanceResponse_Result { if m == nil { return (*ConformanceResponse_RuntimeError)(nil) @@ -221,19 +251,52 @@ func (m *JspbEncodingConfig) CloneMessageVT() proto.Message { return m.CloneVT() } +func (this *TestStatus) EqualVT(that *TestStatus) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Name != that.Name { + return false + } + if this.FailureMessage != that.FailureMessage { + return false + } + if this.MatchedName != that.MatchedName { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestStatus) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestStatus) + if !ok { + return false + } + return this.EqualVT(that) +} 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) { + if len(this.Test) != len(that.Test) { return false } - for i, vx := range this.Failure { - vy := that.Failure[i] - if vx != vy { - return false + for i, vx := range this.Test { + vy := that.Test[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &TestStatus{} + } + if q == nil { + q = &TestStatus{} + } + if !p.EqualVT(q) { + return false + } } } return string(this.unknownFields) == string(that.unknownFields) @@ -521,6 +584,23 @@ func (this *ConformanceResponse_TextPayload) EqualVT(thatIface isConformanceResp return true } +func (this *ConformanceResponse_TimeoutError) EqualVT(thatIface isConformanceResponse_Result) bool { + that, ok := thatIface.(*ConformanceResponse_TimeoutError) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.TimeoutError != that.TimeoutError { + return false + } + return true +} + func (this *JspbEncodingConfig) EqualVT(that *JspbEncodingConfig) bool { if this == that { return true @@ -540,6 +620,60 @@ func (this *JspbEncodingConfig) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } +func (m *TestStatus) 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 *TestStatus) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestStatus) 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.MatchedName) > 0 { + i -= len(m.MatchedName) + copy(dAtA[i:], m.MatchedName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MatchedName))) + i-- + dAtA[i] = 0x1a + } + if len(m.FailureMessage) > 0 { + i -= len(m.FailureMessage) + copy(dAtA[i:], m.FailureMessage) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FailureMessage))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *FailureSet) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -570,13 +704,16 @@ func (m *FailureSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 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]))) + if len(m.Test) > 0 { + for iNdEx := len(m.Test) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Test[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } return len(dAtA) - i, nil @@ -871,6 +1008,20 @@ func (m *ConformanceResponse_TextPayload) MarshalToSizedBufferVT(dAtA []byte) (i dAtA[i] = 0x42 return len(dAtA) - i, nil } +func (m *ConformanceResponse_TimeoutError) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ConformanceResponse_TimeoutError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.TimeoutError) + copy(dAtA[i:], m.TimeoutError) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TimeoutError))) + i-- + dAtA[i] = 0x4a + return len(dAtA) - i, nil +} func (m *JspbEncodingConfig) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -914,6 +1065,60 @@ func (m *JspbEncodingConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *TestStatus) 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 *TestStatus) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestStatus) 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.MatchedName) > 0 { + i -= len(m.MatchedName) + copy(dAtA[i:], m.MatchedName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MatchedName))) + i-- + dAtA[i] = 0x1a + } + if len(m.FailureMessage) > 0 { + i -= len(m.FailureMessage) + copy(dAtA[i:], m.FailureMessage) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FailureMessage))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *FailureSet) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -944,13 +1149,16 @@ func (m *FailureSet) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { 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]))) + if len(m.Test) > 0 { + for iNdEx := len(m.Test) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Test[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } return len(dAtA) - i, nil @@ -1140,6 +1348,13 @@ func (m *ConformanceResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if msg, ok := m.Result.(*ConformanceResponse_TimeoutError); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } if msg, ok := m.Result.(*ConformanceResponse_TextPayload); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { @@ -1311,6 +1526,20 @@ func (m *ConformanceResponse_TextPayload) MarshalToSizedBufferVTStrict(dAtA []by dAtA[i] = 0x42 return len(dAtA) - i, nil } +func (m *ConformanceResponse_TimeoutError) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ConformanceResponse_TimeoutError) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.TimeoutError) + copy(dAtA[i:], m.TimeoutError) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TimeoutError))) + i-- + dAtA[i] = 0x4a + return len(dAtA) - i, nil +} func (m *JspbEncodingConfig) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -1354,15 +1583,37 @@ func (m *JspbEncodingConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *TestStatus) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.FailureMessage) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MatchedName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + 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) + if len(m.Test) > 0 { + for _, e := range m.Test { + l = e.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } @@ -1533,6 +1784,16 @@ func (m *ConformanceResponse_TextPayload) SizeVT() (n int) { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } +func (m *ConformanceResponse_TimeoutError) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TimeoutError) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return n +} func (m *JspbEncodingConfig) SizeVT() (n int) { if m == nil { return 0 @@ -1546,7 +1807,7 @@ func (m *JspbEncodingConfig) SizeVT() (n int) { return n } -func (m *FailureSet) UnmarshalVT(dAtA []byte) error { +func (m *TestStatus) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1569,15 +1830,79 @@ func (m *FailureSet) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FailureSet: wiretype end group for non-group") + return fmt.Errorf("proto: TestStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FailureSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestStatus: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailureMessage", 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.FailureMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchedName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1605,7 +1930,7 @@ func (m *FailureSet) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Failure = append(m.Failure, string(dAtA[iNdEx:postIndex])) + m.MatchedName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1629,7 +1954,7 @@ func (m *FailureSet) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ConformanceRequest) UnmarshalVT(dAtA []byte) error { +func (m *FailureSet) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1652,17 +1977,17 @@ func (m *ConformanceRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConformanceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: FailureSet: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConformanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FailureSet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProtobufPayload", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -1672,12 +1997,97 @@ func (m *ConformanceRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Test = append(m.Test, &TestStatus{}) + if err := m.Test[len(m.Test)-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 *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 @@ -2221,6 +2631,38 @@ func (m *ConformanceResponse) UnmarshalVT(dAtA []byte) error { } m.Result = &ConformanceResponse_TextPayload{TextPayload: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutError", 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_TimeoutError{TimeoutError: string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -2314,7 +2756,7 @@ func (m *JspbEncodingConfig) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FailureSet) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *TestStatus) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2337,15 +2779,51 @@ func (m *FailureSet) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FailureSet: wiretype end group for non-group") + return fmt.Errorf("proto: TestStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FailureSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestStatus: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailureMessage", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2377,7 +2855,128 @@ func (m *FailureSet) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Failure = append(m.Failure, stringValue) + m.FailureMessage = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchedName", 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.MatchedName = 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 *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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Test", 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.Test = append(m.Test, &TestStatus{}) + if err := m.Test[len(m.Test)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3035,6 +3634,42 @@ func (m *ConformanceResponse) UnmarshalVTUnsafe(dAtA []byte) error { } m.Result = &ConformanceResponse_TextPayload{TextPayload: stringValue} iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutError", 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_TimeoutError{TimeoutError: stringValue} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) diff --git a/conformance/internal/conformance/test_messages_proto2.pb.go b/conformance/internal/conformance/test_messages_proto2.pb.go index 8178fc3e..3aa6d52b 100644 --- a/conformance/internal/conformance/test_messages_proto2.pb.go +++ b/conformance/internal/conformance/test_messages_proto2.pb.go @@ -1,32 +1,9 @@ // 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. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd // // Test schema for proto2 messages. This test schema is used by: // @@ -37,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v3.21.12 +// protoc-gen-go v1.36.5 +// protoc v6.30.1 // source: src/google/protobuf/test_messages_proto2.proto package conformance @@ -48,6 +25,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -231,7 +209,69 @@ func (x *EnumOnlyProto2_Bool) UnmarshalJSON(b []byte) error { // 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} + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{5, 0} +} + +type TestAllRequiredTypesProto2_NestedEnum int32 + +const ( + TestAllRequiredTypesProto2_FOO TestAllRequiredTypesProto2_NestedEnum = 0 + TestAllRequiredTypesProto2_BAR TestAllRequiredTypesProto2_NestedEnum = 1 + TestAllRequiredTypesProto2_BAZ TestAllRequiredTypesProto2_NestedEnum = 2 + TestAllRequiredTypesProto2_NEG TestAllRequiredTypesProto2_NestedEnum = -1 // Intentionally negative. +) + +// Enum value maps for TestAllRequiredTypesProto2_NestedEnum. +var ( + TestAllRequiredTypesProto2_NestedEnum_name = map[int32]string{ + 0: "FOO", + 1: "BAR", + 2: "BAZ", + -1: "NEG", + } + TestAllRequiredTypesProto2_NestedEnum_value = map[string]int32{ + "FOO": 0, + "BAR": 1, + "BAZ": 2, + "NEG": -1, + } +) + +func (x TestAllRequiredTypesProto2_NestedEnum) Enum() *TestAllRequiredTypesProto2_NestedEnum { + p := new(TestAllRequiredTypesProto2_NestedEnum) + *p = x + return p +} + +func (x TestAllRequiredTypesProto2_NestedEnum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TestAllRequiredTypesProto2_NestedEnum) Descriptor() protoreflect.EnumDescriptor { + return file_src_google_protobuf_test_messages_proto2_proto_enumTypes[3].Descriptor() +} + +func (TestAllRequiredTypesProto2_NestedEnum) Type() protoreflect.EnumType { + return &file_src_google_protobuf_test_messages_proto2_proto_enumTypes[3] +} + +func (x TestAllRequiredTypesProto2_NestedEnum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *TestAllRequiredTypesProto2_NestedEnum) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = TestAllRequiredTypesProto2_NestedEnum(num) + return nil +} + +// Deprecated: Use TestAllRequiredTypesProto2_NestedEnum.Descriptor instead. +func (TestAllRequiredTypesProto2_NestedEnum) EnumDescriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{8, 0} } // This proto includes every type of field in both singular and repeated @@ -242,11 +282,7 @@ func (EnumOnlyProto2_Bool) EnumDescriptor() ([]byte, []int) { // 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 - + state protoimpl.MessageState `protogen:"open.v1"` // 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"` @@ -342,7 +378,7 @@ type TestAllTypesProto2 struct { 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: + // Types that are valid to be assigned to OneofField: // // *TestAllTypesProto2_OneofUint32 // *TestAllTypesProto2_OneofNestedMessage @@ -353,8 +389,9 @@ type TestAllTypesProto2 struct { // *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"` + OneofField isTestAllTypesProto2_OneofField `protobuf_oneof:"oneof_field"` + Data *TestAllTypesProto2_Data `protobuf:"group,201,opt,name=Data,json=data" json:"data,omitempty"` + Multiwordgroupfield *TestAllTypesProto2_MultiWordGroupField `protobuf:"group,204,opt,name=MultiWordGroupField,json=multiwordgroupfield" json:"multiwordgroupfield,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"` @@ -373,24 +410,27 @@ type TestAllTypesProto2 struct { 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"` + 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"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for TestAllTypesProto2 fields. @@ -418,11 +458,9 @@ var ( 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) - } + 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 { @@ -433,7 +471,7 @@ 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 { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,72 +1116,90 @@ func (x *TestAllTypesProto2) GetMapStringForeignEnum() map[string]ForeignEnumPro return nil } -func (m *TestAllTypesProto2) GetOneofField() isTestAllTypesProto2_OneofField { - if m != nil { - return m.OneofField +func (x *TestAllTypesProto2) GetOneofField() isTestAllTypesProto2_OneofField { + if x != nil { + return x.OneofField } return nil } func (x *TestAllTypesProto2) GetOneofUint32() uint32 { - if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofUint32); ok { - return x.OneofUint32 + if x != nil { + if x, ok := x.OneofField.(*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 + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto2_OneofNestedMessage); ok { + return x.OneofNestedMessage + } } return nil } func (x *TestAllTypesProto2) GetOneofString() string { - if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofString); ok { - return x.OneofString + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto2_OneofString); ok { + return x.OneofString + } } return "" } func (x *TestAllTypesProto2) GetOneofBytes() []byte { - if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofBytes); ok { - return x.OneofBytes + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto2_OneofBytes); ok { + return x.OneofBytes + } } return nil } func (x *TestAllTypesProto2) GetOneofBool() bool { - if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofBool); ok { - return x.OneofBool + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto2_OneofBool); ok { + return x.OneofBool + } } return false } func (x *TestAllTypesProto2) GetOneofUint64() uint64 { - if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofUint64); ok { - return x.OneofUint64 + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto2_OneofUint64); ok { + return x.OneofUint64 + } } return 0 } func (x *TestAllTypesProto2) GetOneofFloat() float32 { - if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofFloat); ok { - return x.OneofFloat + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto2_OneofFloat); ok { + return x.OneofFloat + } } return 0 } func (x *TestAllTypesProto2) GetOneofDouble() float64 { - if x, ok := x.GetOneofField().(*TestAllTypesProto2_OneofDouble); ok { - return x.OneofDouble + if x != nil { + if x, ok := x.OneofField.(*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 + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto2_OneofEnum); ok { + return x.OneofEnum + } } return TestAllTypesProto2_FOO } @@ -1155,6 +1211,13 @@ func (x *TestAllTypesProto2) GetData() *TestAllTypesProto2_Data { return nil } +func (x *TestAllTypesProto2) GetMultiwordgroupfield() *TestAllTypesProto2_MultiWordGroupField { + if x != nil { + return x.Multiwordgroupfield + } + return nil +} + func (x *TestAllTypesProto2) GetDefaultInt32() int32 { if x != nil && x.DefaultInt32 != nil { return *x.DefaultInt32 @@ -1445,20 +1508,17 @@ func (*TestAllTypesProto2_OneofDouble) isTestAllTypesProto2_OneofField() {} func (*TestAllTypesProto2_OneofEnum) isTestAllTypesProto2_OneofField() {} type ForeignMessageProto2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + C *int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"` unknownFields protoimpl.UnknownFields - - C *int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"` + sizeCache protoimpl.SizeCache } 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) - } + 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 { @@ -1469,7 +1529,7 @@ 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 { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,26 +1551,75 @@ func (x *ForeignMessageProto2) GetC() int32 { return 0 } -type UnknownToTestAllTypes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type GroupField struct { + state protoimpl.MessageState `protogen:"open.v1"` + GroupInt32 *int32 `protobuf:"varint,122,opt,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` + GroupUint32 *uint32 `protobuf:"varint,123,opt,name=group_uint32,json=groupUint32" json:"group_uint32,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupField) Reset() { + *x = GroupField{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupField) ProtoMessage() {} +func (x *GroupField) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupField.ProtoReflect.Descriptor instead. +func (*GroupField) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{2} +} + +func (x *GroupField) GetGroupInt32() int32 { + if x != nil && x.GroupInt32 != nil { + return *x.GroupInt32 + } + return 0 +} + +func (x *GroupField) GetGroupUint32() uint32 { + if x != nil && x.GroupUint32 != nil { + return *x.GroupUint32 + } + return 0 +} + +type UnknownToTestAllTypes struct { + state protoimpl.MessageState `protogen:"open.v1"` 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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnknownToTestAllTypes) String() string { @@ -1520,8 +1629,8 @@ func (x *UnknownToTestAllTypes) String() string { 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 { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[3] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1533,7 +1642,7 @@ func (x *UnknownToTestAllTypes) ProtoReflect() protoreflect.Message { // Deprecated: Use UnknownToTestAllTypes.ProtoReflect.Descriptor instead. func (*UnknownToTestAllTypes) Descriptor() ([]byte, []int) { - return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{2} + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{3} } func (x *UnknownToTestAllTypes) GetOptionalInt32() int32 { @@ -1579,18 +1688,16 @@ func (x *UnknownToTestAllTypes) GetRepeatedInt32() []int32 { } type NullHypothesisProto2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NullHypothesisProto2) String() string { @@ -1600,8 +1707,8 @@ func (x *NullHypothesisProto2) String() string { 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 { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[4] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1613,22 +1720,20 @@ func (x *NullHypothesisProto2) ProtoReflect() protoreflect.Message { // Deprecated: Use NullHypothesisProto2.ProtoReflect.Descriptor instead. func (*NullHypothesisProto2) Descriptor() ([]byte, []int) { - return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{3} + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{4} } type EnumOnlyProto2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumOnlyProto2) String() string { @@ -1638,8 +1743,8 @@ func (x *EnumOnlyProto2) String() string { 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 { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[5] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1651,24 +1756,21 @@ func (x *EnumOnlyProto2) ProtoReflect() protoreflect.Message { // Deprecated: Use EnumOnlyProto2.ProtoReflect.Descriptor instead. func (*EnumOnlyProto2) Descriptor() ([]byte, []int) { - return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{4} + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{5} } type OneStringProto2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } 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) - } + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OneStringProto2) String() string { @@ -1678,8 +1780,8 @@ func (x *OneStringProto2) String() string { 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 { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[6] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1691,7 +1793,7 @@ func (x *OneStringProto2) ProtoReflect() protoreflect.Message { // Deprecated: Use OneStringProto2.ProtoReflect.Descriptor instead. func (*OneStringProto2) Descriptor() ([]byte, []int) { - return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{5} + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{6} } func (x *OneStringProto2) GetData() string { @@ -1701,33 +1803,31 @@ func (x *OneStringProto2) GetData() string { return "" } -type TestAllTypesProto2_NestedMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type ProtoWithKeywords struct { + state protoimpl.MessageState `protogen:"open.v1"` + Inline *int32 `protobuf:"varint,1,opt,name=inline" json:"inline,omitempty"` + Concept *string `protobuf:"bytes,2,opt,name=concept" json:"concept,omitempty"` + Requires []string `protobuf:"bytes,3,rep,name=requires" json:"requires,omitempty"` 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"` + sizeCache protoimpl.SizeCache } -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 *ProtoWithKeywords) Reset() { + *x = ProtoWithKeywords{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *TestAllTypesProto2_NestedMessage) String() string { +func (x *ProtoWithKeywords) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TestAllTypesProto2_NestedMessage) ProtoMessage() {} +func (*ProtoWithKeywords) ProtoMessage() {} -func (x *TestAllTypesProto2_NestedMessage) ProtoReflect() protoreflect.Message { - mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { +func (x *ProtoWithKeywords) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[7] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,53 +1837,119 @@ func (x *TestAllTypesProto2_NestedMessage) ProtoReflect() protoreflect.Message { 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} +// Deprecated: Use ProtoWithKeywords.ProtoReflect.Descriptor instead. +func (*ProtoWithKeywords) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{7} } -func (x *TestAllTypesProto2_NestedMessage) GetA() int32 { - if x != nil && x.A != nil { - return *x.A +func (x *ProtoWithKeywords) GetInline() int32 { + if x != nil && x.Inline != nil { + return *x.Inline } return 0 } -func (x *TestAllTypesProto2_NestedMessage) GetCorecursive() *TestAllTypesProto2 { +func (x *ProtoWithKeywords) GetConcept() string { + if x != nil && x.Concept != nil { + return *x.Concept + } + return "" +} + +func (x *ProtoWithKeywords) GetRequires() []string { if x != nil { - return x.Corecursive + return x.Requires } 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"` +type TestAllRequiredTypesProto2 struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Singular + RequiredInt32 *int32 `protobuf:"varint,1,req,name=required_int32,json=requiredInt32" json:"required_int32,omitempty"` + RequiredInt64 *int64 `protobuf:"varint,2,req,name=required_int64,json=requiredInt64" json:"required_int64,omitempty"` + RequiredUint32 *uint32 `protobuf:"varint,3,req,name=required_uint32,json=requiredUint32" json:"required_uint32,omitempty"` + RequiredUint64 *uint64 `protobuf:"varint,4,req,name=required_uint64,json=requiredUint64" json:"required_uint64,omitempty"` + RequiredSint32 *int32 `protobuf:"zigzag32,5,req,name=required_sint32,json=requiredSint32" json:"required_sint32,omitempty"` + RequiredSint64 *int64 `protobuf:"zigzag64,6,req,name=required_sint64,json=requiredSint64" json:"required_sint64,omitempty"` + RequiredFixed32 *uint32 `protobuf:"fixed32,7,req,name=required_fixed32,json=requiredFixed32" json:"required_fixed32,omitempty"` + RequiredFixed64 *uint64 `protobuf:"fixed64,8,req,name=required_fixed64,json=requiredFixed64" json:"required_fixed64,omitempty"` + RequiredSfixed32 *int32 `protobuf:"fixed32,9,req,name=required_sfixed32,json=requiredSfixed32" json:"required_sfixed32,omitempty"` + RequiredSfixed64 *int64 `protobuf:"fixed64,10,req,name=required_sfixed64,json=requiredSfixed64" json:"required_sfixed64,omitempty"` + RequiredFloat *float32 `protobuf:"fixed32,11,req,name=required_float,json=requiredFloat" json:"required_float,omitempty"` + RequiredDouble *float64 `protobuf:"fixed64,12,req,name=required_double,json=requiredDouble" json:"required_double,omitempty"` + RequiredBool *bool `protobuf:"varint,13,req,name=required_bool,json=requiredBool" json:"required_bool,omitempty"` + RequiredString *string `protobuf:"bytes,14,req,name=required_string,json=requiredString" json:"required_string,omitempty"` + RequiredBytes []byte `protobuf:"bytes,15,req,name=required_bytes,json=requiredBytes" json:"required_bytes,omitempty"` + RequiredNestedMessage *TestAllRequiredTypesProto2_NestedMessage `protobuf:"bytes,18,req,name=required_nested_message,json=requiredNestedMessage" json:"required_nested_message,omitempty"` + RequiredForeignMessage *ForeignMessageProto2 `protobuf:"bytes,19,req,name=required_foreign_message,json=requiredForeignMessage" json:"required_foreign_message,omitempty"` + RequiredNestedEnum *TestAllRequiredTypesProto2_NestedEnum `protobuf:"varint,21,req,name=required_nested_enum,json=requiredNestedEnum,enum=protobuf_test_messages.proto2.TestAllRequiredTypesProto2_NestedEnum" json:"required_nested_enum,omitempty"` + RequiredForeignEnum *ForeignEnumProto2 `protobuf:"varint,22,req,name=required_foreign_enum,json=requiredForeignEnum,enum=protobuf_test_messages.proto2.ForeignEnumProto2" json:"required_foreign_enum,omitempty"` + RequiredStringPiece *string `protobuf:"bytes,24,req,name=required_string_piece,json=requiredStringPiece" json:"required_string_piece,omitempty"` + RequiredCord *string `protobuf:"bytes,25,req,name=required_cord,json=requiredCord" json:"required_cord,omitempty"` + RecursiveMessage *TestAllRequiredTypesProto2 `protobuf:"bytes,27,req,name=recursive_message,json=recursiveMessage" json:"recursive_message,omitempty"` + OptionalRecursiveMessage *TestAllRequiredTypesProto2 `protobuf:"bytes,28,opt,name=optional_recursive_message,json=optionalRecursiveMessage" json:"optional_recursive_message,omitempty"` + Data *TestAllRequiredTypesProto2_Data `protobuf:"group,201,req,name=Data,json=data" json:"data,omitempty"` + // default values + DefaultInt32 *int32 `protobuf:"varint,241,req,name=default_int32,json=defaultInt32,def=-123456789" json:"default_int32,omitempty"` + DefaultInt64 *int64 `protobuf:"varint,242,req,name=default_int64,json=defaultInt64,def=-9123456789123456789" json:"default_int64,omitempty"` + DefaultUint32 *uint32 `protobuf:"varint,243,req,name=default_uint32,json=defaultUint32,def=2123456789" json:"default_uint32,omitempty"` + DefaultUint64 *uint64 `protobuf:"varint,244,req,name=default_uint64,json=defaultUint64,def=10123456789123456789" json:"default_uint64,omitempty"` + DefaultSint32 *int32 `protobuf:"zigzag32,245,req,name=default_sint32,json=defaultSint32,def=-123456789" json:"default_sint32,omitempty"` + DefaultSint64 *int64 `protobuf:"zigzag64,246,req,name=default_sint64,json=defaultSint64,def=-9123456789123456789" json:"default_sint64,omitempty"` + DefaultFixed32 *uint32 `protobuf:"fixed32,247,req,name=default_fixed32,json=defaultFixed32,def=2123456789" json:"default_fixed32,omitempty"` + DefaultFixed64 *uint64 `protobuf:"fixed64,248,req,name=default_fixed64,json=defaultFixed64,def=10123456789123456789" json:"default_fixed64,omitempty"` + DefaultSfixed32 *int32 `protobuf:"fixed32,249,req,name=default_sfixed32,json=defaultSfixed32,def=-123456789" json:"default_sfixed32,omitempty"` + DefaultSfixed64 *int64 `protobuf:"fixed64,250,req,name=default_sfixed64,json=defaultSfixed64,def=-9123456789123456789" json:"default_sfixed64,omitempty"` + DefaultFloat *float32 `protobuf:"fixed32,251,req,name=default_float,json=defaultFloat,def=9e+09" json:"default_float,omitempty"` + DefaultDouble *float64 `protobuf:"fixed64,252,req,name=default_double,json=defaultDouble,def=7e+22" json:"default_double,omitempty"` + DefaultBool *bool `protobuf:"varint,253,req,name=default_bool,json=defaultBool,def=1" json:"default_bool,omitempty"` + DefaultString *string `protobuf:"bytes,254,req,name=default_string,json=defaultString,def=Rosebud" json:"default_string,omitempty"` + DefaultBytes []byte `protobuf:"bytes,255,req,name=default_bytes,json=defaultBytes,def=joshua" json:"default_bytes,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -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) - } +// Default values for TestAllRequiredTypesProto2 fields. +const ( + Default_TestAllRequiredTypesProto2_DefaultInt32 = int32(-123456789) + Default_TestAllRequiredTypesProto2_DefaultInt64 = int64(-9123456789123456789) + Default_TestAllRequiredTypesProto2_DefaultUint32 = uint32(2123456789) + Default_TestAllRequiredTypesProto2_DefaultUint64 = uint64(10123456789123456789) + Default_TestAllRequiredTypesProto2_DefaultSint32 = int32(-123456789) + Default_TestAllRequiredTypesProto2_DefaultSint64 = int64(-9123456789123456789) + Default_TestAllRequiredTypesProto2_DefaultFixed32 = uint32(2123456789) + Default_TestAllRequiredTypesProto2_DefaultFixed64 = uint64(10123456789123456789) + Default_TestAllRequiredTypesProto2_DefaultSfixed32 = int32(-123456789) + Default_TestAllRequiredTypesProto2_DefaultSfixed64 = int64(-9123456789123456789) + Default_TestAllRequiredTypesProto2_DefaultFloat = float32(8.999999488e+09) + Default_TestAllRequiredTypesProto2_DefaultDouble = float64(7e+22) + Default_TestAllRequiredTypesProto2_DefaultBool = bool(true) + Default_TestAllRequiredTypesProto2_DefaultString = string("Rosebud") +) + +// Default values for TestAllRequiredTypesProto2 fields. +var ( + Default_TestAllRequiredTypesProto2_DefaultBytes = []byte("joshua") +) + +func (x *TestAllRequiredTypesProto2) Reset() { + *x = TestAllRequiredTypesProto2{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *TestAllTypesProto2_Data) String() string { +func (x *TestAllRequiredTypesProto2) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TestAllTypesProto2_Data) ProtoMessage() {} +func (*TestAllRequiredTypesProto2) ProtoMessage() {} -func (x *TestAllTypesProto2_Data) ProtoReflect() protoreflect.Message { - mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { +func (x *TestAllRequiredTypesProto2) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[8] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1793,91 +1959,915 @@ func (x *TestAllTypesProto2_Data) ProtoReflect() protoreflect.Message { 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} +// Deprecated: Use TestAllRequiredTypesProto2.ProtoReflect.Descriptor instead. +func (*TestAllRequiredTypesProto2) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{8} } -func (x *TestAllTypesProto2_Data) GetGroupInt32() int32 { - if x != nil && x.GroupInt32 != nil { - return *x.GroupInt32 +func (x *TestAllRequiredTypesProto2) GetRequiredInt32() int32 { + if x != nil && x.RequiredInt32 != nil { + return *x.RequiredInt32 } return 0 } -func (x *TestAllTypesProto2_Data) GetGroupUint32() uint32 { - if x != nil && x.GroupUint32 != nil { - return *x.GroupUint32 +func (x *TestAllRequiredTypesProto2) GetRequiredInt64() int64 { + if x != nil && x.RequiredInt64 != nil { + return *x.RequiredInt64 } return 0 } -// message_set test case. -type TestAllTypesProto2_MessageSetCorrect struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields +func (x *TestAllRequiredTypesProto2) GetRequiredUint32() uint32 { + if x != nil && x.RequiredUint32 != nil { + return *x.RequiredUint32 + } + return 0 } -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 *TestAllRequiredTypesProto2) GetRequiredUint64() uint64 { + if x != nil && x.RequiredUint64 != nil { + return *x.RequiredUint64 } + return 0 } -func (x *TestAllTypesProto2_MessageSetCorrect) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *TestAllRequiredTypesProto2) GetRequiredSint32() int32 { + if x != nil && x.RequiredSint32 != nil { + return *x.RequiredSint32 + } + return 0 } -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 +func (x *TestAllRequiredTypesProto2) GetRequiredSint64() int64 { + if x != nil && x.RequiredSint64 != nil { + return *x.RequiredSint64 } - return mi.MessageOf(x) + return 0 } -// 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} +func (x *TestAllRequiredTypesProto2) GetRequiredFixed32() uint32 { + if x != nil && x.RequiredFixed32 != nil { + return *x.RequiredFixed32 + } + return 0 } -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 *TestAllRequiredTypesProto2) GetRequiredFixed64() uint64 { + if x != nil && x.RequiredFixed64 != nil { + return *x.RequiredFixed64 + } + return 0 } -func (x *TestAllTypesProto2_MessageSetCorrectExtension1) Reset() { +func (x *TestAllRequiredTypesProto2) GetRequiredSfixed32() int32 { + if x != nil && x.RequiredSfixed32 != nil { + return *x.RequiredSfixed32 + } + return 0 +} + +func (x *TestAllRequiredTypesProto2) GetRequiredSfixed64() int64 { + if x != nil && x.RequiredSfixed64 != nil { + return *x.RequiredSfixed64 + } + return 0 +} + +func (x *TestAllRequiredTypesProto2) GetRequiredFloat() float32 { + if x != nil && x.RequiredFloat != nil { + return *x.RequiredFloat + } + return 0 +} + +func (x *TestAllRequiredTypesProto2) GetRequiredDouble() float64 { + if x != nil && x.RequiredDouble != nil { + return *x.RequiredDouble + } + return 0 +} + +func (x *TestAllRequiredTypesProto2) GetRequiredBool() bool { + if x != nil && x.RequiredBool != nil { + return *x.RequiredBool + } + return false +} + +func (x *TestAllRequiredTypesProto2) GetRequiredString() string { + if x != nil && x.RequiredString != nil { + return *x.RequiredString + } + return "" +} + +func (x *TestAllRequiredTypesProto2) GetRequiredBytes() []byte { + if x != nil { + return x.RequiredBytes + } + return nil +} + +func (x *TestAllRequiredTypesProto2) GetRequiredNestedMessage() *TestAllRequiredTypesProto2_NestedMessage { + if x != nil { + return x.RequiredNestedMessage + } + return nil +} + +func (x *TestAllRequiredTypesProto2) GetRequiredForeignMessage() *ForeignMessageProto2 { + if x != nil { + return x.RequiredForeignMessage + } + return nil +} + +func (x *TestAllRequiredTypesProto2) GetRequiredNestedEnum() TestAllRequiredTypesProto2_NestedEnum { + if x != nil && x.RequiredNestedEnum != nil { + return *x.RequiredNestedEnum + } + return TestAllRequiredTypesProto2_FOO +} + +func (x *TestAllRequiredTypesProto2) GetRequiredForeignEnum() ForeignEnumProto2 { + if x != nil && x.RequiredForeignEnum != nil { + return *x.RequiredForeignEnum + } + return ForeignEnumProto2_FOREIGN_FOO +} + +func (x *TestAllRequiredTypesProto2) GetRequiredStringPiece() string { + if x != nil && x.RequiredStringPiece != nil { + return *x.RequiredStringPiece + } + return "" +} + +func (x *TestAllRequiredTypesProto2) GetRequiredCord() string { + if x != nil && x.RequiredCord != nil { + return *x.RequiredCord + } + return "" +} + +func (x *TestAllRequiredTypesProto2) GetRecursiveMessage() *TestAllRequiredTypesProto2 { + if x != nil { + return x.RecursiveMessage + } + return nil +} + +func (x *TestAllRequiredTypesProto2) GetOptionalRecursiveMessage() *TestAllRequiredTypesProto2 { + if x != nil { + return x.OptionalRecursiveMessage + } + return nil +} + +func (x *TestAllRequiredTypesProto2) GetData() *TestAllRequiredTypesProto2_Data { + if x != nil { + return x.Data + } + return nil +} + +func (x *TestAllRequiredTypesProto2) GetDefaultInt32() int32 { + if x != nil && x.DefaultInt32 != nil { + return *x.DefaultInt32 + } + return Default_TestAllRequiredTypesProto2_DefaultInt32 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultInt64() int64 { + if x != nil && x.DefaultInt64 != nil { + return *x.DefaultInt64 + } + return Default_TestAllRequiredTypesProto2_DefaultInt64 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultUint32() uint32 { + if x != nil && x.DefaultUint32 != nil { + return *x.DefaultUint32 + } + return Default_TestAllRequiredTypesProto2_DefaultUint32 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultUint64() uint64 { + if x != nil && x.DefaultUint64 != nil { + return *x.DefaultUint64 + } + return Default_TestAllRequiredTypesProto2_DefaultUint64 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultSint32() int32 { + if x != nil && x.DefaultSint32 != nil { + return *x.DefaultSint32 + } + return Default_TestAllRequiredTypesProto2_DefaultSint32 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultSint64() int64 { + if x != nil && x.DefaultSint64 != nil { + return *x.DefaultSint64 + } + return Default_TestAllRequiredTypesProto2_DefaultSint64 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultFixed32() uint32 { + if x != nil && x.DefaultFixed32 != nil { + return *x.DefaultFixed32 + } + return Default_TestAllRequiredTypesProto2_DefaultFixed32 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultFixed64() uint64 { + if x != nil && x.DefaultFixed64 != nil { + return *x.DefaultFixed64 + } + return Default_TestAllRequiredTypesProto2_DefaultFixed64 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultSfixed32() int32 { + if x != nil && x.DefaultSfixed32 != nil { + return *x.DefaultSfixed32 + } + return Default_TestAllRequiredTypesProto2_DefaultSfixed32 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultSfixed64() int64 { + if x != nil && x.DefaultSfixed64 != nil { + return *x.DefaultSfixed64 + } + return Default_TestAllRequiredTypesProto2_DefaultSfixed64 +} + +func (x *TestAllRequiredTypesProto2) GetDefaultFloat() float32 { + if x != nil && x.DefaultFloat != nil { + return *x.DefaultFloat + } + return Default_TestAllRequiredTypesProto2_DefaultFloat +} + +func (x *TestAllRequiredTypesProto2) GetDefaultDouble() float64 { + if x != nil && x.DefaultDouble != nil { + return *x.DefaultDouble + } + return Default_TestAllRequiredTypesProto2_DefaultDouble +} + +func (x *TestAllRequiredTypesProto2) GetDefaultBool() bool { + if x != nil && x.DefaultBool != nil { + return *x.DefaultBool + } + return Default_TestAllRequiredTypesProto2_DefaultBool +} + +func (x *TestAllRequiredTypesProto2) GetDefaultString() string { + if x != nil && x.DefaultString != nil { + return *x.DefaultString + } + return Default_TestAllRequiredTypesProto2_DefaultString +} + +func (x *TestAllRequiredTypesProto2) GetDefaultBytes() []byte { + if x != nil && x.DefaultBytes != nil { + return x.DefaultBytes + } + return append([]byte(nil), Default_TestAllRequiredTypesProto2_DefaultBytes...) +} + +type TestLargeOneof struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to LargeOneof: + // + // *TestLargeOneof_A1_ + // *TestLargeOneof_A2_ + // *TestLargeOneof_A3_ + // *TestLargeOneof_A4_ + // *TestLargeOneof_A5_ + LargeOneof isTestLargeOneof_LargeOneof `protobuf_oneof:"large_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestLargeOneof) Reset() { + *x = TestLargeOneof{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestLargeOneof) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestLargeOneof) ProtoMessage() {} + +func (x *TestLargeOneof) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestLargeOneof.ProtoReflect.Descriptor instead. +func (*TestLargeOneof) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{9} +} + +func (x *TestLargeOneof) GetLargeOneof() isTestLargeOneof_LargeOneof { + if x != nil { + return x.LargeOneof + } + return nil +} + +func (x *TestLargeOneof) GetA1() *TestLargeOneof_A1 { + if x != nil { + if x, ok := x.LargeOneof.(*TestLargeOneof_A1_); ok { + return x.A1 + } + } + return nil +} + +func (x *TestLargeOneof) GetA2() *TestLargeOneof_A2 { + if x != nil { + if x, ok := x.LargeOneof.(*TestLargeOneof_A2_); ok { + return x.A2 + } + } + return nil +} + +func (x *TestLargeOneof) GetA3() *TestLargeOneof_A3 { + if x != nil { + if x, ok := x.LargeOneof.(*TestLargeOneof_A3_); ok { + return x.A3 + } + } + return nil +} + +func (x *TestLargeOneof) GetA4() *TestLargeOneof_A4 { + if x != nil { + if x, ok := x.LargeOneof.(*TestLargeOneof_A4_); ok { + return x.A4 + } + } + return nil +} + +func (x *TestLargeOneof) GetA5() *TestLargeOneof_A5 { + if x != nil { + if x, ok := x.LargeOneof.(*TestLargeOneof_A5_); ok { + return x.A5 + } + } + return nil +} + +type isTestLargeOneof_LargeOneof interface { + isTestLargeOneof_LargeOneof() +} + +type TestLargeOneof_A1_ struct { + A1 *TestLargeOneof_A1 `protobuf:"bytes,1,opt,name=a1,oneof"` +} + +type TestLargeOneof_A2_ struct { + A2 *TestLargeOneof_A2 `protobuf:"bytes,2,opt,name=a2,oneof"` +} + +type TestLargeOneof_A3_ struct { + A3 *TestLargeOneof_A3 `protobuf:"bytes,3,opt,name=a3,oneof"` +} + +type TestLargeOneof_A4_ struct { + A4 *TestLargeOneof_A4 `protobuf:"bytes,4,opt,name=a4,oneof"` +} + +type TestLargeOneof_A5_ struct { + A5 *TestLargeOneof_A5 `protobuf:"bytes,5,opt,name=a5,oneof"` +} + +func (*TestLargeOneof_A1_) isTestLargeOneof_LargeOneof() {} + +func (*TestLargeOneof_A2_) isTestLargeOneof_LargeOneof() {} + +func (*TestLargeOneof_A3_) isTestLargeOneof_LargeOneof() {} + +func (*TestLargeOneof_A4_) isTestLargeOneof_LargeOneof() {} + +func (*TestLargeOneof_A5_) isTestLargeOneof_LargeOneof() {} + +type TestAllTypesProto2_NestedMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + A *int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` + Corecursive *TestAllTypesProto2 `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllTypesProto2_NestedMessage) Reset() { + *x = TestAllTypesProto2_NestedMessage{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[10] + 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[10] + if 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 `protogen:"open.v1"` + 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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllTypesProto2_Data) Reset() { + *x = TestAllTypesProto2_Data{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[30] + 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[30] + if 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 +} + +type TestAllTypesProto2_MultiWordGroupField struct { + state protoimpl.MessageState `protogen:"open.v1"` + GroupInt32 *int32 `protobuf:"varint,205,opt,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` + GroupUint32 *uint32 `protobuf:"varint,206,opt,name=group_uint32,json=groupUint32" json:"group_uint32,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllTypesProto2_MultiWordGroupField) Reset() { + *x = TestAllTypesProto2_MultiWordGroupField{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestAllTypesProto2_MultiWordGroupField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAllTypesProto2_MultiWordGroupField) ProtoMessage() {} + +func (x *TestAllTypesProto2_MultiWordGroupField) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[31] + if 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_MultiWordGroupField.ProtoReflect.Descriptor instead. +func (*TestAllTypesProto2_MultiWordGroupField) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{0, 21} +} + +func (x *TestAllTypesProto2_MultiWordGroupField) GetGroupInt32() int32 { + if x != nil && x.GroupInt32 != nil { + return *x.GroupInt32 + } + return 0 +} + +func (x *TestAllTypesProto2_MultiWordGroupField) GetGroupUint32() uint32 { + if x != nil && x.GroupUint32 != nil { + return *x.GroupUint32 + } + return 0 +} + +// message_set test case. +type TestAllTypesProto2_MessageSetCorrect struct { + state protoimpl.MessageState `protogen:"open.v1"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllTypesProto2_MessageSetCorrect) Reset() { + *x = TestAllTypesProto2_MessageSetCorrect{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[32] + 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[32] + if 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, 22} +} + +type TestAllTypesProto2_MessageSetCorrectExtension1 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Str *string `protobuf:"bytes,25,opt,name=str" json:"str,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllTypesProto2_MessageSetCorrectExtension1) Reset() { *x = TestAllTypesProto2_MessageSetCorrectExtension1{} - if protoimpl.UnsafeEnabled { - mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[28] + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[33] + 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[33] + if 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, 23} +} + +func (x *TestAllTypesProto2_MessageSetCorrectExtension1) GetStr() string { + if x != nil && x.Str != nil { + return *x.Str + } + return "" +} + +type TestAllTypesProto2_MessageSetCorrectExtension2 struct { + state protoimpl.MessageState `protogen:"open.v1"` + I *int32 `protobuf:"varint,9,opt,name=i" json:"i,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllTypesProto2_MessageSetCorrectExtension2) Reset() { + *x = TestAllTypesProto2_MessageSetCorrectExtension2{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[34] + 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[34] + if 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, 24} +} + +func (x *TestAllTypesProto2_MessageSetCorrectExtension2) GetI() int32 { + if x != nil && x.I != nil { + return *x.I + } + return 0 +} + +type UnknownToTestAllTypes_OptionalGroup struct { + state protoimpl.MessageState `protogen:"open.v1"` + A *int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnknownToTestAllTypes_OptionalGroup) Reset() { + *x = UnknownToTestAllTypes_OptionalGroup{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[35] + 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[35] + if 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{3, 0} +} + +func (x *UnknownToTestAllTypes_OptionalGroup) GetA() int32 { + if x != nil && x.A != nil { + return *x.A + } + return 0 +} + +type TestAllRequiredTypesProto2_NestedMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + A *int32 `protobuf:"varint,1,req,name=a" json:"a,omitempty"` + Corecursive *TestAllRequiredTypesProto2 `protobuf:"bytes,2,req,name=corecursive" json:"corecursive,omitempty"` + OptionalCorecursive *TestAllRequiredTypesProto2 `protobuf:"bytes,3,opt,name=optional_corecursive,json=optionalCorecursive" json:"optional_corecursive,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllRequiredTypesProto2_NestedMessage) Reset() { + *x = TestAllRequiredTypesProto2_NestedMessage{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestAllRequiredTypesProto2_NestedMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAllRequiredTypesProto2_NestedMessage) ProtoMessage() {} + +func (x *TestAllRequiredTypesProto2_NestedMessage) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestAllRequiredTypesProto2_NestedMessage.ProtoReflect.Descriptor instead. +func (*TestAllRequiredTypesProto2_NestedMessage) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *TestAllRequiredTypesProto2_NestedMessage) GetA() int32 { + if x != nil && x.A != nil { + return *x.A + } + return 0 +} + +func (x *TestAllRequiredTypesProto2_NestedMessage) GetCorecursive() *TestAllRequiredTypesProto2 { + if x != nil { + return x.Corecursive + } + return nil +} + +func (x *TestAllRequiredTypesProto2_NestedMessage) GetOptionalCorecursive() *TestAllRequiredTypesProto2 { + if x != nil { + return x.OptionalCorecursive + } + return nil +} + +// groups +type TestAllRequiredTypesProto2_Data struct { + state protoimpl.MessageState `protogen:"open.v1"` + GroupInt32 *int32 `protobuf:"varint,202,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` + GroupUint32 *uint32 `protobuf:"varint,203,req,name=group_uint32,json=groupUint32" json:"group_uint32,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllRequiredTypesProto2_Data) Reset() { + *x = TestAllRequiredTypesProto2_Data{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestAllRequiredTypesProto2_Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAllRequiredTypesProto2_Data) ProtoMessage() {} + +func (x *TestAllRequiredTypesProto2_Data) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestAllRequiredTypesProto2_Data.ProtoReflect.Descriptor instead. +func (*TestAllRequiredTypesProto2_Data) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{8, 1} +} + +func (x *TestAllRequiredTypesProto2_Data) GetGroupInt32() int32 { + if x != nil && x.GroupInt32 != nil { + return *x.GroupInt32 + } + return 0 +} + +func (x *TestAllRequiredTypesProto2_Data) GetGroupUint32() uint32 { + if x != nil && x.GroupUint32 != nil { + return *x.GroupUint32 + } + return 0 +} + +// message_set test case. +type TestAllRequiredTypesProto2_MessageSetCorrect struct { + state protoimpl.MessageState `protogen:"open.v1"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllRequiredTypesProto2_MessageSetCorrect) Reset() { + *x = TestAllRequiredTypesProto2_MessageSetCorrect{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestAllRequiredTypesProto2_MessageSetCorrect) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAllRequiredTypesProto2_MessageSetCorrect) ProtoMessage() {} + +func (x *TestAllRequiredTypesProto2_MessageSetCorrect) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[38] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) } -func (x *TestAllTypesProto2_MessageSetCorrectExtension1) String() string { +// Deprecated: Use TestAllRequiredTypesProto2_MessageSetCorrect.ProtoReflect.Descriptor instead. +func (*TestAllRequiredTypesProto2_MessageSetCorrect) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{8, 2} +} + +type TestAllRequiredTypesProto2_MessageSetCorrectExtension1 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Str *string `protobuf:"bytes,25,req,name=str" json:"str,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) Reset() { + *x = TestAllRequiredTypesProto2_MessageSetCorrectExtension1{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TestAllTypesProto2_MessageSetCorrectExtension1) ProtoMessage() {} +func (*TestAllRequiredTypesProto2_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 { +func (x *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[39] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1887,44 +2877,41 @@ func (x *TestAllTypesProto2_MessageSetCorrectExtension1) ProtoReflect() protoref 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} +// Deprecated: Use TestAllRequiredTypesProto2_MessageSetCorrectExtension1.ProtoReflect.Descriptor instead. +func (*TestAllRequiredTypesProto2_MessageSetCorrectExtension1) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{8, 3} } -func (x *TestAllTypesProto2_MessageSetCorrectExtension1) GetStr() string { +func (x *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) GetStr() string { if x != nil && x.Str != nil { return *x.Str } return "" } -type TestAllTypesProto2_MessageSetCorrectExtension2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type TestAllRequiredTypesProto2_MessageSetCorrectExtension2 struct { + state protoimpl.MessageState `protogen:"open.v1"` + I *int32 `protobuf:"varint,9,req,name=i" json:"i,omitempty"` unknownFields protoimpl.UnknownFields - - I *int32 `protobuf:"varint,9,opt,name=i" json:"i,omitempty"` + sizeCache protoimpl.SizeCache } -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 *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) Reset() { + *x = TestAllRequiredTypesProto2_MessageSetCorrectExtension2{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *TestAllTypesProto2_MessageSetCorrectExtension2) String() string { +func (x *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TestAllTypesProto2_MessageSetCorrectExtension2) ProtoMessage() {} +func (*TestAllRequiredTypesProto2_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 { +func (x *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[40] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1934,44 +2921,112 @@ func (x *TestAllTypesProto2_MessageSetCorrectExtension2) ProtoReflect() protoref 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} +// Deprecated: Use TestAllRequiredTypesProto2_MessageSetCorrectExtension2.ProtoReflect.Descriptor instead. +func (*TestAllRequiredTypesProto2_MessageSetCorrectExtension2) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{8, 4} } -func (x *TestAllTypesProto2_MessageSetCorrectExtension2) GetI() int32 { +func (x *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) GetI() int32 { if x != nil && x.I != nil { return *x.I } return 0 } -type UnknownToTestAllTypes_OptionalGroup struct { - state protoimpl.MessageState +type TestLargeOneof_A1 struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache +} + +func (x *TestLargeOneof_A1) Reset() { + *x = TestLargeOneof_A1{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestLargeOneof_A1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestLargeOneof_A1) ProtoMessage() {} + +func (x *TestLargeOneof_A1) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestLargeOneof_A1.ProtoReflect.Descriptor instead. +func (*TestLargeOneof_A1) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{9, 0} +} + +type TestLargeOneof_A2 struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} - A *int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` +func (x *TestLargeOneof_A2) Reset() { + *x = TestLargeOneof_A2{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *UnknownToTestAllTypes_OptionalGroup) Reset() { - *x = UnknownToTestAllTypes_OptionalGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[30] +func (x *TestLargeOneof_A2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestLargeOneof_A2) ProtoMessage() {} + +func (x *TestLargeOneof_A2) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[42] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) } -func (x *UnknownToTestAllTypes_OptionalGroup) String() string { +// Deprecated: Use TestLargeOneof_A2.ProtoReflect.Descriptor instead. +func (*TestLargeOneof_A2) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{9, 1} +} + +type TestLargeOneof_A3 struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestLargeOneof_A3) Reset() { + *x = TestLargeOneof_A3{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestLargeOneof_A3) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UnknownToTestAllTypes_OptionalGroup) ProtoMessage() {} +func (*TestLargeOneof_A3) ProtoMessage() {} -func (x *UnknownToTestAllTypes_OptionalGroup) ProtoReflect() protoreflect.Message { - mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { +func (x *TestLargeOneof_A3) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[43] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1981,16 +3036,81 @@ func (x *UnknownToTestAllTypes_OptionalGroup) ProtoReflect() protoreflect.Messag 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} +// Deprecated: Use TestLargeOneof_A3.ProtoReflect.Descriptor instead. +func (*TestLargeOneof_A3) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{9, 2} } -func (x *UnknownToTestAllTypes_OptionalGroup) GetA() int32 { - if x != nil && x.A != nil { - return *x.A +type TestLargeOneof_A4 struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestLargeOneof_A4) Reset() { + *x = TestLargeOneof_A4{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestLargeOneof_A4) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestLargeOneof_A4) ProtoMessage() {} + +func (x *TestLargeOneof_A4) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) +} + +// Deprecated: Use TestLargeOneof_A4.ProtoReflect.Descriptor instead. +func (*TestLargeOneof_A4) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{9, 3} +} + +type TestLargeOneof_A5 struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestLargeOneof_A5) Reset() { + *x = TestLargeOneof_A5{} + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestLargeOneof_A5) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestLargeOneof_A5) ProtoMessage() {} + +func (x *TestLargeOneof_A5) ProtoReflect() protoreflect.Message { + mi := &file_src_google_protobuf_test_messages_proto2_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestLargeOneof_A5.ProtoReflect.Descriptor instead. +func (*TestLargeOneof_A5) Descriptor() ([]byte, []int) { + return file_src_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{9, 4} } var file_src_google_protobuf_test_messages_proto2_proto_extTypes = []protoimpl.ExtensionInfo{ @@ -2002,6 +3122,14 @@ var file_src_google_protobuf_test_messages_proto2_proto_extTypes = []protoimpl.E Tag: "varint,120,opt,name=extension_int32", Filename: "src/google/protobuf/test_messages_proto2.proto", }, + { + ExtendedType: (*TestAllTypesProto2)(nil), + ExtensionType: (*GroupField)(nil), + Field: 121, + Name: "protobuf_test_messages.proto2.groupfield", + Tag: "group,121,opt,name=GroupField", + Filename: "src/google/protobuf/test_messages_proto2.proto", + }, { ExtendedType: (*TestAllTypesProto2_MessageSetCorrect)(nil), ExtensionType: (*TestAllTypesProto2_MessageSetCorrectExtension1)(nil), @@ -2018,31 +3146,57 @@ var file_src_google_protobuf_test_messages_proto2_proto_extTypes = []protoimpl.E Tag: "bytes,4135312,opt,name=message_set_extension", Filename: "src/google/protobuf/test_messages_proto2.proto", }, + { + ExtendedType: (*TestAllRequiredTypesProto2_MessageSetCorrect)(nil), + ExtensionType: (*TestAllRequiredTypesProto2_MessageSetCorrectExtension1)(nil), + Field: 1547769, + Name: "protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1.message_set_extension", + Tag: "bytes,1547769,opt,name=message_set_extension", + Filename: "src/google/protobuf/test_messages_proto2.proto", + }, + { + ExtendedType: (*TestAllRequiredTypesProto2_MessageSetCorrect)(nil), + ExtensionType: (*TestAllRequiredTypesProto2_MessageSetCorrectExtension2)(nil), + Field: 4135312, + Name: "protobuf_test_messages.proto2.TestAllRequiredTypesProto2.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] + // optional protobuf_test_messages.proto2.GroupField groupfield = 121; + E_Groupfield = &file_src_google_protobuf_test_messages_proto2_proto_extTypes[1] ) // 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] + E_TestAllTypesProto2_MessageSetCorrectExtension1_MessageSetExtension = &file_src_google_protobuf_test_messages_proto2_proto_extTypes[2] // 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] + E_TestAllTypesProto2_MessageSetCorrectExtension2_MessageSetExtension = &file_src_google_protobuf_test_messages_proto2_proto_extTypes[3] +) + +// Extension fields to TestAllRequiredTypesProto2_MessageSetCorrect. +var ( + // optional protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1 message_set_extension = 1547769; + E_TestAllRequiredTypesProto2_MessageSetCorrectExtension1_MessageSetExtension = &file_src_google_protobuf_test_messages_proto2_proto_extTypes[4] + // optional protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2 message_set_extension = 4135312; + E_TestAllRequiredTypesProto2_MessageSetCorrectExtension2_MessageSetExtension = &file_src_google_protobuf_test_messages_proto2_proto_extTypes[5] ) var File_src_google_protobuf_test_messages_proto2_proto protoreflect.FileDescriptor -var file_src_google_protobuf_test_messages_proto2_proto_rawDesc = []byte{ +var file_src_google_protobuf_test_messages_proto2_proto_rawDesc = string([]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, + 0x90, 0x53, 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, @@ -2455,397 +3609,697 @@ var file_src_google_protobuf_test_messages_proto2_proto_rawDesc = []byte{ 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, + 0x78, 0x0a, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x77, 0x6f, 0x72, 0x64, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0xcc, 0x01, 0x20, 0x01, 0x28, 0x0a, 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, 0x75, 0x6c, 0x74, 0x69, 0x57, 0x6f, 0x72, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x77, 0x6f, 0x72, 0x64, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x66, 0x69, 0x65, 0x6c, 0x64, 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, 0x5b, 0x0a, 0x13, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x57, 0x6f, 0x72, 0x64, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0xcd, 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, 0xce, 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, 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, + 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, 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, + 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, 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, + 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, 0x50, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x7a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x7b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 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, 0x22, 0x61, 0x0a, 0x11, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x63, + 0x65, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x63, 0x65, + 0x70, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x22, 0xcc, + 0x19, 0x0a, 0x1a, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x12, 0x25, 0x0a, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, + 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x55, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0e, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, + 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x18, 0x05, 0x20, 0x02, 0x28, 0x11, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x02, 0x28, 0x12, 0x52, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, + 0x29, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x18, 0x07, 0x20, 0x02, 0x28, 0x07, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x08, + 0x20, 0x02, 0x28, 0x06, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x02, 0x28, 0x0f, + 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x02, 0x28, 0x10, 0x52, 0x10, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, + 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x18, 0x0b, 0x20, 0x02, 0x28, 0x02, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x02, 0x28, 0x01, 0x52, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, + 0x18, 0x0d, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0e, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x0f, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x7f, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x12, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x47, 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, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 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, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x13, 0x20, 0x02, 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, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x76, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x02, + 0x28, 0x0e, 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, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 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, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x64, 0x0a, 0x15, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, + 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x16, 0x20, 0x02, 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, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x18, 0x18, 0x20, 0x02, 0x28, + 0x09, 0x42, 0x02, 0x08, 0x02, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x69, 0x65, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x19, 0x20, 0x02, 0x28, + 0x09, 0x42, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, + 0x6f, 0x72, 0x64, 0x12, 0x66, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, + 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1b, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x39, 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, + 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 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, 0x77, 0x0a, 0x1a, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, + 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x39, 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, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x18, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0xc9, 0x01, 0x20, + 0x02, 0x28, 0x0a, 0x32, 0x3e, 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, 0x52, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 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, 0x02, 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, + 0x02, 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, 0x02, 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, 0x02, 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, 0x02, + 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, 0x02, 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, 0x02, 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, 0x02, 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, 0x02, 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, 0x02, 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, + 0x02, 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, 0x02, 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, 0x02, 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, 0x02, 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, 0x02, 0x28, 0x0c, 0x3a, 0x06, 0x6a, 0x6f, 0x73, 0x68, + 0x75, 0x61, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x1a, 0xe8, 0x01, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x01, 0x61, + 0x12, 0x5b, 0x0a, 0x0b, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x39, 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, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, + 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x6c, 0x0a, + 0x14, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x63, 0x75, + 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 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, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x43, 0x6f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 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, 0x02, 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, 0x02, 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, 0x8a, 0x02, 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, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x32, 0xd8, + 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, 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, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 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, 0x55, 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, -} + 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 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, 0x87, 0x02, 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, 0x02, 0x28, 0x05, 0x52, 0x01, 0x69, 0x32, 0xd9, 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, 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, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 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, 0x55, 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, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 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, 0x4a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x90, 0x4e, 0x22, 0x91, 0x03, + 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x4f, 0x6e, 0x65, 0x6f, 0x66, + 0x12, 0x42, 0x0a, 0x02, 0x61, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 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, 0x54, 0x65, 0x73, + 0x74, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, 0x41, 0x31, 0x48, 0x00, + 0x52, 0x02, 0x61, 0x31, 0x12, 0x42, 0x0a, 0x02, 0x61, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 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, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, + 0x41, 0x32, 0x48, 0x00, 0x52, 0x02, 0x61, 0x32, 0x12, 0x42, 0x0a, 0x02, 0x61, 0x33, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 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, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x4f, 0x6e, + 0x65, 0x6f, 0x66, 0x2e, 0x41, 0x33, 0x48, 0x00, 0x52, 0x02, 0x61, 0x33, 0x12, 0x42, 0x0a, 0x02, + 0x61, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 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, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x72, + 0x67, 0x65, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, 0x41, 0x34, 0x48, 0x00, 0x52, 0x02, 0x61, 0x34, + 0x12, 0x42, 0x0a, 0x02, 0x61, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 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, 0x54, 0x65, 0x73, + 0x74, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, 0x41, 0x35, 0x48, 0x00, + 0x52, 0x02, 0x61, 0x35, 0x1a, 0x04, 0x0a, 0x02, 0x41, 0x31, 0x1a, 0x04, 0x0a, 0x02, 0x41, 0x32, + 0x1a, 0x04, 0x0a, 0x02, 0x41, 0x33, 0x1a, 0x04, 0x0a, 0x02, 0x41, 0x34, 0x1a, 0x04, 0x0a, 0x02, + 0x41, 0x35, 0x42, 0x0d, 0x0a, 0x0b, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, + 0x66, 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, 0x3a, 0x7c, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x66, 0x69, + 0x65, 0x6c, 0x64, 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, 0x79, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x29, 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, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x66, 0x69, + 0x65, 0x6c, 0x64, 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, 0x32, 0x48, + 0x01, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x06, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, +}) 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 + file_src_google_protobuf_test_messages_proto2_proto_rawDescData []byte ) 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) + file_src_google_protobuf_test_messages_proto2_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_src_google_protobuf_test_messages_proto2_proto_rawDesc), len(file_src_google_protobuf_test_messages_proto2_proto_rawDesc))) }) 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_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_src_google_protobuf_test_messages_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 46) +var file_src_google_protobuf_test_messages_proto2_proto_goTypes = []any{ + (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 + (TestAllRequiredTypesProto2_NestedEnum)(0), // 3: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedEnum + (*TestAllTypesProto2)(nil), // 4: protobuf_test_messages.proto2.TestAllTypesProto2 + (*ForeignMessageProto2)(nil), // 5: protobuf_test_messages.proto2.ForeignMessageProto2 + (*GroupField)(nil), // 6: protobuf_test_messages.proto2.GroupField + (*UnknownToTestAllTypes)(nil), // 7: protobuf_test_messages.proto2.UnknownToTestAllTypes + (*NullHypothesisProto2)(nil), // 8: protobuf_test_messages.proto2.NullHypothesisProto2 + (*EnumOnlyProto2)(nil), // 9: protobuf_test_messages.proto2.EnumOnlyProto2 + (*OneStringProto2)(nil), // 10: protobuf_test_messages.proto2.OneStringProto2 + (*ProtoWithKeywords)(nil), // 11: protobuf_test_messages.proto2.ProtoWithKeywords + (*TestAllRequiredTypesProto2)(nil), // 12: protobuf_test_messages.proto2.TestAllRequiredTypesProto2 + (*TestLargeOneof)(nil), // 13: protobuf_test_messages.proto2.TestLargeOneof + (*TestAllTypesProto2_NestedMessage)(nil), // 14: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage + nil, // 15: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32Int32Entry + nil, // 16: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt64Int64Entry + nil, // 17: protobuf_test_messages.proto2.TestAllTypesProto2.MapUint32Uint32Entry + nil, // 18: protobuf_test_messages.proto2.TestAllTypesProto2.MapUint64Uint64Entry + nil, // 19: protobuf_test_messages.proto2.TestAllTypesProto2.MapSint32Sint32Entry + nil, // 20: protobuf_test_messages.proto2.TestAllTypesProto2.MapSint64Sint64Entry + nil, // 21: protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed32Fixed32Entry + nil, // 22: protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed64Fixed64Entry + nil, // 23: protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed32Sfixed32Entry + nil, // 24: protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed64Sfixed64Entry + nil, // 25: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32FloatEntry + nil, // 26: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32DoubleEntry + nil, // 27: protobuf_test_messages.proto2.TestAllTypesProto2.MapBoolBoolEntry + nil, // 28: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringStringEntry + nil, // 29: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringBytesEntry + nil, // 30: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry + nil, // 31: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry + nil, // 32: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry + nil, // 33: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry + (*TestAllTypesProto2_Data)(nil), // 34: protobuf_test_messages.proto2.TestAllTypesProto2.Data + (*TestAllTypesProto2_MultiWordGroupField)(nil), // 35: protobuf_test_messages.proto2.TestAllTypesProto2.MultiWordGroupField + (*TestAllTypesProto2_MessageSetCorrect)(nil), // 36: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect + (*TestAllTypesProto2_MessageSetCorrectExtension1)(nil), // 37: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1 + (*TestAllTypesProto2_MessageSetCorrectExtension2)(nil), // 38: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2 + (*UnknownToTestAllTypes_OptionalGroup)(nil), // 39: protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup + (*TestAllRequiredTypesProto2_NestedMessage)(nil), // 40: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage + (*TestAllRequiredTypesProto2_Data)(nil), // 41: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.Data + (*TestAllRequiredTypesProto2_MessageSetCorrect)(nil), // 42: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrect + (*TestAllRequiredTypesProto2_MessageSetCorrectExtension1)(nil), // 43: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1 + (*TestAllRequiredTypesProto2_MessageSetCorrectExtension2)(nil), // 44: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2 + (*TestLargeOneof_A1)(nil), // 45: protobuf_test_messages.proto2.TestLargeOneof.A1 + (*TestLargeOneof_A2)(nil), // 46: protobuf_test_messages.proto2.TestLargeOneof.A2 + (*TestLargeOneof_A3)(nil), // 47: protobuf_test_messages.proto2.TestLargeOneof.A3 + (*TestLargeOneof_A4)(nil), // 48: protobuf_test_messages.proto2.TestLargeOneof.A4 + (*TestLargeOneof_A5)(nil), // 49: protobuf_test_messages.proto2.TestLargeOneof.A5 } 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 + 14, // 0: protobuf_test_messages.proto2.TestAllTypesProto2.optional_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage + 5, // 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 + 4, // 4: protobuf_test_messages.proto2.TestAllTypesProto2.recursive_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2 + 14, // 5: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage + 5, // 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 + 15, // 11: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_int32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32Int32Entry + 16, // 12: protobuf_test_messages.proto2.TestAllTypesProto2.map_int64_int64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt64Int64Entry + 17, // 13: protobuf_test_messages.proto2.TestAllTypesProto2.map_uint32_uint32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapUint32Uint32Entry + 18, // 14: protobuf_test_messages.proto2.TestAllTypesProto2.map_uint64_uint64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapUint64Uint64Entry + 19, // 15: protobuf_test_messages.proto2.TestAllTypesProto2.map_sint32_sint32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSint32Sint32Entry + 20, // 16: protobuf_test_messages.proto2.TestAllTypesProto2.map_sint64_sint64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSint64Sint64Entry + 21, // 17: protobuf_test_messages.proto2.TestAllTypesProto2.map_fixed32_fixed32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed32Fixed32Entry + 22, // 18: protobuf_test_messages.proto2.TestAllTypesProto2.map_fixed64_fixed64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed64Fixed64Entry + 23, // 19: protobuf_test_messages.proto2.TestAllTypesProto2.map_sfixed32_sfixed32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed32Sfixed32Entry + 24, // 20: protobuf_test_messages.proto2.TestAllTypesProto2.map_sfixed64_sfixed64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed64Sfixed64Entry + 25, // 21: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_float:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32FloatEntry + 26, // 22: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_double:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32DoubleEntry + 27, // 23: protobuf_test_messages.proto2.TestAllTypesProto2.map_bool_bool:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapBoolBoolEntry + 28, // 24: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_string:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringStringEntry + 29, // 25: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_bytes:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringBytesEntry + 30, // 26: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry + 31, // 27: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_foreign_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry + 32, // 28: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry + 33, // 29: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_foreign_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry + 14, // 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 + 34, // 32: protobuf_test_messages.proto2.TestAllTypesProto2.data:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.Data + 35, // 33: protobuf_test_messages.proto2.TestAllTypesProto2.multiwordgroupfield:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MultiWordGroupField + 5, // 34: protobuf_test_messages.proto2.UnknownToTestAllTypes.nested_message:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2 + 39, // 35: protobuf_test_messages.proto2.UnknownToTestAllTypes.optionalgroup:type_name -> protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup + 40, // 36: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.required_nested_message:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage + 5, // 37: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.required_foreign_message:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2 + 3, // 38: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.required_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedEnum + 0, // 39: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.required_foreign_enum:type_name -> protobuf_test_messages.proto2.ForeignEnumProto2 + 12, // 40: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.recursive_message:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2 + 12, // 41: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.optional_recursive_message:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2 + 41, // 42: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.data:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2.Data + 45, // 43: protobuf_test_messages.proto2.TestLargeOneof.a1:type_name -> protobuf_test_messages.proto2.TestLargeOneof.A1 + 46, // 44: protobuf_test_messages.proto2.TestLargeOneof.a2:type_name -> protobuf_test_messages.proto2.TestLargeOneof.A2 + 47, // 45: protobuf_test_messages.proto2.TestLargeOneof.a3:type_name -> protobuf_test_messages.proto2.TestLargeOneof.A3 + 48, // 46: protobuf_test_messages.proto2.TestLargeOneof.a4:type_name -> protobuf_test_messages.proto2.TestLargeOneof.A4 + 49, // 47: protobuf_test_messages.proto2.TestLargeOneof.a5:type_name -> protobuf_test_messages.proto2.TestLargeOneof.A5 + 4, // 48: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage.corecursive:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2 + 14, // 49: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry.value:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage + 5, // 50: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry.value:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2 + 1, // 51: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry.value:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum + 0, // 52: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry.value:type_name -> protobuf_test_messages.proto2.ForeignEnumProto2 + 12, // 53: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage.corecursive:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2 + 12, // 54: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage.optional_corecursive:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2 + 4, // 55: protobuf_test_messages.proto2.extension_int32:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2 + 4, // 56: protobuf_test_messages.proto2.groupfield:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2 + 36, // 57: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect + 36, // 58: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect + 42, // 59: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrect + 42, // 60: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrect + 6, // 61: protobuf_test_messages.proto2.groupfield:type_name -> protobuf_test_messages.proto2.GroupField + 37, // 62: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1 + 38, // 63: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2 + 43, // 64: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1 + 44, // 65: protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2 + 66, // [66:66] is the sub-list for method output_type + 66, // [66:66] is the sub-list for method input_type + 61, // [61:66] is the sub-list for extension type_name + 55, // [55:61] is the sub-list for extension extendee + 0, // [0:55] is the sub-list for field type_name } func init() { file_src_google_protobuf_test_messages_proto2_proto_init() } @@ -2853,157 +4307,7 @@ 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{}{ + file_src_google_protobuf_test_messages_proto2_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto2_OneofUint32)(nil), (*TestAllTypesProto2_OneofNestedMessage)(nil), (*TestAllTypesProto2_OneofString)(nil), @@ -3014,14 +4318,21 @@ func file_src_google_protobuf_test_messages_proto2_proto_init() { (*TestAllTypesProto2_OneofDouble)(nil), (*TestAllTypesProto2_OneofEnum)(nil), } + file_src_google_protobuf_test_messages_proto2_proto_msgTypes[9].OneofWrappers = []any{ + (*TestLargeOneof_A1_)(nil), + (*TestLargeOneof_A2_)(nil), + (*TestLargeOneof_A3_)(nil), + (*TestLargeOneof_A4_)(nil), + (*TestLargeOneof_A5_)(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, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_src_google_protobuf_test_messages_proto2_proto_rawDesc), len(file_src_google_protobuf_test_messages_proto2_proto_rawDesc)), + NumEnums: 4, + NumMessages: 46, + NumExtensions: 6, NumServices: 0, }, GoTypes: file_src_google_protobuf_test_messages_proto2_proto_goTypes, @@ -3031,7 +4342,6 @@ func file_src_google_protobuf_test_messages_proto2_proto_init() { 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 } diff --git a/conformance/internal/conformance/test_messages_proto2_vtproto.pb.go b/conformance/internal/conformance/test_messages_proto2_vtproto.pb.go index c8eb7a3a..e3ba1dbb 100644 --- a/conformance/internal/conformance/test_messages_proto2_vtproto.pb.go +++ b/conformance/internal/conformance/test_messages_proto2_vtproto.pb.go @@ -67,6 +67,30 @@ func (m *TestAllTypesProto2_Data) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *TestAllTypesProto2_MultiWordGroupField) CloneVT() *TestAllTypesProto2_MultiWordGroupField { + if m == nil { + return (*TestAllTypesProto2_MultiWordGroupField)(nil) + } + r := new(TestAllTypesProto2_MultiWordGroupField) + 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_MultiWordGroupField) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *TestAllTypesProto2_MessageSetCorrect) CloneVT() *TestAllTypesProto2_MessageSetCorrect { if m == nil { return (*TestAllTypesProto2_MessageSetCorrect)(nil) @@ -132,6 +156,7 @@ func (m *TestAllTypesProto2) CloneVT() *TestAllTypesProto2 { r.OptionalForeignMessage = m.OptionalForeignMessage.CloneVT() r.RecursiveMessage = m.RecursiveMessage.CloneVT() r.Data = m.Data.CloneVT() + r.Multiwordgroupfield = m.Multiwordgroupfield.CloneVT() if rhs := m.OptionalInt32; rhs != nil { tmpVal := *rhs r.OptionalInt32 = &tmpVal @@ -851,6 +876,30 @@ func (m *ForeignMessageProto2) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *GroupField) CloneVT() *GroupField { + if m == nil { + return (*GroupField)(nil) + } + r := new(GroupField) + 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 *GroupField) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *UnknownToTestAllTypes_OptionalGroup) CloneVT() *UnknownToTestAllTypes_OptionalGroup { if m == nil { return (*UnknownToTestAllTypes_OptionalGroup)(nil) @@ -958,3106 +1007,2469 @@ 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 +func (m *ProtoWithKeywords) CloneVT() *ProtoWithKeywords { + if m == nil { + return (*ProtoWithKeywords)(nil) } - if p, q := this.A, that.A; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + r := new(ProtoWithKeywords) + if rhs := m.Inline; rhs != nil { + tmpVal := *rhs + r.Inline = &tmpVal } - if !this.Corecursive.EqualVT(that.Corecursive) { - return false + if rhs := m.Concept; rhs != nil { + tmpVal := *rhs + r.Concept = &tmpVal } - return string(this.unknownFields) == string(that.unknownFields) + if rhs := m.Requires; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Requires = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r } -func (this *TestAllTypesProto2_NestedMessage) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*TestAllTypesProto2_NestedMessage) - if !ok { - return false - } - return this.EqualVT(that) +func (m *ProtoWithKeywords) CloneMessageVT() proto.Message { + return m.CloneVT() } -func (this *TestAllTypesProto2_Data) EqualVT(that *TestAllTypesProto2_Data) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false + +func (m *TestAllRequiredTypesProto2_NestedMessage) CloneVT() *TestAllRequiredTypesProto2_NestedMessage { + if m == nil { + return (*TestAllRequiredTypesProto2_NestedMessage)(nil) } - if p, q := this.GroupInt32, that.GroupInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + r := new(TestAllRequiredTypesProto2_NestedMessage) + r.Corecursive = m.Corecursive.CloneVT() + r.OptionalCorecursive = m.OptionalCorecursive.CloneVT() + if rhs := m.A; rhs != nil { + tmpVal := *rhs + r.A = &tmpVal } - if p, q := this.GroupUint32, that.GroupUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - return string(this.unknownFields) == string(that.unknownFields) + return r } -func (this *TestAllTypesProto2_Data) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*TestAllTypesProto2_Data) - if !ok { - return false - } - return this.EqualVT(that) +func (m *TestAllRequiredTypesProto2_NestedMessage) CloneMessageVT() proto.Message { + return m.CloneVT() } -func (this *TestAllTypesProto2_MessageSetCorrect) EqualVT(that *TestAllTypesProto2_MessageSetCorrect) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false + +func (m *TestAllRequiredTypesProto2_Data) CloneVT() *TestAllRequiredTypesProto2_Data { + if m == nil { + return (*TestAllRequiredTypesProto2_Data)(nil) } - return string(this.unknownFields) == string(that.unknownFields) + r := new(TestAllRequiredTypesProto2_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 (this *TestAllTypesProto2_MessageSetCorrect) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*TestAllTypesProto2_MessageSetCorrect) - if !ok { - return false - } - return this.EqualVT(that) +func (m *TestAllRequiredTypesProto2_Data) CloneMessageVT() proto.Message { + return m.CloneVT() } -func (this *TestAllTypesProto2_MessageSetCorrectExtension1) EqualVT(that *TestAllTypesProto2_MessageSetCorrectExtension1) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false + +func (m *TestAllRequiredTypesProto2_MessageSetCorrect) CloneVT() *TestAllRequiredTypesProto2_MessageSetCorrect { + if m == nil { + return (*TestAllRequiredTypesProto2_MessageSetCorrect)(nil) } - if p, q := this.Str, that.Str; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + r := new(TestAllRequiredTypesProto2_MessageSetCorrect) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - return string(this.unknownFields) == string(that.unknownFields) + return r } -func (this *TestAllTypesProto2_MessageSetCorrectExtension1) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*TestAllTypesProto2_MessageSetCorrectExtension1) - if !ok { - return false - } - return this.EqualVT(that) +func (m *TestAllRequiredTypesProto2_MessageSetCorrect) CloneMessageVT() proto.Message { + return m.CloneVT() } -func (this *TestAllTypesProto2_MessageSetCorrectExtension2) EqualVT(that *TestAllTypesProto2_MessageSetCorrectExtension2) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) CloneVT() *TestAllRequiredTypesProto2_MessageSetCorrectExtension1 { + if m == nil { + return (*TestAllRequiredTypesProto2_MessageSetCorrectExtension1)(nil) } - if p, q := this.I, that.I; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + r := new(TestAllRequiredTypesProto2_MessageSetCorrectExtension1) + if rhs := m.Str; rhs != nil { + tmpVal := *rhs + r.Str = &tmpVal } - return string(this.unknownFields) == string(that.unknownFields) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r } -func (this *TestAllTypesProto2_MessageSetCorrectExtension2) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*TestAllTypesProto2_MessageSetCorrectExtension2) - if !ok { - return false - } - return this.EqualVT(that) +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) CloneMessageVT() proto.Message { + return m.CloneVT() } -func (this *TestAllTypesProto2) EqualVT(that *TestAllTypesProto2) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) CloneVT() *TestAllRequiredTypesProto2_MessageSetCorrectExtension2 { + if m == nil { + return (*TestAllRequiredTypesProto2_MessageSetCorrectExtension2)(nil) } - 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 - } + r := new(TestAllRequiredTypesProto2_MessageSetCorrectExtension2) + if rhs := m.I; rhs != nil { + tmpVal := *rhs + r.I = &tmpVal } - if p, q := this.OptionalInt32, that.OptionalInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - if p, q := this.OptionalInt64, that.OptionalInt64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + return r +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TestAllRequiredTypesProto2) CloneVT() *TestAllRequiredTypesProto2 { + if m == nil { + return (*TestAllRequiredTypesProto2)(nil) } - if p, q := this.OptionalUint32, that.OptionalUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + r := new(TestAllRequiredTypesProto2) + r.RequiredNestedMessage = m.RequiredNestedMessage.CloneVT() + r.RequiredForeignMessage = m.RequiredForeignMessage.CloneVT() + r.RecursiveMessage = m.RecursiveMessage.CloneVT() + r.OptionalRecursiveMessage = m.OptionalRecursiveMessage.CloneVT() + r.Data = m.Data.CloneVT() + if rhs := m.RequiredInt32; rhs != nil { + tmpVal := *rhs + r.RequiredInt32 = &tmpVal } - if p, q := this.OptionalUint64, that.OptionalUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredInt64; rhs != nil { + tmpVal := *rhs + r.RequiredInt64 = &tmpVal } - if p, q := this.OptionalSint32, that.OptionalSint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredUint32; rhs != nil { + tmpVal := *rhs + r.RequiredUint32 = &tmpVal } - if p, q := this.OptionalSint64, that.OptionalSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredUint64; rhs != nil { + tmpVal := *rhs + r.RequiredUint64 = &tmpVal } - if p, q := this.OptionalFixed32, that.OptionalFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredSint32; rhs != nil { + tmpVal := *rhs + r.RequiredSint32 = &tmpVal } - if p, q := this.OptionalFixed64, that.OptionalFixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredSint64; rhs != nil { + tmpVal := *rhs + r.RequiredSint64 = &tmpVal } - if p, q := this.OptionalSfixed32, that.OptionalSfixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredFixed32; rhs != nil { + tmpVal := *rhs + r.RequiredFixed32 = &tmpVal } - if p, q := this.OptionalSfixed64, that.OptionalSfixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredFixed64; rhs != nil { + tmpVal := *rhs + r.RequiredFixed64 = &tmpVal } - if p, q := this.OptionalFloat, that.OptionalFloat; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredSfixed32; rhs != nil { + tmpVal := *rhs + r.RequiredSfixed32 = &tmpVal } - if p, q := this.OptionalDouble, that.OptionalDouble; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredSfixed64; rhs != nil { + tmpVal := *rhs + r.RequiredSfixed64 = &tmpVal } - if p, q := this.OptionalBool, that.OptionalBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredFloat; rhs != nil { + tmpVal := *rhs + r.RequiredFloat = &tmpVal } - if p, q := this.OptionalString, that.OptionalString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredDouble; rhs != nil { + tmpVal := *rhs + r.RequiredDouble = &tmpVal } - if p, q := this.OptionalBytes, that.OptionalBytes; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { - return false + if rhs := m.RequiredBool; rhs != nil { + tmpVal := *rhs + r.RequiredBool = &tmpVal } - if !this.OptionalNestedMessage.EqualVT(that.OptionalNestedMessage) { - return false + if rhs := m.RequiredString; rhs != nil { + tmpVal := *rhs + r.RequiredString = &tmpVal } - if !this.OptionalForeignMessage.EqualVT(that.OptionalForeignMessage) { - return false + if rhs := m.RequiredBytes; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.RequiredBytes = tmpBytes } - if p, q := this.OptionalNestedEnum, that.OptionalNestedEnum; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredNestedEnum; rhs != nil { + tmpVal := *rhs + r.RequiredNestedEnum = &tmpVal } - 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 rhs := m.RequiredForeignEnum; rhs != nil { + tmpVal := *rhs + r.RequiredForeignEnum = &tmpVal } - if p, q := this.OptionalCord, that.OptionalCord; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + if rhs := m.RequiredStringPiece; rhs != nil { + tmpVal := *rhs + r.RequiredStringPiece = &tmpVal } - if !this.RecursiveMessage.EqualVT(that.RecursiveMessage) { - return false + if rhs := m.RequiredCord; rhs != nil { + tmpVal := *rhs + r.RequiredCord = &tmpVal } - if len(this.RepeatedInt32) != len(that.RepeatedInt32) { - return false + if rhs := m.DefaultInt32; rhs != nil { + tmpVal := *rhs + r.DefaultInt32 = &tmpVal } - for i, vx := range this.RepeatedInt32 { - vy := that.RepeatedInt32[i] - if vx != vy { - return false - } + if rhs := m.DefaultInt64; rhs != nil { + tmpVal := *rhs + r.DefaultInt64 = &tmpVal } - if len(this.RepeatedInt64) != len(that.RepeatedInt64) { - return false + if rhs := m.DefaultUint32; rhs != nil { + tmpVal := *rhs + r.DefaultUint32 = &tmpVal } - for i, vx := range this.RepeatedInt64 { - vy := that.RepeatedInt64[i] - if vx != vy { - return false - } + if rhs := m.DefaultUint64; rhs != nil { + tmpVal := *rhs + r.DefaultUint64 = &tmpVal } - if len(this.RepeatedUint32) != len(that.RepeatedUint32) { - return false + if rhs := m.DefaultSint32; rhs != nil { + tmpVal := *rhs + r.DefaultSint32 = &tmpVal } - for i, vx := range this.RepeatedUint32 { - vy := that.RepeatedUint32[i] - if vx != vy { - return false - } + if rhs := m.DefaultSint64; rhs != nil { + tmpVal := *rhs + r.DefaultSint64 = &tmpVal } - if len(this.RepeatedUint64) != len(that.RepeatedUint64) { - return false + if rhs := m.DefaultFixed32; rhs != nil { + tmpVal := *rhs + r.DefaultFixed32 = &tmpVal } - for i, vx := range this.RepeatedUint64 { - vy := that.RepeatedUint64[i] - if vx != vy { - return false - } + if rhs := m.DefaultFixed64; rhs != nil { + tmpVal := *rhs + r.DefaultFixed64 = &tmpVal } - if len(this.RepeatedSint32) != len(that.RepeatedSint32) { - return false + if rhs := m.DefaultSfixed32; rhs != nil { + tmpVal := *rhs + r.DefaultSfixed32 = &tmpVal } - for i, vx := range this.RepeatedSint32 { - vy := that.RepeatedSint32[i] - if vx != vy { - return false - } + if rhs := m.DefaultSfixed64; rhs != nil { + tmpVal := *rhs + r.DefaultSfixed64 = &tmpVal } - if len(this.RepeatedSint64) != len(that.RepeatedSint64) { - return false + if rhs := m.DefaultFloat; rhs != nil { + tmpVal := *rhs + r.DefaultFloat = &tmpVal } - for i, vx := range this.RepeatedSint64 { - vy := that.RepeatedSint64[i] - if vx != vy { - return false - } + if rhs := m.DefaultDouble; rhs != nil { + tmpVal := *rhs + r.DefaultDouble = &tmpVal } - if len(this.RepeatedFixed32) != len(that.RepeatedFixed32) { - return false + if rhs := m.DefaultBool; rhs != nil { + tmpVal := *rhs + r.DefaultBool = &tmpVal } - for i, vx := range this.RepeatedFixed32 { - vy := that.RepeatedFixed32[i] - if vx != vy { - return false - } + if rhs := m.DefaultString; rhs != nil { + tmpVal := *rhs + r.DefaultString = &tmpVal } - if len(this.RepeatedFixed64) != len(that.RepeatedFixed64) { - return false + if rhs := m.DefaultBytes; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.DefaultBytes = tmpBytes } - for i, vx := range this.RepeatedFixed64 { - vy := that.RepeatedFixed64[i] - if vx != vy { - return false - } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - if len(this.RepeatedSfixed32) != len(that.RepeatedSfixed32) { - return false + return r +} + +func (m *TestAllRequiredTypesProto2) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TestLargeOneof_A1) CloneVT() *TestLargeOneof_A1 { + if m == nil { + return (*TestLargeOneof_A1)(nil) } - for i, vx := range this.RepeatedSfixed32 { - vy := that.RepeatedSfixed32[i] - if vx != vy { - return false - } + r := new(TestLargeOneof_A1) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - if len(this.RepeatedSfixed64) != len(that.RepeatedSfixed64) { - return false + return r +} + +func (m *TestLargeOneof_A1) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TestLargeOneof_A2) CloneVT() *TestLargeOneof_A2 { + if m == nil { + return (*TestLargeOneof_A2)(nil) } - for i, vx := range this.RepeatedSfixed64 { - vy := that.RepeatedSfixed64[i] - if vx != vy { - return false - } + r := new(TestLargeOneof_A2) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - if len(this.RepeatedFloat) != len(that.RepeatedFloat) { - return false + return r +} + +func (m *TestLargeOneof_A2) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TestLargeOneof_A3) CloneVT() *TestLargeOneof_A3 { + if m == nil { + return (*TestLargeOneof_A3)(nil) } - for i, vx := range this.RepeatedFloat { - vy := that.RepeatedFloat[i] - if vx != vy { - return false - } + r := new(TestLargeOneof_A3) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - if len(this.RepeatedDouble) != len(that.RepeatedDouble) { - return false + return r +} + +func (m *TestLargeOneof_A3) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TestLargeOneof_A4) CloneVT() *TestLargeOneof_A4 { + if m == nil { + return (*TestLargeOneof_A4)(nil) } - for i, vx := range this.RepeatedDouble { - vy := that.RepeatedDouble[i] - if vx != vy { - return false - } + r := new(TestLargeOneof_A4) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - if len(this.RepeatedBool) != len(that.RepeatedBool) { - return false + return r +} + +func (m *TestLargeOneof_A4) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TestLargeOneof_A5) CloneVT() *TestLargeOneof_A5 { + if m == nil { + return (*TestLargeOneof_A5)(nil) } - for i, vx := range this.RepeatedBool { - vy := that.RepeatedBool[i] - if vx != vy { - return false - } + r := new(TestLargeOneof_A5) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - if len(this.RepeatedString) != len(that.RepeatedString) { - return false + return r +} + +func (m *TestLargeOneof_A5) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TestLargeOneof) CloneVT() *TestLargeOneof { + if m == nil { + return (*TestLargeOneof)(nil) } - for i, vx := range this.RepeatedString { - vy := that.RepeatedString[i] - if vx != vy { - return false - } + r := new(TestLargeOneof) + if m.LargeOneof != nil { + r.LargeOneof = m.LargeOneof.(interface { + CloneVT() isTestLargeOneof_LargeOneof + }).CloneVT() } - if len(this.RepeatedBytes) != len(that.RepeatedBytes) { - return false + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) } - for i, vx := range this.RepeatedBytes { - vy := that.RepeatedBytes[i] - if string(vx) != string(vy) { - return false - } + return r +} + +func (m *TestLargeOneof) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TestLargeOneof_A1_) CloneVT() isTestLargeOneof_LargeOneof { + if m == nil { + return (*TestLargeOneof_A1_)(nil) } - if len(this.RepeatedNestedMessage) != len(that.RepeatedNestedMessage) { - return false + r := new(TestLargeOneof_A1_) + r.A1 = m.A1.CloneVT() + return r +} + +func (m *TestLargeOneof_A2_) CloneVT() isTestLargeOneof_LargeOneof { + if m == nil { + return (*TestLargeOneof_A2_)(nil) } - 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 - } - } + r := new(TestLargeOneof_A2_) + r.A2 = m.A2.CloneVT() + return r +} + +func (m *TestLargeOneof_A3_) CloneVT() isTestLargeOneof_LargeOneof { + if m == nil { + return (*TestLargeOneof_A3_)(nil) } - if len(this.RepeatedForeignMessage) != len(that.RepeatedForeignMessage) { - return false + r := new(TestLargeOneof_A3_) + r.A3 = m.A3.CloneVT() + return r +} + +func (m *TestLargeOneof_A4_) CloneVT() isTestLargeOneof_LargeOneof { + if m == nil { + return (*TestLargeOneof_A4_)(nil) } - 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 - } - } + r := new(TestLargeOneof_A4_) + r.A4 = m.A4.CloneVT() + return r +} + +func (m *TestLargeOneof_A5_) CloneVT() isTestLargeOneof_LargeOneof { + if m == nil { + return (*TestLargeOneof_A5_)(nil) } - if len(this.RepeatedNestedEnum) != len(that.RepeatedNestedEnum) { + r := new(TestLargeOneof_A5_) + r.A5 = m.A5.CloneVT() + return r +} + +func (this *TestAllTypesProto2_NestedMessage) EqualVT(that *TestAllTypesProto2_NestedMessage) bool { + if this == that { + return true + } else if this == nil || that == nil { return false } - for i, vx := range this.RepeatedNestedEnum { - vy := that.RepeatedNestedEnum[i] - if vx != vy { - return false - } + if p, q := this.A, that.A; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.RepeatedForeignEnum) != len(that.RepeatedForeignEnum) { + if !this.Corecursive.EqualVT(that.Corecursive) { return false } - for i, vx := range this.RepeatedForeignEnum { - vy := that.RepeatedForeignEnum[i] - if vx != vy { - 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 } - if len(this.RepeatedStringPiece) != len(that.RepeatedStringPiece) { + 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 } - for i, vx := range this.RepeatedStringPiece { - vy := that.RepeatedStringPiece[i] - if vx != vy { - return false - } + if p, q := this.GroupInt32, that.GroupInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.RepeatedCord) != len(that.RepeatedCord) { + if p, q := this.GroupUint32, that.GroupUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.RepeatedCord { - vy := that.RepeatedCord[i] - if vx != vy { - 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 } - if len(this.MapInt32Int32) != len(that.MapInt32Int32) { + return this.EqualVT(that) +} +func (this *TestAllTypesProto2_MultiWordGroupField) EqualVT(that *TestAllTypesProto2_MultiWordGroupField) bool { + if this == that { + return true + } else if this == nil || that == nil { return false } - for i, vx := range this.MapInt32Int32 { - vy, ok := that.MapInt32Int32[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.GroupInt32, that.GroupInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapInt64Int64) != len(that.MapInt64Int64) { + if p, q := this.GroupUint32, that.GroupUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapInt64Int64 { - vy, ok := that.MapInt64Int64[i] - if !ok { - return false - } - if vx != vy { - return false - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestAllTypesProto2_MultiWordGroupField) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestAllTypesProto2_MultiWordGroupField) + if !ok { + return false } - if len(this.MapUint32Uint32) != len(that.MapUint32Uint32) { + 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 } - for i, vx := range this.MapUint32Uint32 { - vy, ok := that.MapUint32Uint32[i] - if !ok { - return false - } - if vx != vy { - 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 } - if len(this.MapUint64Uint64) != len(that.MapUint64Uint64) { + 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 } - for i, vx := range this.MapUint64Uint64 { - vy, ok := that.MapUint64Uint64[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.Str, that.Str; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapSint32Sint32) != len(that.MapSint32Sint32) { + 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 } - for i, vx := range this.MapSint32Sint32 { - vy, ok := that.MapSint32Sint32[i] - if !ok { - return false - } - if vx != vy { - 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 len(this.MapSint64Sint64) != len(that.MapSint64Sint64) { + if p, q := this.I, that.I; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapSint64Sint64 { - vy, ok := that.MapSint64Sint64[i] - if !ok { - return false - } - if vx != vy { - 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 } - if len(this.MapFixed32Fixed32) != len(that.MapFixed32Fixed32) { + return this.EqualVT(that) +} +func (this *TestAllTypesProto2) EqualVT(that *TestAllTypesProto2) bool { + if this == that { + return true + } else if this == nil || that == nil { return false } - for i, vx := range this.MapFixed32Fixed32 { - vy, ok := that.MapFixed32Fixed32[i] - if !ok { + if this.OneofField == nil && that.OneofField != nil { + return false + } else if this.OneofField != nil { + if that.OneofField == nil { return false } - if vx != vy { + if !this.OneofField.(interface { + EqualVT(isTestAllTypesProto2_OneofField) bool + }).EqualVT(that.OneofField) { return false } } - if len(this.MapFixed64Fixed64) != len(that.MapFixed64Fixed64) { + if p, q := this.OptionalInt32, that.OptionalInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { 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) { + if p, q := this.OptionalInt64, that.OptionalInt64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapSfixed32Sfixed32 { - vy, ok := that.MapSfixed32Sfixed32[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.OptionalUint32, that.OptionalUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapSfixed64Sfixed64) != len(that.MapSfixed64Sfixed64) { + if p, q := this.OptionalUint64, that.OptionalUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapSfixed64Sfixed64 { - vy, ok := that.MapSfixed64Sfixed64[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.OptionalSint32, that.OptionalSint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapInt32Float) != len(that.MapInt32Float) { + if p, q := this.OptionalSint64, that.OptionalSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapInt32Float { - vy, ok := that.MapInt32Float[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.OptionalFixed32, that.OptionalFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapInt32Double) != len(that.MapInt32Double) { + if p, q := this.OptionalFixed64, that.OptionalFixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapInt32Double { - vy, ok := that.MapInt32Double[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.OptionalSfixed32, that.OptionalSfixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapBoolBool) != len(that.MapBoolBool) { + if p, q := this.OptionalSfixed64, that.OptionalSfixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapBoolBool { - vy, ok := that.MapBoolBool[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.OptionalFloat, that.OptionalFloat; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapStringString) != len(that.MapStringString) { + if p, q := this.OptionalDouble, that.OptionalDouble; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapStringString { - vy, ok := that.MapStringString[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.OptionalBool, that.OptionalBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapStringBytes) != len(that.MapStringBytes) { + if p, q := this.OptionalString, that.OptionalString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { 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 p, q := this.OptionalBytes, that.OptionalBytes; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { + return false } - if len(this.MapStringNestedMessage) != len(that.MapStringNestedMessage) { + if !this.OptionalNestedMessage.EqualVT(that.OptionalNestedMessage) { 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 !this.OptionalForeignMessage.EqualVT(that.OptionalForeignMessage) { + return false } - if len(this.MapStringForeignMessage) != len(that.MapStringForeignMessage) { + if p, q := this.OptionalNestedEnum, that.OptionalNestedEnum; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { 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 p, q := this.OptionalForeignEnum, that.OptionalForeignEnum; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapStringNestedEnum) != len(that.MapStringNestedEnum) { + if p, q := this.OptionalStringPiece, that.OptionalStringPiece; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.MapStringNestedEnum { - vy, ok := that.MapStringNestedEnum[i] - if !ok { - return false - } - if vx != vy { - return false - } + if p, q := this.OptionalCord, that.OptionalCord; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if len(this.MapStringForeignEnum) != len(that.MapStringForeignEnum) { + if !this.RecursiveMessage.EqualVT(that.RecursiveMessage) { return false } - for i, vx := range this.MapStringForeignEnum { - vy, ok := that.MapStringForeignEnum[i] - if !ok { - 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.PackedInt32) != len(that.PackedInt32) { + if len(this.RepeatedInt64) != len(that.RepeatedInt64) { return false } - for i, vx := range this.PackedInt32 { - vy := that.PackedInt32[i] + for i, vx := range this.RepeatedInt64 { + vy := that.RepeatedInt64[i] if vx != vy { return false } } - if len(this.PackedInt64) != len(that.PackedInt64) { + if len(this.RepeatedUint32) != len(that.RepeatedUint32) { return false } - for i, vx := range this.PackedInt64 { - vy := that.PackedInt64[i] + for i, vx := range this.RepeatedUint32 { + vy := that.RepeatedUint32[i] if vx != vy { return false } } - if len(this.PackedUint32) != len(that.PackedUint32) { + if len(this.RepeatedUint64) != len(that.RepeatedUint64) { return false } - for i, vx := range this.PackedUint32 { - vy := that.PackedUint32[i] + for i, vx := range this.RepeatedUint64 { + vy := that.RepeatedUint64[i] if vx != vy { return false } } - if len(this.PackedUint64) != len(that.PackedUint64) { + if len(this.RepeatedSint32) != len(that.RepeatedSint32) { return false } - for i, vx := range this.PackedUint64 { - vy := that.PackedUint64[i] + for i, vx := range this.RepeatedSint32 { + vy := that.RepeatedSint32[i] if vx != vy { return false } } - if len(this.PackedSint32) != len(that.PackedSint32) { + if len(this.RepeatedSint64) != len(that.RepeatedSint64) { return false } - for i, vx := range this.PackedSint32 { - vy := that.PackedSint32[i] + for i, vx := range this.RepeatedSint64 { + vy := that.RepeatedSint64[i] if vx != vy { return false } } - if len(this.PackedSint64) != len(that.PackedSint64) { + if len(this.RepeatedFixed32) != len(that.RepeatedFixed32) { return false } - for i, vx := range this.PackedSint64 { - vy := that.PackedSint64[i] + for i, vx := range this.RepeatedFixed32 { + vy := that.RepeatedFixed32[i] if vx != vy { return false } } - if len(this.PackedFixed32) != len(that.PackedFixed32) { + if len(this.RepeatedFixed64) != len(that.RepeatedFixed64) { return false } - for i, vx := range this.PackedFixed32 { - vy := that.PackedFixed32[i] + for i, vx := range this.RepeatedFixed64 { + vy := that.RepeatedFixed64[i] if vx != vy { return false } } - if len(this.PackedFixed64) != len(that.PackedFixed64) { + if len(this.RepeatedSfixed32) != len(that.RepeatedSfixed32) { return false } - for i, vx := range this.PackedFixed64 { - vy := that.PackedFixed64[i] + for i, vx := range this.RepeatedSfixed32 { + vy := that.RepeatedSfixed32[i] if vx != vy { return false } } - if len(this.PackedSfixed32) != len(that.PackedSfixed32) { + if len(this.RepeatedSfixed64) != len(that.RepeatedSfixed64) { return false } - for i, vx := range this.PackedSfixed32 { - vy := that.PackedSfixed32[i] + for i, vx := range this.RepeatedSfixed64 { + vy := that.RepeatedSfixed64[i] if vx != vy { return false } } - if len(this.PackedSfixed64) != len(that.PackedSfixed64) { + if len(this.RepeatedFloat) != len(that.RepeatedFloat) { return false } - for i, vx := range this.PackedSfixed64 { - vy := that.PackedSfixed64[i] + for i, vx := range this.RepeatedFloat { + vy := that.RepeatedFloat[i] if vx != vy { return false } } - if len(this.PackedFloat) != len(that.PackedFloat) { + if len(this.RepeatedDouble) != len(that.RepeatedDouble) { return false } - for i, vx := range this.PackedFloat { - vy := that.PackedFloat[i] + for i, vx := range this.RepeatedDouble { + vy := that.RepeatedDouble[i] if vx != vy { return false } } - if len(this.PackedDouble) != len(that.PackedDouble) { + if len(this.RepeatedBool) != len(that.RepeatedBool) { return false } - for i, vx := range this.PackedDouble { - vy := that.PackedDouble[i] + for i, vx := range this.RepeatedBool { + vy := that.RepeatedBool[i] if vx != vy { return false } } - if len(this.PackedBool) != len(that.PackedBool) { + if len(this.RepeatedString) != len(that.RepeatedString) { return false } - for i, vx := range this.PackedBool { - vy := that.PackedBool[i] + for i, vx := range this.RepeatedString { + vy := that.RepeatedString[i] if vx != vy { return false } } - if len(this.PackedNestedEnum) != len(that.PackedNestedEnum) { + if len(this.RepeatedBytes) != len(that.RepeatedBytes) { return false } - for i, vx := range this.PackedNestedEnum { - vy := that.PackedNestedEnum[i] - if vx != vy { + for i, vx := range this.RepeatedBytes { + vy := that.RepeatedBytes[i] + if string(vx) != string(vy) { return false } } - if len(this.UnpackedInt32) != len(that.UnpackedInt32) { + if len(this.RepeatedNestedMessage) != len(that.RepeatedNestedMessage) { return false } - for i, vx := range this.UnpackedInt32 { - vy := that.UnpackedInt32[i] - if vx != vy { - 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.UnpackedInt64) != len(that.UnpackedInt64) { + if len(this.RepeatedForeignMessage) != len(that.RepeatedForeignMessage) { return false } - for i, vx := range this.UnpackedInt64 { - vy := that.UnpackedInt64[i] - if vx != vy { - 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.UnpackedUint32) != len(that.UnpackedUint32) { + if len(this.RepeatedNestedEnum) != len(that.RepeatedNestedEnum) { return false } - for i, vx := range this.UnpackedUint32 { - vy := that.UnpackedUint32[i] + for i, vx := range this.RepeatedNestedEnum { + vy := that.RepeatedNestedEnum[i] if vx != vy { return false } } - if len(this.UnpackedUint64) != len(that.UnpackedUint64) { + if len(this.RepeatedForeignEnum) != len(that.RepeatedForeignEnum) { return false } - for i, vx := range this.UnpackedUint64 { - vy := that.UnpackedUint64[i] + for i, vx := range this.RepeatedForeignEnum { + vy := that.RepeatedForeignEnum[i] if vx != vy { return false } } - if len(this.UnpackedSint32) != len(that.UnpackedSint32) { + if len(this.RepeatedStringPiece) != len(that.RepeatedStringPiece) { return false } - for i, vx := range this.UnpackedSint32 { - vy := that.UnpackedSint32[i] + for i, vx := range this.RepeatedStringPiece { + vy := that.RepeatedStringPiece[i] if vx != vy { return false } } - if len(this.UnpackedSint64) != len(that.UnpackedSint64) { + if len(this.RepeatedCord) != len(that.RepeatedCord) { return false } - for i, vx := range this.UnpackedSint64 { - vy := that.UnpackedSint64[i] + for i, vx := range this.RepeatedCord { + vy := that.RepeatedCord[i] if vx != vy { return false } } - if len(this.UnpackedFixed32) != len(that.UnpackedFixed32) { + if len(this.MapInt32Int32) != len(that.MapInt32Int32) { return false } - for i, vx := range this.UnpackedFixed32 { - vy := that.UnpackedFixed32[i] + for i, vx := range this.MapInt32Int32 { + vy, ok := that.MapInt32Int32[i] + if !ok { + return false + } if vx != vy { return false } } - if len(this.UnpackedFixed64) != len(that.UnpackedFixed64) { + if len(this.MapInt64Int64) != len(that.MapInt64Int64) { return false } - for i, vx := range this.UnpackedFixed64 { - vy := that.UnpackedFixed64[i] + for i, vx := range this.MapInt64Int64 { + vy, ok := that.MapInt64Int64[i] + if !ok { + return false + } if vx != vy { return false } } - if len(this.UnpackedSfixed32) != len(that.UnpackedSfixed32) { + if len(this.MapUint32Uint32) != len(that.MapUint32Uint32) { return false } - for i, vx := range this.UnpackedSfixed32 { - vy := that.UnpackedSfixed32[i] + for i, vx := range this.MapUint32Uint32 { + vy, ok := that.MapUint32Uint32[i] + if !ok { + return false + } if vx != vy { return false } } - if len(this.UnpackedSfixed64) != len(that.UnpackedSfixed64) { + if len(this.MapUint64Uint64) != len(that.MapUint64Uint64) { return false } - for i, vx := range this.UnpackedSfixed64 { - vy := that.UnpackedSfixed64[i] + for i, vx := range this.MapUint64Uint64 { + vy, ok := that.MapUint64Uint64[i] + if !ok { + return false + } if vx != vy { return false } } - if len(this.UnpackedFloat) != len(that.UnpackedFloat) { + if len(this.MapSint32Sint32) != len(that.MapSint32Sint32) { return false } - for i, vx := range this.UnpackedFloat { - vy := that.UnpackedFloat[i] + for i, vx := range this.MapSint32Sint32 { + vy, ok := that.MapSint32Sint32[i] + if !ok { + return false + } if vx != vy { return false } } - if len(this.UnpackedDouble) != len(that.UnpackedDouble) { + if len(this.MapSint64Sint64) != len(that.MapSint64Sint64) { return false } - for i, vx := range this.UnpackedDouble { - vy := that.UnpackedDouble[i] + for i, vx := range this.MapSint64Sint64 { + vy, ok := that.MapSint64Sint64[i] + if !ok { + return false + } if vx != vy { return false } } - if len(this.UnpackedBool) != len(that.UnpackedBool) { + if len(this.MapFixed32Fixed32) != len(that.MapFixed32Fixed32) { return false } - for i, vx := range this.UnpackedBool { - vy := that.UnpackedBool[i] + for i, vx := range this.MapFixed32Fixed32 { + vy, ok := that.MapFixed32Fixed32[i] + if !ok { + return false + } if vx != vy { return false } } - if len(this.UnpackedNestedEnum) != len(that.UnpackedNestedEnum) { + if len(this.MapFixed64Fixed64) != len(that.MapFixed64Fixed64) { return false } - for i, vx := range this.UnpackedNestedEnum { - vy := that.UnpackedNestedEnum[i] + for i, vx := range this.MapFixed64Fixed64 { + vy, ok := that.MapFixed64Fixed64[i] + if !ok { + return false + } if vx != vy { return false } } - if !this.Data.EqualVT(that.Data) { + if len(this.MapSfixed32Sfixed32) != len(that.MapSfixed32Sfixed32) { return false } - if p, q := this.DefaultInt32, that.DefaultInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.MapSfixed32Sfixed32 { + vy, ok := that.MapSfixed32Sfixed32[i] + if !ok { + return false + } + if vx != vy { + return false + } } - if p, q := this.DefaultInt64, that.DefaultInt64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapSfixed64Sfixed64) != len(that.MapSfixed64Sfixed64) { return false } - if p, q := this.DefaultUint32, that.DefaultUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.MapSfixed64Sfixed64 { + vy, ok := that.MapSfixed64Sfixed64[i] + if !ok { + return false + } + if vx != vy { + return false + } } - if p, q := this.DefaultUint64, that.DefaultUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapInt32Float) != len(that.MapInt32Float) { return false } - if p, q := this.DefaultSint32, that.DefaultSint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.MapInt32Float { + vy, ok := that.MapInt32Float[i] + if !ok { + return false + } + if vx != vy { + return false + } } - if p, q := this.DefaultSint64, that.DefaultSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapInt32Double) != len(that.MapInt32Double) { return false } - if p, q := this.DefaultFixed32, that.DefaultFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.MapInt32Double { + vy, ok := that.MapInt32Double[i] + if !ok { + return false + } + if vx != vy { + return false + } } - if p, q := this.DefaultFixed64, that.DefaultFixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapBoolBool) != len(that.MapBoolBool) { return false } - if p, q := this.DefaultSfixed32, that.DefaultSfixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.MapBoolBool { + vy, ok := that.MapBoolBool[i] + if !ok { + return false + } + if vx != vy { + return false + } } - if p, q := this.DefaultSfixed64, that.DefaultSfixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapStringString) != len(that.MapStringString) { return false } - if p, q := this.DefaultFloat, that.DefaultFloat; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.MapStringString { + vy, ok := that.MapStringString[i] + if !ok { + return false + } + if vx != vy { + return false + } } - if p, q := this.DefaultDouble, that.DefaultDouble; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapStringBytes) != len(that.MapStringBytes) { return false } - if p, q := this.DefaultBool, that.DefaultBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - 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 p, q := this.DefaultString, that.DefaultString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapStringNestedMessage) != len(that.MapStringNestedMessage) { return false } - if p, q := this.DefaultBytes, that.DefaultBytes; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { - 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 p, q := this.Fieldname1, that.Fieldname1; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapStringForeignMessage) != len(that.MapStringForeignMessage) { return false } - if p, q := this.FieldName2, that.FieldName2; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - 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 p, q := this.XFieldName3, that.XFieldName3; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapStringNestedEnum) != len(that.MapStringNestedEnum) { return false } - if p, q := this.Field_Name4_, that.Field_Name4_; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.MapStringNestedEnum { + vy, ok := that.MapStringNestedEnum[i] + if !ok { + return false + } + if vx != vy { + return false + } } - if p, q := this.Field0Name5, that.Field0Name5; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.MapStringForeignEnum) != len(that.MapStringForeignEnum) { return false } - if p, q := this.Field_0Name6, that.Field_0Name6; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.MapStringForeignEnum { + vy, ok := that.MapStringForeignEnum[i] + if !ok { + return false + } + if vx != vy { + return false + } } - if p, q := this.FieldName7, that.FieldName7; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.PackedInt32) != len(that.PackedInt32) { return false } - if p, q := this.FieldName8, that.FieldName8; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.PackedInt32 { + vy := that.PackedInt32[i] + if vx != vy { + return false + } } - if p, q := this.Field_Name9, that.Field_Name9; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.PackedInt64) != len(that.PackedInt64) { return false } - if p, q := this.Field_Name10, that.Field_Name10; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.PackedInt64 { + vy := that.PackedInt64[i] + if vx != vy { + return false + } } - if p, q := this.FIELD_NAME11, that.FIELD_NAME11; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.PackedUint32) != len(that.PackedUint32) { return false } - if p, q := this.FIELDName12, that.FIELDName12; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.PackedUint32 { + vy := that.PackedUint32[i] + if vx != vy { + return false + } } - if p, q := this.XFieldName13, that.XFieldName13; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.PackedUint64) != len(that.PackedUint64) { return false } - if p, q := this.X_FieldName14, that.X_FieldName14; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.PackedUint64 { + vy := that.PackedUint64[i] + if vx != vy { + return false + } } - if p, q := this.Field_Name15, that.Field_Name15; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.PackedSint32) != len(that.PackedSint32) { return false } - if p, q := this.Field__Name16, that.Field__Name16; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.PackedSint32 { + vy := that.PackedSint32[i] + if vx != vy { + return false + } } - if p, q := this.FieldName17__, that.FieldName17__; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if len(this.PackedSint64) != len(that.PackedSint64) { return false } - if p, q := this.FieldName18__, that.FieldName18__; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.PackedSint64 { + vy := that.PackedSint64[i] + if vx != vy { + return false + } } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *TestAllTypesProto2) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*TestAllTypesProto2) - if !ok { + if len(this.PackedFixed32) != len(that.PackedFixed32) { return false } - return this.EqualVT(that) -} -func (this *TestAllTypesProto2_OneofUint32) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofUint32) - if !ok { + for i, vx := range this.PackedFixed32 { + vy := that.PackedFixed32[i] + if vx != vy { + return false + } + } + if len(this.PackedFixed64) != len(that.PackedFixed64) { return false } - if this == that { - return true + for i, vx := range this.PackedFixed64 { + vy := that.PackedFixed64[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.PackedSfixed32) != len(that.PackedSfixed32) { return false } - if this.OneofUint32 != that.OneofUint32 { - return false + for i, vx := range this.PackedSfixed32 { + vy := that.PackedSfixed32[i] + if vx != vy { + return false + } } - return true -} - -func (this *TestAllTypesProto2_OneofNestedMessage) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofNestedMessage) - if !ok { + if len(this.PackedSfixed64) != len(that.PackedSfixed64) { return false } - if this == that { - return true + for i, vx := range this.PackedSfixed64 { + vy := that.PackedSfixed64[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.PackedFloat) != len(that.PackedFloat) { 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) { + for i, vx := range this.PackedFloat { + vy := that.PackedFloat[i] + if vx != vy { return false } } - return true -} - -func (this *TestAllTypesProto2_OneofString) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofString) - if !ok { + if len(this.PackedDouble) != len(that.PackedDouble) { return false } - if this == that { - return true + for i, vx := range this.PackedDouble { + vy := that.PackedDouble[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.PackedBool) != len(that.PackedBool) { return false } - if this.OneofString != that.OneofString { - return false + for i, vx := range this.PackedBool { + vy := that.PackedBool[i] + if vx != vy { + return false + } } - return true -} - -func (this *TestAllTypesProto2_OneofBytes) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofBytes) - if !ok { + if len(this.PackedNestedEnum) != len(that.PackedNestedEnum) { return false } - if this == that { - return true + for i, vx := range this.PackedNestedEnum { + vy := that.PackedNestedEnum[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.UnpackedInt32) != len(that.UnpackedInt32) { return false } - if string(this.OneofBytes) != string(that.OneofBytes) { - return false + for i, vx := range this.UnpackedInt32 { + vy := that.UnpackedInt32[i] + if vx != vy { + return false + } } - return true -} - -func (this *TestAllTypesProto2_OneofBool) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofBool) - if !ok { + if len(this.UnpackedInt64) != len(that.UnpackedInt64) { return false } - if this == that { - return true + for i, vx := range this.UnpackedInt64 { + vy := that.UnpackedInt64[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.UnpackedUint32) != len(that.UnpackedUint32) { return false } - if this.OneofBool != that.OneofBool { - return false + for i, vx := range this.UnpackedUint32 { + vy := that.UnpackedUint32[i] + if vx != vy { + return false + } } - return true -} - -func (this *TestAllTypesProto2_OneofUint64) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofUint64) - if !ok { + if len(this.UnpackedUint64) != len(that.UnpackedUint64) { return false } - if this == that { - return true + for i, vx := range this.UnpackedUint64 { + vy := that.UnpackedUint64[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.UnpackedSint32) != len(that.UnpackedSint32) { return false } - if this.OneofUint64 != that.OneofUint64 { - return false + for i, vx := range this.UnpackedSint32 { + vy := that.UnpackedSint32[i] + if vx != vy { + return false + } } - return true -} - -func (this *TestAllTypesProto2_OneofFloat) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofFloat) - if !ok { + if len(this.UnpackedSint64) != len(that.UnpackedSint64) { return false } - if this == that { - return true + for i, vx := range this.UnpackedSint64 { + vy := that.UnpackedSint64[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.UnpackedFixed32) != len(that.UnpackedFixed32) { return false } - if this.OneofFloat != that.OneofFloat { - return false + for i, vx := range this.UnpackedFixed32 { + vy := that.UnpackedFixed32[i] + if vx != vy { + return false + } } - return true -} - -func (this *TestAllTypesProto2_OneofDouble) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofDouble) - if !ok { + if len(this.UnpackedFixed64) != len(that.UnpackedFixed64) { return false } - if this == that { - return true + for i, vx := range this.UnpackedFixed64 { + vy := that.UnpackedFixed64[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.UnpackedSfixed32) != len(that.UnpackedSfixed32) { return false } - if this.OneofDouble != that.OneofDouble { - return false + for i, vx := range this.UnpackedSfixed32 { + vy := that.UnpackedSfixed32[i] + if vx != vy { + return false + } } - return true -} - -func (this *TestAllTypesProto2_OneofEnum) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { - that, ok := thatIface.(*TestAllTypesProto2_OneofEnum) - if !ok { + if len(this.UnpackedSfixed64) != len(that.UnpackedSfixed64) { return false } - if this == that { - return true + for i, vx := range this.UnpackedSfixed64 { + vy := that.UnpackedSfixed64[i] + if vx != vy { + return false + } } - if this == nil && that != nil || this != nil && that == nil { + if len(this.UnpackedFloat) != len(that.UnpackedFloat) { return false } - if this.OneofEnum != that.OneofEnum { - return false + for i, vx := range this.UnpackedFloat { + vy := that.UnpackedFloat[i] + if vx != vy { + return false + } } - return true -} - -func (this *ForeignMessageProto2) EqualVT(that *ForeignMessageProto2) bool { - if this == that { - return true - } else if this == nil || that == nil { + if len(this.UnpackedDouble) != len(that.UnpackedDouble) { return false } - if p, q := this.C, that.C; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { - return false + for i, vx := range this.UnpackedDouble { + vy := that.UnpackedDouble[i] + if vx != vy { + return false + } } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ForeignMessageProto2) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ForeignMessageProto2) - if !ok { + if len(this.UnpackedBool) != len(that.UnpackedBool) { 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 { + for i, vx := range this.UnpackedBool { + vy := that.UnpackedBool[i] + if vx != vy { + return false + } + } + if len(this.UnpackedNestedEnum) != len(that.UnpackedNestedEnum) { return false } - if p, q := this.A, that.A; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + for i, vx := range this.UnpackedNestedEnum { + vy := that.UnpackedNestedEnum[i] + if vx != vy { + return false + } + } + if !this.Data.EqualVT(that.Data) { 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 { + if !this.Multiwordgroupfield.EqualVT(that.Multiwordgroupfield) { return false } - return this.EqualVT(that) -} -func (this *UnknownToTestAllTypes) EqualVT(that *UnknownToTestAllTypes) bool { - if this == that { - return true - } else if this == nil || that == nil { + if p, q := this.DefaultInt32, that.DefaultInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - if p, q := this.OptionalInt32, that.OptionalInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if p, q := this.DefaultInt64, that.DefaultInt64; (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)) { + if p, q := this.DefaultUint32, that.DefaultUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - if !this.NestedMessage.EqualVT(that.NestedMessage) { + if p, q := this.DefaultUint64, that.DefaultUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - if !this.Optionalgroup.EqualVT(that.Optionalgroup) { + if p, q := this.DefaultSint32, that.DefaultSint32; (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)) { + if p, q := this.DefaultSint64, that.DefaultSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - if len(this.RepeatedInt32) != len(that.RepeatedInt32) { + if p, q := this.DefaultFixed32, that.DefaultFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { return false } - for i, vx := range this.RepeatedInt32 { - vy := that.RepeatedInt32[i] - if vx != vy { - 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 *UnknownToTestAllTypes) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*UnknownToTestAllTypes) +func (this *TestAllTypesProto2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestAllTypesProto2) if !ok { return false } return this.EqualVT(that) } -func (this *NullHypothesisProto2) EqualVT(that *NullHypothesisProto2) bool { +func (this *TestAllTypesProto2_OneofUint32) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofUint32) + if !ok { + return false + } if this == that { return true - } else if this == nil || that == nil { + } + if this == nil && that != nil || this != nil && that == nil { return false } - return string(this.unknownFields) == string(that.unknownFields) + if this.OneofUint32 != that.OneofUint32 { + return false + } + return true } -func (this *NullHypothesisProto2) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*NullHypothesisProto2) +func (this *TestAllTypesProto2_OneofNestedMessage) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofNestedMessage) 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 { + } + if this == nil && that != nil || this != nil && that == nil { return false } - return string(this.unknownFields) == string(that.unknownFields) + 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 *EnumOnlyProto2) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*EnumOnlyProto2) +func (this *TestAllTypesProto2_OneofString) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofString) 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 { + } + if this == nil && that != nil || this != nil && that == nil { return false } - if p, q := this.Data, that.Data; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + if this.OneofString != that.OneofString { return false } - return string(this.unknownFields) == string(that.unknownFields) + return true } -func (this *OneStringProto2) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*OneStringProto2) +func (this *TestAllTypesProto2_OneofBytes) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofBytes) if !ok { return false } - return this.EqualVT(that) -} -func (m *TestAllTypesProto2_NestedMessage) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if this == that { + return true } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if this == nil && that != nil || this != nil && that == nil { + return false } - return dAtA[:n], nil -} - -func (m *TestAllTypesProto2_NestedMessage) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + if string(this.OneofBytes) != string(that.OneofBytes) { + return false + } + return true } -func (m *TestAllTypesProto2_NestedMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +func (this *TestAllTypesProto2_OneofBool) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofBool) + if !ok { + return false } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if this == that { + return true } - 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 this == nil && that != nil || this != nil && that == nil { + return false } - if m.A != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) - i-- - dAtA[i] = 0x8 + if this.OneofBool != that.OneofBool { + return false } - return len(dAtA) - i, nil + return true } -func (m *TestAllTypesProto2_Data) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil +func (this *TestAllTypesProto2_OneofUint64) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofUint64) + if !ok { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if this == that { + return true } - return dAtA[:n], nil -} - -func (m *TestAllTypesProto2_Data) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.OneofUint64 != that.OneofUint64 { + return false + } + return true } -func (m *TestAllTypesProto2_Data) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +func (this *TestAllTypesProto2_OneofFloat) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofFloat) + if !ok { + return false } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if this == that { + return true } - if m.GroupUint32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) - i-- - dAtA[i] = 0xc - i-- - dAtA[i] = 0xd8 + if this == nil && that != nil || this != nil && that == nil { + return false } - if m.GroupInt32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) - i-- - dAtA[i] = 0xc - i-- - dAtA[i] = 0xd0 + if this.OneofFloat != that.OneofFloat { + return false } - return len(dAtA) - i, nil + return true } -func (m *TestAllTypesProto2_MessageSetCorrect) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil +func (this *TestAllTypesProto2_OneofDouble) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofDouble) + if !ok { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if this == that { + return true } - 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 + if this == nil && that != nil || this != nil && that == nil { + return false } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if this.OneofDouble != that.OneofDouble { + return false } - return len(dAtA) - i, nil + return true } -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 +func (this *TestAllTypesProto2_OneofEnum) EqualVT(thatIface isTestAllTypesProto2_OneofField) bool { + that, ok := thatIface.(*TestAllTypesProto2_OneofEnum) + if !ok { + return false } - 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 + if this == that { + return true } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if this == nil && that != nil || this != nil && that == nil { + return false } - 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 + if this.OneofEnum != that.OneofEnum { + return false } - return len(dAtA) - i, nil + return true } -func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil +func (this *ForeignMessageProto2) EqualVT(that *ForeignMessageProto2) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if p, q := this.C, that.C; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - return dAtA[:n], nil + return string(this.unknownFields) == string(that.unknownFields) } -func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +func (this *ForeignMessageProto2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ForeignMessageProto2) + if !ok { + return false + } + return this.EqualVT(that) } - -func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +func (this *GroupField) EqualVT(that *GroupField) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if p, q := this.GroupInt32, that.GroupInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if m.I != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.I)) - i-- - dAtA[i] = 0x48 + if p, q := this.GroupUint32, that.GroupUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - return len(dAtA) - i, nil + return string(this.unknownFields) == string(that.unknownFields) } -func (m *TestAllTypesProto2) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil +func (this *GroupField) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GroupField) + if !ok { + return false } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + 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 } - return dAtA[:n], nil + 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 (m *TestAllTypesProto2) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +func (this *UnknownToTestAllTypes_OptionalGroup) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*UnknownToTestAllTypes_OptionalGroup) + if !ok { + return false + } + return this.EqualVT(that) } - -func (m *TestAllTypesProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +func (this *UnknownToTestAllTypes) EqualVT(that *UnknownToTestAllTypes) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if p, q := this.OptionalInt32, that.OptionalInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.OptionalString, that.OptionalString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if m.FieldName18__ != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName18__)) - i-- - dAtA[i] = 0x1a - i-- - dAtA[i] = 0x90 + if !this.NestedMessage.EqualVT(that.NestedMessage) { + return false } - if m.FieldName17__ != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName17__)) - i-- - dAtA[i] = 0x1a - i-- - dAtA[i] = 0x88 + if !this.Optionalgroup.EqualVT(that.Optionalgroup) { + return false } - if m.Field__Name16 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field__Name16)) - i-- - dAtA[i] = 0x1a - i-- - dAtA[i] = 0x80 + if p, q := this.OptionalBool, that.OptionalBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if m.Field_Name15 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name15)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xf8 + if len(this.RepeatedInt32) != len(that.RepeatedInt32) { + return false } - if m.X_FieldName14 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.X_FieldName14)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xf0 + for i, vx := range this.RepeatedInt32 { + vy := that.RepeatedInt32[i] + if vx != vy { + return false + } } - if m.XFieldName13 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName13)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xe8 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *UnknownToTestAllTypes) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*UnknownToTestAllTypes) + if !ok { + return false } - if m.FIELDName12 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELDName12)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xe0 + return this.EqualVT(that) +} +func (this *NullHypothesisProto2) EqualVT(that *NullHypothesisProto2) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - if m.FIELD_NAME11 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELD_NAME11)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xd8 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *NullHypothesisProto2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*NullHypothesisProto2) + if !ok { + return false } - if m.Field_Name10 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name10)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xd0 + return this.EqualVT(that) +} +func (this *EnumOnlyProto2) EqualVT(that *EnumOnlyProto2) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - if m.Field_Name9 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name9)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xc8 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *EnumOnlyProto2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*EnumOnlyProto2) + if !ok { + return false } - if m.FieldName8 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName8)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xc0 + 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 m.FieldName7 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName7)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xb8 + if p, q := this.Data, that.Data; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if m.Field_0Name6 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_0Name6)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xb0 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *OneStringProto2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*OneStringProto2) + if !ok { + return false } - if m.Field0Name5 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field0Name5)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xa8 + return this.EqualVT(that) +} +func (this *ProtoWithKeywords) EqualVT(that *ProtoWithKeywords) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - if m.Field_Name4_ != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name4_)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xa0 + if p, q := this.Inline, that.Inline; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if m.XFieldName3 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName3)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0x98 + if p, q := this.Concept, that.Concept; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if m.FieldName2 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName2)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0x90 + if len(this.Requires) != len(that.Requires) { + return false } - if m.Fieldname1 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Fieldname1)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0x88 + for i, vx := range this.Requires { + vy := that.Requires[i] + if vx != vy { + return false + } } - 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 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ProtoWithKeywords) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ProtoWithKeywords) + if !ok { + return false } - 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 + return this.EqualVT(that) +} +func (this *TestAllRequiredTypesProto2_NestedMessage) EqualVT(that *TestAllRequiredTypesProto2_NestedMessage) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - if m.DefaultBool != nil { - i-- - if *m.DefaultBool { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0xe8 + if p, q := this.A, that.A; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 !this.Corecursive.EqualVT(that.Corecursive) { + return false } - 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 !this.OptionalCorecursive.EqualVT(that.OptionalCorecursive) { + return false } - if m.DefaultSfixed64 != nil { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultSfixed64)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0xd1 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestAllRequiredTypesProto2_NestedMessage) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestAllRequiredTypesProto2_NestedMessage) + if !ok { + return false } - if m.DefaultSfixed32 != nil { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultSfixed32)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0xcd + return this.EqualVT(that) +} +func (this *TestAllRequiredTypesProto2_Data) EqualVT(that *TestAllRequiredTypesProto2_Data) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - if m.DefaultFixed64 != nil { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultFixed64)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0xc1 + if p, q := this.GroupInt32, that.GroupInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if m.DefaultFixed32 != nil { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultFixed32)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0xbd + if p, q := this.GroupUint32, that.GroupUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestAllRequiredTypesProto2_Data) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestAllRequiredTypesProto2_Data) + if !ok { + return false } - 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 + return this.EqualVT(that) +} +func (this *TestAllRequiredTypesProto2_MessageSetCorrect) EqualVT(that *TestAllRequiredTypesProto2_MessageSetCorrect) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - if m.DefaultUint64 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint64)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0xa0 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestAllRequiredTypesProto2_MessageSetCorrect) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestAllRequiredTypesProto2_MessageSetCorrect) + if !ok { + return false } - if m.DefaultUint32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint32)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0x98 + return this.EqualVT(that) +} +func (this *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) EqualVT(that *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - if m.DefaultInt64 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt64)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0x90 + if p, q := this.Str, that.Str; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - if m.DefaultInt32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt32)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0x88 + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestAllRequiredTypesProto2_MessageSetCorrectExtension1) + if !ok { + return false } - 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 + return this.EqualVT(that) +} +func (this *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) EqualVT(that *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - 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 p, q := this.I, that.I; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestAllRequiredTypesProto2_MessageSetCorrectExtension2) + if !ok { + return false } - 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 - } + return this.EqualVT(that) +} +func (this *TestAllRequiredTypesProto2) EqualVT(that *TestAllRequiredTypesProto2) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - 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 p, q := this.RequiredInt32, that.RequiredInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredInt64, that.RequiredInt64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredUint32, that.RequiredUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredUint64, that.RequiredUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredSint32, that.RequiredSint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredSint64, that.RequiredSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredFixed32, that.RequiredFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredFixed64, that.RequiredFixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredSfixed32, that.RequiredSfixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredSfixed64, that.RequiredSfixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredFloat, that.RequiredFloat; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredDouble, that.RequiredDouble; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredBool, that.RequiredBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredString, that.RequiredString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredBytes, that.RequiredBytes; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { + return false } - 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 !this.RequiredNestedMessage.EqualVT(that.RequiredNestedMessage) { + return false } - 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 !this.RequiredForeignMessage.EqualVT(that.RequiredForeignMessage) { + return false } - 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 p, q := this.RequiredNestedEnum, that.RequiredNestedEnum; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredForeignEnum, that.RequiredForeignEnum; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredStringPiece, that.RequiredStringPiece; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.RequiredCord, that.RequiredCord; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 !this.RecursiveMessage.EqualVT(that.RecursiveMessage) { + return false } - 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 !this.OptionalRecursiveMessage.EqualVT(that.OptionalRecursiveMessage) { + return false } - 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 !this.Data.EqualVT(that.Data) { + return false } - 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 p, q := this.DefaultInt32, that.DefaultInt32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultInt64, that.DefaultInt64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultUint32, that.DefaultUint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultUint64, that.DefaultUint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultSint32, that.DefaultSint32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultSint64, that.DefaultSint64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultFixed32, that.DefaultFixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultFixed64, that.DefaultFixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultSfixed32, that.DefaultSfixed32; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultSfixed64, that.DefaultSfixed64; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultFloat, that.DefaultFloat; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultDouble, that.DefaultDouble; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultBool, that.DefaultBool; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultString, that.DefaultString; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false } - 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 p, q := this.DefaultBytes, that.DefaultBytes; (p == nil && q != nil) || (p != nil && q == nil) || string(p) != string(q) { + return false } - 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestAllRequiredTypesProto2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestAllRequiredTypesProto2) + if !ok { + return false } - 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 - } + return this.EqualVT(that) +} +func (this *TestLargeOneof_A1) EqualVT(that *TestLargeOneof_A1) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestLargeOneof_A1) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestLargeOneof_A1) + if !ok { + return false } - 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 - } + return this.EqualVT(that) +} +func (this *TestLargeOneof_A2) EqualVT(that *TestLargeOneof_A2) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestLargeOneof_A2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestLargeOneof_A2) + if !ok { + return false } - 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 - } + return this.EqualVT(that) +} +func (this *TestLargeOneof_A3) EqualVT(that *TestLargeOneof_A3) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestLargeOneof_A3) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestLargeOneof_A3) + if !ok { + return false } - 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 - } + return this.EqualVT(that) +} +func (this *TestLargeOneof_A4) EqualVT(that *TestLargeOneof_A4) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestLargeOneof_A4) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestLargeOneof_A4) + if !ok { + return false } - 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 - } + return this.EqualVT(that) +} +func (this *TestLargeOneof_A5) EqualVT(that *TestLargeOneof_A5) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestLargeOneof_A5) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestLargeOneof_A5) + if !ok { + return false } - 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 - } + return this.EqualVT(that) +} +func (this *TestLargeOneof) EqualVT(that *TestLargeOneof) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - 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 this.LargeOneof == nil && that.LargeOneof != nil { + return false + } else if this.LargeOneof != nil { + if that.LargeOneof == nil { + return false } - } - 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 !this.LargeOneof.(interface { + EqualVT(isTestLargeOneof_LargeOneof) bool + }).EqualVT(that.LargeOneof) { + return false } } - 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 - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TestLargeOneof) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TestLargeOneof) + if !ok { + return false } - 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 - } + return this.EqualVT(that) +} +func (this *TestLargeOneof_A1_) EqualVT(thatIface isTestLargeOneof_LargeOneof) bool { + that, ok := thatIface.(*TestLargeOneof_A1_) + if !ok { + return false } - 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 this == that { + return true } - 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 this == nil && that != nil || this != nil && that == nil { + return false } - 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 p, q := this.A1, that.A1; p != q { + if p == nil { + p = &TestLargeOneof_A1{} } - } - 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 q == nil { + q = &TestLargeOneof_A1{} } - } - 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 !p.EqualVT(q) { + return false } } - 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 - } + return true +} + +func (this *TestLargeOneof_A2_) EqualVT(thatIface isTestLargeOneof_LargeOneof) bool { + that, ok := thatIface.(*TestLargeOneof_A2_) + if !ok { + return false } - 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 this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.A2, that.A2; p != q { + if p == nil { + p = &TestLargeOneof_A2{} + } + if q == nil { + q = &TestLargeOneof_A2{} + } + if !p.EqualVT(q) { + return false } } - 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 + return true +} + +func (this *TestLargeOneof_A3_) EqualVT(thatIface isTestLargeOneof_LargeOneof) bool { + that, ok := thatIface.(*TestLargeOneof_A3_) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.A3, that.A3; p != q { + if p == nil { + p = &TestLargeOneof_A3{} + } + if q == nil { + q = &TestLargeOneof_A3{} + } + if !p.EqualVT(q) { + return false } } - 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 + return true +} + +func (this *TestLargeOneof_A4_) EqualVT(thatIface isTestLargeOneof_LargeOneof) bool { + that, ok := thatIface.(*TestLargeOneof_A4_) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.A4, that.A4; p != q { + if p == nil { + p = &TestLargeOneof_A4{} + } + if q == nil { + q = &TestLargeOneof_A4{} + } + if !p.EqualVT(q) { + return false } } - 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 + return true +} + +func (this *TestLargeOneof_A5_) EqualVT(thatIface isTestLargeOneof_LargeOneof) bool { + that, ok := thatIface.(*TestLargeOneof_A5_) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.A5, that.A5; p != q { + if p == nil { + p = &TestLargeOneof_A5{} + } + if q == nil { + q = &TestLargeOneof_A5{} + } + if !p.EqualVT(q) { + return false } } - if m.RecursiveMessage != nil { - size, err := m.RecursiveMessage.MarshalToSizedBufferVT(dAtA[:i]) + return true +} + +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] = 0x1 + dAtA[i] = 0x12 + } + if m.A != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) i-- - dAtA[i] = 0xda + dAtA[i] = 0x8 } - 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 + return len(dAtA) - i, nil +} + +func (m *TestAllTypesProto2_Data) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - 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 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - 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 + 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 } - 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 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.OptionalBool != nil { + if m.GroupUint32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) i-- - if *m.OptionalBool { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0xc i-- - dAtA[i] = 0x68 + dAtA[i] = 0xd8 } - if m.OptionalDouble != nil { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.OptionalDouble)))) + if m.GroupInt32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) i-- - dAtA[i] = 0x61 - } - if m.OptionalFloat != nil { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.OptionalFloat)))) + dAtA[i] = 0xc i-- - dAtA[i] = 0x5d + dAtA[i] = 0xd0 } - if m.OptionalSfixed64 != nil { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalSfixed64)) - i-- - dAtA[i] = 0x51 + return len(dAtA) - i, nil +} + +func (m *TestAllTypesProto2_MultiWordGroupField) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.OptionalSfixed32 != nil { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalSfixed32)) - i-- - dAtA[i] = 0x4d + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if m.OptionalFixed64 != nil { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalFixed64)) - i-- - dAtA[i] = 0x41 + return dAtA[:n], nil +} + +func (m *TestAllTypesProto2_MultiWordGroupField) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestAllTypesProto2_MultiWordGroupField) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.OptionalFixed32 != nil { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalFixed32)) - i-- - dAtA[i] = 0x3d + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.OptionalSint64 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.OptionalSint64)<<1)^uint64((*m.OptionalSint64>>63)))) + if m.GroupUint32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) i-- - dAtA[i] = 0x30 - } - if m.OptionalSint32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.OptionalSint32)<<1)^uint32((*m.OptionalSint32>>31)))) + dAtA[i] = 0xc i-- - dAtA[i] = 0x28 + dAtA[i] = 0xf0 } - if m.OptionalUint64 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint64)) + if m.GroupInt32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) i-- - dAtA[i] = 0x20 - } - if m.OptionalUint32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalUint32)) + dAtA[i] = 0xc i-- - dAtA[i] = 0x18 + dAtA[i] = 0xe8 } - if m.OptionalInt64 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt64)) - i-- - dAtA[i] = 0x10 + return len(dAtA) - i, nil +} + +func (m *TestAllTypesProto2_MessageSetCorrect) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.OptionalInt32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt32)) - i-- - dAtA[i] = 0x8 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return dAtA[:n], nil } -func (m *TestAllTypesProto2_OneofUint32) MarshalToVT(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_MessageSetCorrect) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofUint32) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_MessageSetCorrect) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } i := len(dAtA) - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint32)) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xf8 + _ = 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_OneofNestedMessage) MarshalToVT(dAtA []byte) (int, error) { + +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_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 - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - 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 - } +func (m *TestAllTypesProto2_MessageSetCorrectExtension1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } i := len(dAtA) _ = i var l int @@ -4066,15 +3478,19 @@ func (m *ForeignMessageProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.C != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.C)) + 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] = 0x8 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca } return len(dAtA) - i, nil } -func (m *UnknownToTestAllTypes_OptionalGroup) MarshalVT() (dAtA []byte, err error) { +func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4087,12 +3503,12 @@ func (m *UnknownToTestAllTypes_OptionalGroup) MarshalVT() (dAtA []byte, err erro return dAtA[:n], nil } -func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToVT(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4104,15 +3520,15 @@ func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToSizedBufferVT(dAtA []byte i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.A != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) + if m.I != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.I)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x48 } return len(dAtA) - i, nil } -func (m *UnknownToTestAllTypes) MarshalVT() (dAtA []byte, err error) { +func (m *TestAllTypesProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4125,12 +3541,12 @@ func (m *UnknownToTestAllTypes) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *UnknownToTestAllTypes) MarshalToVT(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *UnknownToTestAllTypes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4142,1830 +3558,1380 @@ func (m *UnknownToTestAllTypes) MarshalToSizedBufferVT(dAtA []byte) (int, error) 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 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.OptionalBool != nil { + if m.FieldName18__ != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName18__)) i-- - if *m.OptionalBool { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x1a i-- - dAtA[i] = 0x3e + dAtA[i] = 0x90 + } + if m.FieldName17__ != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName17__)) i-- - dAtA[i] = 0xf0 + dAtA[i] = 0x1a + i-- + dAtA[i] = 0x88 } - if m.Optionalgroup != nil { + if m.Field__Name16 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field__Name16)) i-- - dAtA[i] = 0x3e + dAtA[i] = 0x1a i-- - dAtA[i] = 0xe4 - size, err := m.Optionalgroup.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size + dAtA[i] = 0x80 + } + if m.Field_Name15 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name15)) i-- - dAtA[i] = 0x3e + dAtA[i] = 0x19 i-- - dAtA[i] = 0xe3 + dAtA[i] = 0xf8 } - 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)) + if m.X_FieldName14 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.X_FieldName14)) i-- - dAtA[i] = 0x3e + dAtA[i] = 0x19 i-- - dAtA[i] = 0xda + dAtA[i] = 0xf0 } - if m.OptionalString != nil { - i -= len(*m.OptionalString) - copy(dAtA[i:], *m.OptionalString) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.OptionalString))) + if m.XFieldName13 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName13)) i-- - dAtA[i] = 0x3e + dAtA[i] = 0x19 i-- - dAtA[i] = 0xd2 + dAtA[i] = 0xe8 } - if m.OptionalInt32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalInt32)) + if m.FIELDName12 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELDName12)) i-- - dAtA[i] = 0x3e + dAtA[i] = 0x19 i-- - dAtA[i] = 0xc8 + dAtA[i] = 0xe0 } - return len(dAtA) - i, nil -} - -func (m *NullHypothesisProto2) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if m.FIELD_NAME11 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELD_NAME11)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0xd8 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if m.Field_Name10 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name10)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0xd0 } - 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 + if m.Field_Name9 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name9)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0xc8 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.FieldName8 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName8)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0xc0 } - return len(dAtA) - i, nil -} - -func (m *EnumOnlyProto2) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if m.FieldName7 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName7)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0xb8 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if m.Field_0Name6 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_0Name6)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0xb0 } - 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 + if m.Field0Name5 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field0Name5)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0xa8 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.Field_Name4_ != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name4_)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0xa0 } - return len(dAtA) - i, nil -} - -func (m *OneStringProto2) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if m.XFieldName3 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName3)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0x98 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if m.FieldName2 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName2)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0x90 } - 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 + if m.Fieldname1 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Fieldname1)) + i-- + dAtA[i] = 0x19 + i-- + dAtA[i] = 0x88 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + 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.Data != nil { - i -= len(*m.Data) - copy(dAtA[i:], *m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Data))) + 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] = 0xa + dAtA[i] = 0xf + i-- + dAtA[i] = 0xf2 } - return len(dAtA) - i, nil -} - -func (m *TestAllTypesProto2_NestedMessage) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if m.DefaultBool != nil { + i-- + if *m.DefaultBool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xe8 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + 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 } - 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 + 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 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.DefaultSfixed64 != nil { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultSfixed64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xd1 } - 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)) + if m.DefaultSfixed32 != nil { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultSfixed32)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0xf + i-- + dAtA[i] = 0xcd } - if m.A != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) + if m.DefaultFixed64 != nil { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultFixed64)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xf + i-- + dAtA[i] = 0xc1 } - 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)) + if m.DefaultFixed32 != nil { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultFixed32)) i-- - dAtA[i] = 0xc + dAtA[i] = 0xf i-- - dAtA[i] = 0xd8 + dAtA[i] = 0xbd } - if m.GroupInt32 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) + if m.DefaultSint64 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.DefaultSint64)<<1)^uint64((*m.DefaultSint64>>63)))) i-- - dAtA[i] = 0xc + dAtA[i] = 0xf 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) + dAtA[i] = 0xb0 } - if m.Str != nil { - i -= len(*m.Str) - copy(dAtA[i:], *m.Str) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Str))) + if m.DefaultSint32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.DefaultSint32)<<1)^uint32((*m.DefaultSint32>>31)))) i-- - dAtA[i] = 0x1 + dAtA[i] = 0xf 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) + dAtA[i] = 0xa8 } - if m.I != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.I)) + if m.DefaultUint64 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint64)) 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 + dAtA[i] = 0xf + i-- + dAtA[i] = 0xa0 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.DefaultUint32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0x98 } - if m.FieldName18__ != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName18__)) + if m.DefaultInt64 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt64)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0xf i-- dAtA[i] = 0x90 } - if m.FieldName17__ != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName17__)) + if m.DefaultInt32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt32)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0xf i-- dAtA[i] = 0x88 } - if m.Field__Name16 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field__Name16)) + if m.Multiwordgroupfield != nil { i-- - dAtA[i] = 0x1a + dAtA[i] = 0xc i-- - dAtA[i] = 0x80 - } - if m.Field_Name15 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name15)) + dAtA[i] = 0xe4 + size, err := m.Multiwordgroupfield.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size i-- - dAtA[i] = 0x19 + dAtA[i] = 0xc i-- - dAtA[i] = 0xf8 + dAtA[i] = 0xe3 } - if m.X_FieldName14 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.X_FieldName14)) + if m.Data != nil { i-- - dAtA[i] = 0x19 + dAtA[i] = 0xc i-- - dAtA[i] = 0xf0 - } - if m.XFieldName13 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.XFieldName13)) + dAtA[i] = 0xcc + size, err := m.Data.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size i-- - dAtA[i] = 0x19 + dAtA[i] = 0xc i-- - dAtA[i] = 0xe8 + dAtA[i] = 0xcb } - if m.FIELDName12 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELDName12)) - i-- - dAtA[i] = 0x19 - i-- - dAtA[i] = 0xe0 + 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 m.FIELD_NAME11 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FIELD_NAME11)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0xd8 + dAtA[i] = 0xc2 } - if m.Field_Name10 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name10)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0xd0 + dAtA[i] = 0xba } - if m.Field_Name9 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name9)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0xc8 + dAtA[i] = 0xb2 } - if m.FieldName8 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName8)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0xc0 + dAtA[i] = 0xaa } - if m.FieldName7 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName7)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0xb8 + dAtA[i] = 0xa2 } - if m.Field_0Name6 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_0Name6)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0xb0 + dAtA[i] = 0x9a } - if m.Field0Name5 != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field0Name5)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0xa8 + dAtA[i] = 0x92 } - if m.Field_Name4_ != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Field_Name4_)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0xa0 + dAtA[i] = 0x8a } - 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)) + 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] = 0x19 + dAtA[i] = 0x5 i-- - dAtA[i] = 0x88 + dAtA[i] = 0x82 } - if m.DefaultBytes != nil { - i -= len(m.DefaultBytes) - copy(dAtA[i:], m.DefaultBytes) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefaultBytes))) + 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] = 0xf + dAtA[i] = 0x4 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))) + 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] = 0xf + dAtA[i] = 0x4 i-- dAtA[i] = 0xf2 } - if m.DefaultBool != nil { - i-- - if *m.DefaultBool { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + 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] = 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 + dAtA[i] = 0x4 i-- - dAtA[i] = 0xdd + dAtA[i] = 0xea } - if m.DefaultSfixed64 != nil { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultSfixed64)) + 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] = 0xf + dAtA[i] = 0x4 i-- - dAtA[i] = 0xd1 + dAtA[i] = 0xe2 } - if m.DefaultSfixed32 != nil { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultSfixed32)) + 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] = 0xf + dAtA[i] = 0x4 i-- - dAtA[i] = 0xcd + dAtA[i] = 0xda } - if m.DefaultFixed64 != nil { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultFixed64)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0xc1 + 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 m.DefaultFixed32 != nil { - i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultFixed32)) - i-- - dAtA[i] = 0xf - i-- - dAtA[i] = 0xbd + 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 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 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 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 + 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 } - i -= size } - if msg, ok := m.OneofField.(*TestAllTypesProto2_OneofUint32); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + 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 } - 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])) + 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] = 0x6 + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- - dAtA[i] = 0xb0 + dAtA[i] = 0xa + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4 + i-- + dAtA[i] = 0xaa } } - if len(m.UnpackedBool) > 0 { - for iNdEx := len(m.UnpackedBool) - 1; iNdEx >= 0; iNdEx-- { + if len(m.MapBoolBool) > 0 { + for k := range m.MapBoolBool { + v := m.MapBoolBool[k] + baseI := i i-- - if m.UnpackedBool[iNdEx] { + if v { 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)) + dAtA[i] = 0x10 i-- - dAtA[i] = 0x6 + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } 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)) + dAtA[i] = 0x8 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x6 + dAtA[i] = 0x4 i-- - dAtA[i] = 0x9d + dAtA[i] = 0xa2 } } - if len(m.UnpackedSfixed64) > 0 { - for iNdEx := len(m.UnpackedSfixed64) - 1; iNdEx >= 0; iNdEx-- { + if len(m.MapInt32Double) > 0 { + for k := range m.MapInt32Double { + v := m.MapInt32Double[k] + baseI := i i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.UnpackedSfixed64[iNdEx])) + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) i-- - dAtA[i] = 0x6 + dAtA[i] = 0x11 + i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- - dAtA[i] = 0x91 + dAtA[i] = 0x8 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4 + i-- + dAtA[i] = 0x9a } } - if len(m.UnpackedSfixed32) > 0 { - for iNdEx := len(m.UnpackedSfixed32) - 1; iNdEx >= 0; iNdEx-- { + if len(m.MapInt32Float) > 0 { + for k := range m.MapInt32Float { + v := m.MapInt32Float[k] + baseI := i i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.UnpackedSfixed32[iNdEx])) + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) i-- - dAtA[i] = 0x6 + dAtA[i] = 0x15 + i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) 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])) + dAtA[i] = 0x8 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x6 + dAtA[i] = 0x4 i-- - dAtA[i] = 0x81 + dAtA[i] = 0x92 } } - 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])) + 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] = 0x5 + dAtA[i] = 0x11 + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- - dAtA[i] = 0xfd + dAtA[i] = 0x9 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4 + i-- + dAtA[i] = 0x8a } } - 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)) + 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] = 0x5 + dAtA[i] = 0x15 + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- - dAtA[i] = 0xf0 + dAtA[i] = 0xd + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4 + i-- + dAtA[i] = 0x82 } } - 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)) + 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] = 0x5 + dAtA[i] = 0x11 + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) i-- - dAtA[i] = 0xe8 + dAtA[i] = 0x9 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3 + i-- + dAtA[i] = 0xfa } } - if len(m.UnpackedUint64) > 0 { - for iNdEx := len(m.UnpackedUint64) - 1; iNdEx >= 0; iNdEx-- { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint64[iNdEx])) + 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] = 0x5 + dAtA[i] = 0x15 + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) i-- - dAtA[i] = 0xe0 + dAtA[i] = 0xd + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3 + i-- + dAtA[i] = 0xf2 } } - if len(m.UnpackedUint32) > 0 { - for iNdEx := len(m.UnpackedUint32) - 1; iNdEx >= 0; iNdEx-- { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedUint32[iNdEx])) + 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] = 0x5 + dAtA[i] = 0x10 + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) i-- - dAtA[i] = 0xd8 + dAtA[i] = 0x8 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3 + i-- + dAtA[i] = 0xea } } - if len(m.UnpackedInt64) > 0 { - for iNdEx := len(m.UnpackedInt64) - 1; iNdEx >= 0; iNdEx-- { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt64[iNdEx])) + 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] = 0x5 + dAtA[i] = 0x10 + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) i-- - dAtA[i] = 0xd0 + dAtA[i] = 0x8 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3 + i-- + dAtA[i] = 0xe2 } } - if len(m.UnpackedInt32) > 0 { - for iNdEx := len(m.UnpackedInt32) - 1; iNdEx >= 0; iNdEx-- { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UnpackedInt32[iNdEx])) + 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] = 0x5 + dAtA[i] = 0x10 + i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- - dAtA[i] = 0xc8 + dAtA[i] = 0x8 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3 + i-- + dAtA[i] = 0xda } } - 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++ + 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 } - 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-- { + if len(m.MapInt64Int64) > 0 { + for k := range m.MapInt64Int64 { + v := m.MapInt64Int64[k] + baseI := i + i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) i-- - if m.PackedBool[iNdEx] { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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 } - 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)) + 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 } - 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)) + 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 } - 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])) + 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 } - 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)) + 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] = 0x4 + dAtA[i] = 0x3 i-- - dAtA[i] = 0xd2 + dAtA[i] = 0xa0 } } - 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)) + 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] = 0x4 + dAtA[i] = 0x3 i-- - dAtA[i] = 0xca + dAtA[i] = 0x98 } } - if len(m.MapStringForeignMessage) > 0 { - for k := range m.MapStringForeignMessage { - v := m.MapStringForeignMessage[k] - baseI := i - size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 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 + dAtA[i] = 0x3 i-- - dAtA[i] = 0xc2 + dAtA[i] = 0x8a } } - if len(m.MapStringNestedMessage) > 0 { - for k := range m.MapStringNestedMessage { - v := m.MapStringNestedMessage[k] - baseI := i - size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 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 + dAtA[i] = 0x3 i-- - dAtA[i] = 0xba + dAtA[i] = 0x82 } } - 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)) + 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] = 0x4 + dAtA[i] = 0x2 i-- - dAtA[i] = 0xb2 + dAtA[i] = 0xea } } - 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)) + 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] = 0x4 + dAtA[i] = 0x2 i-- - dAtA[i] = 0xaa + dAtA[i] = 0xe2 } } - 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 + if len(m.RepeatedBool) > 0 { + for iNdEx := len(m.RepeatedBool) - 1; iNdEx >= 0; iNdEx-- { i-- - if k { + if m.RepeatedBool[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x8 - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x4 + dAtA[i] = 0x2 i-- - dAtA[i] = 0xa2 + dAtA[i] = 0xd8 } } - if len(m.MapInt32Double) > 0 { - for k := range m.MapInt32Double { - v := m.MapInt32Double[k] - baseI := i + 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(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)) + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f23)) i-- - dAtA[i] = 0x4 + dAtA[i] = 0x2 i-- - dAtA[i] = 0x9a + dAtA[i] = 0xd1 } } - if len(m.MapInt32Float) > 0 { - for k := range m.MapInt32Float { - v := m.MapInt32Float[k] - baseI := i + 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(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)) + binary.LittleEndian.PutUint32(dAtA[i:], uint32(f24)) i-- - dAtA[i] = 0x4 + dAtA[i] = 0x2 i-- - dAtA[i] = 0x92 + dAtA[i] = 0xcd } } - 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 + if len(m.RepeatedSfixed64) > 0 { + for iNdEx := len(m.RepeatedSfixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i-- - dAtA[i] = 0x9 - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedSfixed64[iNdEx])) i-- - dAtA[i] = 0x4 + dAtA[i] = 0x2 i-- - dAtA[i] = 0x8a + dAtA[i] = 0xc1 } } - 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 + if len(m.RepeatedSfixed32) > 0 { + for iNdEx := len(m.RepeatedSfixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i-- - dAtA[i] = 0xd - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedSfixed32[iNdEx])) i-- - dAtA[i] = 0x4 + dAtA[i] = 0x2 i-- - dAtA[i] = 0x82 + dAtA[i] = 0xbd } } - 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 + if len(m.RepeatedFixed64) > 0 { + for iNdEx := len(m.RepeatedFixed64) - 1; iNdEx >= 0; iNdEx-- { i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i-- - dAtA[i] = 0x9 - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.RepeatedFixed64[iNdEx])) i-- - dAtA[i] = 0x3 + dAtA[i] = 0x2 i-- - dAtA[i] = 0xfa + dAtA[i] = 0xb1 } } - 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 + if len(m.RepeatedFixed32) > 0 { + for iNdEx := len(m.RepeatedFixed32) - 1; iNdEx >= 0; iNdEx-- { i -= 4 - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i-- - dAtA[i] = 0xd - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.RepeatedFixed32[iNdEx])) i-- - dAtA[i] = 0x3 + dAtA[i] = 0x2 i-- - dAtA[i] = 0xf2 + dAtA[i] = 0xad } } - 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)))) + 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] = 0x10 - i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x2 i-- - dAtA[i] = 0x8 - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-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] = 0x3 + dAtA[i] = 0x2 i-- - dAtA[i] = 0xea + dAtA[i] = 0x98 } } - 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)))) + 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] = 0x10 - i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x2 i-- - dAtA[i] = 0x8 - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-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] = 0x3 + dAtA[i] = 0x2 i-- - dAtA[i] = 0xe2 + dAtA[i] = 0x88 } } - if len(m.MapUint64Uint64) > 0 { - for k := range m.MapUint64Uint64 { - v := m.MapUint64Uint64[k] - baseI := i - i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) + 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] = 0x10 - i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) + dAtA[i] = 0x2 i-- - dAtA[i] = 0x8 - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-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] = 0x3 + dAtA[i] = 0x1 i-- - dAtA[i] = 0xda + dAtA[i] = 0xf8 } } - 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 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.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 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 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 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 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 m.OptionalForeignEnum != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalForeignEnum)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 } - 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 m.OptionalNestedEnum != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OptionalNestedEnum)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 } - 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 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 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 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.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 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 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 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 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 m.OptionalBool != nil { + i-- + if *m.OptionalBool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x68 } - 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 m.OptionalDouble != nil { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.OptionalDouble)))) + i-- + dAtA[i] = 0x61 } - 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 m.OptionalFloat != nil { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.OptionalFloat)))) + i-- + dAtA[i] = 0x5d } - 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 m.OptionalSfixed64 != nil { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.OptionalSfixed64)) + i-- + dAtA[i] = 0x51 } - 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.OptionalSfixed32 != nil { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.OptionalSfixed32)) + i-- + dAtA[i] = 0x4d } if m.OptionalFixed64 != nil { i -= 8 @@ -6012,12 +4978,12 @@ func (m *TestAllTypesProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofUint32) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofUint32) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofUint32) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofUint32) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint32)) i-- @@ -6026,15 +4992,15 @@ func (m *TestAllTypesProto2_OneofUint32) MarshalToSizedBufferVTStrict(dAtA []byt dAtA[i] = 0xf8 return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) if m.OneofNestedMessage != nil { - size, err := m.OneofNestedMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) + size, err := m.OneofNestedMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -6053,12 +5019,12 @@ func (m *TestAllTypesProto2_OneofNestedMessage) MarshalToSizedBufferVTStrict(dAt } return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofString) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofString) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofString) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofString) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofString) copy(dAtA[i:], m.OneofString) @@ -6069,12 +5035,12 @@ func (m *TestAllTypesProto2_OneofString) MarshalToSizedBufferVTStrict(dAtA []byt dAtA[i] = 0x8a return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofBytes) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofBytes) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofBytes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofBytes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i -= len(m.OneofBytes) copy(dAtA[i:], m.OneofBytes) @@ -6085,12 +5051,12 @@ func (m *TestAllTypesProto2_OneofBytes) MarshalToSizedBufferVTStrict(dAtA []byte dAtA[i] = 0x92 return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofBool) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofBool) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofBool) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofBool) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i-- if m.OneofBool { @@ -6104,12 +5070,12 @@ func (m *TestAllTypesProto2_OneofBool) MarshalToSizedBufferVTStrict(dAtA []byte) dAtA[i] = 0x98 return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofUint64) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofUint64) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofUint64) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofUint64) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofUint64)) i-- @@ -6118,12 +5084,12 @@ func (m *TestAllTypesProto2_OneofUint64) MarshalToSizedBufferVTStrict(dAtA []byt dAtA[i] = 0xa0 return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofFloat) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofFloat) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofFloat) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +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)))) @@ -6133,12 +5099,12 @@ func (m *TestAllTypesProto2_OneofFloat) MarshalToSizedBufferVTStrict(dAtA []byte dAtA[i] = 0xad return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofDouble) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofDouble) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofDouble) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +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)))) @@ -6148,12 +5114,12 @@ func (m *TestAllTypesProto2_OneofDouble) MarshalToSizedBufferVTStrict(dAtA []byt dAtA[i] = 0xb1 return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofEnum) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofEnum) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofEnum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *TestAllTypesProto2_OneofEnum) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OneofEnum)) i-- @@ -6162,25 +5128,25 @@ func (m *TestAllTypesProto2_OneofEnum) MarshalToSizedBufferVTStrict(dAtA []byte) dAtA[i] = 0xb8 return len(dAtA) - i, nil } -func (m *ForeignMessageProto2) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ForeignMessageProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *ForeignMessageProto2) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ForeignMessageProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ForeignMessageProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ForeignMessageProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6200,25 +5166,72 @@ func (m *ForeignMessageProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *UnknownToTestAllTypes_OptionalGroup) MarshalVTStrict() (dAtA []byte, err error) { +func (m *GroupField) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *GroupField) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *GroupField) 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] = 0x7 + i-- + dAtA[i] = 0xd8 + } + if m.GroupInt32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) + i-- + dAtA[i] = 0x7 + i-- + dAtA[i] = 0xd0 + } + 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 } @@ -6238,25 +5251,25 @@ func (m *UnknownToTestAllTypes_OptionalGroup) MarshalToSizedBufferVTStrict(dAtA return len(dAtA) - i, nil } -func (m *UnknownToTestAllTypes) MarshalVTStrict() (dAtA []byte, err error) { +func (m *UnknownToTestAllTypes) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *UnknownToTestAllTypes) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *UnknownToTestAllTypes) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *UnknownToTestAllTypes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *UnknownToTestAllTypes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6294,7 +5307,7 @@ func (m *UnknownToTestAllTypes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, dAtA[i] = 0x3e i-- dAtA[i] = 0xe4 - size, err := m.Optionalgroup.MarshalToSizedBufferVTStrict(dAtA[:i]) + size, err := m.Optionalgroup.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -6305,7 +5318,7 @@ func (m *UnknownToTestAllTypes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, dAtA[i] = 0xe3 } if m.NestedMessage != nil { - size, err := m.NestedMessage.MarshalToSizedBufferVTStrict(dAtA[:i]) + size, err := m.NestedMessage.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -6335,25 +5348,25 @@ func (m *UnknownToTestAllTypes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *NullHypothesisProto2) MarshalVTStrict() (dAtA []byte, err error) { +func (m *NullHypothesisProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *NullHypothesisProto2) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *NullHypothesisProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *NullHypothesisProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *NullHypothesisProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6368,25 +5381,25 @@ func (m *NullHypothesisProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *EnumOnlyProto2) MarshalVTStrict() (dAtA []byte, err error) { +func (m *EnumOnlyProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *EnumOnlyProto2) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *EnumOnlyProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *EnumOnlyProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *EnumOnlyProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6401,25 +5414,25 @@ func (m *EnumOnlyProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *OneStringProto2) MarshalVTStrict() (dAtA []byte, err error) { +func (m *OneStringProto2) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *OneStringProto2) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *OneStringProto2) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *OneStringProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *OneStringProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6441,975 +5454,7947 @@ func (m *OneStringProto2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_NestedMessage) SizeVT() (n int) { +func (m *ProtoWithKeywords) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.A != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.A)) + return nil, nil } - if m.Corecursive != nil { - l = m.Corecursive.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *TestAllTypesProto2_Data) SizeVT() (n int) { +func (m *ProtoWithKeywords) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ProtoWithKeywords) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.GroupInt32 != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.GroupInt32)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.GroupUint32 != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.GroupUint32)) + if len(m.Requires) > 0 { + for iNdEx := len(m.Requires) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requires[iNdEx]) + copy(dAtA[i:], m.Requires[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Requires[iNdEx]))) + i-- + dAtA[i] = 0x1a + } } - n += len(m.unknownFields) - return n + if m.Concept != nil { + i -= len(*m.Concept) + copy(dAtA[i:], *m.Concept) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Concept))) + i-- + dAtA[i] = 0x12 + } + if m.Inline != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Inline)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_MessageSetCorrect) SizeVT() (n int) { +func (m *TestAllRequiredTypesProto2_NestedMessage) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - n += len(m.unknownFields) - return n + 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) SizeVT() (n int) { +func (m *TestAllRequiredTypesProto2_NestedMessage) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_NestedMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Str != nil { - l = len(*m.Str) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n + if m.OptionalCorecursive != nil { + size, err := m.OptionalCorecursive.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Corecursive == nil { + return 0, fmt.Errorf("proto: required field corecursive not set") + } else { + 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 { + return 0, fmt.Errorf("proto: required field a not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_MessageSetCorrectExtension2) SizeVT() (n int) { +func (m *TestAllRequiredTypesProto2_Data) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if m.I != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.I)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *TestAllTypesProto2) SizeVT() (n int) { +func (m *TestAllRequiredTypesProto2_Data) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_Data) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.OptionalInt32 != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalInt32)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.OptionalInt64 != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalInt64)) + if m.GroupUint32 == nil { + return 0, fmt.Errorf("proto: required field group_uint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xd8 } - if m.OptionalUint32 != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalUint32)) - } - if m.OptionalUint64 != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.OptionalUint64)) + if m.GroupInt32 == nil { + return 0, fmt.Errorf("proto: required field group_int32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xd0 } - if m.OptionalSint32 != nil { - n += 1 + protohelpers.SizeOfZigzag(uint64(*m.OptionalSint32)) + return len(dAtA) - i, nil +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrect) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.OptionalSint64 != nil { - n += 1 + protohelpers.SizeOfZigzag(uint64(*m.OptionalSint64)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if m.OptionalFixed32 != nil { - n += 5 + return dAtA[:n], nil +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrect) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrect) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.OptionalFixed64 != nil { - n += 9 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.OptionalSfixed32 != nil { - n += 5 + return len(dAtA) - i, nil +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.OptionalSfixed64 != nil { - n += 9 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if m.OptionalFloat != nil { - n += 5 + return dAtA[:n], nil +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.OptionalDouble != nil { - n += 9 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.OptionalBool != nil { - n += 2 + if m.Str == nil { + return 0, fmt.Errorf("proto: required field str not set") + } else { + 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 } - if m.OptionalString != nil { - l = len(*m.OptionalString) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.OptionalBytes != nil { - l = len(m.OptionalBytes) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if m.OptionalNestedMessage != nil { - l = m.OptionalNestedMessage.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + return dAtA[:n], nil +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.OptionalForeignMessage != nil { - l = m.OptionalForeignMessage.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.OptionalNestedEnum != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.OptionalNestedEnum)) + if m.I == nil { + return 0, fmt.Errorf("proto: required field i not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.I)) + i-- + dAtA[i] = 0x48 } - if m.OptionalForeignEnum != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.OptionalForeignEnum)) + return len(dAtA) - i, nil +} + +func (m *TestAllRequiredTypesProto2) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.OptionalStringPiece != nil { - l = len(*m.OptionalStringPiece) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if m.OptionalCord != nil { - l = len(*m.OptionalCord) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + return dAtA[:n], nil +} + +func (m *TestAllRequiredTypesProto2) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.RecursiveMessage != nil { - l = m.RecursiveMessage.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 _, e := range m.RepeatedInt32 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + if m.DefaultBytes == nil { + return 0, fmt.Errorf("proto: required field default_bytes not set") + } else { + 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 len(m.RepeatedInt64) > 0 { - for _, e := range m.RepeatedInt64 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + if m.DefaultString == nil { + return 0, fmt.Errorf("proto: required field default_string not set") + } else { + 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 len(m.RepeatedUint32) > 0 { - for _, e := range m.RepeatedUint32 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) + if m.DefaultBool == nil { + return 0, fmt.Errorf("proto: required field default_bool not set") + } else { + i-- + if *m.DefaultBool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xe8 } - if len(m.RepeatedUint64) > 0 { - for _, e := range m.RepeatedUint64 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + if m.DefaultDouble == nil { + return 0, fmt.Errorf("proto: required field default_double not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.DefaultDouble)))) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xe1 } - if len(m.RepeatedSint32) > 0 { - for _, e := range m.RepeatedSint32 { - n += 2 + protohelpers.SizeOfZigzag(uint64(e)) - } + if m.DefaultFloat == nil { + return 0, fmt.Errorf("proto: required field default_float not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.DefaultFloat)))) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xdd } - if len(m.RepeatedSint64) > 0 { - for _, e := range m.RepeatedSint64 { - n += 2 + protohelpers.SizeOfZigzag(uint64(e)) - } + if m.DefaultSfixed64 == nil { + return 0, fmt.Errorf("proto: required field default_sfixed64 not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultSfixed64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xd1 } - if len(m.RepeatedFixed32) > 0 { - n += 6 * len(m.RepeatedFixed32) + if m.DefaultSfixed32 == nil { + return 0, fmt.Errorf("proto: required field default_sfixed32 not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultSfixed32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xcd } - if len(m.RepeatedFixed64) > 0 { - n += 10 * len(m.RepeatedFixed64) + if m.DefaultFixed64 == nil { + return 0, fmt.Errorf("proto: required field default_fixed64 not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultFixed64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xc1 } - if len(m.RepeatedSfixed32) > 0 { - n += 6 * len(m.RepeatedSfixed32) + if m.DefaultFixed32 == nil { + return 0, fmt.Errorf("proto: required field default_fixed32 not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultFixed32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xbd } - if len(m.RepeatedSfixed64) > 0 { - n += 10 * len(m.RepeatedSfixed64) + if m.DefaultSint64 == nil { + return 0, fmt.Errorf("proto: required field default_sint64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.DefaultSint64)<<1)^uint64((*m.DefaultSint64>>63)))) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xb0 } - if len(m.RepeatedFloat) > 0 { - n += 6 * len(m.RepeatedFloat) + if m.DefaultSint32 == nil { + return 0, fmt.Errorf("proto: required field default_sint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.DefaultSint32)<<1)^uint32((*m.DefaultSint32>>31)))) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xa8 } - if len(m.RepeatedDouble) > 0 { - n += 10 * len(m.RepeatedDouble) + if m.DefaultUint64 == nil { + return 0, fmt.Errorf("proto: required field default_uint64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xa0 } - if len(m.RepeatedBool) > 0 { - n += 3 * len(m.RepeatedBool) + if m.DefaultUint32 == nil { + return 0, fmt.Errorf("proto: required field default_uint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0x98 } - if len(m.RepeatedString) > 0 { - for _, s := range m.RepeatedString { - l = len(s) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } + if m.DefaultInt64 == nil { + return 0, fmt.Errorf("proto: required field default_int64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0x90 } - if len(m.RepeatedBytes) > 0 { - for _, b := range m.RepeatedBytes { - l = len(b) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } + if m.DefaultInt32 == nil { + return 0, fmt.Errorf("proto: required field default_int32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0x88 } - if len(m.RepeatedNestedMessage) > 0 { - for _, e := range m.RepeatedNestedMessage { - l = e.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Data == nil { + return 0, fmt.Errorf("proto: required field data not set") + } else { + 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.RepeatedForeignMessage) > 0 { - for _, e := range m.RepeatedForeignMessage { - l = e.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.OptionalRecursiveMessage != nil { + size, err := m.OptionalRecursiveMessage.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] = 0xe2 } - if len(m.RepeatedNestedEnum) > 0 { - for _, e := range m.RepeatedNestedEnum { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) + if m.RecursiveMessage == nil { + return 0, fmt.Errorf("proto: required field recursive_message not set") + } else { + 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.RepeatedForeignEnum) > 0 { - for _, e := range m.RepeatedForeignEnum { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + if m.RequiredCord == nil { + return 0, fmt.Errorf("proto: required field required_cord not set") + } else { + i -= len(*m.RequiredCord) + copy(dAtA[i:], *m.RequiredCord) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.RequiredCord))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca } - if len(m.RepeatedStringPiece) > 0 { - for _, s := range m.RepeatedStringPiece { - l = len(s) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } + if m.RequiredStringPiece == nil { + return 0, fmt.Errorf("proto: required field required_string_piece not set") + } else { + i -= len(*m.RequiredStringPiece) + copy(dAtA[i:], *m.RequiredStringPiece) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.RequiredStringPiece))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 } - if len(m.RepeatedCord) > 0 { - for _, s := range m.RepeatedCord { - l = len(s) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } + if m.RequiredForeignEnum == nil { + return 0, fmt.Errorf("proto: required field required_foreign_enum not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredForeignEnum)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 } - 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 m.RequiredNestedEnum == nil { + return 0, fmt.Errorf("proto: required field required_nested_enum not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredNestedEnum)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 } - 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 m.RequiredForeignMessage == nil { + return 0, fmt.Errorf("proto: required field required_foreign_message not set") + } else { + size, err := m.RequiredForeignMessage.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 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 m.RequiredNestedMessage == nil { + return 0, fmt.Errorf("proto: required field required_nested_message not set") + } else { + size, err := m.RequiredNestedMessage.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.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 m.RequiredBytes == nil { + return 0, fmt.Errorf("proto: required field required_bytes not set") + } else { + i -= len(m.RequiredBytes) + copy(dAtA[i:], m.RequiredBytes) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequiredBytes))) + i-- + dAtA[i] = 0x7a } - 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 m.RequiredString == nil { + return 0, fmt.Errorf("proto: required field required_string not set") + } else { + i -= len(*m.RequiredString) + copy(dAtA[i:], *m.RequiredString) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.RequiredString))) + i-- + dAtA[i] = 0x72 } - 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 m.RequiredBool == nil { + return 0, fmt.Errorf("proto: required field required_bool not set") + } else { + i-- + if *m.RequiredBool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x68 } - 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 m.RequiredDouble == nil { + return 0, fmt.Errorf("proto: required field required_double not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.RequiredDouble)))) + i-- + dAtA[i] = 0x61 } - 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 m.RequiredFloat == nil { + return 0, fmt.Errorf("proto: required field required_float not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.RequiredFloat)))) + i-- + dAtA[i] = 0x5d } - 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 m.RequiredSfixed64 == nil { + return 0, fmt.Errorf("proto: required field required_sfixed64 not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.RequiredSfixed64)) + i-- + dAtA[i] = 0x51 } - 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 m.RequiredSfixed32 == nil { + return 0, fmt.Errorf("proto: required field required_sfixed32 not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.RequiredSfixed32)) + i-- + dAtA[i] = 0x4d } - 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 m.RequiredFixed64 == nil { + return 0, fmt.Errorf("proto: required field required_fixed64 not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.RequiredFixed64)) + i-- + dAtA[i] = 0x41 } - 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 m.RequiredFixed32 == nil { + return 0, fmt.Errorf("proto: required field required_fixed32 not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.RequiredFixed32)) + i-- + dAtA[i] = 0x3d } - 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 m.RequiredSint64 == nil { + return 0, fmt.Errorf("proto: required field required_sint64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.RequiredSint64)<<1)^uint64((*m.RequiredSint64>>63)))) + i-- + dAtA[i] = 0x30 } - 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 m.RequiredSint32 == nil { + return 0, fmt.Errorf("proto: required field required_sint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.RequiredSint32)<<1)^uint32((*m.RequiredSint32>>31)))) + i-- + dAtA[i] = 0x28 } - 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 m.RequiredUint64 == nil { + return 0, fmt.Errorf("proto: required field required_uint64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredUint64)) + i-- + dAtA[i] = 0x20 } - 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 m.RequiredUint32 == nil { + return 0, fmt.Errorf("proto: required field required_uint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredUint32)) + i-- + dAtA[i] = 0x18 } - 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 m.RequiredInt64 == nil { + return 0, fmt.Errorf("proto: required field required_int64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredInt64)) + i-- + dAtA[i] = 0x10 } - 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 m.RequiredInt32 == nil { + return 0, fmt.Errorf("proto: required field required_int32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredInt32)) + i-- + dAtA[i] = 0x8 } - if len(m.PackedInt32) > 0 { - l = 0 - for _, e := range m.PackedInt32 { - l += protohelpers.SizeOfVarint(uint64(e)) - } - n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof_A1) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.PackedInt64) > 0 { - l = 0 - for _, e := range m.PackedInt64 { - l += protohelpers.SizeOfVarint(uint64(e)) - } - n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.PackedUint32) > 0 { - l = 0 - for _, e := range m.PackedUint32 { - l += protohelpers.SizeOfVarint(uint64(e)) - } - n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l + return dAtA[:n], nil +} + +func (m *TestLargeOneof_A1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if len(m.PackedUint64) > 0 { - l = 0 - for _, e := range m.PackedUint64 { - l += protohelpers.SizeOfVarint(uint64(e)) - } - n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.PackedSint32) > 0 { - l = 0 - for _, e := range m.PackedSint32 { - l += protohelpers.SizeOfZigzag(uint64(e)) - } - n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof_A2) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.PackedSint64) > 0 { - l = 0 - for _, e := range m.PackedSint64 { - l += protohelpers.SizeOfZigzag(uint64(e)) - } - n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.PackedFixed32) > 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFixed32)*4)) + len(m.PackedFixed32)*4 + return dAtA[:n], nil +} + +func (m *TestLargeOneof_A2) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if len(m.PackedFixed64) > 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFixed64)*8)) + len(m.PackedFixed64)*8 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.PackedSfixed32) > 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedSfixed32)*4)) + len(m.PackedSfixed32)*4 + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof_A3) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.PackedSfixed64) > 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedSfixed64)*8)) + len(m.PackedSfixed64)*8 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.PackedFloat) > 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedFloat)*4)) + len(m.PackedFloat)*4 + return dAtA[:n], nil +} + +func (m *TestLargeOneof_A3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if len(m.PackedDouble) > 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedDouble)*8)) + len(m.PackedDouble)*8 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.PackedBool) > 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(len(m.PackedBool))) + len(m.PackedBool)*1 + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof_A4) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.PackedNestedEnum) > 0 { - l = 0 - for _, e := range m.PackedNestedEnum { - l += protohelpers.SizeOfVarint(uint64(e)) - } - n += 2 + protohelpers.SizeOfVarint(uint64(l)) + l + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.UnpackedInt32) > 0 { - for _, e := range m.UnpackedInt32 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + return dAtA[:n], nil +} + +func (m *TestLargeOneof_A4) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A4) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if len(m.UnpackedInt64) > 0 { - for _, e := range m.UnpackedInt64 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.UnpackedUint32) > 0 { - for _, e := range m.UnpackedUint32 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof_A5) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.UnpackedUint64) > 0 { - for _, e := range m.UnpackedUint64 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.UnpackedSint32) > 0 { - for _, e := range m.UnpackedSint32 { - n += 2 + protohelpers.SizeOfZigzag(uint64(e)) - } + return dAtA[:n], nil +} + +func (m *TestLargeOneof_A5) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A5) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if len(m.UnpackedSint64) > 0 { - for _, e := range m.UnpackedSint64 { - n += 2 + protohelpers.SizeOfZigzag(uint64(e)) - } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.UnpackedFixed32) > 0 { - n += 6 * len(m.UnpackedFixed32) + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.UnpackedFixed64) > 0 { - n += 10 * len(m.UnpackedFixed64) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.UnpackedSfixed32) > 0 { - n += 6 * len(m.UnpackedSfixed32) + return dAtA[:n], nil +} + +func (m *TestLargeOneof) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if len(m.UnpackedSfixed64) > 0 { - n += 10 * len(m.UnpackedSfixed64) + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.UnpackedFloat) > 0 { - n += 6 * len(m.UnpackedFloat) + if vtmsg, ok := m.LargeOneof.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size } - if len(m.UnpackedDouble) > 0 { - n += 10 * len(m.UnpackedDouble) + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof_A1_) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A1_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A1 != nil { + size, err := m.A1.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa } - if len(m.UnpackedBool) > 0 { - n += 3 * len(m.UnpackedBool) + return len(dAtA) - i, nil +} +func (m *TestLargeOneof_A2_) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A2_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A2 != nil { + size, err := m.A2.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 } - if len(m.UnpackedNestedEnum) > 0 { - for _, e := range m.UnpackedNestedEnum { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) + return len(dAtA) - i, nil +} +func (m *TestLargeOneof_A3_) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A3_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A3 != nil { + size, err := m.A3.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x1a } - if vtmsg, ok := m.OneofField.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() + return len(dAtA) - i, nil +} +func (m *TestLargeOneof_A4_) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A4_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A4 != nil { + size, err := m.A4.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x22 } - if m.Data != nil { - l = m.Data.SizeVT() - n += l + 4 + return len(dAtA) - i, nil +} +func (m *TestLargeOneof_A5_) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TestLargeOneof_A5_) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A5 != nil { + size, err := m.A5.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x2a } - if m.DefaultInt32 != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.DefaultInt32)) + return len(dAtA) - i, nil +} +func (m *TestAllTypesProto2_NestedMessage) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.DefaultInt64 != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.DefaultInt64)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.DefaultUint32 != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.DefaultUint32)) + 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 } - if m.DefaultUint64 != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.DefaultUint64)) + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.DefaultSint32 != nil { - n += 2 + protohelpers.SizeOfZigzag(uint64(*m.DefaultSint32)) + 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.DefaultSint64 != nil { - n += 2 + protohelpers.SizeOfZigzag(uint64(*m.DefaultSint64)) + if m.A != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) + i-- + dAtA[i] = 0x8 } - if m.DefaultFixed32 != nil { - n += 6 + return len(dAtA) - i, nil +} + +func (m *TestAllTypesProto2_Data) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - 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__)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -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_Data) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofNestedMessage) SizeVT() (n int) { + +func (m *TestAllTypesProto2_Data) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.OneofNestedMessage != nil { - l = m.OneofNestedMessage.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 3 + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - return n -} -func (m *TestAllTypesProto2_OneofString) SizeVT() (n int) { - if m == nil { - return 0 + if m.GroupUint32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xd8 } - 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 + if m.GroupInt32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xd0 } - var l int - _ = l - l = len(m.OneofBytes) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - return n + return len(dAtA) - i, nil } -func (m *TestAllTypesProto2_OneofBool) SizeVT() (n int) { + +func (m *TestAllTypesProto2_MultiWordGroupField) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - n += 3 - return n -} -func (m *TestAllTypesProto2_OneofUint64) SizeVT() (n int) { - if m == nil { - return 0 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofUint64)) - return n + return dAtA[:n], nil } -func (m *TestAllTypesProto2_OneofFloat) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 6 - return n + +func (m *TestAllTypesProto2_MultiWordGroupField) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *TestAllTypesProto2_OneofDouble) SizeVT() (n int) { + +func (m *TestAllTypesProto2_MultiWordGroupField) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - n += 10 - return n -} -func (m *TestAllTypesProto2_OneofEnum) SizeVT() (n int) { - if m == nil { - return 0 + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - var l int - _ = l - n += 2 + protohelpers.SizeOfVarint(uint64(m.OneofEnum)) - return n + if m.GroupUint32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xf0 + } + if m.GroupInt32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xe8 + } + return len(dAtA) - i, nil } -func (m *ForeignMessageProto2) SizeVT() (n int) { + +func (m *TestAllTypesProto2_MessageSetCorrect) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if m.C != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.C)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *UnknownToTestAllTypes_OptionalGroup) SizeVT() (n int) { +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 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.A != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.A)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *UnknownToTestAllTypes) SizeVT() (n int) { +func (m *TestAllTypesProto2_MessageSetCorrectExtension1) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.OptionalInt32 != nil { - n += 2 + protohelpers.SizeOfVarint(uint64(*m.OptionalInt32)) + return nil, nil } - if m.OptionalString != nil { - l = len(*m.OptionalString) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.NestedMessage != nil { - l = m.NestedMessage.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 } - if m.Optionalgroup != nil { - l = m.Optionalgroup.SizeVT() - n += l + 4 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.OptionalBool != nil { - n += 3 + 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 } - if len(m.RepeatedInt32) > 0 { - for _, e := range m.RepeatedInt32 { - n += 2 + protohelpers.SizeOfVarint(uint64(e)) - } + return len(dAtA) - i, nil +} + +func (m *TestAllTypesProto2_MessageSetCorrectExtension2) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - n += len(m.unknownFields) - return n + 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) SizeVT() (n int) { +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 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - n += len(m.unknownFields) - return n + 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 *EnumOnlyProto2) SizeVT() (n int) { +func (m *TestAllTypesProto2) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - n += len(m.unknownFields) - return n + 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) SizeVT() (n int) { +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 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Data != nil { - l = len(*m.Data) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - 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 m.FieldName18__ != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName18__)) + i-- + dAtA[i] = 0x1a + i-- + dAtA[i] = 0x90 } - - if iNdEx > l { - return io.ErrUnexpectedEOF + if m.FieldName17__ != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.FieldName17__)) + i-- + dAtA[i] = 0x1a + i-- + dAtA[i] = 0x88 } - 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 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 } - if fieldNum <= 0 { - return fmt.Errorf("proto: TestAllTypesProto2_Data: illegal tag %d (wire type %d)", fieldNum, wire) + 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.Multiwordgroupfield != nil { + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xe4 + size, err := m.Multiwordgroupfield.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } - switch fieldNum { - case 202: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupInt32", wireType) + i -= size + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xe3 + } + 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 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + 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 *GroupField) 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 *GroupField) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GroupField) 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] = 0x7 + i-- + dAtA[i] = 0xd8 + } + if m.GroupInt32 != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) + i-- + dAtA[i] = 0x7 + i-- + dAtA[i] = 0xd0 + } + 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 *ProtoWithKeywords) 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 *ProtoWithKeywords) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ProtoWithKeywords) 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.Requires) > 0 { + for iNdEx := len(m.Requires) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requires[iNdEx]) + copy(dAtA[i:], m.Requires[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Requires[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.Concept != nil { + i -= len(*m.Concept) + copy(dAtA[i:], *m.Concept) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Concept))) + i-- + dAtA[i] = 0x12 + } + if m.Inline != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Inline)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2_NestedMessage) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_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.OptionalCorecursive != nil { + size, err := m.OptionalCorecursive.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Corecursive == nil { + return 0, fmt.Errorf("proto: required field corecursive not set") + } else { + 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 { + return 0, fmt.Errorf("proto: required field a not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.A)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2_Data) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_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 { + return 0, fmt.Errorf("proto: required field group_uint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupUint32)) + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xd8 + } + if m.GroupInt32 == nil { + return 0, fmt.Errorf("proto: required field group_int32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.GroupInt32)) + i-- + dAtA[i] = 0xc + i-- + dAtA[i] = 0xd0 + } + return len(dAtA) - i, nil +} + +func (m *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2_MessageSetCorrect) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_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 { + return 0, fmt.Errorf("proto: required field str not set") + } else { + 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 *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2_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 { + return 0, fmt.Errorf("proto: required field i not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.I)) + i-- + dAtA[i] = 0x48 + } + return len(dAtA) - i, nil +} + +func (m *TestAllRequiredTypesProto2) 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 *TestAllRequiredTypesProto2) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestAllRequiredTypesProto2) 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.DefaultBytes == nil { + return 0, fmt.Errorf("proto: required field default_bytes not set") + } else { + 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 { + return 0, fmt.Errorf("proto: required field default_string not set") + } else { + 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 { + return 0, fmt.Errorf("proto: required field default_bool not set") + } else { + i-- + if *m.DefaultBool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xe8 + } + if m.DefaultDouble == nil { + return 0, fmt.Errorf("proto: required field default_double not set") + } else { + 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 { + return 0, fmt.Errorf("proto: required field default_float not set") + } else { + 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 { + return 0, fmt.Errorf("proto: required field default_sfixed64 not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultSfixed64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xd1 + } + if m.DefaultSfixed32 == nil { + return 0, fmt.Errorf("proto: required field default_sfixed32 not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultSfixed32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xcd + } + if m.DefaultFixed64 == nil { + return 0, fmt.Errorf("proto: required field default_fixed64 not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.DefaultFixed64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xc1 + } + if m.DefaultFixed32 == nil { + return 0, fmt.Errorf("proto: required field default_fixed32 not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.DefaultFixed32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xbd + } + if m.DefaultSint64 == nil { + return 0, fmt.Errorf("proto: required field default_sint64 not set") + } else { + 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 { + return 0, fmt.Errorf("proto: required field default_sint32 not set") + } else { + 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 { + return 0, fmt.Errorf("proto: required field default_uint64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0xa0 + } + if m.DefaultUint32 == nil { + return 0, fmt.Errorf("proto: required field default_uint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultUint32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0x98 + } + if m.DefaultInt64 == nil { + return 0, fmt.Errorf("proto: required field default_int64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt64)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0x90 + } + if m.DefaultInt32 == nil { + return 0, fmt.Errorf("proto: required field default_int32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DefaultInt32)) + i-- + dAtA[i] = 0xf + i-- + dAtA[i] = 0x88 + } + if m.Data == nil { + return 0, fmt.Errorf("proto: required field data not set") + } else { + 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 m.OptionalRecursiveMessage != nil { + size, err := m.OptionalRecursiveMessage.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] = 0xe2 + } + if m.RecursiveMessage == nil { + return 0, fmt.Errorf("proto: required field recursive_message not set") + } else { + 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.RequiredCord == nil { + return 0, fmt.Errorf("proto: required field required_cord not set") + } else { + i -= len(*m.RequiredCord) + copy(dAtA[i:], *m.RequiredCord) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.RequiredCord))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + } + if m.RequiredStringPiece == nil { + return 0, fmt.Errorf("proto: required field required_string_piece not set") + } else { + i -= len(*m.RequiredStringPiece) + copy(dAtA[i:], *m.RequiredStringPiece) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.RequiredStringPiece))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + if m.RequiredForeignEnum == nil { + return 0, fmt.Errorf("proto: required field required_foreign_enum not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredForeignEnum)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 + } + if m.RequiredNestedEnum == nil { + return 0, fmt.Errorf("proto: required field required_nested_enum not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredNestedEnum)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } + if m.RequiredForeignMessage == nil { + return 0, fmt.Errorf("proto: required field required_foreign_message not set") + } else { + size, err := m.RequiredForeignMessage.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.RequiredNestedMessage == nil { + return 0, fmt.Errorf("proto: required field required_nested_message not set") + } else { + size, err := m.RequiredNestedMessage.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.RequiredBytes == nil { + return 0, fmt.Errorf("proto: required field required_bytes not set") + } else { + i -= len(m.RequiredBytes) + copy(dAtA[i:], m.RequiredBytes) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequiredBytes))) + i-- + dAtA[i] = 0x7a + } + if m.RequiredString == nil { + return 0, fmt.Errorf("proto: required field required_string not set") + } else { + i -= len(*m.RequiredString) + copy(dAtA[i:], *m.RequiredString) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.RequiredString))) + i-- + dAtA[i] = 0x72 + } + if m.RequiredBool == nil { + return 0, fmt.Errorf("proto: required field required_bool not set") + } else { + i-- + if *m.RequiredBool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + if m.RequiredDouble == nil { + return 0, fmt.Errorf("proto: required field required_double not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.RequiredDouble)))) + i-- + dAtA[i] = 0x61 + } + if m.RequiredFloat == nil { + return 0, fmt.Errorf("proto: required field required_float not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.RequiredFloat)))) + i-- + dAtA[i] = 0x5d + } + if m.RequiredSfixed64 == nil { + return 0, fmt.Errorf("proto: required field required_sfixed64 not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.RequiredSfixed64)) + i-- + dAtA[i] = 0x51 + } + if m.RequiredSfixed32 == nil { + return 0, fmt.Errorf("proto: required field required_sfixed32 not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.RequiredSfixed32)) + i-- + dAtA[i] = 0x4d + } + if m.RequiredFixed64 == nil { + return 0, fmt.Errorf("proto: required field required_fixed64 not set") + } else { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.RequiredFixed64)) + i-- + dAtA[i] = 0x41 + } + if m.RequiredFixed32 == nil { + return 0, fmt.Errorf("proto: required field required_fixed32 not set") + } else { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.RequiredFixed32)) + i-- + dAtA[i] = 0x3d + } + if m.RequiredSint64 == nil { + return 0, fmt.Errorf("proto: required field required_sint64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint64(*m.RequiredSint64)<<1)^uint64((*m.RequiredSint64>>63)))) + i-- + dAtA[i] = 0x30 + } + if m.RequiredSint32 == nil { + return 0, fmt.Errorf("proto: required field required_sint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64((uint32(*m.RequiredSint32)<<1)^uint32((*m.RequiredSint32>>31)))) + i-- + dAtA[i] = 0x28 + } + if m.RequiredUint64 == nil { + return 0, fmt.Errorf("proto: required field required_uint64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredUint64)) + i-- + dAtA[i] = 0x20 + } + if m.RequiredUint32 == nil { + return 0, fmt.Errorf("proto: required field required_uint32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredUint32)) + i-- + dAtA[i] = 0x18 + } + if m.RequiredInt64 == nil { + return 0, fmt.Errorf("proto: required field required_int64 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredInt64)) + i-- + dAtA[i] = 0x10 + } + if m.RequiredInt32 == nil { + return 0, fmt.Errorf("proto: required field required_int32 not set") + } else { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RequiredInt32)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof_A1) 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 *TestLargeOneof_A1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A1) 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 *TestLargeOneof_A2) 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 *TestLargeOneof_A2) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A2) 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 *TestLargeOneof_A3) 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 *TestLargeOneof_A3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A3) 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 *TestLargeOneof_A4) 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 *TestLargeOneof_A4) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A4) 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 *TestLargeOneof_A5) 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 *TestLargeOneof_A5) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A5) 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 *TestLargeOneof) 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 *TestLargeOneof) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof) 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.LargeOneof.(*TestLargeOneof_A5_); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.LargeOneof.(*TestLargeOneof_A4_); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.LargeOneof.(*TestLargeOneof_A3_); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.LargeOneof.(*TestLargeOneof_A2_); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.LargeOneof.(*TestLargeOneof_A1_); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *TestLargeOneof_A1_) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A1_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A1 != nil { + size, err := m.A1.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *TestLargeOneof_A2_) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A2_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A2 != nil { + size, err := m.A2.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *TestLargeOneof_A3_) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A3_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A3 != nil { + size, err := m.A3.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *TestLargeOneof_A4_) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A4_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A4 != nil { + size, err := m.A4.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *TestLargeOneof_A5_) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TestLargeOneof_A5_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.A5 != nil { + size, err := m.A5.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x2a + } + 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_MultiWordGroupField) 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.Multiwordgroupfield != nil { + l = m.Multiwordgroupfield.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)) + } else { + n += 3 + } + 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 *GroupField) 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 *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 *ProtoWithKeywords) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Inline != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Inline)) + } + if m.Concept != nil { + l = len(*m.Concept) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Requires) > 0 { + for _, s := range m.Requires { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *TestAllRequiredTypesProto2_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)) + } + if m.OptionalCorecursive != nil { + l = m.OptionalCorecursive.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2_MessageSetCorrect) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2_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 *TestAllRequiredTypesProto2) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequiredInt32 != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredInt32)) + } + if m.RequiredInt64 != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredInt64)) + } + if m.RequiredUint32 != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredUint32)) + } + if m.RequiredUint64 != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.RequiredUint64)) + } + if m.RequiredSint32 != nil { + n += 1 + protohelpers.SizeOfZigzag(uint64(*m.RequiredSint32)) + } + if m.RequiredSint64 != nil { + n += 1 + protohelpers.SizeOfZigzag(uint64(*m.RequiredSint64)) + } + if m.RequiredFixed32 != nil { + n += 5 + } + if m.RequiredFixed64 != nil { + n += 9 + } + if m.RequiredSfixed32 != nil { + n += 5 + } + if m.RequiredSfixed64 != nil { + n += 9 + } + if m.RequiredFloat != nil { + n += 5 + } + if m.RequiredDouble != nil { + n += 9 + } + if m.RequiredBool != nil { + n += 2 + } + if m.RequiredString != nil { + l = len(*m.RequiredString) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RequiredBytes != nil { + l = len(m.RequiredBytes) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RequiredNestedMessage != nil { + l = m.RequiredNestedMessage.SizeVT() + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RequiredForeignMessage != nil { + l = m.RequiredForeignMessage.SizeVT() + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RequiredNestedEnum != nil { + n += 2 + protohelpers.SizeOfVarint(uint64(*m.RequiredNestedEnum)) + } + if m.RequiredForeignEnum != nil { + n += 2 + protohelpers.SizeOfVarint(uint64(*m.RequiredForeignEnum)) + } + if m.RequiredStringPiece != nil { + l = len(*m.RequiredStringPiece) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RequiredCord != nil { + l = len(*m.RequiredCord) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RecursiveMessage != nil { + l = m.RecursiveMessage.SizeVT() + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.OptionalRecursiveMessage != nil { + l = m.OptionalRecursiveMessage.SizeVT() + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + 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)) + } + n += len(m.unknownFields) + return n +} + +func (m *TestLargeOneof_A1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *TestLargeOneof_A2) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *TestLargeOneof_A3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *TestLargeOneof_A4) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *TestLargeOneof_A5) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *TestLargeOneof) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.LargeOneof.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *TestLargeOneof_A1_) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A1 != nil { + l = m.A1.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *TestLargeOneof_A2_) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A2 != nil { + l = m.A2.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *TestLargeOneof_A3_) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A3 != nil { + l = m.A3.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *TestLargeOneof_A4_) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A4 != nil { + l = m.A4.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *TestLargeOneof_A5_) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A5 != nil { + l = m.A5.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + 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_MultiWordGroupField) 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_MultiWordGroupField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllTypesProto2_MultiWordGroupField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 205: + 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 206: + 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 + } } - var v int32 + 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 @@ -7419,17 +13404,96 @@ func (m *TestAllTypesProto2_Data) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - var v uint32 + 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 @@ -7439,127 +13503,96 @@ func (m *TestAllTypesProto2_Data) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + msglen |= int(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 { + if msglen < 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 { + postIndex := iNdEx + msglen + if postIndex < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > 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 + if m.MapUint64Uint64 == nil { + m.MapUint64Uint64 = make(map[uint64]uint64) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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 + } } - } - 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: + m.MapUint64Uint64[mapkey] = mapvalue + iNdEx = postIndex + case 60: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapSint32Sint32", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7569,81 +13602,207 @@ func (m *TestAllTypesProto2_MessageSetCorrectExtension1) UnmarshalVT(dAtA []byte } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Str = &s + 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 - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 61: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MapSint64Sint64", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + 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 (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return protohelpers.ErrInvalidLength } - 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.MapSint64Sint64 == nil { + m.MapSint64Sint64 = make(map[int64]int64) } - } - 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 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 + } } - var v int32 + 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 @@ -7653,68 +13812,78 @@ func (m *TestAllTypesProto2_MessageSetCorrectExtension2) UnmarshalVT(dAtA []byte } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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 msglen < 0 { + return protohelpers.ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + msglen + if postIndex < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > 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 + if m.MapFixed32Fixed32 == nil { + m.MapFixed32Fixed32 = make(map[uint32]uint32) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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 + } } - } - 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) + m.MapFixed32Fixed32[mapkey] = mapvalue + iNdEx = postIndex + case 63: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MapFixed64Fixed64", wireType) } - var v int32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7724,17 +13893,78 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - var v int64 + 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 @@ -7744,17 +13974,78 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + msglen |= int(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) + 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 v uint32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7764,58 +14055,78 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - 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 - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - m.OptionalUint64 = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalSint32", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= 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 + } } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(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 } } - 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) + m.MapSfixed64Sfixed64[mapkey] = mapvalue + iNdEx = postIndex + case 66: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Float", wireType) } - var v uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7825,87 +14136,89 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + msglen |= int(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 + if msglen < 0 { + return protohelpers.ErrInvalidLength } - 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) + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - var v uint32 - if (iNdEx + 4) > l { + if postIndex > 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) + if m.MapInt32Float == nil { + m.MapInt32Float = make(map[int32]float32) } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + 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 + } } - 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) + m.MapInt32Float[mapkey] = mapvalue + iNdEx = postIndex + case 67: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Double", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7915,18 +14228,89 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - b := bool(v != 0) - m.OptionalBool = &b - case 14: + 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 OptionalString", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapBoolBool", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7936,30 +14320,100 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.OptionalString = &s + 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 15: + case 69: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringString", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7969,29 +14423,122 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= 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{} - } + 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 18: + case 70: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringBytes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8018,16 +14565,108 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OptionalNestedMessage == nil { - m.OptionalNestedMessage = &TestAllTypesProto2_NestedMessage{} + if m.MapStringBytes == nil { + m.MapStringBytes = make(map[string][]byte) } - if err := m.OptionalNestedMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + 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 19: + case 71: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8054,122 +14693,109 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { 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) + if m.MapStringNestedMessage == nil { + m.MapStringNestedMessage = make(map[string]*TestAllTypesProto2_NestedMessage) } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + 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 + } } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= 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 } } - 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 + m.MapStringNestedMessage[mapkey] = mapvalue iNdEx = postIndex - case 27: + case 72: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecursiveMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8196,16 +14822,14 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { 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 + if m.MapStringForeignMessage == nil { + m.MapStringForeignMessage = make(map[string]*ForeignMessageProto2) } - iNdEx = postIndex - case 31: - if wireType == 0 { - var v int32 + 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 @@ -8215,51 +14839,43 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + wire |= uint64(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 + 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 + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength } - } - 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++ + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF } - } - elementCount = count - if elementCount != 0 && len(m.RepeatedInt32) == 0 { - m.RepeatedInt32 = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 + 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 @@ -8269,19 +14885,80 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedInt32 = append(m.RepeatedInt32, v) + 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 } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32", wireType) } - case 32: - if wireType == 0 { - var v int64 + 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 @@ -8291,51 +14968,42 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + wire |= uint64(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 + 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 + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength } - } - 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++ + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF } - } - elementCount = count - if elementCount != 0 && len(m.RepeatedInt64) == 0 { - m.RepeatedInt64 = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8345,36 +15013,65 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + mapvalue |= TestAllTypesProto2_NestedEnum(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 + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF } + iNdEx += skippy } - m.RepeatedUint32 = append(m.RepeatedUint32, v) - } else if wireType == 2 { - var packedLen int + } + 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 @@ -8384,34 +15081,14 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(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 + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8421,73 +15098,25 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + stringLenmapkey |= uint64(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 + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postStringIndexmapkey > 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 + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8497,17 +15126,29 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + mapvalue |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedUint64 = append(m.RepeatedUint64, v) + } 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 } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint64", wireType) } - case 35: + m.MapStringForeignEnum[mapkey] = mapvalue + iNdEx = postIndex + case 75: if wireType == 0 { var v int32 for shift := uint(0); ; shift += 7 { @@ -8524,8 +15165,7 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { break } } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.RepeatedSint32 = append(m.RepeatedSint32, v) + m.PackedInt32 = append(m.PackedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -8560,8 +15200,8 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.RepeatedSint32) == 0 { - m.RepeatedSint32 = make([]int32, 0, elementCount) + if elementCount != 0 && len(m.PackedInt32) == 0 { + m.PackedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { var v int32 @@ -8579,15 +15219,14 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { break } } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.RepeatedSint32 = append(m.RepeatedSint32, v) + m.PackedInt32 = append(m.PackedInt32, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PackedInt32", wireType) } - case 36: + case 76: if wireType == 0 { - var v uint64 + var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8597,13 +15236,12 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) + m.PackedInt64 = append(m.PackedInt64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -8638,11 +15276,11 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.RepeatedSint64) == 0 { - m.RepeatedSint64 = make([]int64, 0, elementCount) + if elementCount != 0 && len(m.PackedInt64) == 0 { + m.PackedInt64 = make([]int64, 0, elementCount) } for iNdEx < postIndex { - var v uint64 + var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8652,28 +15290,19 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) + m.PackedInt64 = append(m.PackedInt64, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSint64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PackedInt64", wireType) } - case 37: - if wireType == 5 { + case 77: + if wireType == 0 { 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 @@ -8683,47 +15312,12 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + v |= uint32(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) + m.PackedUint32 = append(m.PackedUint32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -8751,85 +15345,40 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { 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 + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ } } - 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) + elementCount = count + if elementCount != 0 && len(m.PackedUint32) == 0 { + m.PackedUint32 = make([]uint32, 0, elementCount) } for iNdEx < postIndex { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF + 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 + } } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) + m.PackedUint32 = append(m.PackedUint32, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PackedUint32", 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 + case 78: + if wireType == 0 { + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8839,48 +15388,12 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + v |= uint64(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) + m.PackedUint64 = append(m.PackedUint64, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -8908,33 +15421,56 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } var elementCount int - elementCount = packedLen / 4 - if elementCount != 0 && len(m.RepeatedFloat) == 0 { - m.RepeatedFloat = make([]float32, 0, elementCount) + 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 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) + 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 RepeatedFloat", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PackedUint64", wireType) } - case 42: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + 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 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.RepeatedDouble = append(m.RepeatedDouble, v2) + 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 { @@ -8962,26 +15498,41 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.RepeatedDouble) == 0 { - m.RepeatedDouble = make([]float64, 0, elementCount) + 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 uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + 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 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.RepeatedDouble = append(m.RepeatedDouble, v2) + 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 RepeatedDouble", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PackedSint32", wireType) } - case 43: + case 80: if wireType == 0 { - var v int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8991,12 +15542,13 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) + 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 { @@ -9024,12 +15576,18 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } var elementCount int - elementCount = packedLen - if elementCount != 0 && len(m.RepeatedBool) == 0 { - m.RepeatedBool = make([]bool, 0, elementCount) + 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 int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9039,151 +15597,80 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) + 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 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) + return fmt.Errorf("proto: wrong wireType = %d for field PackedSint64", wireType) } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { + case 81: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > 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 + 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 + } } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -9193,12 +15680,47 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) + 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 { @@ -9226,33 +15748,33 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } var elementCount int - if elementCount != 0 && len(m.RepeatedNestedEnum) == 0 { - m.RepeatedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) + elementCount = packedLen / 4 + if elementCount != 0 && len(m.PackedSfixed32) == 0 { + m.PackedSfixed32 = make([]int32, 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 - } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF } - m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) + 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 RepeatedNestedEnum", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed32", wireType) } - case 52: - if wireType == 0 { - var v ForeignEnumProto2 + 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 @@ -9262,12 +15784,48 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= ForeignEnumProto2(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) + 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 { @@ -9295,131 +15853,35 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } var elementCount int - if elementCount != 0 && len(m.RepeatedForeignEnum) == 0 { - m.RepeatedForeignEnum = make([]ForeignEnumProto2, 0, elementCount) + elementCount = packedLen / 4 + if elementCount != 0 && len(m.PackedFloat) == 0 { + m.PackedFloat = make([]float32, 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 - } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF } - 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 + 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) } - 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 + 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 @@ -9429,96 +15891,42 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + case 87: + if wireType == 0 { + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9528,28 +15936,45 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= int(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 - } + 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 } - } else if fieldNum == 2 { + 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 @@ -9559,65 +15984,36 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= int64(b&0x7F) << shift + v |= int(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 + 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 + skippy) > postIndex { + if iNdEx >= l { 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 + 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 @@ -9627,13 +16023,27 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { + 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 @@ -9643,12 +16053,73 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= uint32(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } - } else if fieldNum == 2 { + 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 @@ -9658,65 +16129,36 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= uint32(b&0x7F) << shift + v |= 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 + 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 + skippy) > postIndex { + if iNdEx >= l { 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 + b := dAtA[iNdEx] + iNdEx++ + v |= int64(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 + 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 @@ -9726,28 +16168,34 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 - } + 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++ } - } else if fieldNum == 2 { + } + 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 @@ -9757,65 +16205,36 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= uint64(b&0x7F) << shift + v |= 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 + 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 + skippy) > postIndex { + if iNdEx >= l { 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 + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(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 + 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 @@ -9825,32 +16244,34 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 - } + 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++ } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey = int32(mapkeytemp) - } else if fieldNum == 2 { - var mapvaluetemp int32 + } + 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 @@ -9860,67 +16281,36 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvaluetemp |= int32(b&0x7F) << shift + v |= uint32(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 + 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 + skippy) > postIndex { + if iNdEx >= l { 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 + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(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 + 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 @@ -9930,32 +16320,34 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 - } + 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++ } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey = int64(mapkeytemp) - } else if fieldNum == 2 { - var mapvaluetemp uint64 + } + 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 @@ -9965,67 +16357,37 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvaluetemp |= uint64(b&0x7F) << shift + v |= 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 + 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 + skippy) > postIndex { + if iNdEx >= l { 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 + 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 @@ -10035,78 +16397,57 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + case 94: + if wireType == 0 { + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10116,78 +16457,83 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + 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 } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { + if iNdEx >= 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 + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -10197,78 +16543,49 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 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 } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + v = 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.UnpackedFixed32 = append(m.UnpackedFixed32, v) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed32", wireType) } - 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 { + case 96: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > 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 + 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 @@ -10278,78 +16595,49 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 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 } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = 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.UnpackedFixed64 = append(m.UnpackedFixed64, v) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field UnpackedFixed64", wireType) } - 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 { + case 97: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > 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 + 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 @@ -10359,89 +16647,49 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -10451,89 +16699,104 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 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 } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = int64(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 + 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 + skippy) > postIndex { + if iNdEx >= l { return io.ErrUnexpectedEOF } - iNdEx += skippy + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -10543,100 +16806,42 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + case 101: + if wireType == 0 { + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10646,43 +16851,45 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= int(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 + 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 postStringIndexmapkey > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 + 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 @@ -10692,78 +16899,19 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift + v |= int(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 + m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field UnpackedBool", wireType) } - 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 + case 102: + if wireType == 0 { + var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10773,43 +16921,44 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(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 + 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 postStringIndexmapkey > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapbyteLen uint64 + 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 @@ -10819,45 +16968,39 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(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.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.MapStringBytes[mapkey] = mapvalue - iNdEx = postIndex - case 71: + m.OneofField = &TestAllTypesProto2_OneofUint32{OneofUint32: v} + case 112: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OneofNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10884,111 +17027,23 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { 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 - } + if oneof, ok := m.OneofField.(*TestAllTypesProto2_OneofNestedMessage); ok { + if err := oneof.OneofNestedMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - 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 + } else { + v := &TestAllTypesProto2_NestedMessage{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.OneofField = &TestAllTypesProto2_OneofNestedMessage{OneofNestedMessage: v} } - m.MapStringNestedMessage[mapkey] = mapvalue iNdEx = postIndex - case 72: + case 113: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OneofString", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10998,126 +17053,83 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.MapStringForeignMessage == nil { - m.MapStringForeignMessage = make(map[string]*ForeignMessageProto2) + 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 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 - } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 + 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 } } - m.MapStringForeignMessage[mapkey] = mapvalue - iNdEx = postIndex - case 73: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedEnum", wireType) + 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 msglen int + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11127,110 +17139,39 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + m.OneofField = &TestAllTypesProto2_OneofUint64{OneofUint64: v} + case 117: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field OneofFloat", wireType) } - if postIndex > l { + var v uint32 + if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } - if m.MapStringNestedEnum == nil { - m.MapStringNestedEnum = make(map[string]TestAllTypesProto2_NestedEnum) + 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 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 - } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - m.MapStringNestedEnum[mapkey] = mapvalue - iNdEx = postIndex - case 74: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignEnum", wireType) + 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 msglen int + var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11240,29 +17181,20 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(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) + m.OneofField = &TestAllTypesProto2_OneofEnum{OneofEnum: v} + case 201: + if wireType != 3 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var mapkey string - var mapvalue ForeignEnumProto2 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 + groupStart := iNdEx + for { + maybeGroupEnd := iNdEx + var groupFieldWire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11272,93 +17204,35 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + groupFieldWire |= 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 { + groupWireType := int(wire & 0x7) + if groupWireType == 4 { + if err := m.Data.UnmarshalVT(dAtA[groupStart:maybeGroupEnd]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + break } - } - 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 - } + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - m.PackedInt32 = append(m.PackedInt32, v) - } else if wireType == 2 { - var packedLen int + iNdEx += skippy + } + case 204: + if wireType != 3 { + return fmt.Errorf("proto: wrong wireType = %d for field Multiwordgroupfield", wireType) + } + groupStart := iNdEx + for { + maybeGroupEnd := iNdEx + var groupFieldWire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11368,895 +17242,1055 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + groupFieldWire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + groupWireType := int(wire & 0x7) + if groupWireType == 4 { + if err := m.Multiwordgroupfield.UnmarshalVT(dAtA[groupStart:maybeGroupEnd]); err != nil { + return err + } + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + 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 } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - elementCount = count - if elementCount != 0 && len(m.PackedInt32) == 0 { - m.PackedInt32 = make([]int32, 0, elementCount) + } + 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 } - 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) + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break } - } 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.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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } 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 - } + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 - } + 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 packedLen < 0 { - return protohelpers.ErrInvalidLength + if iNdEx >= l { + return io.ErrUnexpectedEOF } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - if postIndex > l { + } + 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 } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - elementCount = count - if elementCount != 0 && len(m.PackedUint64) == 0 { - m.PackedUint64 = make([]uint64, 0, elementCount) + } + 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 } - 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) + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 - } + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - elementCount = count - if elementCount != 0 && len(m.PackedSint32) == 0 { - m.PackedSint32 = make([]int32, 0, elementCount) + } + 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 } - 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) + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 - } + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - elementCount = count - if elementCount != 0 && len(m.PackedSint64) == 0 { - m.PackedSint64 = make([]int64, 0, elementCount) + } + 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 } - 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)) + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.PackedSfixed64) == 0 { - m.PackedSfixed64 = make([]int64, 0, elementCount) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - 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) + } + 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 { - return fmt.Errorf("proto: wrong wireType = %d for field PackedSfixed64", wireType) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - case 85: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF + } + } + + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 *GroupField) 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: GroupField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 122: + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + m.GroupInt32 = &v + case 123: + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.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 *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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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)) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field PackedNestedEnum", wireType) } - case 89: - if wireType == 0 { - var v int32 + 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 @@ -12266,73 +18300,51 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + groupFieldWire |= uint64(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 + groupWireType := int(wire & 0x7) + if groupWireType == 4 { + if err := m.Optionalgroup.UnmarshalVT(dAtA[groupStart:maybeGroupEnd]); err != nil { + return err } + break } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + packedLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 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++ - } + 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 } - elementCount = count - if elementCount != 0 && len(m.UnpackedInt32) == 0 { - m.UnpackedInt32 = make([]int32, 0, elementCount) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field UnpackedInt32", wireType) } - case 90: + b := bool(v != 0) + m.OptionalBool = &b + case 1011: if wireType == 0 { - var v int64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12342,12 +18354,12 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.UnpackedInt64 = append(m.UnpackedInt64, v) + m.RepeatedInt32 = append(m.RepeatedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -12381,12 +18393,12 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { count++ } } - elementCount = count - if elementCount != 0 && len(m.UnpackedInt64) == 0 { - m.UnpackedInt64 = make([]int64, 0, elementCount) + elementCount = count + if elementCount != 0 && len(m.RepeatedInt32) == 0 { + m.RepeatedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { - var v int64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12396,784 +18408,1349 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.UnpackedInt64 = append(m.UnpackedInt64, v) + 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 *ProtoWithKeywords) 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: ProtoWithKeywords: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoWithKeywords: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Inline", 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 } - } 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.Inline = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Concept", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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.Concept = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requires", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - elementCount = count - if elementCount != 0 && len(m.UnpackedUint32) == 0 { - m.UnpackedUint32 = make([]uint32, 0, elementCount) + } + 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.Requires = append(m.Requires, 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 *TestAllRequiredTypesProto2_NestedMessage) 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: TestAllRequiredTypesProto2_NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 } - 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) + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.A = &v + hasFields[0] |= uint64(0x00000001) + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 = &TestAllRequiredTypesProto2{} + } + if err := m.Corecursive.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalCorecursive", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } 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 - } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OptionalCorecursive == nil { + m.OptionalCorecursive = &TestAllRequiredTypesProto2{} + } + if err := m.OptionalCorecursive.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 hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field a not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field corecursive not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2_Data) 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: TestAllRequiredTypesProto2_Data: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + m.GroupInt32 = &v + hasFields[0] |= uint64(0x00000001) + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break } - 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) + } + m.GroupUint32 = &v + hasFields[0] |= uint64(0x00000002) + 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 group_int32 not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field group_uint32 not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2_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: TestAllRequiredTypesProto2_MessageSetCorrect: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 { - return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint32", wireType) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - 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 - } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) 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: TestAllRequiredTypesProto2_MessageSetCorrectExtension1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 + hasFields[0] |= uint64(0x00000001) + 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 str not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) 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: TestAllRequiredTypesProto2_MessageSetCorrectExtension2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 postIndex > l { + if iNdEx >= 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)) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + m.I = &v + hasFields[0] |= uint64(0x00000001) + 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 i not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2) 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: TestAllRequiredTypesProto2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredInt32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + m.RequiredInt32 = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredInt64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + m.RequiredInt64 = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredUint32", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + m.RequiredUint32 = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredUint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + m.RequiredUint64 = &v + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredSint32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.RequiredSint32 = &v + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredSint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.RequiredSint64 = &v2 + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredFixed32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.RequiredFixed32 = &v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredFixed64", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.RequiredFixed64 = &v + hasFields[0] |= uint64(0x00000080) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredSfixed32", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.RequiredSfixed32 = &v + hasFields[0] |= uint64(0x00000100) + case 10: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredSfixed64", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.RequiredSfixed64 = &v + hasFields[0] |= uint64(0x00000200) + case 11: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredFloat", 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.RequiredFloat = &v2 + hasFields[0] |= uint64(0x00000400) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredDouble", 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.RequiredDouble = &v2 + hasFields[0] |= uint64(0x00000800) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredBool", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + b := bool(v != 0) + m.RequiredBool = &b + hasFields[0] |= uint64(0x00001000) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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.RequiredString = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00002000) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequiredBytes = append(m.RequiredBytes[:0], dAtA[iNdEx:postIndex]...) + if m.RequiredBytes == nil { + m.RequiredBytes = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00004000) + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredNestedMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequiredNestedMessage == nil { + m.RequiredNestedMessage = &TestAllRequiredTypesProto2_NestedMessage{} + } + if err := m.RequiredNestedMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00008000) + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredForeignMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } 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 - } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequiredForeignMessage == nil { + m.RequiredForeignMessage = &ForeignMessageProto2{} + } + if err := m.RequiredForeignMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00010000) + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredNestedEnum", wireType) + } + var v TestAllRequiredTypesProto2_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= TestAllRequiredTypesProto2_NestedEnum(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + m.RequiredNestedEnum = &v + hasFields[0] |= uint64(0x00020000) + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredForeignEnum", wireType) + } + var v ForeignEnumProto2 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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)) + b := dAtA[iNdEx] + iNdEx++ + v |= ForeignEnumProto2(b&0x7F) << shift + if b < 0x80 { + break } - } 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.RequiredForeignEnum = &v + hasFields[0] |= uint64(0x00040000) + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredStringPiece", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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.RequiredStringPiece = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00080000) + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredCord", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } 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) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - var v uint32 + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.RequiredCord = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00100000) + 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 @@ -13183,15 +19760,32 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.OneofField = &TestAllTypesProto2_OneofUint32{OneofUint32: v} - case 112: + 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 = &TestAllRequiredTypesProto2{} + } + if err := m.RecursiveMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00200000) + case 28: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OneofNestedMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OptionalRecursiveMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13218,23 +19812,57 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { 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 + if m.OptionalRecursiveMessage == nil { + m.OptionalRecursiveMessage = &TestAllRequiredTypesProto2{} + } + if err := m.OptionalRecursiveMessage.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + 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 + } } - } else { - v := &TestAllTypesProto2_NestedMessage{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + 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 } - m.OneofField = &TestAllTypesProto2_OneofNestedMessage{OneofNestedMessage: v} + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + iNdEx += skippy } - iNdEx = postIndex - case 113: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OneofString", wireType) + hasFields[0] |= uint64(0x00400000) + case 241: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt32", wireType) } - var stringLen uint64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13244,29 +19872,39 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int32(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 + m.DefaultInt32 = &v + hasFields[0] |= uint64(0x00800000) + case 242: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt64", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + 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.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) + m.DefaultInt64 = &v + hasFields[0] |= uint64(0x01000000) + case 243: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint32", wireType) } - var byteLen int + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13276,30 +19914,39 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + m.DefaultUint32 = &v + hasFields[0] |= uint64(0x02000000) + case 244: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint64", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + 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 := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.OneofField = &TestAllTypesProto2_OneofBytes{OneofBytes: v} - iNdEx = postIndex - case 115: + m.DefaultUint64 = &v + hasFields[0] |= uint64(0x04000000) + case 245: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OneofBool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint32", wireType) } - var v int + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13309,16 +19956,17 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - b := bool(v != 0) - m.OneofField = &TestAllTypesProto2_OneofBool{OneofBool: b} - case 116: + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.DefaultSint32 = &v + hasFields[0] |= uint64(0x08000000) + case 246: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OneofUint64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { @@ -13335,10 +19983,13 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { break } } - m.OneofField = &TestAllTypesProto2_OneofUint64{OneofUint64: v} - case 117: + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.DefaultSint64 = &v2 + hasFields[0] |= uint64(0x10000000) + case 247: if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field OneofFloat", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed32", wireType) } var v uint32 if (iNdEx + 4) > l { @@ -13346,10 +19997,11 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 - m.OneofField = &TestAllTypesProto2_OneofFloat{OneofFloat: float32(math.Float32frombits(v))} - case 118: + m.DefaultFixed32 = &v + hasFields[0] |= uint64(0x20000000) + case 248: if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field OneofDouble", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed64", wireType) } var v uint64 if (iNdEx + 8) > l { @@ -13357,90 +20009,63 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } 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) + m.DefaultFixed64 = &v + hasFields[0] |= uint64(0x40000000) + case 249: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed32", 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 - } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF } - m.OneofField = &TestAllTypesProto2_OneofEnum{OneofEnum: v} - case 201: - if wireType != 3 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DefaultSfixed32 = &v + hasFields[0] |= uint64(0x80000000) + case 250: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed64", 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 + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.DefaultSfixed64 = &v + hasFields[0] |= uint64(0x100000000) + case 251: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultFloat", wireType) } - case 241: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt32", wireType) + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF } - 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 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.DefaultFloat = &v2 + hasFields[0] |= uint64(0x200000000) + case 252: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultDouble", wireType) } - m.DefaultInt32 = &v - case 242: + 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 + hasFields[0] |= uint64(0x400000000) + case 253: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultBool", wireType) } - var v int64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13450,17 +20075,19 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int(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) + b := bool(v != 0) + m.DefaultBool = &b + hasFields[0] |= uint64(0x800000000) + case 254: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultString", wireType) } - var v uint32 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13470,37 +20097,31 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + stringLen |= uint64(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) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - 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 - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - m.DefaultUint64 = &v - case 245: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint32", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - var v int32 + s := string(dAtA[iNdEx:postIndex]) + m.DefaultString = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x1000000000) + 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 @@ -13510,162 +20131,460 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + byteLen |= int(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) + if byteLen < 0 { + return protohelpers.ErrInvalidLength } - 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 + 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 + hasFields[0] |= uint64(0x2000000000) + 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 } - 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) + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field required_int32 not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field required_int64 not set") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return fmt.Errorf("proto: required field required_uint32 not set") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return fmt.Errorf("proto: required field required_uint64 not set") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return fmt.Errorf("proto: required field required_sint32 not set") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return fmt.Errorf("proto: required field required_sint64 not set") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return fmt.Errorf("proto: required field required_fixed32 not set") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return fmt.Errorf("proto: required field required_fixed64 not set") + } + if hasFields[0]&uint64(0x00000100) == 0 { + return fmt.Errorf("proto: required field required_sfixed32 not set") + } + if hasFields[0]&uint64(0x00000200) == 0 { + return fmt.Errorf("proto: required field required_sfixed64 not set") + } + if hasFields[0]&uint64(0x00000400) == 0 { + return fmt.Errorf("proto: required field required_float not set") + } + if hasFields[0]&uint64(0x00000800) == 0 { + return fmt.Errorf("proto: required field required_double not set") + } + if hasFields[0]&uint64(0x00001000) == 0 { + return fmt.Errorf("proto: required field required_bool not set") + } + if hasFields[0]&uint64(0x00002000) == 0 { + return fmt.Errorf("proto: required field required_string not set") + } + if hasFields[0]&uint64(0x00004000) == 0 { + return fmt.Errorf("proto: required field required_bytes not set") + } + if hasFields[0]&uint64(0x00008000) == 0 { + return fmt.Errorf("proto: required field required_nested_message not set") + } + if hasFields[0]&uint64(0x00010000) == 0 { + return fmt.Errorf("proto: required field required_foreign_message not set") + } + if hasFields[0]&uint64(0x00020000) == 0 { + return fmt.Errorf("proto: required field required_nested_enum not set") + } + if hasFields[0]&uint64(0x00040000) == 0 { + return fmt.Errorf("proto: required field required_foreign_enum not set") + } + if hasFields[0]&uint64(0x00080000) == 0 { + return fmt.Errorf("proto: required field required_string_piece not set") + } + if hasFields[0]&uint64(0x00100000) == 0 { + return fmt.Errorf("proto: required field required_cord not set") + } + if hasFields[0]&uint64(0x00200000) == 0 { + return fmt.Errorf("proto: required field recursive_message not set") + } + if hasFields[0]&uint64(0x00400000) == 0 { + return fmt.Errorf("proto: required field data not set") + } + if hasFields[0]&uint64(0x00800000) == 0 { + return fmt.Errorf("proto: required field default_int32 not set") + } + if hasFields[0]&uint64(0x01000000) == 0 { + return fmt.Errorf("proto: required field default_int64 not set") + } + if hasFields[0]&uint64(0x02000000) == 0 { + return fmt.Errorf("proto: required field default_uint32 not set") + } + if hasFields[0]&uint64(0x04000000) == 0 { + return fmt.Errorf("proto: required field default_uint64 not set") + } + if hasFields[0]&uint64(0x08000000) == 0 { + return fmt.Errorf("proto: required field default_sint32 not set") + } + if hasFields[0]&uint64(0x10000000) == 0 { + return fmt.Errorf("proto: required field default_sint64 not set") + } + if hasFields[0]&uint64(0x20000000) == 0 { + return fmt.Errorf("proto: required field default_fixed32 not set") + } + if hasFields[0]&uint64(0x40000000) == 0 { + return fmt.Errorf("proto: required field default_fixed64 not set") + } + if hasFields[0]&uint64(0x80000000) == 0 { + return fmt.Errorf("proto: required field default_sfixed32 not set") + } + if hasFields[0]&uint64(0x100000000) == 0 { + return fmt.Errorf("proto: required field default_sfixed64 not set") + } + if hasFields[0]&uint64(0x200000000) == 0 { + return fmt.Errorf("proto: required field default_float not set") + } + if hasFields[0]&uint64(0x400000000) == 0 { + return fmt.Errorf("proto: required field default_double not set") + } + if hasFields[0]&uint64(0x800000000) == 0 { + return fmt.Errorf("proto: required field default_bool not set") + } + if hasFields[0]&uint64(0x1000000000) == 0 { + return fmt.Errorf("proto: required field default_string not set") + } + if hasFields[0]&uint64(0x2000000000) == 0 { + return fmt.Errorf("proto: required field default_bytes not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestLargeOneof_A1) 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: TestLargeOneof_A1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof_A1: 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 *TestLargeOneof_A2) 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 } - var v uint32 - if (iNdEx + 4) > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - var v uint64 - if (iNdEx + 8) > l { + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestLargeOneof_A2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof_A2: 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 } - 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) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestLargeOneof_A3) 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 } - var v int32 - if (iNdEx + 4) > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - var v int64 - if (iNdEx + 8) > l { + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestLargeOneof_A3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof_A3: 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 } - 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) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestLargeOneof_A4) 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 } - var v uint32 - if (iNdEx + 4) > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - var v uint64 - if (iNdEx + 8) > l { + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestLargeOneof_A4: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof_A4: 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 } - 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) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestLargeOneof_A5) 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 } - 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 - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - b := bool(v != 0) - m.DefaultBool = &b - case 254: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultString", wireType) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - 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 - } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestLargeOneof_A5: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof_A5: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen - if postIndex < 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 *TestLargeOneof) 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.DefaultString = &s - iNdEx = postIndex - case 255: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestLargeOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field A1", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13675,131 +20594,38 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen 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 + if oneof, ok := m.LargeOneof.(*TestLargeOneof_A1_); ok { + if err := oneof.A1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break + } else { + v := &TestLargeOneof_A1{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.LargeOneof = &TestLargeOneof_A1_{A1: v} } - m.Field0Name5 = &v - case 406: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field_0Name6", wireType) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A2", wireType) } - var v int32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13809,57 +20635,38 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - 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 - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - m.FieldName7 = &v - case 408: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldName8", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if oneof, ok := m.LargeOneof.(*TestLargeOneof_A2_); ok { + if err := oneof.A2.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break + } else { + v := &TestLargeOneof_A2{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.LargeOneof = &TestLargeOneof_A2_{A2: v} } - m.FieldName8 = &v - case 409: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field_Name9", wireType) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A3", wireType) } - var v int32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13869,57 +20676,38 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - 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 - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - m.Field_Name10 = &v - case 411: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FIELD_NAME11", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if oneof, ok := m.LargeOneof.(*TestLargeOneof_A3_); ok { + if err := oneof.A3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break + } else { + v := &TestLargeOneof_A3{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.LargeOneof = &TestLargeOneof_A3_{A3: v} } - m.FIELD_NAME11 = &v - case 412: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FIELDName12", wireType) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A4", wireType) } - var v int32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13929,37 +20717,38 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.LargeOneof.(*TestLargeOneof_A4_); ok { + if err := oneof.A4.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break + } else { + v := &TestLargeOneof_A4{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.LargeOneof = &TestLargeOneof_A4_{A4: v} } - m.XFieldName13 = &v - case 414: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field X_FieldName14", wireType) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A5", wireType) } - var v int32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13969,15 +20758,87 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.X_FieldName14 = &v - case 415: + 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.LargeOneof.(*TestLargeOneof_A5_); ok { + if err := oneof.A5.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TestLargeOneof_A5{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.LargeOneof = &TestLargeOneof_A5_{A5: 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 *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 Field_Name15", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -13994,12 +20855,12 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { break } } - m.Field_Name15 = &v - case 416: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field__Name16", wireType) + m.A = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Corecursive", wireType) } - var v int32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14009,15 +20870,82 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Field__Name16 = &v - case 417: + 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 FieldName17__", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -14034,12 +20962,12 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { break } } - m.FieldName17__ = &v - case 418: + m.GroupInt32 = &v + case 203: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldName18__", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupUint32", wireType) } - var v int32 + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14049,12 +20977,12 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - m.FieldName18__ = &v + m.GroupUint32 = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -14067,16 +20995,8 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { 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 - } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } @@ -14085,7 +21005,7 @@ func (m *TestAllTypesProto2) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ForeignMessageProto2) UnmarshalVT(dAtA []byte) error { +func (m *TestAllTypesProto2_MultiWordGroupField) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14108,15 +21028,15 @@ func (m *ForeignMessageProto2) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ForeignMessageProto2: wiretype end group for non-group") + return fmt.Errorf("proto: TestAllTypesProto2_MultiWordGroupField: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ForeignMessageProto2: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestAllTypesProto2_MultiWordGroupField: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 205: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -14133,7 +21053,27 @@ func (m *ForeignMessageProto2) UnmarshalVT(dAtA []byte) error { break } } - m.C = &v + m.GroupInt32 = &v + case 206: + 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:]) @@ -14156,7 +21096,7 @@ func (m *ForeignMessageProto2) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *UnknownToTestAllTypes_OptionalGroup) UnmarshalVT(dAtA []byte) error { +func (m *TestAllTypesProto2_MessageSetCorrect) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14179,32 +21119,12 @@ func (m *UnknownToTestAllTypes_OptionalGroup) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnknownToTestAllTypes_OptionalGroup: wiretype end group for non-group") + return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrect: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnknownToTestAllTypes_OptionalGroup: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrect: 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:]) @@ -14217,8 +21137,16 @@ func (m *UnknownToTestAllTypes_OptionalGroup) UnmarshalVT(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy + 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 + } } } @@ -14227,7 +21155,7 @@ func (m *UnknownToTestAllTypes_OptionalGroup) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *UnknownToTestAllTypes) UnmarshalVT(dAtA []byte) error { +func (m *TestAllTypesProto2_MessageSetCorrectExtension1) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14250,35 +21178,15 @@ func (m *UnknownToTestAllTypes) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnknownToTestAllTypes: wiretype end group for non-group") + return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension1: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnknownToTestAllTypes: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension1: 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: + case 25: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14286,200 +21194,33 @@ func (m *UnknownToTestAllTypes) UnmarshalVT(dAtA []byte) error { 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) + return io.ErrUnexpectedEOF } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt32", wireType) + 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:]) @@ -14502,7 +21243,7 @@ func (m *UnknownToTestAllTypes) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *NullHypothesisProto2) UnmarshalVT(dAtA []byte) error { +func (m *TestAllTypesProto2_MessageSetCorrectExtension2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14525,12 +21266,32 @@ func (m *NullHypothesisProto2) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NullHypothesisProto2: wiretype end group for non-group") + return fmt.Errorf("proto: TestAllTypesProto2_MessageSetCorrectExtension2: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NullHypothesisProto2: illegal tag %d (wire type %d)", fieldNum, wire) + 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:]) @@ -14553,7 +21314,7 @@ func (m *NullHypothesisProto2) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *EnumOnlyProto2) UnmarshalVT(dAtA []byte) error { +func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14576,66 +21337,227 @@ func (m *EnumOnlyProto2) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EnumOnlyProto2: wiretype end group for non-group") + return fmt.Errorf("proto: TestAllTypesProto2: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EnumOnlyProto2: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestAllTypesProto2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + 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 + } } - if (iNdEx + skippy) > l { + 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 } - 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 + 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 } - if iNdEx >= l { + 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 } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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) } - } - 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: + 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 Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14663,65 +21585,18 @@ func (m *OneStringProto2) UnmarshalVT(dAtA []byte) error { 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 + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - } - 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) + s := stringValue + m.OptionalString = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalBytes", wireType) } - var v int32 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14731,15 +21606,26 @@ func (m *TestAllTypesProto2_NestedMessage) UnmarshalVTUnsafe(dAtA []byte) error } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.A = &v - case 2: + 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 Corecursive", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14766,69 +21652,54 @@ func (m *TestAllTypesProto2_NestedMessage) UnmarshalVTUnsafe(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - if m.Corecursive == nil { - m.Corecursive = &TestAllTypesProto2{} + if m.OptionalNestedMessage == nil { + m.OptionalNestedMessage = &TestAllTypesProto2_NestedMessage{} } - if err := m.Corecursive.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.OptionalNestedMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignMessage", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + 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 (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return protohelpers.ErrInvalidLength } - 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.OptionalForeignMessage == nil { + m.OptionalForeignMessage = &ForeignMessageProto2{} } - } - 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 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 GroupInt32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OptionalNestedEnum", wireType) } - var v int32 + var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14838,17 +21709,17 @@ func (m *TestAllTypesProto2_Data) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } - m.GroupInt32 = &v - case 203: + m.OptionalNestedEnum = &v + case 22: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupUint32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OptionalForeignEnum", wireType) } - var v uint32 + var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14858,125 +21729,52 @@ func (m *TestAllTypesProto2_Data) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + 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 } } - m.GroupUint32 = &v - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + intStringLen := int(stringLen) + if intStringLen < 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 { + postIndex := iNdEx + intStringLen + if postIndex < 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 { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - } - 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 { + s := stringValue + m.OptionalStringPiece = &s + iNdEx = postIndex case 25: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OptionalCord", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15009,635 +21807,724 @@ func (m *TestAllTypesProto2_MessageSetCorrectExtension1) UnmarshalVTUnsafe(dAtA stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue - m.Str = &s + m.OptionalCord = &s iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecursiveMessage", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + 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 (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return protohelpers.ErrInvalidLength } - 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.RecursiveMessage == nil { + m.RecursiveMessage = &TestAllTypesProto2{} } - } - 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) + 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) } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + 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 + } } - if iNdEx >= l { + 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 } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 + } } - if iNdEx >= l { + 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 } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + 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 + } } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > 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 + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + elementCount = count + if elementCount != 0 && len(m.RepeatedUint64) == 0 { + m.RepeatedUint64 = make([]uint64, 0, elementCount) } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + 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 + } } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + 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 + } } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } } - } - 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 + elementCount = count + if elementCount != 0 && len(m.RepeatedSint64) == 0 { + m.RepeatedSint64 = make([]int64, 0, elementCount) } - if iNdEx >= l { + 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 } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 iNdEx >= l { + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.RepeatedFixed64) == 0 { + m.RepeatedFixed64 = make([]uint64, 0, elementCount) } - } - 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 + 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) } - if iNdEx >= l { + } 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 } - b := dAtA[iNdEx] - iNdEx++ - v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift - if b < 0x80 { - break + 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 + } } - } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - v |= ForeignEnumProto2(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.RepeatedSfixed32) == 0 { + m.RepeatedSfixed32 = make([]int32, 0, elementCount) } - } - 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 + 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) } - if iNdEx >= l { + } 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 } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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 + } } - } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.RepeatedSfixed64) == 0 { + m.RepeatedSfixed64 = make([]int64, 0, elementCount) } - } - 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 + 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) } - if iNdEx >= l { + } 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 } - 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 + 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 @@ -15647,12 +22534,49 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedInt32 = append(m.RepeatedInt32, v) + 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 { @@ -15680,40 +22604,26 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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) + elementCount = packedLen / 8 + if elementCount != 0 && len(m.RepeatedDouble) == 0 { + m.RepeatedDouble = make([]float64, 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 - } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - m.RepeatedInt32 = append(m.RepeatedInt32, v) + 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 RepeatedInt32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDouble", wireType) } - case 32: + case 43: if wireType == 0 { - var v int64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15723,12 +22633,12 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedInt64 = append(m.RepeatedInt64, v) + m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -15756,18 +22666,12 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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) + elementCount = packedLen + if elementCount != 0 && len(m.RepeatedBool) == 0 { + m.RepeatedBool = make([]bool, 0, elementCount) } for iNdEx < postIndex { - var v int64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15777,19 +22681,154 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedInt64 = append(m.RepeatedInt64, v) + 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 } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedInt64", wireType) } - case 33: + 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 uint32 + var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15799,12 +22838,12 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedUint32 = append(m.RepeatedUint32, v) + m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -15832,18 +22871,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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) + if elementCount != 0 && len(m.RepeatedNestedEnum) == 0 { + m.RepeatedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) } for iNdEx < postIndex { - var v uint32 + var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15853,19 +22885,19 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedUint32 = append(m.RepeatedUint32, v) + m.RepeatedNestedEnum = append(m.RepeatedNestedEnum, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedEnum", wireType) } - case 34: + case 52: if wireType == 0 { - var v uint64 + var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15875,12 +22907,12 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedUint64 = append(m.RepeatedUint64, v) + m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -15908,18 +22940,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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) + if elementCount != 0 && len(m.RepeatedForeignEnum) == 0 { + m.RepeatedForeignEnum = make([]ForeignEnumProto2, 0, elementCount) } for iNdEx < postIndex { - var v uint64 + var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15929,19 +22954,125 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= ForeignEnumProto2(b&0x7F) << shift if b < 0x80 { break } } - m.RepeatedUint64 = append(m.RepeatedUint64, v) + m.RepeatedForeignEnum = append(m.RepeatedForeignEnum, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedUint64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignEnum", wireType) } - case 35: - if wireType == 0 { - var v int32 + 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 @@ -15951,15 +23082,96 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + wire |= uint64(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 + 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 @@ -15969,34 +23181,28 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(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++ + 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 + } } - } - elementCount = count - if elementCount != 0 && len(m.RepeatedSint32) == 0 { - m.RepeatedSint32 = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 + } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16006,38 +23212,65 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + mapvalue |= int64(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 + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF } + iNdEx += skippy } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.RepeatedSint64 = append(m.RepeatedSint64, int64(v)) - } else if wireType == 2 { - var packedLen int + } + 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 @@ -16047,34 +23280,13 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(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 + fieldNum := int32(wire >> 3) + if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16084,80 +23296,80 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + mapkey |= uint32(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 + } 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 + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - } - 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 { + if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.RepeatedFixed32 = append(m.RepeatedFixed32, v) + iNdEx += skippy } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed32", wireType) } - case 38: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { + 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 } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.RepeatedFixed64 = append(m.RepeatedFixed64, v) - } else if wireType == 2 { - var packedLen int + 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 @@ -16167,49 +23379,96 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(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 { + 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 } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.RepeatedFixed64 = append(m.RepeatedFixed64, v) + iNdEx += skippy } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFixed64", wireType) } - case 39: - if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { + 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 } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) - } else if wireType == 2 { - var packedLen int + 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 @@ -16219,49 +23478,102 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(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 { + 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 } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.RepeatedSfixed32 = append(m.RepeatedSfixed32, v) + iNdEx += skippy } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed32", wireType) } - case 40: - if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { + 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 } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) - } else if wireType == 2 { - var packedLen int + 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 @@ -16271,50 +23583,102 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(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 { + 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 } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.RepeatedSfixed64 = append(m.RepeatedSfixed64, v) + iNdEx += skippy } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedSfixed64", wireType) } - case 41: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { + 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 } - 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 + 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 @@ -16324,51 +23688,78 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(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 + fieldNum := int32(wire >> 3) + if fieldNum == 1 { if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.RepeatedFloat = append(m.RepeatedFloat, v2) + } 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 } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedFloat", wireType) } - case 42: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { + 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 } - 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 + 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 @@ -16378,42 +23769,78 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + 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 } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedDouble", wireType) } - case 43: - if wireType == 0 { - var v int + 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 @@ -16423,69 +23850,46 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + wire |= uint64(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 + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF } - if iNdEx >= l { + mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break + mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - } - 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 - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - m.RepeatedBool = append(m.RepeatedBool, bool(v != 0)) + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBool", wireType) } - case 44: + m.MapSfixed32Sfixed32[mapkey] = mapvalue + iNdEx = postIndex + case 65: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedString", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapSfixed64Sfixed64", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16495,33 +23899,78 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.MapSfixed64Sfixed64 == nil { + m.MapSfixed64Sfixed64 = make(map[int64]int64) } - m.RepeatedString = append(m.RepeatedString, stringValue) + 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 45: + case 66: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Float", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16531,26 +23980,87 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.RepeatedBytes = append(m.RepeatedBytes, dAtA[iNdEx:postIndex]) + 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 48: + case 67: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedNestedMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Double", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16577,14 +24087,72 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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 + 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 49: + case 68: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepeatedForeignMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapBoolBool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16611,31 +24179,14 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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 + if m.MapBoolBool == nil { + m.MapBoolBool = make(map[bool]bool) } - 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 + 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 @@ -16645,27 +24196,14 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(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 + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16675,66 +24213,14 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift + mapkeytemp |= int(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 + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16744,91 +24230,32 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= ForeignEnumProto2(b&0x7F) << shift + mapvaluetemp |= int(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 + 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 } } - 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) + m.MapBoolBool[mapkey] = mapvalue iNdEx = postIndex - case 56: + case 69: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapInt32Int32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringString", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16855,11 +24282,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MapInt32Int32 == nil { - m.MapInt32Int32 = make(map[int32]int32) + if m.MapStringString == nil { + m.MapStringString = make(map[string]string) } - var mapkey int32 - var mapvalue int32 + var mapkey string + var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -16879,6 +24306,7 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } fieldNum := int32(wire >> 3) if fieldNum == 1 { + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16888,12 +24316,30 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= int32(b&0x7F) << shift + 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 @@ -16903,11 +24349,28 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= int32(b&0x7F) << shift + 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:]) @@ -16923,11 +24386,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx += skippy } } - m.MapInt32Int32[mapkey] = mapvalue + m.MapStringString[mapkey] = mapvalue iNdEx = postIndex - case 57: + case 70: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapInt64Int64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringBytes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16954,11 +24417,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MapInt64Int64 == nil { - m.MapInt64Int64 = make(map[int64]int64) + if m.MapStringBytes == nil { + m.MapStringBytes = make(map[string][]byte) } - var mapkey int64 - var mapvalue int64 + var mapkey string + var mapvalue []byte for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -16978,6 +24441,7 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } fieldNum := int32(wire >> 3) if fieldNum == 1 { + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16987,12 +24451,30 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= int64(b&0x7F) << shift + 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 @@ -17002,11 +24484,24 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= int64(b&0x7F) << shift + 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:]) @@ -17022,11 +24517,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx += skippy } } - m.MapInt64Int64[mapkey] = mapvalue + m.MapStringBytes[mapkey] = mapvalue iNdEx = postIndex - case 58: + case 71: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapUint32Uint32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -17053,11 +24548,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MapUint32Uint32 == nil { - m.MapUint32Uint32 = make(map[uint32]uint32) + if m.MapStringNestedMessage == nil { + m.MapStringNestedMessage = make(map[string]*TestAllTypesProto2_NestedMessage) } - var mapkey uint32 - var mapvalue uint32 + var mapkey string + var mapvalue *TestAllTypesProto2_NestedMessage for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -17077,6 +24572,7 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } fieldNum := int32(wire >> 3) if fieldNum == 1 { + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17086,12 +24582,30 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= uint32(b&0x7F) << shift + 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 @@ -17101,11 +24615,26 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= uint32(b&0x7F) << shift + 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:]) @@ -17121,11 +24650,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx += skippy } } - m.MapUint32Uint32[mapkey] = mapvalue + m.MapStringNestedMessage[mapkey] = mapvalue iNdEx = postIndex - case 59: + case 72: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapUint64Uint64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignMessage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -17152,11 +24681,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MapUint64Uint64 == nil { - m.MapUint64Uint64 = make(map[uint64]uint64) + if m.MapStringForeignMessage == nil { + m.MapStringForeignMessage = make(map[string]*ForeignMessageProto2) } - var mapkey uint64 - var mapvalue uint64 + var mapkey string + var mapvalue *ForeignMessageProto2 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -17176,6 +24705,7 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } fieldNum := int32(wire >> 3) if fieldNum == 1 { + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17185,12 +24715,30 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= uint64(b&0x7F) << shift + 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 @@ -17200,11 +24748,26 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= uint64(b&0x7F) << shift + 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:]) @@ -17220,11 +24783,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx += skippy } } - m.MapUint64Uint64[mapkey] = mapvalue + m.MapStringForeignMessage[mapkey] = mapvalue iNdEx = postIndex - case 60: + case 73: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapSint32Sint32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringNestedEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -17251,11 +24814,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MapSint32Sint32 == nil { - m.MapSint32Sint32 = make(map[int32]int32) + if m.MapStringNestedEnum == nil { + m.MapStringNestedEnum = make(map[string]TestAllTypesProto2_NestedEnum) } - var mapkey int32 - var mapvalue int32 + var mapkey string + var mapvalue TestAllTypesProto2_NestedEnum for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -17275,7 +24838,7 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } fieldNum := int32(wire >> 3) if fieldNum == 1 { - var mapkeytemp int32 + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17285,15 +24848,29 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkeytemp |= int32(b&0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } - mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) - mapkey = int32(mapkeytemp) + 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 mapvaluetemp int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17303,13 +24880,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvaluetemp |= int32(b&0x7F) << shift + mapvalue |= TestAllTypesProto2_NestedEnum(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:]) @@ -17325,11 +24900,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx += skippy } } - m.MapSint32Sint32[mapkey] = mapvalue + m.MapStringNestedEnum[mapkey] = mapvalue iNdEx = postIndex - case 61: + case 74: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MapSint64Sint64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MapStringForeignEnum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -17356,11 +24931,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MapSint64Sint64 == nil { - m.MapSint64Sint64 = make(map[int64]int64) + if m.MapStringForeignEnum == nil { + m.MapStringForeignEnum = make(map[string]ForeignEnumProto2) } - var mapkey int64 - var mapvalue int64 + var mapkey string + var mapvalue ForeignEnumProto2 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -17380,7 +24955,7 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } fieldNum := int32(wire >> 3) if fieldNum == 1 { - var mapkeytemp uint64 + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17390,15 +24965,29 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkeytemp |= uint64(b&0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } - mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) - mapkey = int64(mapkeytemp) + 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 mapvaluetemp uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17408,13 +24997,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvaluetemp |= uint64(b&0x7F) << shift + mapvalue |= ForeignEnumProto2(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:]) @@ -17430,45 +25017,87 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx += skippy } } - m.MapSint64Sint64[mapkey] = mapvalue + m.MapStringForeignEnum[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 + 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 + } } - if iNdEx >= l { + 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 } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + case 76: + if wireType == 0 { + var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17478,78 +25107,73 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF + 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 } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { + if iNdEx >= 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 + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + case 77: + if wireType == 0 { + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17559,78 +25183,73 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + 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 } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { + if iNdEx >= 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 + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + case 78: + if wireType == 0 { + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17640,78 +25259,91 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF + 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 } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { + if iNdEx >= 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 + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -17721,78 +25353,57 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + case 80: + if wireType == 0 { + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17802,13 +25413,52 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { + 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 @@ -17818,73 +25468,80 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= int32(b&0x7F) << shift + v |= uint64(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 + 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 + skippy) > postIndex { + if iNdEx >= l { return io.ErrUnexpectedEOF } - iNdEx += skippy + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.PackedFixed32) == 0 { + m.PackedFixed32 = make([]uint32, 0, elementCount) } - } - 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 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 @@ -17894,89 +25551,101 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 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 } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = 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 + 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 + skippy) > postIndex { + if iNdEx >= l { return io.ErrUnexpectedEOF } - iNdEx += skippy + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -17986,100 +25655,50 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - 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 + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -18089,132 +25708,96 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 { + 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 } - 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 + 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 postStringIndexmapvalue > l { + if iNdEx >= 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 + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + case 87: + if wireType == 0 { + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18224,47 +25807,45 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= int(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 + 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 postStringIndexmapkey > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - if intStringLenmapkey == 0 { - mapkey = "" - } else { - mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapbyteLen uint64 + } + 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 @@ -18274,78 +25855,36 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift + v |= int(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 + 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 postbytesIndex > l { + if iNdEx >= 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 + b := dAtA[iNdEx] + iNdEx++ + v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift + if b < 0x80 { + break } - 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 + 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 @@ -18355,14 +25894,27 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 + 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 @@ -18372,30 +25924,73 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength + 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 } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if postStringIndexmapkey > l { + 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 } - if intStringLenmapkey == 0 { - mapkey = "" - } else { - mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int + } + 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 @@ -18405,80 +26000,36 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= int(b&0x7F) << shift + v |= int32(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 + 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 + skippy) > postIndex { + if iNdEx >= l { 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 + b := dAtA[iNdEx] + iNdEx++ + v |= int64(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 + 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 @@ -18488,14 +26039,34 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 + 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 @@ -18505,30 +26076,73 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength + 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 } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if postStringIndexmapkey > l { + 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 } - if intStringLenmapkey == 0 { - mapkey = "" - } else { - mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int + } + 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 @@ -18538,80 +26152,113 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= int(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if mapmsglen < 0 { - return protohelpers.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protohelpers.ErrInvalidLength + 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 postmsgIndex > l { + if iNdEx >= 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 + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + } + 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 + skippy) > postIndex { + if iNdEx >= l { return io.ErrUnexpectedEOF } - iNdEx += skippy + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - 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 packedLen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -18621,14 +26268,34 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 + 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 @@ -18638,29 +26305,75 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength + 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 } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if postStringIndexmapkey > l { + 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 } - if intStringLenmapkey == 0 { - mapkey = "" - } else { - mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { + } + 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 @@ -18670,65 +26383,132 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + 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 (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if (iNdEx + skippy) > postIndex { + 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 } - iNdEx += skippy + 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) } - 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 + case 96: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - if iNdEx >= l { + 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 } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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) } - 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 + 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 @@ -18738,80 +26518,102 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(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 { + 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 } - 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 - } + 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 } - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - if (iNdEx + skippy) > postIndex { + } + 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 } - iNdEx += skippy + 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) } - m.MapStringForeignEnum[mapkey] = mapvalue - iNdEx = postIndex - case 75: - if wireType == 0 { - var v int32 + 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 @@ -18821,12 +26623,49 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.PackedInt32 = append(m.PackedInt32, v) + 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 { @@ -18854,40 +26693,26 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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) + elementCount = packedLen / 8 + if elementCount != 0 && len(m.UnpackedDouble) == 0 { + m.UnpackedDouble = make([]float64, 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 - } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - m.PackedInt32 = append(m.PackedInt32, v) + 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 PackedInt32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnpackedDouble", wireType) } - case 76: + case 101: if wireType == 0 { - var v int64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18897,12 +26722,12 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - m.PackedInt64 = append(m.PackedInt64, v) + m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -18924,24 +26749,18 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } 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++ - } + return protohelpers.ErrInvalidLength } - elementCount = count - if elementCount != 0 && len(m.PackedInt64) == 0 { - m.PackedInt64 = make([]int64, 0, elementCount) + 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 int64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18951,19 +26770,19 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - m.PackedInt64 = append(m.PackedInt64, v) + m.UnpackedBool = append(m.UnpackedBool, bool(v != 0)) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field PackedInt64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnpackedBool", wireType) } - case 77: + case 102: if wireType == 0 { - var v uint32 + var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18973,12 +26792,12 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } - m.PackedUint32 = append(m.PackedUint32, v) + m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -19006,18 +26825,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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) + if elementCount != 0 && len(m.UnpackedNestedEnum) == 0 { + m.UnpackedNestedEnum = make([]TestAllTypesProto2_NestedEnum, 0, elementCount) } for iNdEx < postIndex { - var v uint32 + var v TestAllTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -19027,19 +26839,236 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } - m.PackedUint32 = append(m.PackedUint32, v) + m.UnpackedNestedEnum = append(m.UnpackedNestedEnum, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field PackedUint32", wireType) + 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 + } } - case 78: - if wireType == 0 { - var v uint64 + 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 @@ -19049,14 +27078,35 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + groupFieldWire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.PackedUint64 = append(m.PackedUint64, v) - } else if wireType == 2 { - var packedLen int + 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 204: + if wireType != 3 { + return fmt.Errorf("proto: wrong wireType = %d for field Multiwordgroupfield", wireType) + } + groupStart := iNdEx + for { + maybeGroupEnd := iNdEx + var groupFieldWire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -19066,971 +27116,1060 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + groupFieldWire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + groupWireType := int(wire & 0x7) + if groupWireType == 4 { + if err := m.Multiwordgroupfield.UnmarshalVTUnsafe(dAtA[groupStart:maybeGroupEnd]); err != nil { + return err + } + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + 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 } - 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 postIndex > l { + if iNdEx >= 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)) + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.PackedDouble) == 0 { - m.PackedDouble = make([]float64, 0, elementCount) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - 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) + } + 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 } - } 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.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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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)) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.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 *GroupField) 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: GroupField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 122: + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + m.GroupInt32 = &v + case 123: + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.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 *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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field UnpackedUint64", wireType) } - case 93: - if wireType == 0 { - var v int32 + 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 @@ -20040,75 +28179,51 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + groupFieldWire |= uint64(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 + groupWireType := int(wire & 0x7) + if groupWireType == 4 { + if err := m.Optionalgroup.UnmarshalVTUnsafe(dAtA[groupStart:maybeGroupEnd]); err != nil { + return err } + break } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + packedLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 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++ - } + 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 } - elementCount = count - if elementCount != 0 && len(m.UnpackedSint32) == 0 { - m.UnpackedSint32 = make([]int32, 0, elementCount) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint32", wireType) } - case 94: + b := bool(v != 0) + m.OptionalBool = &b + case 1011: if wireType == 0 { - var v uint64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -20118,13 +28233,12 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) + m.RepeatedInt32 = append(m.RepeatedInt32, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -20159,11 +28273,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.UnpackedSint64) == 0 { - m.UnpackedSint64 = make([]int64, 0, elementCount) + if elementCount != 0 && len(m.RepeatedInt32) == 0 { + m.RepeatedInt32 = make([]int32, 0, elementCount) } for iNdEx < postIndex { - var v uint64 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -20173,477 +28287,559 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - m.UnpackedSint64 = append(m.UnpackedSint64, int64(v)) + m.RepeatedInt32 = append(m.RepeatedInt32, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field UnpackedSint64", wireType) + 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 } - 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) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - 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) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - 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 + } + 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 postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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 +} +func (m *ProtoWithKeywords) 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: ProtoWithKeywords: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoWithKeywords: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Inline", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + m.Inline = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Concept", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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.Concept = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requires", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } 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 + 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.Requires = append(m.Requires, 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 *TestAllRequiredTypesProto2_NestedMessage) 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: TestAllRequiredTypesProto2_NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 postIndex > l { + if iNdEx >= 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)) + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break } - } 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.A = &v + hasFields[0] |= uint64(0x00000001) + 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 } - 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 = &TestAllRequiredTypesProto2{} + } + if err := m.Corecursive.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalCorecursive", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field UnpackedNestedEnum", wireType) } - case 111: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OptionalCorecursive == nil { + m.OptionalCorecursive = &TestAllRequiredTypesProto2{} + } + if err := m.OptionalCorecursive.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 hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field a not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field corecursive not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2_Data) 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: TestAllRequiredTypesProto2_Data: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 OneofUint32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupInt32", wireType) } - var v uint32 + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -20653,17 +28849,18 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + v |= int32(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) + m.GroupInt32 = &v + hasFields[0] |= uint64(0x00000001) + case 203: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupUint32", wireType) } - var msglen int + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -20673,36 +28870,133 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + m.GroupUint32 = &v + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen - if postIndex < 0 { + 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 group_int32 not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field group_uint32 not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2_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: TestAllRequiredTypesProto2_MessageSetCorrect: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.OneofField.(*TestAllTypesProto2_OneofNestedMessage); ok { - if err := oneof.OneofNestedMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if (fieldNum >= 4) && (fieldNum < 2147483647) { + err = proto.UnmarshalOptions{AllowPartial: true}.Unmarshal(dAtA[iNdEx:iNdEx+skippy], m) + if err != nil { return err } + iNdEx += skippy } else { - v := &TestAllTypesProto2_NestedMessage{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneofField = &TestAllTypesProto2_OneofNestedMessage{OneofNestedMessage: v} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - iNdEx = postIndex - case 113: + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension1) 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: TestAllRequiredTypesProto2_MessageSetCorrectExtension1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 OneofString", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -20734,108 +29028,70 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.OneofField = &TestAllTypesProto2_OneofString{OneofString: stringValue} + s := stringValue + m.Str = &s 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 + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + byteLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 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 { + if (iNdEx + skippy) > 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) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field str not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2_MessageSetCorrectExtension2) 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 } - var v uint64 - if (iNdEx + 8) > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.OneofField = &TestAllTypesProto2_OneofDouble{OneofDouble: float64(math.Float64frombits(v))} - case 119: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_MessageSetCorrectExtension2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2_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 OneofEnum", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field I", wireType) } - var v TestAllTypesProto2_NestedEnum + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -20845,53 +29101,71 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= TestAllTypesProto2_NestedEnum(b&0x7F) << shift + v |= int32(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) + m.I = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - 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 + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - case 241: + 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 i not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAllRequiredTypesProto2) 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: TestAllRequiredTypesProto2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAllRequiredTypesProto2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -20908,10 +29182,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.DefaultInt32 = &v - case 242: + m.RequiredInt32 = &v + hasFields[0] |= uint64(0x00000001) + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredInt64", wireType) } var v int64 for shift := uint(0); ; shift += 7 { @@ -20928,10 +29203,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.DefaultInt64 = &v - case 243: + m.RequiredInt64 = &v + hasFields[0] |= uint64(0x00000002) + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredUint32", wireType) } var v uint32 for shift := uint(0); ; shift += 7 { @@ -20948,10 +29224,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.DefaultUint32 = &v - case 244: + m.RequiredUint32 = &v + hasFields[0] |= uint64(0x00000004) + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredUint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { @@ -20968,10 +29245,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.DefaultUint64 = &v - case 245: + m.RequiredUint64 = &v + hasFields[0] |= uint64(0x00000008) + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -20989,10 +29267,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } } v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.DefaultSint32 = &v - case 246: + m.RequiredSint32 = &v + hasFields[0] |= uint64(0x00000010) + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredSint64", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { @@ -21011,10 +29290,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) v2 := int64(v) - m.DefaultSint64 = &v2 - case 247: + m.RequiredSint64 = &v2 + hasFields[0] |= uint64(0x00000020) + case 7: if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredFixed32", wireType) } var v uint32 if (iNdEx + 4) > l { @@ -21022,10 +29302,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 - m.DefaultFixed32 = &v - case 248: + m.RequiredFixed32 = &v + hasFields[0] |= uint64(0x00000040) + case 8: if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredFixed64", wireType) } var v uint64 if (iNdEx + 8) > l { @@ -21033,10 +29314,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 - m.DefaultFixed64 = &v - case 249: + m.RequiredFixed64 = &v + hasFields[0] |= uint64(0x00000080) + case 9: if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredSfixed32", wireType) } var v int32 if (iNdEx + 4) > l { @@ -21044,10 +29326,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 - m.DefaultSfixed32 = &v - case 250: + m.RequiredSfixed32 = &v + hasFields[0] |= uint64(0x00000100) + case 10: if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed64", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredSfixed64", wireType) } var v int64 if (iNdEx + 8) > l { @@ -21055,10 +29338,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 - m.DefaultSfixed64 = &v - case 251: + m.RequiredSfixed64 = &v + hasFields[0] |= uint64(0x00000200) + case 11: if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultFloat", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredFloat", wireType) } var v uint32 if (iNdEx + 4) > l { @@ -21067,10 +29351,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 v2 := float32(math.Float32frombits(v)) - m.DefaultFloat = &v2 - case 252: + m.RequiredFloat = &v2 + hasFields[0] |= uint64(0x00000400) + case 12: if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultDouble", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredDouble", wireType) } var v uint64 if (iNdEx + 8) > l { @@ -21079,10 +29364,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) - m.DefaultDouble = &v2 - case 253: + m.RequiredDouble = &v2 + hasFields[0] |= uint64(0x00000800) + case 13: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultBool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredBool", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -21100,10 +29386,11 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } } b := bool(v != 0) - m.DefaultBool = &b - case 254: + m.RequiredBool = &b + hasFields[0] |= uint64(0x00001000) + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultString", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -21132,108 +29419,18 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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) + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - var v int32 + s := stringValue + m.RequiredString = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00002000) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredBytes", wireType) + } + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21243,17 +29440,29 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + byteLen |= int(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) + if byteLen < 0 { + return protohelpers.ErrInvalidLength } - var v int32 + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequiredBytes = dAtA[iNdEx:postIndex] + iNdEx = postIndex + hasFields[0] |= uint64(0x00004000) + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredNestedMessage", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21263,17 +29472,34 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - var v int32 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequiredNestedMessage == nil { + m.RequiredNestedMessage = &TestAllRequiredTypesProto2_NestedMessage{} + } + if err := m.RequiredNestedMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00008000) + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredForeignMessage", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21283,17 +29509,34 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Field_0Name6 = &v - case 407: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequiredForeignMessage == nil { + m.RequiredForeignMessage = &ForeignMessageProto2{} + } + if err := m.RequiredForeignMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00010000) + case 21: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldName7", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredNestedEnum", wireType) } - var v int32 + var v TestAllRequiredTypesProto2_NestedEnum for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21303,17 +29546,18 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= TestAllRequiredTypesProto2_NestedEnum(b&0x7F) << shift if b < 0x80 { break } } - m.FieldName7 = &v - case 408: + m.RequiredNestedEnum = &v + hasFields[0] |= uint64(0x00020000) + case 22: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldName8", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredForeignEnum", wireType) } - var v int32 + var v ForeignEnumProto2 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21323,17 +29567,18 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= ForeignEnumProto2(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) + m.RequiredForeignEnum = &v + hasFields[0] |= uint64(0x00040000) + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredStringPiece", wireType) } - var v int32 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21343,17 +29588,35 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + stringLen |= uint64(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) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - var v int32 + 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.RequiredStringPiece = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00080000) + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredCord", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21363,17 +29626,35 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + stringLen |= uint64(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) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - var v int32 + 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.RequiredCord = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00100000) + 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 @@ -21383,17 +29664,34 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - var v int32 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RecursiveMessage == nil { + m.RecursiveMessage = &TestAllRequiredTypesProto2{} + } + if err := m.RecursiveMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00200000) + case 28: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalRecursiveMessage", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21403,35 +29701,70 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + msglen |= int(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) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OptionalRecursiveMessage == nil { + m.OptionalRecursiveMessage = &TestAllRequiredTypesProto2{} + } + if err := m.OptionalRecursiveMessage.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + 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 + } } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { + 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 } - m.XFieldName13 = &v - case 414: + hasFields[0] |= uint64(0x00400000) + case 241: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field X_FieldName14", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -21448,12 +29781,13 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.X_FieldName14 = &v - case 415: + m.DefaultInt32 = &v + hasFields[0] |= uint64(0x00800000) + case 242: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field_Name15", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultInt64", wireType) } - var v int32 + var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21463,17 +29797,18 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.Field_Name15 = &v - case 416: + m.DefaultInt64 = &v + hasFields[0] |= uint64(0x01000000) + case 243: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field__Name16", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint32", wireType) } - var v int32 + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21483,17 +29818,18 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - m.Field__Name16 = &v - case 417: + m.DefaultUint32 = &v + hasFields[0] |= uint64(0x02000000) + case 244: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldName17__", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultUint64", wireType) } - var v int32 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21503,15 +29839,16 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.FieldName17__ = &v - case 418: + m.DefaultUint64 = &v + hasFields[0] |= uint64(0x04000000) + case 245: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldName18__", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint32", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -21528,71 +29865,14 @@ func (m *TestAllTypesProto2) UnmarshalVTUnsafe(dAtA []byte) error { 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: + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.DefaultSint32 = &v + hasFields[0] |= uint64(0x08000000) + case 246: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSint64", wireType) } - var v int32 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21602,139 +29882,94 @@ func (m *ForeignMessageProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= uint64(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 + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.DefaultSint64 = &v2 + hasFields[0] |= uint64(0x10000000) + case 247: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed32", wireType) } - if (iNdEx + skippy) > l { + var v uint32 + if (iNdEx + 4) > 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 + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DefaultFixed32 = &v + hasFields[0] |= uint64(0x20000000) + case 248: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultFixed64", wireType) } - if iNdEx >= l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - 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) + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.DefaultFixed64 = &v + hasFields[0] |= uint64(0x40000000) + case 249: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed32", 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 (iNdEx + 4) > l { + return io.ErrUnexpectedEOF } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DefaultSfixed32 = &v + hasFields[0] |= uint64(0x80000000) + case 250: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSfixed64", wireType) } - if (iNdEx + skippy) > l { + var v int64 + if (iNdEx + 8) > 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 + v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.DefaultSfixed64 = &v + hasFields[0] |= uint64(0x100000000) + case 251: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultFloat", wireType) } - if iNdEx >= l { + var v uint32 + if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.DefaultFloat = &v2 + hasFields[0] |= uint64(0x200000000) + case 252: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultDouble", wireType) } - } - 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: + 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 + hasFields[0] |= uint64(0x400000000) + case 253: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalInt32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultBool", wireType) } - var v int32 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21744,15 +29979,17 @@ func (m *UnknownToTestAllTypes) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - m.OptionalInt32 = &v - case 1002: + b := bool(v != 0) + m.DefaultBool = &b + hasFields[0] |= uint64(0x800000000) + case 254: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalString", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultString", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -21785,13 +30022,14 @@ func (m *UnknownToTestAllTypes) UnmarshalVTUnsafe(dAtA []byte) error { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } s := stringValue - m.OptionalString = &s + m.DefaultString = &s iNdEx = postIndex - case 1003: + hasFields[0] |= uint64(0x1000000000) + case 255: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultBytes", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -21801,163 +30039,248 @@ func (m *UnknownToTestAllTypes) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen 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 { + m.DefaultBytes = dAtA[iNdEx:postIndex] + iNdEx = postIndex + hasFields[0] |= uint64(0x2000000000) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 1004: - if wireType != 3 { - return fmt.Errorf("proto: wrong wireType = %d for field Optionalgroup", wireType) + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - 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 (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 } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } + iNdEx += skippy + } else { + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } - case 1006: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalBool", wireType) + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field required_int32 not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field required_int64 not set") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return fmt.Errorf("proto: required field required_uint32 not set") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return fmt.Errorf("proto: required field required_uint64 not set") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return fmt.Errorf("proto: required field required_sint32 not set") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return fmt.Errorf("proto: required field required_sint64 not set") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return fmt.Errorf("proto: required field required_fixed32 not set") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return fmt.Errorf("proto: required field required_fixed64 not set") + } + if hasFields[0]&uint64(0x00000100) == 0 { + return fmt.Errorf("proto: required field required_sfixed32 not set") + } + if hasFields[0]&uint64(0x00000200) == 0 { + return fmt.Errorf("proto: required field required_sfixed64 not set") + } + if hasFields[0]&uint64(0x00000400) == 0 { + return fmt.Errorf("proto: required field required_float not set") + } + if hasFields[0]&uint64(0x00000800) == 0 { + return fmt.Errorf("proto: required field required_double not set") + } + if hasFields[0]&uint64(0x00001000) == 0 { + return fmt.Errorf("proto: required field required_bool not set") + } + if hasFields[0]&uint64(0x00002000) == 0 { + return fmt.Errorf("proto: required field required_string not set") + } + if hasFields[0]&uint64(0x00004000) == 0 { + return fmt.Errorf("proto: required field required_bytes not set") + } + if hasFields[0]&uint64(0x00008000) == 0 { + return fmt.Errorf("proto: required field required_nested_message not set") + } + if hasFields[0]&uint64(0x00010000) == 0 { + return fmt.Errorf("proto: required field required_foreign_message not set") + } + if hasFields[0]&uint64(0x00020000) == 0 { + return fmt.Errorf("proto: required field required_nested_enum not set") + } + if hasFields[0]&uint64(0x00040000) == 0 { + return fmt.Errorf("proto: required field required_foreign_enum not set") + } + if hasFields[0]&uint64(0x00080000) == 0 { + return fmt.Errorf("proto: required field required_string_piece not set") + } + if hasFields[0]&uint64(0x00100000) == 0 { + return fmt.Errorf("proto: required field required_cord not set") + } + if hasFields[0]&uint64(0x00200000) == 0 { + return fmt.Errorf("proto: required field recursive_message not set") + } + if hasFields[0]&uint64(0x00400000) == 0 { + return fmt.Errorf("proto: required field data not set") + } + if hasFields[0]&uint64(0x00800000) == 0 { + return fmt.Errorf("proto: required field default_int32 not set") + } + if hasFields[0]&uint64(0x01000000) == 0 { + return fmt.Errorf("proto: required field default_int64 not set") + } + if hasFields[0]&uint64(0x02000000) == 0 { + return fmt.Errorf("proto: required field default_uint32 not set") + } + if hasFields[0]&uint64(0x04000000) == 0 { + return fmt.Errorf("proto: required field default_uint64 not set") + } + if hasFields[0]&uint64(0x08000000) == 0 { + return fmt.Errorf("proto: required field default_sint32 not set") + } + if hasFields[0]&uint64(0x10000000) == 0 { + return fmt.Errorf("proto: required field default_sint64 not set") + } + if hasFields[0]&uint64(0x20000000) == 0 { + return fmt.Errorf("proto: required field default_fixed32 not set") + } + if hasFields[0]&uint64(0x40000000) == 0 { + return fmt.Errorf("proto: required field default_fixed64 not set") + } + if hasFields[0]&uint64(0x80000000) == 0 { + return fmt.Errorf("proto: required field default_sfixed32 not set") + } + if hasFields[0]&uint64(0x100000000) == 0 { + return fmt.Errorf("proto: required field default_sfixed64 not set") + } + if hasFields[0]&uint64(0x200000000) == 0 { + return fmt.Errorf("proto: required field default_float not set") + } + if hasFields[0]&uint64(0x400000000) == 0 { + return fmt.Errorf("proto: required field default_double not set") + } + if hasFields[0]&uint64(0x800000000) == 0 { + return fmt.Errorf("proto: required field default_bool not set") + } + if hasFields[0]&uint64(0x1000000000) == 0 { + return fmt.Errorf("proto: required field default_string not set") + } + if hasFields[0]&uint64(0x2000000000) == 0 { + return fmt.Errorf("proto: required field default_bytes not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestLargeOneof_A1) 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 } - 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 - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - 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) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestLargeOneof_A1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof_A1: 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 *TestLargeOneof_A2) 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: TestLargeOneof_A2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof_A2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -21980,7 +30303,7 @@ func (m *UnknownToTestAllTypes) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *NullHypothesisProto2) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *TestLargeOneof_A3) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -22003,10 +30326,10 @@ func (m *NullHypothesisProto2) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NullHypothesisProto2: wiretype end group for non-group") + return fmt.Errorf("proto: TestLargeOneof_A3: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NullHypothesisProto2: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestLargeOneof_A3: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -22031,7 +30354,7 @@ func (m *NullHypothesisProto2) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *EnumOnlyProto2) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *TestLargeOneof_A4) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -22054,10 +30377,10 @@ func (m *EnumOnlyProto2) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EnumOnlyProto2: wiretype end group for non-group") + return fmt.Errorf("proto: TestLargeOneof_A4: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EnumOnlyProto2: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestLargeOneof_A4: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -22082,7 +30405,7 @@ func (m *EnumOnlyProto2) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *OneStringProto2) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *TestLargeOneof_A5) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -22105,17 +30428,68 @@ func (m *OneStringProto2) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OneStringProto2: wiretype end group for non-group") + return fmt.Errorf("proto: TestLargeOneof_A5: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OneStringProto2: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TestLargeOneof_A5: 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 *TestLargeOneof) 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: TestLargeOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestLargeOneof: 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) + return fmt.Errorf("proto: wrong wireType = %d for field A1", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -22125,28 +30499,196 @@ func (m *OneStringProto2) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if oneof, ok := m.LargeOneof.(*TestLargeOneof_A1_); ok { + if err := oneof.A1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TestLargeOneof_A1{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.LargeOneof = &TestLargeOneof_A1_{A1: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A2", 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.LargeOneof.(*TestLargeOneof_A2_); ok { + if err := oneof.A2.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TestLargeOneof_A2{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.LargeOneof = &TestLargeOneof_A2_{A2: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A3", 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.LargeOneof.(*TestLargeOneof_A3_); ok { + if err := oneof.A3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TestLargeOneof_A3{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.LargeOneof = &TestLargeOneof_A3_{A3: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A4", 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.LargeOneof.(*TestLargeOneof_A4_); ok { + if err := oneof.A4.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TestLargeOneof_A4{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.LargeOneof = &TestLargeOneof_A4_{A4: v} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A5", 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.LargeOneof.(*TestLargeOneof_A5_); ok { + if err := oneof.A5.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TestLargeOneof_A5{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.LargeOneof = &TestLargeOneof_A5_{A5: v} } - s := stringValue - m.Data = &s iNdEx = postIndex default: iNdEx = preIndex diff --git a/conformance/internal/conformance/test_messages_proto3.pb.go b/conformance/internal/conformance/test_messages_proto3.pb.go index 198a99a2..8150fd70 100644 --- a/conformance/internal/conformance/test_messages_proto3.pb.go +++ b/conformance/internal/conformance/test_messages_proto3.pb.go @@ -1,32 +1,9 @@ // 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. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd // // Test schema for proto3 messages. This test schema is used by: // @@ -37,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v3.21.12 +// protoc-gen-go v1.36.5 +// protoc v6.30.1 // source: src/google/protobuf/test_messages_proto3.proto package conformance @@ -54,6 +31,7 @@ import ( wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -276,10 +254,7 @@ func (EnumOnlyProto3_Bool) EnumDescriptor() ([]byte, []int) { // 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 - + state protoimpl.MessageState `protogen:"open.v1"` // 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"` @@ -357,26 +332,26 @@ type TestAllTypesProto3 struct { 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: + 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" protobuf_val:"varint,2,opt,name=value"` + 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" protobuf_val:"varint,2,opt,name=value"` + 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" protobuf_val:"varint,2,opt,name=value"` + 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" protobuf_val:"varint,2,opt,name=value"` + 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" protobuf_val:"zigzag32,2,opt,name=value"` + 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" protobuf_val:"zigzag64,2,opt,name=value"` + 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" protobuf_val:"fixed32,2,opt,name=value"` + 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" protobuf_val:"fixed64,2,opt,name=value"` + 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" protobuf_val:"fixed32,2,opt,name=value"` + 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" protobuf_val:"fixed64,2,opt,name=value"` + 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" protobuf_val:"fixed32,2,opt,name=value"` + 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" protobuf_val:"fixed64,2,opt,name=value"` + 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" protobuf_val:"varint,2,opt,name=value"` + 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" protobuf_val:"bytes,2,opt,name=value"` + 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" protobuf_val:"bytes,2,opt,name=value"` + 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" protobuf_val:"bytes,2,opt,name=value"` + 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" protobuf_val:"bytes,2,opt,name=value"` + 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" protobuf_val:"varint,2,opt,name=value,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" protobuf_val:"varint,2,opt,name=value,enum=protobuf_test_messages.proto3.ForeignEnum"` + // Types that are valid to be assigned to OneofField: // // *TestAllTypesProto3_OneofUint32 // *TestAllTypesProto3_OneofNestedMessage @@ -442,15 +417,15 @@ type TestAllTypesProto3 struct { 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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + 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 { @@ -461,7 +436,7 @@ 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 { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,79 +1088,99 @@ func (x *TestAllTypesProto3) GetMapStringForeignEnum() map[string]ForeignEnum { return nil } -func (m *TestAllTypesProto3) GetOneofField() isTestAllTypesProto3_OneofField { - if m != nil { - return m.OneofField +func (x *TestAllTypesProto3) GetOneofField() isTestAllTypesProto3_OneofField { + if x != nil { + return x.OneofField } return nil } func (x *TestAllTypesProto3) GetOneofUint32() uint32 { - if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofUint32); ok { - return x.OneofUint32 + if x != nil { + if x, ok := x.OneofField.(*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 + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto3_OneofNestedMessage); ok { + return x.OneofNestedMessage + } } return nil } func (x *TestAllTypesProto3) GetOneofString() string { - if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofString); ok { - return x.OneofString + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto3_OneofString); ok { + return x.OneofString + } } return "" } func (x *TestAllTypesProto3) GetOneofBytes() []byte { - if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofBytes); ok { - return x.OneofBytes + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto3_OneofBytes); ok { + return x.OneofBytes + } } return nil } func (x *TestAllTypesProto3) GetOneofBool() bool { - if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofBool); ok { - return x.OneofBool + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto3_OneofBool); ok { + return x.OneofBool + } } return false } func (x *TestAllTypesProto3) GetOneofUint64() uint64 { - if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofUint64); ok { - return x.OneofUint64 + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto3_OneofUint64); ok { + return x.OneofUint64 + } } return 0 } func (x *TestAllTypesProto3) GetOneofFloat() float32 { - if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofFloat); ok { - return x.OneofFloat + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto3_OneofFloat); ok { + return x.OneofFloat + } } return 0 } func (x *TestAllTypesProto3) GetOneofDouble() float64 { - if x, ok := x.GetOneofField().(*TestAllTypesProto3_OneofDouble); ok { - return x.OneofDouble + if x != nil { + if x, ok := x.OneofField.(*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 + if x != nil { + if x, ok := x.OneofField.(*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 + if x != nil { + if x, ok := x.OneofField.(*TestAllTypesProto3_OneofNullValue); ok { + return x.OneofNullValue + } } return structpb.NullValue(0) } @@ -1605,20 +1600,17 @@ func (*TestAllTypesProto3_OneofEnum) isTestAllTypesProto3_OneofField() {} func (*TestAllTypesProto3_OneofNullValue) isTestAllTypesProto3_OneofField() {} type ForeignMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` unknownFields protoimpl.UnknownFields - - C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` + sizeCache protoimpl.SizeCache } 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) - } + 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 { @@ -1629,7 +1621,7 @@ 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 { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,18 +1644,16 @@ func (x *ForeignMessage) GetC() int32 { } type NullHypothesisProto3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + 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 { @@ -1674,7 +1664,7 @@ 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 { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1690,18 +1680,16 @@ func (*NullHypothesisProto3) Descriptor() ([]byte, []int) { } type EnumOnlyProto3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } 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) - } + 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 { @@ -1712,7 +1700,7 @@ 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 { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1728,21 +1716,18 @@ func (*EnumOnlyProto3) Descriptor() ([]byte, []int) { } type TestAllTypesProto3_NestedMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` + Corecursive *TestAllTypesProto3 `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"` 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"` + sizeCache protoimpl.SizeCache } 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) - } + 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 { @@ -1753,7 +1738,7 @@ 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 { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1784,7 +1769,7 @@ func (x *TestAllTypesProto3_NestedMessage) GetCorecursive() *TestAllTypesProto3 var File_src_google_protobuf_test_messages_proto3_proto protoreflect.FileDescriptor -var file_src_google_protobuf_test_messages_proto3_proto_rawDesc = []byte{ +var file_src_google_protobuf_test_messages_proto3_proto_rawDesc = string([]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, @@ -2547,23 +2532,23 @@ var file_src_google_protobuf_test_messages_proto3_proto_rawDesc = []byte{ 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 + file_src_google_protobuf_test_messages_proto3_proto_rawDescData []byte ) 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) + file_src_google_protobuf_test_messages_proto3_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_src_google_protobuf_test_messages_proto3_proto_rawDesc), len(file_src_google_protobuf_test_messages_proto3_proto_rawDesc))) }) 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{}{ +var file_src_google_protobuf_test_messages_proto3_proto_goTypes = []any{ (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 @@ -2694,69 +2679,7 @@ 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{}{ + file_src_google_protobuf_test_messages_proto3_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto3_OneofUint32)(nil), (*TestAllTypesProto3_OneofNestedMessage)(nil), (*TestAllTypesProto3_OneofString)(nil), @@ -2772,7 +2695,7 @@ func file_src_google_protobuf_test_messages_proto3_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_src_google_protobuf_test_messages_proto3_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_src_google_protobuf_test_messages_proto3_proto_rawDesc), len(file_src_google_protobuf_test_messages_proto3_proto_rawDesc)), NumEnums: 4, NumMessages: 24, NumExtensions: 0, @@ -2784,7 +2707,6 @@ func file_src_google_protobuf_test_messages_proto3_proto_init() { 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 } diff --git a/protobuf.sh b/protobuf.sh index 88f7faea..4899e44d 100755 --- a/protobuf.sh +++ b/protobuf.sh @@ -2,25 +2,24 @@ set -e -PROTOBUF_VERSION=21.12 +PROTOBUF_VERSION=30.1 ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) PROTOBUF_PATH="${ROOT}/_vendor/protobuf-${PROTOBUF_VERSION}" -if [ -f "$PROTOBUF_PATH/src/protoc" ]; then +if [ -f "$PROTOBUF_PATH/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 +curl -sS -L -o "$ROOT/_vendor/pb.tar.gz" http://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.gz cd "$ROOT/_vendor" tar zxf pb.tar.gz cd protobuf-${PROTOBUF_VERSION} -./configure -make -make -C conformance +cmake . -Dprotobuf_BUILD_CONFORMANCE=ON -DCMAKE_CXX_STANDARD=17 -Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON +make protoc conformance_test_runner -j$(nproc) echo "Dowloaded and compiled protobuf $PROTOBUF_VERSION to $PROTOBUF_PATH" ls -l src/