Commit 9d40a0af authored by Jeromy's avatar Jeromy
Browse files

migrate to gx namespace

parent fb31f446
# Extensions for Protocol Buffers to create more go like structures.
#
# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
# http://github.com/gogo/protobuf
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
regenerate:
(protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto)
// Code generated by protoc-gen-gogo.
// source: proto.proto
// DO NOT EDIT!
/*
Package proto is a generated protocol buffer package.
It is generated from these files:
proto.proto
It has these top-level messages:
Foo
*/
package proto
import proto1 "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import fmt "fmt"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
import bytes "bytes"
import io "io"
import github_com_gogo_protobuf_proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Foo struct {
Bar *uint64 `protobuf:"varint,1,req,name=bar" json:"bar,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Foo) Reset() { *m = Foo{} }
func (m *Foo) String() string { return proto1.CompactTextString(m) }
func (*Foo) ProtoMessage() {}
func (m *Foo) GetBar() uint64 {
if m != nil && m.Bar != nil {
return *m.Bar
}
return 0
}
func (this *Foo) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Foo)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Bar != nil && that1.Bar != nil {
if *this.Bar != *that1.Bar {
return false
}
} else if this.Bar != nil {
return false
} else if that1.Bar != nil {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func NewPopulatedFoo(r randyProto, easy bool) *Foo {
this := &Foo{}
v1 := uint64(uint64(r.Uint32()))
this.Bar = &v1
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedProto(r, 2)
}
return this
}
type randyProto interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneProto(r randyProto) rune {
ru := r.Intn(62)
if ru < 10 {
return rune(ru + 48)
} else if ru < 36 {
return rune(ru + 55)
}
return rune(ru + 61)
}
func randStringProto(r randyProto) string {
v2 := r.Intn(100)
tmps := make([]rune, v2)
for i := 0; i < v2; i++ {
tmps[i] = randUTF8RuneProto(r)
}
return string(tmps)
}
func randUnrecognizedProto(r randyProto, maxFieldNumber int) (data []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
data = randFieldProto(data, r, fieldNumber, wire)
}
return data
}
func randFieldProto(data []byte, r randyProto, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
data = encodeVarintPopulateProto(data, uint64(key))
v3 := r.Int63()
if r.Intn(2) == 0 {
v3 *= -1
}
data = encodeVarintPopulateProto(data, uint64(v3))
case 1:
data = encodeVarintPopulateProto(data, uint64(key))
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
data = encodeVarintPopulateProto(data, uint64(key))
ll := r.Intn(100)
data = encodeVarintPopulateProto(data, uint64(ll))
for j := 0; j < ll; j++ {
data = append(data, byte(r.Intn(256)))
}
default:
data = encodeVarintPopulateProto(data, uint64(key))
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return data
}
func encodeVarintPopulateProto(data []byte, v uint64) []byte {
for v >= 1<<7 {
data = append(data, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
data = append(data, uint8(v))
return data
}
func (m *Foo) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProto
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Foo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType)
}
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProto
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Bar = &v
hasFields[0] |= uint64(0x00000001)
default:
iNdEx = preIndex
skippy, err := skipProto(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthProto
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("bar")
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipProto(data []byte) (n int, err error) {
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowProto
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowProto
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if data[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowProto
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthProto
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowProto
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipProto(data[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowProto = fmt.Errorf("proto: integer overflow")
)
syntax = "proto2";
package proto;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.equal_all) = true;
message Foo {
required uint64 bar = 1;
}
// Code generated by protoc-gen-gogo.
// source: proto.proto
// DO NOT EDIT!
/*
Package proto is a generated protocol buffer package.
It is generated from these files:
proto.proto
It has these top-level messages:
Foo
*/
package proto
import testing "testing"
import math_rand "math/rand"
import time "time"
import github_com_gogo_protobuf_proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import github_com_gogo_protobuf_jsonpb "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/jsonpb"
import proto1 "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import fmt "fmt"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func TestFooProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFoo(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &Foo{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(data))
copy(littlefuzz, data)
for i := range data {
data[i] = byte(popr.Intn(256))
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFooJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFoo(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &Foo{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFooProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFoo(popr, true)
data := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &Foo{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFooProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFoo(popr, true)
data := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &Foo{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
//These tests are generated by github.com/gogo/protobuf/plugin/testgen
# Extensions for Protocol Buffers to create more go like structures.
#
# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
# http://github.com/gogo/protobuf/gogoproto
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
regenerate:
cp header.proto mapsproto2.proto
cat ../theproto3/maps.proto >> mapsproto2.proto
go install github.com/gogo/protobuf/protoc-gen-combo
protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. mapsproto2.proto
\ No newline at end of file
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Go support for Protocol Buffers - Google's data interchange format
//
// Copyright 2014 The Go Authors. All rights reserved.
// https://github.com/golang/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto2";
package proto2.maps;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
option (gogoproto.stringer_all) = true;
option (gogoproto.gostring_all) = true;
option (gogoproto.face_all) = true;
option (gogoproto.description_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.benchgen_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_enum_stringer_all) = false;
option (gogoproto.enum_stringer_all) = true;
option (gogoproto.unsafe_marshaler_all) = false;
option (gogoproto.unsafe_unmarshaler_all) = false;
message FloatingPoint {
optional double f = 1;
}
enum MapEnum {
MA = 0;
MB = 1;
MC = 2;
}
message AllMaps {
map<string, double> StringToDoubleMap = 1;
map<string, float> StringToFloatMap = 2;
map<int32, int32> Int32Map = 3;
map<int64, int64> Int64Map = 4;
map<uint32, uint32> Uint32Map = 5;
map<uint64, uint64> Uint64Map = 6;
map<sint32, sint32> Sint32Map = 7;
map<sint64, sint64> Sint64Map = 8;
map<fixed32, fixed32> Fixed32Map = 9;
map<sfixed32, sfixed32> Sfixed32Map = 10;
map<fixed64, fixed64> Fixed64Map = 11;
map<sfixed64, sfixed64> Sfixed64Map = 12;
map<bool, bool> BoolMap = 13;
map<string, string> StringMap = 14;
map<string, bytes> StringToBytesMap = 15;
map<string, MapEnum> StringToEnumMap = 16;
map<string, FloatingPoint> StringToMsgMap = 17;
}
// Code generated by protoc-gen-gogo.
// source: combos/both/mapsproto2.proto
// DO NOT EDIT!
/*
Package proto2_maps is a generated protocol buffer package.
It is generated from these files:
combos/both/mapsproto2.proto
It has these top-level messages:
FloatingPoint
AllMaps
*/
package proto2_maps
import testing "testing"
import math_rand "math/rand"
import time "time"
import github_com_gogo_protobuf_proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import github_com_gogo_protobuf_jsonpb "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/jsonpb"
import fmt "fmt"
import go_parser "go/parser"
import proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func TestFloatingPointProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(data))
copy(littlefuzz, data)
for i := range data {
data[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFloatingPointMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, false)
size := p.Size()
data := make([]byte, size)
for i := range data {
data[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(data)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range data {
data[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func BenchmarkFloatingPointProtoMarshal(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
pops := make([]*FloatingPoint, 10000)
for i := 0; i < 10000; i++ {
pops[i] = NewPopulatedFloatingPoint(popr, false)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])
if err != nil {
panic(err)
}
total += len(data)
}
b.SetBytes(int64(total / b.N))
}
func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
datas := make([][]byte, 10000)
for i := 0; i < 10000; i++ {
data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false))
if err != nil {
panic(err)
}
datas[i] = data
}
msg := &FloatingPoint{}
b.ResetTimer()
for i := 0; i < b.N; i++ {
total += len(datas[i%10000])
if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {
panic(err)
}
}
b.SetBytes(int64(total / b.N))
}
func TestAllMapsProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(data))
copy(littlefuzz, data)
for i := range data {
data[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestAllMapsMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, false)
size := p.Size()
data := make([]byte, size)
for i := range data {
data[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(data)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range data {
data[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func BenchmarkAllMapsProtoMarshal(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
pops := make([]*AllMaps, 10000)
for i := 0; i < 10000; i++ {
pops[i] = NewPopulatedAllMaps(popr, false)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])
if err != nil {
panic(err)
}
total += len(data)
}
b.SetBytes(int64(total / b.N))
}
func BenchmarkAllMapsProtoUnmarshal(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
datas := make([][]byte, 10000)
for i := 0; i < 10000; i++ {
data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false))
if err != nil {
panic(err)
}
datas[i] = data
}
msg := &AllMaps{}
b.ResetTimer()
for i := 0; i < b.N; i++ {
total += len(datas[i%10000])
if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {
panic(err)
}
}
b.SetBytes(int64(total / b.N))
}
func TestFloatingPointJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FloatingPoint{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestAllMapsJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &AllMaps{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFloatingPointProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, true)
data := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFloatingPointProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, true)
data := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestAllMapsProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, true)
data := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestAllMapsProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, true)
data := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapsproto2Description(t *testing.T) {
Mapsproto2Description()
}
func TestFloatingPointVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFloatingPoint(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestAllMapsVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedAllMaps(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFloatingPointFace(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFloatingPoint(popr, true)
msg := p.TestProto()
if !p.Equal(msg) {
t.Fatalf("%#v !Face Equal %#v", msg, p)
}
}
func TestAllMapsFace(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedAllMaps(popr, true)
msg := p.TestProto()
if !p.Equal(msg) {
t.Fatalf("%#v !Face Equal %#v", msg, p)
}
}
func TestFloatingPointGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFloatingPoint(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
panic(err)
}
}
func TestAllMapsGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedAllMaps(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
panic(err)
}
}
func TestFloatingPointSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(data) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func BenchmarkFloatingPointSize(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
pops := make([]*FloatingPoint, 1000)
for i := 0; i < 1000; i++ {
pops[i] = NewPopulatedFloatingPoint(popr, false)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
total += pops[i%1000].Size()
}
b.SetBytes(int64(total / b.N))
}
func TestAllMapsSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(data) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func BenchmarkAllMapsSize(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
pops := make([]*AllMaps, 1000)
for i := 0; i < 1000; i++ {
pops[i] = NewPopulatedAllMaps(popr, false)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
total += pops[i%1000].Size()
}
b.SetBytes(int64(total / b.N))
}
func TestFloatingPointStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFloatingPoint(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestAllMapsStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedAllMaps(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
//These tests are generated by github.com/gogo/protobuf/plugin/testgen
// Code generated by protoc-gen-gogo.
// source: combos/marshaler/mapsproto2.proto
// DO NOT EDIT!
/*
Package proto2_maps is a generated protocol buffer package.
It is generated from these files:
combos/marshaler/mapsproto2.proto
It has these top-level messages:
FloatingPoint
AllMaps
*/
package proto2_maps
import proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import fmt "fmt"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
import google_protobuf "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/protoc-gen-gogo/descriptor"
import strconv "strconv"
import bytes "bytes"
import github_com_gogo_protobuf_proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import strings "strings"
import sort "sort"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/sortkeys"
import errors "errors"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type MapEnum int32
const (
MA MapEnum = 0
MB MapEnum = 1
MC MapEnum = 2
)
var MapEnum_name = map[int32]string{
0: "MA",
1: "MB",
2: "MC",
}
var MapEnum_value = map[string]int32{
"MA": 0,
"MB": 1,
"MC": 2,
}
func (x MapEnum) Enum() *MapEnum {
p := new(MapEnum)
*p = x
return p
}
func (x MapEnum) MarshalJSON() ([]byte, error) {
return proto.MarshalJSONEnum(MapEnum_name, int32(x))
}
func (x *MapEnum) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum")
if err != nil {
return err
}
*x = MapEnum(value)
return nil
}
type FloatingPoint struct {
F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *FloatingPoint) Reset() { *m = FloatingPoint{} }
func (*FloatingPoint) ProtoMessage() {}
type AllMaps struct {
StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"`
Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"`
Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"`
Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"`
Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"`
Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"`
StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
XXX_unrecognized []byte `json:"-"`
}
func (m *AllMaps) Reset() { *m = AllMaps{} }
func (*AllMaps) ProtoMessage() {}
func init() {
proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value)
}
func (this *FloatingPoint) Description() (desc *google_protobuf.FileDescriptorSet) {
return Mapsproto2Description()
}
func (this *AllMaps) Description() (desc *google_protobuf.FileDescriptorSet) {
return Mapsproto2Description()
}
func Mapsproto2Description() (desc *google_protobuf.FileDescriptorSet) {
return &google_protobuf.FileDescriptorSet{File: []*google_protobuf.FileDescriptorProto{{Name: func(v string) *string { return &v }("google/protobuf/descriptor.proto"),
Package: func(v string) *string { return &v }("google.protobuf"),
MessageType: []*google_protobuf.DescriptorProto{{Name: func(v string) *string { return &v }("FileDescriptorSet"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("file"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.FileDescriptorProto"),
}},
}, {Name: func(v string) *string { return &v }("FileDescriptorProto"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("package"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("dependency"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("public_dependency"),
Number: func(v int32) *int32 { return &v }(10),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}, {Name: func(v string) *string { return &v }("weak_dependency"),
Number: func(v int32) *int32 { return &v }(11),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}, {Name: func(v string) *string { return &v }("message_type"),
Number: func(v int32) *int32 { return &v }(4),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"),
}, {Name: func(v string) *string { return &v }("enum_type"),
Number: func(v int32) *int32 { return &v }(5),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"),
}, {Name: func(v string) *string { return &v }("service"),
Number: func(v int32) *int32 { return &v }(6),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceDescriptorProto"),
}, {Name: func(v string) *string { return &v }("extension"),
Number: func(v int32) *int32 { return &v }(7),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"),
}, {Name: func(v string) *string { return &v }("options"),
Number: func(v int32) *int32 { return &v }(8),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("source_code_info"),
Number: func(v int32) *int32 { return &v }(9),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo"),
}, {Name: func(v string) *string { return &v }("syntax"),
Number: func(v int32) *int32 { return &v }(12),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}},
}, {Name: func(v string) *string { return &v }("DescriptorProto"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("field"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"),
}, {Name: func(v string) *string { return &v }("extension"),
Number: func(v int32) *int32 { return &v }(6),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto"),
}, {Name: func(v string) *string { return &v }("nested_type"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto"),
}, {Name: func(v string) *string { return &v }("enum_type"),
Number: func(v int32) *int32 { return &v }(4),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.EnumDescriptorProto"),
}, {Name: func(v string) *string { return &v }("extension_range"),
Number: func(v int32) *int32 { return &v }(5),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.DescriptorProto.ExtensionRange"),
}, {Name: func(v string) *string { return &v }("oneof_decl"),
Number: func(v int32) *int32 { return &v }(8),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.OneofDescriptorProto"),
}, {Name: func(v string) *string { return &v }("options"),
Number: func(v int32) *int32 { return &v }(7),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}},
NestedType: []*google_protobuf.DescriptorProto{{Name: func(v string) *string { return &v }("ExtensionRange"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("start"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}, {Name: func(v string) *string { return &v }("end"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}},
}},
}, {Name: func(v string) *string { return &v }("FieldDescriptorProto"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("number"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}, {Name: func(v string) *string { return &v }("label"),
Number: func(v int32) *int32 { return &v }(4),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(14),
TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Label"),
}, {Name: func(v string) *string { return &v }("type"),
Number: func(v int32) *int32 { return &v }(5),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(14),
TypeName: func(v string) *string { return &v }(".google.protobuf.FieldDescriptorProto.Type"),
}, {Name: func(v string) *string { return &v }("type_name"),
Number: func(v int32) *int32 { return &v }(6),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("extendee"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("default_value"),
Number: func(v int32) *int32 { return &v }(7),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("oneof_index"),
Number: func(v int32) *int32 { return &v }(9),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}, {Name: func(v string) *string { return &v }("options"),
Number: func(v int32) *int32 { return &v }(8),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions"),
}},
EnumType: []*google_protobuf.EnumDescriptorProto{{Name: func(v string) *string { return &v }("Type"),
Value: []*google_protobuf.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("TYPE_DOUBLE"),
Number: func(v int32) *int32 { return &v }(1),
}, {Name: func(v string) *string { return &v }("TYPE_FLOAT"),
Number: func(v int32) *int32 { return &v }(2),
}, {Name: func(v string) *string { return &v }("TYPE_INT64"),
Number: func(v int32) *int32 { return &v }(3),
}, {Name: func(v string) *string { return &v }("TYPE_UINT64"),
Number: func(v int32) *int32 { return &v }(4),
}, {Name: func(v string) *string { return &v }("TYPE_INT32"),
Number: func(v int32) *int32 { return &v }(5),
}, {Name: func(v string) *string { return &v }("TYPE_FIXED64"),
Number: func(v int32) *int32 { return &v }(6),
}, {Name: func(v string) *string { return &v }("TYPE_FIXED32"),
Number: func(v int32) *int32 { return &v }(7),
}, {Name: func(v string) *string { return &v }("TYPE_BOOL"),
Number: func(v int32) *int32 { return &v }(8),
}, {Name: func(v string) *string { return &v }("TYPE_STRING"),
Number: func(v int32) *int32 { return &v }(9),
}, {Name: func(v string) *string { return &v }("TYPE_GROUP"),
Number: func(v int32) *int32 { return &v }(10),
}, {Name: func(v string) *string { return &v }("TYPE_MESSAGE"),
Number: func(v int32) *int32 { return &v }(11),
}, {Name: func(v string) *string { return &v }("TYPE_BYTES"),
Number: func(v int32) *int32 { return &v }(12),
}, {Name: func(v string) *string { return &v }("TYPE_UINT32"),
Number: func(v int32) *int32 { return &v }(13),
}, {Name: func(v string) *string { return &v }("TYPE_ENUM"),
Number: func(v int32) *int32 { return &v }(14),
}, {Name: func(v string) *string { return &v }("TYPE_SFIXED32"),
Number: func(v int32) *int32 { return &v }(15),
}, {Name: func(v string) *string { return &v }("TYPE_SFIXED64"),
Number: func(v int32) *int32 { return &v }(16),
}, {Name: func(v string) *string { return &v }("TYPE_SINT32"),
Number: func(v int32) *int32 { return &v }(17),
}, {Name: func(v string) *string { return &v }("TYPE_SINT64"),
Number: func(v int32) *int32 { return &v }(18),
}},
}, {Name: func(v string) *string { return &v }("Label"),
Value: []*google_protobuf.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("LABEL_OPTIONAL"),
Number: func(v int32) *int32 { return &v }(1),
}, {Name: func(v string) *string { return &v }("LABEL_REQUIRED"),
Number: func(v int32) *int32 { return &v }(2),
}, {Name: func(v string) *string { return &v }("LABEL_REPEATED"),
Number: func(v int32) *int32 { return &v }(3),
}},
}},
}, {Name: func(v string) *string { return &v }("OneofDescriptorProto"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}},
}, {Name: func(v string) *string { return &v }("EnumDescriptorProto"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueDescriptorProto"),
}, {Name: func(v string) *string { return &v }("options"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.EnumOptions"),
}},
}, {Name: func(v string) *string { return &v }("EnumValueDescriptorProto"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("number"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}, {Name: func(v string) *string { return &v }("options"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.EnumValueOptions"),
}},
}, {Name: func(v string) *string { return &v }("ServiceDescriptorProto"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("method"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.MethodDescriptorProto"),
}, {Name: func(v string) *string { return &v }("options"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.ServiceOptions"),
}},
}, {Name: func(v string) *string { return &v }("MethodDescriptorProto"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("input_type"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("output_type"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("options"),
Number: func(v int32) *int32 { return &v }(4),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.MethodOptions"),
}, {Name: func(v string) *string { return &v }("client_streaming"),
Number: func(v int32) *int32 { return &v }(5),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("server_streaming"),
Number: func(v int32) *int32 { return &v }(6),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}},
}, {Name: func(v string) *string { return &v }("FileOptions"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("java_package"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("java_outer_classname"),
Number: func(v int32) *int32 { return &v }(8),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("java_multiple_files"),
Number: func(v int32) *int32 { return &v }(10),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("java_generate_equals_and_hash"),
Number: func(v int32) *int32 { return &v }(20),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("java_string_check_utf8"),
Number: func(v int32) *int32 { return &v }(27),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("optimize_for"),
Number: func(v int32) *int32 { return &v }(9),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(14),
TypeName: func(v string) *string { return &v }(".google.protobuf.FileOptions.OptimizeMode"),
DefaultValue: func(v string) *string { return &v }("SPEED"),
}, {Name: func(v string) *string { return &v }("go_package"),
Number: func(v int32) *int32 { return &v }(11),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("cc_generic_services"),
Number: func(v int32) *int32 { return &v }(16),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("java_generic_services"),
Number: func(v int32) *int32 { return &v }(17),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("py_generic_services"),
Number: func(v int32) *int32 { return &v }(18),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("deprecated"),
Number: func(v int32) *int32 { return &v }(23),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("cc_enable_arenas"),
Number: func(v int32) *int32 { return &v }(31),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("uninterpreted_option"),
Number: func(v int32) *int32 { return &v }(999),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"),
}},
EnumType: []*google_protobuf.EnumDescriptorProto{{Name: func(v string) *string { return &v }("OptimizeMode"),
Value: []*google_protobuf.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("SPEED"),
Number: func(v int32) *int32 { return &v }(1),
}, {Name: func(v string) *string { return &v }("CODE_SIZE"),
Number: func(v int32) *int32 { return &v }(2),
}, {Name: func(v string) *string { return &v }("LITE_RUNTIME"),
Number: func(v int32) *int32 { return &v }(3),
}},
}},
ExtensionRange: []*google_protobuf.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000),
End: func(v int32) *int32 { return &v }(536870912),
}},
}, {Name: func(v string) *string { return &v }("MessageOptions"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("message_set_wire_format"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("no_standard_descriptor_accessor"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("deprecated"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("map_entry"),
Number: func(v int32) *int32 { return &v }(7),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
}, {Name: func(v string) *string { return &v }("uninterpreted_option"),
Number: func(v int32) *int32 { return &v }(999),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"),
}},
ExtensionRange: []*google_protobuf.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000),
End: func(v int32) *int32 { return &v }(536870912),
}},
}, {Name: func(v string) *string { return &v }("FieldOptions"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("ctype"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(14),
TypeName: func(v string) *string { return &v }(".google.protobuf.FieldOptions.CType"),
DefaultValue: func(v string) *string { return &v }("STRING"),
}, {Name: func(v string) *string { return &v }("packed"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
}, {Name: func(v string) *string { return &v }("lazy"),
Number: func(v int32) *int32 { return &v }(5),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("deprecated"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("weak"),
Number: func(v int32) *int32 { return &v }(10),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("uninterpreted_option"),
Number: func(v int32) *int32 { return &v }(999),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"),
}},
EnumType: []*google_protobuf.EnumDescriptorProto{{Name: func(v string) *string { return &v }("CType"),
Value: []*google_protobuf.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("STRING"),
Number: func(v int32) *int32 { return &v }(0),
}, {Name: func(v string) *string { return &v }("CORD"),
Number: func(v int32) *int32 { return &v }(1),
}, {Name: func(v string) *string { return &v }("STRING_PIECE"),
Number: func(v int32) *int32 { return &v }(2),
}},
}},
ExtensionRange: []*google_protobuf.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000),
End: func(v int32) *int32 { return &v }(536870912),
}},
}, {Name: func(v string) *string { return &v }("EnumOptions"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("allow_alias"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
}, {Name: func(v string) *string { return &v }("deprecated"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("uninterpreted_option"),
Number: func(v int32) *int32 { return &v }(999),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"),
}},
ExtensionRange: []*google_protobuf.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000),
End: func(v int32) *int32 { return &v }(536870912),
}},
}, {Name: func(v string) *string { return &v }("EnumValueOptions"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("uninterpreted_option"),
Number: func(v int32) *int32 { return &v }(999),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"),
}},
ExtensionRange: []*google_protobuf.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000),
End: func(v int32) *int32 { return &v }(536870912),
}},
}, {Name: func(v string) *string { return &v }("ServiceOptions"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"),
Number: func(v int32) *int32 { return &v }(33),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("uninterpreted_option"),
Number: func(v int32) *int32 { return &v }(999),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"),
}},
ExtensionRange: []*google_protobuf.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000),
End: func(v int32) *int32 { return &v }(536870912),
}},
}, {Name: func(v string) *string { return &v }("MethodOptions"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("deprecated"),
Number: func(v int32) *int32 { return &v }(33),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
DefaultValue: func(v string) *string { return &v }("false"),
}, {Name: func(v string) *string { return &v }("uninterpreted_option"),
Number: func(v int32) *int32 { return &v }(999),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption"),
}},
ExtensionRange: []*google_protobuf.DescriptorProto_ExtensionRange{{Start: func(v int32) *int32 { return &v }(1000),
End: func(v int32) *int32 { return &v }(536870912),
}},
}, {Name: func(v string) *string { return &v }("UninterpretedOption"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.UninterpretedOption.NamePart"),
}, {Name: func(v string) *string { return &v }("identifier_value"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("positive_int_value"),
Number: func(v int32) *int32 { return &v }(4),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(4),
}, {Name: func(v string) *string { return &v }("negative_int_value"),
Number: func(v int32) *int32 { return &v }(5),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(3),
}, {Name: func(v string) *string { return &v }("double_value"),
Number: func(v int32) *int32 { return &v }(6),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(1),
}, {Name: func(v string) *string { return &v }("string_value"),
Number: func(v int32) *int32 { return &v }(7),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(12),
}, {Name: func(v string) *string { return &v }("aggregate_value"),
Number: func(v int32) *int32 { return &v }(8),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}},
NestedType: []*google_protobuf.DescriptorProto{{Name: func(v string) *string { return &v }("NamePart"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("name_part"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(2),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("is_extension"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(2),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
}},
}},
}, {Name: func(v string) *string { return &v }("SourceCodeInfo"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("location"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".google.protobuf.SourceCodeInfo.Location"),
}},
NestedType: []*google_protobuf.DescriptorProto{{Name: func(v string) *string { return &v }("Location"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("path"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
Options: &google_protobuf.FieldOptions{Packed: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("span"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
Options: &google_protobuf.FieldOptions{Packed: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("leading_comments"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("trailing_comments"),
Number: func(v int32) *int32 { return &v }(4),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}},
}},
}},
Options: &google_protobuf.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"),
JavaOuterClassname: func(v string) *string { return &v }("DescriptorProtos"),
OptimizeFor: func(v google_protobuf.FileOptions_OptimizeMode) *google_protobuf.FileOptions_OptimizeMode { return &v }(1),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("github.com/gogo/protobuf/gogoproto/gogo.proto"),
Package: func(v string) *string { return &v }("gogoproto"),
Dependency: []string{"google/protobuf/descriptor.proto"},
Extension: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("goproto_enum_prefix"),
Number: func(v int32) *int32 { return &v }(62001),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"),
}, {Name: func(v string) *string { return &v }("goproto_enum_stringer"),
Number: func(v int32) *int32 { return &v }(62021),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"),
}, {Name: func(v string) *string { return &v }("enum_stringer"),
Number: func(v int32) *int32 { return &v }(62022),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.EnumOptions"),
}, {Name: func(v string) *string { return &v }("goproto_getters_all"),
Number: func(v int32) *int32 { return &v }(63001),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("goproto_enum_prefix_all"),
Number: func(v int32) *int32 { return &v }(63002),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("goproto_stringer_all"),
Number: func(v int32) *int32 { return &v }(63003),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("verbose_equal_all"),
Number: func(v int32) *int32 { return &v }(63004),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("face_all"),
Number: func(v int32) *int32 { return &v }(63005),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("gostring_all"),
Number: func(v int32) *int32 { return &v }(63006),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("populate_all"),
Number: func(v int32) *int32 { return &v }(63007),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("stringer_all"),
Number: func(v int32) *int32 { return &v }(63008),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("onlyone_all"),
Number: func(v int32) *int32 { return &v }(63009),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("equal_all"),
Number: func(v int32) *int32 { return &v }(63013),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("description_all"),
Number: func(v int32) *int32 { return &v }(63014),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("testgen_all"),
Number: func(v int32) *int32 { return &v }(63015),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("benchgen_all"),
Number: func(v int32) *int32 { return &v }(63016),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("marshaler_all"),
Number: func(v int32) *int32 { return &v }(63017),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("unmarshaler_all"),
Number: func(v int32) *int32 { return &v }(63018),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("sizer_all"),
Number: func(v int32) *int32 { return &v }(63020),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("goproto_enum_stringer_all"),
Number: func(v int32) *int32 { return &v }(63021),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("enum_stringer_all"),
Number: func(v int32) *int32 { return &v }(63022),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("unsafe_marshaler_all"),
Number: func(v int32) *int32 { return &v }(63023),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("unsafe_unmarshaler_all"),
Number: func(v int32) *int32 { return &v }(63024),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("goproto_extensions_map_all"),
Number: func(v int32) *int32 { return &v }(63025),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("goproto_unrecognized_all"),
Number: func(v int32) *int32 { return &v }(63026),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("gogoproto_import"),
Number: func(v int32) *int32 { return &v }(63027),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FileOptions"),
}, {Name: func(v string) *string { return &v }("goproto_getters"),
Number: func(v int32) *int32 { return &v }(64001),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("goproto_stringer"),
Number: func(v int32) *int32 { return &v }(64003),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("verbose_equal"),
Number: func(v int32) *int32 { return &v }(64004),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("face"),
Number: func(v int32) *int32 { return &v }(64005),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("gostring"),
Number: func(v int32) *int32 { return &v }(64006),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("populate"),
Number: func(v int32) *int32 { return &v }(64007),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("stringer"),
Number: func(v int32) *int32 { return &v }(67008),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("onlyone"),
Number: func(v int32) *int32 { return &v }(64009),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("equal"),
Number: func(v int32) *int32 { return &v }(64013),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("description"),
Number: func(v int32) *int32 { return &v }(64014),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("testgen"),
Number: func(v int32) *int32 { return &v }(64015),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("benchgen"),
Number: func(v int32) *int32 { return &v }(64016),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("marshaler"),
Number: func(v int32) *int32 { return &v }(64017),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("unmarshaler"),
Number: func(v int32) *int32 { return &v }(64018),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("sizer"),
Number: func(v int32) *int32 { return &v }(64020),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("unsafe_marshaler"),
Number: func(v int32) *int32 { return &v }(64023),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("unsafe_unmarshaler"),
Number: func(v int32) *int32 { return &v }(64024),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("goproto_extensions_map"),
Number: func(v int32) *int32 { return &v }(64025),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("goproto_unrecognized"),
Number: func(v int32) *int32 { return &v }(64026),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.MessageOptions"),
}, {Name: func(v string) *string { return &v }("nullable"),
Number: func(v int32) *int32 { return &v }(65001),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"),
}, {Name: func(v string) *string { return &v }("embed"),
Number: func(v int32) *int32 { return &v }(65002),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"),
}, {Name: func(v string) *string { return &v }("customtype"),
Number: func(v int32) *int32 { return &v }(65003),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"),
}, {Name: func(v string) *string { return &v }("customname"),
Number: func(v int32) *int32 { return &v }(65004),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"),
}, {Name: func(v string) *string { return &v }("jsontag"),
Number: func(v int32) *int32 { return &v }(65005),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"),
}, {Name: func(v string) *string { return &v }("moretags"),
Number: func(v int32) *int32 { return &v }(65006),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"),
}, {Name: func(v string) *string { return &v }("casttype"),
Number: func(v int32) *int32 { return &v }(65007),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
Extendee: func(v string) *string { return &v }(".google.protobuf.FieldOptions"),
}},
Options: &google_protobuf.FileOptions{JavaPackage: func(v string) *string { return &v }("com.google.protobuf"),
JavaOuterClassname: func(v string) *string { return &v }("GoGoProtos"),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("combos/marshaler/mapsproto2.proto"),
Package: func(v string) *string { return &v }("proto2.maps"),
Dependency: []string{"github.com/gogo/protobuf/gogoproto/gogo.proto"},
MessageType: []*google_protobuf.DescriptorProto{{Name: func(v string) *string { return &v }("FloatingPoint"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("f"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(1),
}},
}, {Name: func(v string) *string { return &v }("AllMaps"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMap"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToDoubleMapEntry"),
}, {Name: func(v string) *string { return &v }("StringToFloatMap"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToFloatMapEntry"),
}, {Name: func(v string) *string { return &v }("Int32Map"),
Number: func(v int32) *int32 { return &v }(3),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int32MapEntry"),
}, {Name: func(v string) *string { return &v }("Int64Map"),
Number: func(v int32) *int32 { return &v }(4),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Int64MapEntry"),
}, {Name: func(v string) *string { return &v }("Uint32Map"),
Number: func(v int32) *int32 { return &v }(5),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint32MapEntry"),
}, {Name: func(v string) *string { return &v }("Uint64Map"),
Number: func(v int32) *int32 { return &v }(6),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Uint64MapEntry"),
}, {Name: func(v string) *string { return &v }("Sint32Map"),
Number: func(v int32) *int32 { return &v }(7),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint32MapEntry"),
}, {Name: func(v string) *string { return &v }("Sint64Map"),
Number: func(v int32) *int32 { return &v }(8),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sint64MapEntry"),
}, {Name: func(v string) *string { return &v }("Fixed32Map"),
Number: func(v int32) *int32 { return &v }(9),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed32MapEntry"),
}, {Name: func(v string) *string { return &v }("Sfixed32Map"),
Number: func(v int32) *int32 { return &v }(10),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed32MapEntry"),
}, {Name: func(v string) *string { return &v }("Fixed64Map"),
Number: func(v int32) *int32 { return &v }(11),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Fixed64MapEntry"),
}, {Name: func(v string) *string { return &v }("Sfixed64Map"),
Number: func(v int32) *int32 { return &v }(12),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.Sfixed64MapEntry"),
}, {Name: func(v string) *string { return &v }("BoolMap"),
Number: func(v int32) *int32 { return &v }(13),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.BoolMapEntry"),
}, {Name: func(v string) *string { return &v }("StringMap"),
Number: func(v int32) *int32 { return &v }(14),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringMapEntry"),
}, {Name: func(v string) *string { return &v }("StringToBytesMap"),
Number: func(v int32) *int32 { return &v }(15),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToBytesMapEntry"),
}, {Name: func(v string) *string { return &v }("StringToEnumMap"),
Number: func(v int32) *int32 { return &v }(16),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToEnumMapEntry"),
}, {Name: func(v string) *string { return &v }("StringToMsgMap"),
Number: func(v int32) *int32 { return &v }(17),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(3),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.AllMaps.StringToMsgMapEntry"),
}},
NestedType: []*google_protobuf.DescriptorProto{{Name: func(v string) *string { return &v }("StringToDoubleMapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(1),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("StringToFloatMapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(2),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Int32MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(5),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Int64MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(3),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(3),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Uint32MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(13),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(13),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Uint64MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(4),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(4),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Sint32MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(17),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(17),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Sint64MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(18),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(18),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Fixed32MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(7),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(7),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Sfixed32MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(15),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(15),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Fixed64MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(6),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(6),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("Sfixed64MapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(16),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(16),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("BoolMapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(8),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("StringMapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("StringToBytesMapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(12),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("StringToEnumMapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(14),
TypeName: func(v string) *string { return &v }(".proto2.maps.MapEnum"),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}, {Name: func(v string) *string { return &v }("StringToMsgMapEntry"),
Field: []*google_protobuf.FieldDescriptorProto{{Name: func(v string) *string { return &v }("key"),
Number: func(v int32) *int32 { return &v }(1),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(9),
}, {Name: func(v string) *string { return &v }("value"),
Number: func(v int32) *int32 { return &v }(2),
Label: func(v google_protobuf.FieldDescriptorProto_Label) *google_protobuf.FieldDescriptorProto_Label {
return &v
}(1),
Type: func(v google_protobuf.FieldDescriptorProto_Type) *google_protobuf.FieldDescriptorProto_Type {
return &v
}(11),
TypeName: func(v string) *string { return &v }(".proto2.maps.FloatingPoint"),
}},
Options: &google_protobuf.MessageOptions{MapEntry: func(v bool) *bool { return &v }(true),
XXX_extensions: map[int32]proto.Extension{},
},
}},
}},
EnumType: []*google_protobuf.EnumDescriptorProto{{Name: func(v string) *string { return &v }("MapEnum"),
Value: []*google_protobuf.EnumValueDescriptorProto{{Name: func(v string) *string { return &v }("MA"),
Number: func(v int32) *int32 { return &v }(0),
}, {Name: func(v string) *string { return &v }("MB"),
Number: func(v int32) *int32 { return &v }(1),
}, {Name: func(v string) *string { return &v }("MC"),
Number: func(v int32) *int32 { return &v }(2),
}},
}},
Options: &google_protobuf.FileOptions{XXX_extensions: map[int32]proto.Extension{63001: proto.NewExtension([]byte{0xc8, 0xe1, 0x1e, 0x0}), 63002: proto.NewExtension([]byte{0xd0, 0xe1, 0x1e, 0x0}), 63003: proto.NewExtension([]byte{0xd8, 0xe1, 0x1e, 0x0}), 63004: proto.NewExtension([]byte{0xe0, 0xe1, 0x1e, 0x1}), 63005: proto.NewExtension([]byte{0xe8, 0xe1, 0x1e, 0x1}), 63006: proto.NewExtension([]byte{0xf0, 0xe1, 0x1e, 0x1}), 63007: proto.NewExtension([]byte{0xf8, 0xe1, 0x1e, 0x1}), 63008: proto.NewExtension([]byte{0x80, 0xe2, 0x1e, 0x1}), 63013: proto.NewExtension([]byte{0xa8, 0xe2, 0x1e, 0x1}), 63014: proto.NewExtension([]byte{0xb0, 0xe2, 0x1e, 0x1}), 63015: proto.NewExtension([]byte{0xb8, 0xe2, 0x1e, 0x1}), 63016: proto.NewExtension([]byte{0xc0, 0xe2, 0x1e, 0x1}), 63017: proto.NewExtension([]byte{0xc8, 0xe2, 0x1e, 0x1}), 63018: proto.NewExtension([]byte{0xd0, 0xe2, 0x1e, 0x0}), 63020: proto.NewExtension([]byte{0xe0, 0xe2, 0x1e, 0x1}), 63021: proto.NewExtension([]byte{0xe8, 0xe2, 0x1e, 0x0}), 63022: proto.NewExtension([]byte{0xf0, 0xe2, 0x1e, 0x1}), 63023: proto.NewExtension([]byte{0xf8, 0xe2, 0x1e, 0x0}), 63024: proto.NewExtension([]byte{0x80, 0xe3, 0x1e, 0x0})}},
}},
}
}
func (x MapEnum) String() string {
s, ok := MapEnum_name[int32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
func (this *FloatingPoint) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*FloatingPoint)
if !ok {
return fmt.Errorf("that is not of type *FloatingPoint")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *FloatingPointbut is not nil && this == nil")
}
if this.F != nil && that1.F != nil {
if *this.F != *that1.F {
return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F)
}
} else if this.F != nil {
return fmt.Errorf("this.F == nil && that.F != nil")
} else if that1.F != nil {
return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *FloatingPoint) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*FloatingPoint)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.F != nil && that1.F != nil {
if *this.F != *that1.F {
return false
}
} else if this.F != nil {
return false
} else if that1.F != nil {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *AllMaps) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*AllMaps)
if !ok {
return fmt.Errorf("that is not of type *AllMaps")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *AllMaps but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *AllMapsbut is not nil && this == nil")
}
if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) {
return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap))
}
for i := range this.StringToDoubleMap {
if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] {
return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i])
}
}
if len(this.StringToFloatMap) != len(that1.StringToFloatMap) {
return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap))
}
for i := range this.StringToFloatMap {
if this.StringToFloatMap[i] != that1.StringToFloatMap[i] {
return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i])
}
}
if len(this.Int32Map) != len(that1.Int32Map) {
return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map))
}
for i := range this.Int32Map {
if this.Int32Map[i] != that1.Int32Map[i] {
return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i])
}
}
if len(this.Int64Map) != len(that1.Int64Map) {
return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map))
}
for i := range this.Int64Map {
if this.Int64Map[i] != that1.Int64Map[i] {
return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i])
}
}
if len(this.Uint32Map) != len(that1.Uint32Map) {
return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map))
}
for i := range this.Uint32Map {
if this.Uint32Map[i] != that1.Uint32Map[i] {
return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i])
}
}
if len(this.Uint64Map) != len(that1.Uint64Map) {
return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map))
}
for i := range this.Uint64Map {
if this.Uint64Map[i] != that1.Uint64Map[i] {
return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i])
}
}
if len(this.Sint32Map) != len(that1.Sint32Map) {
return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map))
}
for i := range this.Sint32Map {
if this.Sint32Map[i] != that1.Sint32Map[i] {
return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i])
}
}
if len(this.Sint64Map) != len(that1.Sint64Map) {
return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map))
}
for i := range this.Sint64Map {
if this.Sint64Map[i] != that1.Sint64Map[i] {
return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i])
}
}
if len(this.Fixed32Map) != len(that1.Fixed32Map) {
return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map))
}
for i := range this.Fixed32Map {
if this.Fixed32Map[i] != that1.Fixed32Map[i] {
return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i])
}
}
if len(this.Sfixed32Map) != len(that1.Sfixed32Map) {
return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map))
}
for i := range this.Sfixed32Map {
if this.Sfixed32Map[i] != that1.Sfixed32Map[i] {
return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i])
}
}
if len(this.Fixed64Map) != len(that1.Fixed64Map) {
return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map))
}
for i := range this.Fixed64Map {
if this.Fixed64Map[i] != that1.Fixed64Map[i] {
return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i])
}
}
if len(this.Sfixed64Map) != len(that1.Sfixed64Map) {
return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map))
}
for i := range this.Sfixed64Map {
if this.Sfixed64Map[i] != that1.Sfixed64Map[i] {
return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i])
}
}
if len(this.BoolMap) != len(that1.BoolMap) {
return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap))
}
for i := range this.BoolMap {
if this.BoolMap[i] != that1.BoolMap[i] {
return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i])
}
}
if len(this.StringMap) != len(that1.StringMap) {
return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap))
}
for i := range this.StringMap {
if this.StringMap[i] != that1.StringMap[i] {
return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i])
}
}
if len(this.StringToBytesMap) != len(that1.StringToBytesMap) {
return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap))
}
for i := range this.StringToBytesMap {
if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) {
return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i])
}
}
if len(this.StringToEnumMap) != len(that1.StringToEnumMap) {
return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap))
}
for i := range this.StringToEnumMap {
if this.StringToEnumMap[i] != that1.StringToEnumMap[i] {
return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i])
}
}
if len(this.StringToMsgMap) != len(that1.StringToMsgMap) {
return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap))
}
for i := range this.StringToMsgMap {
if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) {
return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i])
}
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *AllMaps) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*AllMaps)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) {
return false
}
for i := range this.StringToDoubleMap {
if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] {
return false
}
}
if len(this.StringToFloatMap) != len(that1.StringToFloatMap) {
return false
}
for i := range this.StringToFloatMap {
if this.StringToFloatMap[i] != that1.StringToFloatMap[i] {
return false
}
}
if len(this.Int32Map) != len(that1.Int32Map) {
return false
}
for i := range this.Int32Map {
if this.Int32Map[i] != that1.Int32Map[i] {
return false
}
}
if len(this.Int64Map) != len(that1.Int64Map) {
return false
}
for i := range this.Int64Map {
if this.Int64Map[i] != that1.Int64Map[i] {
return false
}
}
if len(this.Uint32Map) != len(that1.Uint32Map) {
return false
}
for i := range this.Uint32Map {
if this.Uint32Map[i] != that1.Uint32Map[i] {
return false
}
}
if len(this.Uint64Map) != len(that1.Uint64Map) {
return false
}
for i := range this.Uint64Map {
if this.Uint64Map[i] != that1.Uint64Map[i] {
return false
}
}
if len(this.Sint32Map) != len(that1.Sint32Map) {
return false
}
for i := range this.Sint32Map {
if this.Sint32Map[i] != that1.Sint32Map[i] {
return false
}
}
if len(this.Sint64Map) != len(that1.Sint64Map) {
return false
}
for i := range this.Sint64Map {
if this.Sint64Map[i] != that1.Sint64Map[i] {
return false
}
}
if len(this.Fixed32Map) != len(that1.Fixed32Map) {
return false
}
for i := range this.Fixed32Map {
if this.Fixed32Map[i] != that1.Fixed32Map[i] {
return false
}
}
if len(this.Sfixed32Map) != len(that1.Sfixed32Map) {
return false
}
for i := range this.Sfixed32Map {
if this.Sfixed32Map[i] != that1.Sfixed32Map[i] {
return false
}
}
if len(this.Fixed64Map) != len(that1.Fixed64Map) {
return false
}
for i := range this.Fixed64Map {
if this.Fixed64Map[i] != that1.Fixed64Map[i] {
return false
}
}
if len(this.Sfixed64Map) != len(that1.Sfixed64Map) {
return false
}
for i := range this.Sfixed64Map {
if this.Sfixed64Map[i] != that1.Sfixed64Map[i] {
return false
}
}
if len(this.BoolMap) != len(that1.BoolMap) {
return false
}
for i := range this.BoolMap {
if this.BoolMap[i] != that1.BoolMap[i] {
return false
}
}
if len(this.StringMap) != len(that1.StringMap) {
return false
}
for i := range this.StringMap {
if this.StringMap[i] != that1.StringMap[i] {
return false
}
}
if len(this.StringToBytesMap) != len(that1.StringToBytesMap) {
return false
}
for i := range this.StringToBytesMap {
if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) {
return false
}
}
if len(this.StringToEnumMap) != len(that1.StringToEnumMap) {
return false
}
for i := range this.StringToEnumMap {
if this.StringToEnumMap[i] != that1.StringToEnumMap[i] {
return false
}
}
if len(this.StringToMsgMap) != len(that1.StringToMsgMap) {
return false
}
for i := range this.StringToMsgMap {
if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) {
return false
}
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
type FloatingPointFace interface {
Proto() github_com_gogo_protobuf_proto.Message
GetF() *float64
}
func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message {
return this
}
func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message {
return NewFloatingPointFromFace(this)
}
func (this *FloatingPoint) GetF() *float64 {
return this.F
}
func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint {
this := &FloatingPoint{}
this.F = that.GetF()
return this
}
type AllMapsFace interface {
Proto() github_com_gogo_protobuf_proto.Message
GetStringToDoubleMap() map[string]float64
GetStringToFloatMap() map[string]float32
GetInt32Map() map[int32]int32
GetInt64Map() map[int64]int64
GetUint32Map() map[uint32]uint32
GetUint64Map() map[uint64]uint64
GetSint32Map() map[int32]int32
GetSint64Map() map[int64]int64
GetFixed32Map() map[uint32]uint32
GetSfixed32Map() map[int32]int32
GetFixed64Map() map[uint64]uint64
GetSfixed64Map() map[int64]int64
GetBoolMap() map[bool]bool
GetStringMap() map[string]string
GetStringToBytesMap() map[string][]byte
GetStringToEnumMap() map[string]MapEnum
GetStringToMsgMap() map[string]*FloatingPoint
}
func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message {
return this
}
func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message {
return NewAllMapsFromFace(this)
}
func (this *AllMaps) GetStringToDoubleMap() map[string]float64 {
return this.StringToDoubleMap
}
func (this *AllMaps) GetStringToFloatMap() map[string]float32 {
return this.StringToFloatMap
}
func (this *AllMaps) GetInt32Map() map[int32]int32 {
return this.Int32Map
}
func (this *AllMaps) GetInt64Map() map[int64]int64 {
return this.Int64Map
}
func (this *AllMaps) GetUint32Map() map[uint32]uint32 {
return this.Uint32Map
}
func (this *AllMaps) GetUint64Map() map[uint64]uint64 {
return this.Uint64Map
}
func (this *AllMaps) GetSint32Map() map[int32]int32 {
return this.Sint32Map
}
func (this *AllMaps) GetSint64Map() map[int64]int64 {
return this.Sint64Map
}
func (this *AllMaps) GetFixed32Map() map[uint32]uint32 {
return this.Fixed32Map
}
func (this *AllMaps) GetSfixed32Map() map[int32]int32 {
return this.Sfixed32Map
}
func (this *AllMaps) GetFixed64Map() map[uint64]uint64 {
return this.Fixed64Map
}
func (this *AllMaps) GetSfixed64Map() map[int64]int64 {
return this.Sfixed64Map
}
func (this *AllMaps) GetBoolMap() map[bool]bool {
return this.BoolMap
}
func (this *AllMaps) GetStringMap() map[string]string {
return this.StringMap
}
func (this *AllMaps) GetStringToBytesMap() map[string][]byte {
return this.StringToBytesMap
}
func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum {
return this.StringToEnumMap
}
func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint {
return this.StringToMsgMap
}
func NewAllMapsFromFace(that AllMapsFace) *AllMaps {
this := &AllMaps{}
this.StringToDoubleMap = that.GetStringToDoubleMap()
this.StringToFloatMap = that.GetStringToFloatMap()
this.Int32Map = that.GetInt32Map()
this.Int64Map = that.GetInt64Map()
this.Uint32Map = that.GetUint32Map()
this.Uint64Map = that.GetUint64Map()
this.Sint32Map = that.GetSint32Map()
this.Sint64Map = that.GetSint64Map()
this.Fixed32Map = that.GetFixed32Map()
this.Sfixed32Map = that.GetSfixed32Map()
this.Fixed64Map = that.GetFixed64Map()
this.Sfixed64Map = that.GetSfixed64Map()
this.BoolMap = that.GetBoolMap()
this.StringMap = that.GetStringMap()
this.StringToBytesMap = that.GetStringToBytesMap()
this.StringToEnumMap = that.GetStringToEnumMap()
this.StringToMsgMap = that.GetStringToMsgMap()
return this
}
func (this *FloatingPoint) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&proto2_maps.FloatingPoint{")
if this.F != nil {
s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *AllMaps) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 21)
s = append(s, "&proto2_maps.AllMaps{")
keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap))
for k := range this.StringToDoubleMap {
keysForStringToDoubleMap = append(keysForStringToDoubleMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap)
mapStringForStringToDoubleMap := "map[string]float64{"
for _, k := range keysForStringToDoubleMap {
mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k])
}
mapStringForStringToDoubleMap += "}"
if this.StringToDoubleMap != nil {
s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n")
}
keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap))
for k := range this.StringToFloatMap {
keysForStringToFloatMap = append(keysForStringToFloatMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap)
mapStringForStringToFloatMap := "map[string]float32{"
for _, k := range keysForStringToFloatMap {
mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k])
}
mapStringForStringToFloatMap += "}"
if this.StringToFloatMap != nil {
s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n")
}
keysForInt32Map := make([]int32, 0, len(this.Int32Map))
for k := range this.Int32Map {
keysForInt32Map = append(keysForInt32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map)
mapStringForInt32Map := "map[int32]int32{"
for _, k := range keysForInt32Map {
mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k])
}
mapStringForInt32Map += "}"
if this.Int32Map != nil {
s = append(s, "Int32Map: "+mapStringForInt32Map+",\n")
}
keysForInt64Map := make([]int64, 0, len(this.Int64Map))
for k := range this.Int64Map {
keysForInt64Map = append(keysForInt64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map)
mapStringForInt64Map := "map[int64]int64{"
for _, k := range keysForInt64Map {
mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k])
}
mapStringForInt64Map += "}"
if this.Int64Map != nil {
s = append(s, "Int64Map: "+mapStringForInt64Map+",\n")
}
keysForUint32Map := make([]uint32, 0, len(this.Uint32Map))
for k := range this.Uint32Map {
keysForUint32Map = append(keysForUint32Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map)
mapStringForUint32Map := "map[uint32]uint32{"
for _, k := range keysForUint32Map {
mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k])
}
mapStringForUint32Map += "}"
if this.Uint32Map != nil {
s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n")
}
keysForUint64Map := make([]uint64, 0, len(this.Uint64Map))
for k := range this.Uint64Map {
keysForUint64Map = append(keysForUint64Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map)
mapStringForUint64Map := "map[uint64]uint64{"
for _, k := range keysForUint64Map {
mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k])
}
mapStringForUint64Map += "}"
if this.Uint64Map != nil {
s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n")
}
keysForSint32Map := make([]int32, 0, len(this.Sint32Map))
for k := range this.Sint32Map {
keysForSint32Map = append(keysForSint32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map)
mapStringForSint32Map := "map[int32]int32{"
for _, k := range keysForSint32Map {
mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k])
}
mapStringForSint32Map += "}"
if this.Sint32Map != nil {
s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n")
}
keysForSint64Map := make([]int64, 0, len(this.Sint64Map))
for k := range this.Sint64Map {
keysForSint64Map = append(keysForSint64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map)
mapStringForSint64Map := "map[int64]int64{"
for _, k := range keysForSint64Map {
mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k])
}
mapStringForSint64Map += "}"
if this.Sint64Map != nil {
s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n")
}
keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map))
for k := range this.Fixed32Map {
keysForFixed32Map = append(keysForFixed32Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map)
mapStringForFixed32Map := "map[uint32]uint32{"
for _, k := range keysForFixed32Map {
mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k])
}
mapStringForFixed32Map += "}"
if this.Fixed32Map != nil {
s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n")
}
keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map))
for k := range this.Sfixed32Map {
keysForSfixed32Map = append(keysForSfixed32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map)
mapStringForSfixed32Map := "map[int32]int32{"
for _, k := range keysForSfixed32Map {
mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k])
}
mapStringForSfixed32Map += "}"
if this.Sfixed32Map != nil {
s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n")
}
keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map))
for k := range this.Fixed64Map {
keysForFixed64Map = append(keysForFixed64Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map)
mapStringForFixed64Map := "map[uint64]uint64{"
for _, k := range keysForFixed64Map {
mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k])
}
mapStringForFixed64Map += "}"
if this.Fixed64Map != nil {
s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n")
}
keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map))
for k := range this.Sfixed64Map {
keysForSfixed64Map = append(keysForSfixed64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map)
mapStringForSfixed64Map := "map[int64]int64{"
for _, k := range keysForSfixed64Map {
mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k])
}
mapStringForSfixed64Map += "}"
if this.Sfixed64Map != nil {
s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n")
}
keysForBoolMap := make([]bool, 0, len(this.BoolMap))
for k := range this.BoolMap {
keysForBoolMap = append(keysForBoolMap, k)
}
github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap)
mapStringForBoolMap := "map[bool]bool{"
for _, k := range keysForBoolMap {
mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k])
}
mapStringForBoolMap += "}"
if this.BoolMap != nil {
s = append(s, "BoolMap: "+mapStringForBoolMap+",\n")
}
keysForStringMap := make([]string, 0, len(this.StringMap))
for k := range this.StringMap {
keysForStringMap = append(keysForStringMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap)
mapStringForStringMap := "map[string]string{"
for _, k := range keysForStringMap {
mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k])
}
mapStringForStringMap += "}"
if this.StringMap != nil {
s = append(s, "StringMap: "+mapStringForStringMap+",\n")
}
keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap))
for k := range this.StringToBytesMap {
keysForStringToBytesMap = append(keysForStringToBytesMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap)
mapStringForStringToBytesMap := "map[string][]byte{"
for _, k := range keysForStringToBytesMap {
mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k])
}
mapStringForStringToBytesMap += "}"
if this.StringToBytesMap != nil {
s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n")
}
keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap))
for k := range this.StringToEnumMap {
keysForStringToEnumMap = append(keysForStringToEnumMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap)
mapStringForStringToEnumMap := "map[string]MapEnum{"
for _, k := range keysForStringToEnumMap {
mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k])
}
mapStringForStringToEnumMap += "}"
if this.StringToEnumMap != nil {
s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n")
}
keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap))
for k := range this.StringToMsgMap {
keysForStringToMsgMap = append(keysForStringToMsgMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap)
mapStringForStringToMsgMap := "map[string]*FloatingPoint{"
for _, k := range keysForStringToMsgMap {
mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k])
}
mapStringForStringToMsgMap += "}"
if this.StringToMsgMap != nil {
s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringMapsproto2(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string {
if e == nil {
return "nil"
}
s := "map[int32]proto.Extension{"
keys := make([]int, 0, len(e))
for k := range e {
keys = append(keys, int(k))
}
sort.Ints(keys)
ss := []string{}
for _, k := range keys {
ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
}
s += strings.Join(ss, ",") + "}"
return s
}
func (m *FloatingPoint) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
n, err := m.MarshalTo(data)
if err != nil {
return nil, err
}
return data[:n], nil
}
func (m *FloatingPoint) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.F != nil {
data[i] = 0x9
i++
i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(*m.F)))
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *AllMaps) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
n, err := m.MarshalTo(data)
if err != nil {
return nil, err
}
return data[:n], nil
}
func (m *AllMaps) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.StringToDoubleMap) > 0 {
keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap))
for k := range m.StringToDoubleMap {
keysForStringToDoubleMap = append(keysForStringToDoubleMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap)
for _, k := range keysForStringToDoubleMap {
data[i] = 0xa
i++
v := m.StringToDoubleMap[k]
mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0xa
i++
i = encodeVarintMapsproto2(data, i, uint64(len(k)))
i += copy(data[i:], k)
data[i] = 0x11
i++
i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(v)))
}
}
if len(m.StringToFloatMap) > 0 {
keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap))
for k := range m.StringToFloatMap {
keysForStringToFloatMap = append(keysForStringToFloatMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap)
for _, k := range keysForStringToFloatMap {
data[i] = 0x12
i++
v := m.StringToFloatMap[k]
mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0xa
i++
i = encodeVarintMapsproto2(data, i, uint64(len(k)))
i += copy(data[i:], k)
data[i] = 0x15
i++
i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(v)))
}
}
if len(m.Int32Map) > 0 {
keysForInt32Map := make([]int32, 0, len(m.Int32Map))
for k := range m.Int32Map {
keysForInt32Map = append(keysForInt32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map)
for _, k := range keysForInt32Map {
data[i] = 0x1a
i++
v := m.Int32Map[k]
mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x8
i++
i = encodeVarintMapsproto2(data, i, uint64(k))
data[i] = 0x10
i++
i = encodeVarintMapsproto2(data, i, uint64(v))
}
}
if len(m.Int64Map) > 0 {
keysForInt64Map := make([]int64, 0, len(m.Int64Map))
for k := range m.Int64Map {
keysForInt64Map = append(keysForInt64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map)
for _, k := range keysForInt64Map {
data[i] = 0x22
i++
v := m.Int64Map[k]
mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x8
i++
i = encodeVarintMapsproto2(data, i, uint64(k))
data[i] = 0x10
i++
i = encodeVarintMapsproto2(data, i, uint64(v))
}
}
if len(m.Uint32Map) > 0 {
keysForUint32Map := make([]uint32, 0, len(m.Uint32Map))
for k := range m.Uint32Map {
keysForUint32Map = append(keysForUint32Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map)
for _, k := range keysForUint32Map {
data[i] = 0x2a
i++
v := m.Uint32Map[k]
mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x8
i++
i = encodeVarintMapsproto2(data, i, uint64(k))
data[i] = 0x10
i++
i = encodeVarintMapsproto2(data, i, uint64(v))
}
}
if len(m.Uint64Map) > 0 {
keysForUint64Map := make([]uint64, 0, len(m.Uint64Map))
for k := range m.Uint64Map {
keysForUint64Map = append(keysForUint64Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map)
for _, k := range keysForUint64Map {
data[i] = 0x32
i++
v := m.Uint64Map[k]
mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x8
i++
i = encodeVarintMapsproto2(data, i, uint64(k))
data[i] = 0x10
i++
i = encodeVarintMapsproto2(data, i, uint64(v))
}
}
if len(m.Sint32Map) > 0 {
keysForSint32Map := make([]int32, 0, len(m.Sint32Map))
for k := range m.Sint32Map {
keysForSint32Map = append(keysForSint32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map)
for _, k := range keysForSint32Map {
data[i] = 0x3a
i++
v := m.Sint32Map[k]
mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x8
i++
i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31))))
data[i] = 0x10
i++
i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31))))
}
}
if len(m.Sint64Map) > 0 {
keysForSint64Map := make([]int64, 0, len(m.Sint64Map))
for k := range m.Sint64Map {
keysForSint64Map = append(keysForSint64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map)
for _, k := range keysForSint64Map {
data[i] = 0x42
i++
v := m.Sint64Map[k]
mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x8
i++
i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63))))
data[i] = 0x10
i++
i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63))))
}
}
if len(m.Fixed32Map) > 0 {
keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map))
for k := range m.Fixed32Map {
keysForFixed32Map = append(keysForFixed32Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map)
for _, k := range keysForFixed32Map {
data[i] = 0x4a
i++
v := m.Fixed32Map[k]
mapSize := 1 + 4 + 1 + 4
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0xd
i++
i = encodeFixed32Mapsproto2(data, i, uint32(k))
data[i] = 0x15
i++
i = encodeFixed32Mapsproto2(data, i, uint32(v))
}
}
if len(m.Sfixed32Map) > 0 {
keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map))
for k := range m.Sfixed32Map {
keysForSfixed32Map = append(keysForSfixed32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map)
for _, k := range keysForSfixed32Map {
data[i] = 0x52
i++
v := m.Sfixed32Map[k]
mapSize := 1 + 4 + 1 + 4
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0xd
i++
i = encodeFixed32Mapsproto2(data, i, uint32(k))
data[i] = 0x15
i++
i = encodeFixed32Mapsproto2(data, i, uint32(v))
}
}
if len(m.Fixed64Map) > 0 {
keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map))
for k := range m.Fixed64Map {
keysForFixed64Map = append(keysForFixed64Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map)
for _, k := range keysForFixed64Map {
data[i] = 0x5a
i++
v := m.Fixed64Map[k]
mapSize := 1 + 8 + 1 + 8
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x9
i++
i = encodeFixed64Mapsproto2(data, i, uint64(k))
data[i] = 0x11
i++
i = encodeFixed64Mapsproto2(data, i, uint64(v))
}
}
if len(m.Sfixed64Map) > 0 {
keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map))
for k := range m.Sfixed64Map {
keysForSfixed64Map = append(keysForSfixed64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map)
for _, k := range keysForSfixed64Map {
data[i] = 0x62
i++
v := m.Sfixed64Map[k]
mapSize := 1 + 8 + 1 + 8
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x9
i++
i = encodeFixed64Mapsproto2(data, i, uint64(k))
data[i] = 0x11
i++
i = encodeFixed64Mapsproto2(data, i, uint64(v))
}
}
if len(m.BoolMap) > 0 {
keysForBoolMap := make([]bool, 0, len(m.BoolMap))
for k := range m.BoolMap {
keysForBoolMap = append(keysForBoolMap, k)
}
github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap)
for _, k := range keysForBoolMap {
data[i] = 0x6a
i++
v := m.BoolMap[k]
mapSize := 1 + 1 + 1 + 1
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0x8
i++
if k {
data[i] = 1
} else {
data[i] = 0
}
i++
data[i] = 0x10
i++
if v {
data[i] = 1
} else {
data[i] = 0
}
i++
}
}
if len(m.StringMap) > 0 {
keysForStringMap := make([]string, 0, len(m.StringMap))
for k := range m.StringMap {
keysForStringMap = append(keysForStringMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap)
for _, k := range keysForStringMap {
data[i] = 0x72
i++
v := m.StringMap[k]
mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v)))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0xa
i++
i = encodeVarintMapsproto2(data, i, uint64(len(k)))
i += copy(data[i:], k)
data[i] = 0x12
i++
i = encodeVarintMapsproto2(data, i, uint64(len(v)))
i += copy(data[i:], v)
}
}
if len(m.StringToBytesMap) > 0 {
keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap))
for k := range m.StringToBytesMap {
keysForStringToBytesMap = append(keysForStringToBytesMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap)
for _, k := range keysForStringToBytesMap {
data[i] = 0x7a
i++
v := m.StringToBytesMap[k]
mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v)))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0xa
i++
i = encodeVarintMapsproto2(data, i, uint64(len(k)))
i += copy(data[i:], k)
data[i] = 0x12
i++
i = encodeVarintMapsproto2(data, i, uint64(len(v)))
i += copy(data[i:], v)
}
}
if len(m.StringToEnumMap) > 0 {
keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap))
for k := range m.StringToEnumMap {
keysForStringToEnumMap = append(keysForStringToEnumMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap)
for _, k := range keysForStringToEnumMap {
data[i] = 0x82
i++
data[i] = 0x1
i++
v := m.StringToEnumMap[k]
mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0xa
i++
i = encodeVarintMapsproto2(data, i, uint64(len(k)))
i += copy(data[i:], k)
data[i] = 0x10
i++
i = encodeVarintMapsproto2(data, i, uint64(v))
}
}
if len(m.StringToMsgMap) > 0 {
keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap))
for k := range m.StringToMsgMap {
keysForStringToMsgMap = append(keysForStringToMsgMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap)
for _, k := range keysForStringToMsgMap {
data[i] = 0x8a
i++
data[i] = 0x1
i++
v := m.StringToMsgMap[k]
if v == nil {
return 0, errors.New("proto: map has nil element")
}
msgSize := v.Size()
mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize))
i = encodeVarintMapsproto2(data, i, uint64(mapSize))
data[i] = 0xa
i++
i = encodeVarintMapsproto2(data, i, uint64(len(k)))
i += copy(data[i:], k)
data[i] = 0x12
i++
i = encodeVarintMapsproto2(data, i, uint64(v.Size()))
n1, err := v.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n1
}
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeFixed64Mapsproto2(data []byte, offset int, v uint64) int {
data[offset] = uint8(v)
data[offset+1] = uint8(v >> 8)
data[offset+2] = uint8(v >> 16)
data[offset+3] = uint8(v >> 24)
data[offset+4] = uint8(v >> 32)
data[offset+5] = uint8(v >> 40)
data[offset+6] = uint8(v >> 48)
data[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32Mapsproto2(data []byte, offset int, v uint32) int {
data[offset] = uint8(v)
data[offset+1] = uint8(v >> 8)
data[offset+2] = uint8(v >> 16)
data[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintMapsproto2(data []byte, offset int, v uint64) int {
for v >= 1<<7 {
data[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
data[offset] = uint8(v)
return offset + 1
}
func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint {
this := &FloatingPoint{}
if r.Intn(10) != 0 {
v1 := float64(r.Float64())
if r.Intn(2) == 0 {
v1 *= -1
}
this.F = &v1
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2)
}
return this
}
func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps {
this := &AllMaps{}
if r.Intn(10) != 0 {
v2 := r.Intn(10)
this.StringToDoubleMap = make(map[string]float64)
for i := 0; i < v2; i++ {
v3 := randStringMapsproto2(r)
this.StringToDoubleMap[v3] = float64(r.Float64())
if r.Intn(2) == 0 {
this.StringToDoubleMap[v3] *= -1
}
}
}
if r.Intn(10) != 0 {
v4 := r.Intn(10)
this.StringToFloatMap = make(map[string]float32)
for i := 0; i < v4; i++ {
v5 := randStringMapsproto2(r)
this.StringToFloatMap[v5] = float32(r.Float32())
if r.Intn(2) == 0 {
this.StringToFloatMap[v5] *= -1
}
}
}
if r.Intn(10) != 0 {
v6 := r.Intn(10)
this.Int32Map = make(map[int32]int32)
for i := 0; i < v6; i++ {
v7 := int32(r.Int31())
this.Int32Map[v7] = int32(r.Int31())
if r.Intn(2) == 0 {
this.Int32Map[v7] *= -1
}
}
}
if r.Intn(10) != 0 {
v8 := r.Intn(10)
this.Int64Map = make(map[int64]int64)
for i := 0; i < v8; i++ {
v9 := int64(r.Int63())
this.Int64Map[v9] = int64(r.Int63())
if r.Intn(2) == 0 {
this.Int64Map[v9] *= -1
}
}
}
if r.Intn(10) != 0 {
v10 := r.Intn(10)
this.Uint32Map = make(map[uint32]uint32)
for i := 0; i < v10; i++ {
v11 := uint32(r.Uint32())
this.Uint32Map[v11] = uint32(r.Uint32())
}
}
if r.Intn(10) != 0 {
v12 := r.Intn(10)
this.Uint64Map = make(map[uint64]uint64)
for i := 0; i < v12; i++ {
v13 := uint64(uint64(r.Uint32()))
this.Uint64Map[v13] = uint64(uint64(r.Uint32()))
}
}
if r.Intn(10) != 0 {
v14 := r.Intn(10)
this.Sint32Map = make(map[int32]int32)
for i := 0; i < v14; i++ {
v15 := int32(r.Int31())
this.Sint32Map[v15] = int32(r.Int31())
if r.Intn(2) == 0 {
this.Sint32Map[v15] *= -1
}
}
}
if r.Intn(10) != 0 {
v16 := r.Intn(10)
this.Sint64Map = make(map[int64]int64)
for i := 0; i < v16; i++ {
v17 := int64(r.Int63())
this.Sint64Map[v17] = int64(r.Int63())
if r.Intn(2) == 0 {
this.Sint64Map[v17] *= -1
}
}
}
if r.Intn(10) != 0 {
v18 := r.Intn(10)
this.Fixed32Map = make(map[uint32]uint32)
for i := 0; i < v18; i++ {
v19 := uint32(r.Uint32())
this.Fixed32Map[v19] = uint32(r.Uint32())
}
}
if r.Intn(10) != 0 {
v20 := r.Intn(10)
this.Sfixed32Map = make(map[int32]int32)
for i := 0; i < v20; i++ {
v21 := int32(r.Int31())
this.Sfixed32Map[v21] = int32(r.Int31())
if r.Intn(2) == 0 {
this.Sfixed32Map[v21] *= -1
}
}
}
if r.Intn(10) != 0 {
v22 := r.Intn(10)
this.Fixed64Map = make(map[uint64]uint64)
for i := 0; i < v22; i++ {
v23 := uint64(uint64(r.Uint32()))
this.Fixed64Map[v23] = uint64(uint64(r.Uint32()))
}
}
if r.Intn(10) != 0 {
v24 := r.Intn(10)
this.Sfixed64Map = make(map[int64]int64)
for i := 0; i < v24; i++ {
v25 := int64(r.Int63())
this.Sfixed64Map[v25] = int64(r.Int63())
if r.Intn(2) == 0 {
this.Sfixed64Map[v25] *= -1
}
}
}
if r.Intn(10) != 0 {
v26 := r.Intn(10)
this.BoolMap = make(map[bool]bool)
for i := 0; i < v26; i++ {
v27 := bool(bool(r.Intn(2) == 0))
this.BoolMap[v27] = bool(bool(r.Intn(2) == 0))
}
}
if r.Intn(10) != 0 {
v28 := r.Intn(10)
this.StringMap = make(map[string]string)
for i := 0; i < v28; i++ {
this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r)
}
}
if r.Intn(10) != 0 {
v29 := r.Intn(10)
this.StringToBytesMap = make(map[string][]byte)
for i := 0; i < v29; i++ {
v30 := r.Intn(100)
v31 := randStringMapsproto2(r)
this.StringToBytesMap[v31] = make([]byte, v30)
for i := 0; i < v30; i++ {
this.StringToBytesMap[v31][i] = byte(r.Intn(256))
}
}
}
if r.Intn(10) != 0 {
v32 := r.Intn(10)
this.StringToEnumMap = make(map[string]MapEnum)
for i := 0; i < v32; i++ {
this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)])
}
}
if r.Intn(10) != 0 {
v33 := r.Intn(10)
this.StringToMsgMap = make(map[string]*FloatingPoint)
for i := 0; i < v33; i++ {
this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy)
}
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18)
}
return this
}
type randyMapsproto2 interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneMapsproto2(r randyMapsproto2) rune {
ru := r.Intn(62)
if ru < 10 {
return rune(ru + 48)
} else if ru < 36 {
return rune(ru + 55)
}
return rune(ru + 61)
}
func randStringMapsproto2(r randyMapsproto2) string {
v34 := r.Intn(100)
tmps := make([]rune, v34)
for i := 0; i < v34; i++ {
tmps[i] = randUTF8RuneMapsproto2(r)
}
return string(tmps)
}
func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (data []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
data = randFieldMapsproto2(data, r, fieldNumber, wire)
}
return data
}
func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
data = encodeVarintPopulateMapsproto2(data, uint64(key))
v35 := r.Int63()
if r.Intn(2) == 0 {
v35 *= -1
}
data = encodeVarintPopulateMapsproto2(data, uint64(v35))
case 1:
data = encodeVarintPopulateMapsproto2(data, uint64(key))
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
data = encodeVarintPopulateMapsproto2(data, uint64(key))
ll := r.Intn(100)
data = encodeVarintPopulateMapsproto2(data, uint64(ll))
for j := 0; j < ll; j++ {
data = append(data, byte(r.Intn(256)))
}
default:
data = encodeVarintPopulateMapsproto2(data, uint64(key))
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return data
}
func encodeVarintPopulateMapsproto2(data []byte, v uint64) []byte {
for v >= 1<<7 {
data = append(data, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
data = append(data, uint8(v))
return data
}
func (m *FloatingPoint) Size() (n int) {
var l int
_ = l
if m.F != nil {
n += 9
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *AllMaps) Size() (n int) {
var l int
_ = l
if len(m.StringToDoubleMap) > 0 {
for k, v := range m.StringToDoubleMap {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.StringToFloatMap) > 0 {
for k, v := range m.StringToFloatMap {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Int32Map) > 0 {
for k, v := range m.Int32Map {
_ = k
_ = v
mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v))
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Int64Map) > 0 {
for k, v := range m.Int64Map {
_ = k
_ = v
mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v))
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Uint32Map) > 0 {
for k, v := range m.Uint32Map {
_ = k
_ = v
mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v))
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Uint64Map) > 0 {
for k, v := range m.Uint64Map {
_ = k
_ = v
mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v))
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Sint32Map) > 0 {
for k, v := range m.Sint32Map {
_ = k
_ = v
mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v))
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Sint64Map) > 0 {
for k, v := range m.Sint64Map {
_ = k
_ = v
mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v))
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Fixed32Map) > 0 {
for k, v := range m.Fixed32Map {
_ = k
_ = v
mapEntrySize := 1 + 4 + 1 + 4
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Sfixed32Map) > 0 {
for k, v := range m.Sfixed32Map {
_ = k
_ = v
mapEntrySize := 1 + 4 + 1 + 4
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Fixed64Map) > 0 {
for k, v := range m.Fixed64Map {
_ = k
_ = v
mapEntrySize := 1 + 8 + 1 + 8
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.Sfixed64Map) > 0 {
for k, v := range m.Sfixed64Map {
_ = k
_ = v
mapEntrySize := 1 + 8 + 1 + 8
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.BoolMap) > 0 {
for k, v := range m.BoolMap {
_ = k
_ = v
mapEntrySize := 1 + 1 + 1 + 1
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.StringMap) > 0 {
for k, v := range m.StringMap {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v)))
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.StringToBytesMap) > 0 {
for k, v := range m.StringToBytesMap {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v)))
n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.StringToEnumMap) > 0 {
for k, v := range m.StringToEnumMap {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v))
n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize))
}
}
if len(m.StringToMsgMap) > 0 {
for k, v := range m.StringToMsgMap {
_ = k
_ = v
l = 0
if v != nil {
l = v.Size()
}
mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l))
n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovMapsproto2(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozMapsproto2(x uint64) (n int) {
return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *FloatingPoint) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&FloatingPoint{`,
`F:` + valueToStringMapsproto2(this.F) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *AllMaps) String() string {
if this == nil {
return "nil"
}
keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap))
for k := range this.StringToDoubleMap {
keysForStringToDoubleMap = append(keysForStringToDoubleMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap)
mapStringForStringToDoubleMap := "map[string]*float64{"
for _, k := range keysForStringToDoubleMap {
mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k])
}
mapStringForStringToDoubleMap += "}"
keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap))
for k := range this.StringToFloatMap {
keysForStringToFloatMap = append(keysForStringToFloatMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap)
mapStringForStringToFloatMap := "map[string]*float32{"
for _, k := range keysForStringToFloatMap {
mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k])
}
mapStringForStringToFloatMap += "}"
keysForInt32Map := make([]int32, 0, len(this.Int32Map))
for k := range this.Int32Map {
keysForInt32Map = append(keysForInt32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map)
mapStringForInt32Map := "map[int32]*int32{"
for _, k := range keysForInt32Map {
mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k])
}
mapStringForInt32Map += "}"
keysForInt64Map := make([]int64, 0, len(this.Int64Map))
for k := range this.Int64Map {
keysForInt64Map = append(keysForInt64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map)
mapStringForInt64Map := "map[int64]*int64{"
for _, k := range keysForInt64Map {
mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k])
}
mapStringForInt64Map += "}"
keysForUint32Map := make([]uint32, 0, len(this.Uint32Map))
for k := range this.Uint32Map {
keysForUint32Map = append(keysForUint32Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map)
mapStringForUint32Map := "map[uint32]*uint32{"
for _, k := range keysForUint32Map {
mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k])
}
mapStringForUint32Map += "}"
keysForUint64Map := make([]uint64, 0, len(this.Uint64Map))
for k := range this.Uint64Map {
keysForUint64Map = append(keysForUint64Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map)
mapStringForUint64Map := "map[uint64]*uint64{"
for _, k := range keysForUint64Map {
mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k])
}
mapStringForUint64Map += "}"
keysForSint32Map := make([]int32, 0, len(this.Sint32Map))
for k := range this.Sint32Map {
keysForSint32Map = append(keysForSint32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map)
mapStringForSint32Map := "map[int32]*int32{"
for _, k := range keysForSint32Map {
mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k])
}
mapStringForSint32Map += "}"
keysForSint64Map := make([]int64, 0, len(this.Sint64Map))
for k := range this.Sint64Map {
keysForSint64Map = append(keysForSint64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map)
mapStringForSint64Map := "map[int64]*int64{"
for _, k := range keysForSint64Map {
mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k])
}
mapStringForSint64Map += "}"
keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map))
for k := range this.Fixed32Map {
keysForFixed32Map = append(keysForFixed32Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map)
mapStringForFixed32Map := "map[uint32]*uint32{"
for _, k := range keysForFixed32Map {
mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k])
}
mapStringForFixed32Map += "}"
keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map))
for k := range this.Sfixed32Map {
keysForSfixed32Map = append(keysForSfixed32Map, k)
}
github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map)
mapStringForSfixed32Map := "map[int32]*int32{"
for _, k := range keysForSfixed32Map {
mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k])
}
mapStringForSfixed32Map += "}"
keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map))
for k := range this.Fixed64Map {
keysForFixed64Map = append(keysForFixed64Map, k)
}
github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map)
mapStringForFixed64Map := "map[uint64]*uint64{"
for _, k := range keysForFixed64Map {
mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k])
}
mapStringForFixed64Map += "}"
keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map))
for k := range this.Sfixed64Map {
keysForSfixed64Map = append(keysForSfixed64Map, k)
}
github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map)
mapStringForSfixed64Map := "map[int64]*int64{"
for _, k := range keysForSfixed64Map {
mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k])
}
mapStringForSfixed64Map += "}"
keysForBoolMap := make([]bool, 0, len(this.BoolMap))
for k := range this.BoolMap {
keysForBoolMap = append(keysForBoolMap, k)
}
github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap)
mapStringForBoolMap := "map[bool]*bool{"
for _, k := range keysForBoolMap {
mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k])
}
mapStringForBoolMap += "}"
keysForStringMap := make([]string, 0, len(this.StringMap))
for k := range this.StringMap {
keysForStringMap = append(keysForStringMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap)
mapStringForStringMap := "map[string]*string{"
for _, k := range keysForStringMap {
mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k])
}
mapStringForStringMap += "}"
keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap))
for k := range this.StringToBytesMap {
keysForStringToBytesMap = append(keysForStringToBytesMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap)
mapStringForStringToBytesMap := "map[string][]byte{"
for _, k := range keysForStringToBytesMap {
mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k])
}
mapStringForStringToBytesMap += "}"
keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap))
for k := range this.StringToEnumMap {
keysForStringToEnumMap = append(keysForStringToEnumMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap)
mapStringForStringToEnumMap := "map[string]*MapEnum{"
for _, k := range keysForStringToEnumMap {
mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k])
}
mapStringForStringToEnumMap += "}"
keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap))
for k := range this.StringToMsgMap {
keysForStringToMsgMap = append(keysForStringToMsgMap, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap)
mapStringForStringToMsgMap := "map[string]*FloatingPoint{"
for _, k := range keysForStringToMsgMap {
mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k])
}
mapStringForStringToMsgMap += "}"
s := strings.Join([]string{`&AllMaps{`,
`StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`,
`StringToFloatMap:` + mapStringForStringToFloatMap + `,`,
`Int32Map:` + mapStringForInt32Map + `,`,
`Int64Map:` + mapStringForInt64Map + `,`,
`Uint32Map:` + mapStringForUint32Map + `,`,
`Uint64Map:` + mapStringForUint64Map + `,`,
`Sint32Map:` + mapStringForSint32Map + `,`,
`Sint64Map:` + mapStringForSint64Map + `,`,
`Fixed32Map:` + mapStringForFixed32Map + `,`,
`Sfixed32Map:` + mapStringForSfixed32Map + `,`,
`Fixed64Map:` + mapStringForFixed64Map + `,`,
`Sfixed64Map:` + mapStringForSfixed64Map + `,`,
`BoolMap:` + mapStringForBoolMap + `,`,
`StringMap:` + mapStringForStringMap + `,`,
`StringToBytesMap:` + mapStringForStringToBytesMap + `,`,
`StringToEnumMap:` + mapStringForStringToEnumMap + `,`,
`StringToMsgMap:` + mapStringForStringToMsgMap + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func valueToStringMapsproto2(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Go support for Protocol Buffers - Google's data interchange format
//
// Copyright 2014 The Go Authors. All rights reserved.
// https://github.com/golang/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto2";
package proto2.maps;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
option (gogoproto.stringer_all) = true;
option (gogoproto.gostring_all) = true;
option (gogoproto.face_all) = true;
option (gogoproto.description_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.benchgen_all) = true;
option (gogoproto.unmarshaler_all) = false;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_enum_stringer_all) = false;
option (gogoproto.enum_stringer_all) = true;
option (gogoproto.unsafe_marshaler_all) = false;
option (gogoproto.unsafe_unmarshaler_all) = false;
message FloatingPoint {
optional double f = 1;
}
enum MapEnum {
MA = 0;
MB = 1;
MC = 2;
}
message AllMaps {
map<string, double> StringToDoubleMap = 1;
map<string, float> StringToFloatMap = 2;
map<int32, int32> Int32Map = 3;
map<int64, int64> Int64Map = 4;
map<uint32, uint32> Uint32Map = 5;
map<uint64, uint64> Uint64Map = 6;
map<sint32, sint32> Sint32Map = 7;
map<sint64, sint64> Sint64Map = 8;
map<fixed32, fixed32> Fixed32Map = 9;
map<sfixed32, sfixed32> Sfixed32Map = 10;
map<fixed64, fixed64> Fixed64Map = 11;
map<sfixed64, sfixed64> Sfixed64Map = 12;
map<bool, bool> BoolMap = 13;
map<string, string> StringMap = 14;
map<string, bytes> StringToBytesMap = 15;
map<string, MapEnum> StringToEnumMap = 16;
map<string, FloatingPoint> StringToMsgMap = 17;
}
// Code generated by protoc-gen-gogo.
// source: combos/marshaler/mapsproto2.proto
// DO NOT EDIT!
/*
Package proto2_maps is a generated protocol buffer package.
It is generated from these files:
combos/marshaler/mapsproto2.proto
It has these top-level messages:
FloatingPoint
AllMaps
*/
package proto2_maps
import testing "testing"
import math_rand "math/rand"
import time "time"
import github_com_gogo_protobuf_proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import github_com_gogo_protobuf_jsonpb "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/jsonpb"
import fmt "fmt"
import go_parser "go/parser"
import proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func TestFloatingPointProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(data))
copy(littlefuzz, data)
for i := range data {
data[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFloatingPointMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, false)
size := p.Size()
data := make([]byte, size)
for i := range data {
data[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(data)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range data {
data[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func BenchmarkFloatingPointProtoMarshal(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
pops := make([]*FloatingPoint, 10000)
for i := 0; i < 10000; i++ {
pops[i] = NewPopulatedFloatingPoint(popr, false)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])
if err != nil {
panic(err)
}
total += len(data)
}
b.SetBytes(int64(total / b.N))
}
func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
datas := make([][]byte, 10000)
for i := 0; i < 10000; i++ {
data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false))
if err != nil {
panic(err)
}
datas[i] = data
}
msg := &FloatingPoint{}
b.ResetTimer()
for i := 0; i < b.N; i++ {
total += len(datas[i%10000])
if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {
panic(err)
}
}
b.SetBytes(int64(total / b.N))
}
func TestAllMapsProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(data))
copy(littlefuzz, data)
for i := range data {
data[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestAllMapsMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, false)
size := p.Size()
data := make([]byte, size)
for i := range data {
data[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(data)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range data {
data[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func BenchmarkAllMapsProtoMarshal(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
pops := make([]*AllMaps, 10000)
for i := 0; i < 10000; i++ {
pops[i] = NewPopulatedAllMaps(popr, false)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])
if err != nil {
panic(err)
}
total += len(data)
}
b.SetBytes(int64(total / b.N))
}
func BenchmarkAllMapsProtoUnmarshal(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
datas := make([][]byte, 10000)
for i := 0; i < 10000; i++ {
data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false))
if err != nil {
panic(err)
}
datas[i] = data
}
msg := &AllMaps{}
b.ResetTimer()
for i := 0; i < b.N; i++ {
total += len(datas[i%10000])
if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {
panic(err)
}
}
b.SetBytes(int64(total / b.N))
}
func TestFloatingPointJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FloatingPoint{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestAllMapsJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &AllMaps{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFloatingPointProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, true)
data := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFloatingPointProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, true)
data := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestAllMapsProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, true)
data := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestAllMapsProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, true)
data := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapsproto2Description(t *testing.T) {
Mapsproto2Description()
}
func TestFloatingPointVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFloatingPoint(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FloatingPoint{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestAllMapsVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedAllMaps(popr, false)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &AllMaps{}
if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFloatingPointFace(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFloatingPoint(popr, true)
msg := p.TestProto()
if !p.Equal(msg) {
t.Fatalf("%#v !Face Equal %#v", msg, p)
}
}
func TestAllMapsFace(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedAllMaps(popr, true)
msg := p.TestProto()
if !p.Equal(msg) {
t.Fatalf("%#v !Face Equal %#v", msg, p)
}
}
func TestFloatingPointGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFloatingPoint(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
panic(err)
}
}
func TestAllMapsGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedAllMaps(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
panic(err)
}
}
func TestFloatingPointSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFloatingPoint(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(data) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func BenchmarkFloatingPointSize(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
pops := make([]*FloatingPoint, 1000)
for i := 0; i < 1000; i++ {
pops[i] = NewPopulatedFloatingPoint(popr, false)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
total += pops[i%1000].Size()
}
b.SetBytes(int64(total / b.N))
}
func TestAllMapsSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedAllMaps(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
data, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(data) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func BenchmarkAllMapsSize(b *testing.B) {
popr := math_rand.New(math_rand.NewSource(616))
total := 0
pops := make([]*AllMaps, 1000)
for i := 0; i < 1000; i++ {
pops[i] = NewPopulatedAllMaps(popr, false)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
total += pops[i%1000].Size()
}
b.SetBytes(int64(total / b.N))
}
func TestFloatingPointStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFloatingPoint(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestAllMapsStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedAllMaps(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
//These tests are generated by github.com/gogo/protobuf/plugin/testgen
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment