622 lines
23 KiB
Go
622 lines
23 KiB
Go
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
|
// source: proto3_proto/proto3.proto
|
||
|
|
||
|
package proto3_proto
|
||
|
|
||
|
import (
|
||
|
fmt "fmt"
|
||
|
proto "github.com/golang/protobuf/proto"
|
||
|
test_proto "github.com/golang/protobuf/proto/test_proto"
|
||
|
any "github.com/golang/protobuf/ptypes/any"
|
||
|
math "math"
|
||
|
)
|
||
|
|
||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
var _ = proto.Marshal
|
||
|
var _ = fmt.Errorf
|
||
|
var _ = math.Inf
|
||
|
|
||
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
// is compatible with the proto package it is being compiled against.
|
||
|
// A compilation error at this line likely means your copy of the
|
||
|
// proto package needs to be updated.
|
||
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||
|
|
||
|
type Message_Humour int32
|
||
|
|
||
|
const (
|
||
|
Message_UNKNOWN Message_Humour = 0
|
||
|
Message_PUNS Message_Humour = 1
|
||
|
Message_SLAPSTICK Message_Humour = 2
|
||
|
Message_BILL_BAILEY Message_Humour = 3
|
||
|
)
|
||
|
|
||
|
var Message_Humour_name = map[int32]string{
|
||
|
0: "UNKNOWN",
|
||
|
1: "PUNS",
|
||
|
2: "SLAPSTICK",
|
||
|
3: "BILL_BAILEY",
|
||
|
}
|
||
|
|
||
|
var Message_Humour_value = map[string]int32{
|
||
|
"UNKNOWN": 0,
|
||
|
"PUNS": 1,
|
||
|
"SLAPSTICK": 2,
|
||
|
"BILL_BAILEY": 3,
|
||
|
}
|
||
|
|
||
|
func (x Message_Humour) String() string {
|
||
|
return proto.EnumName(Message_Humour_name, int32(x))
|
||
|
}
|
||
|
|
||
|
func (Message_Humour) EnumDescriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_1c50d9b824d4ac38, []int{0, 0}
|
||
|
}
|
||
|
|
||
|
type Message struct {
|
||
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||
|
Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=proto3_proto.Message_Humour" json:"hilarity,omitempty"`
|
||
|
HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"`
|
||
|
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
|
||
|
ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"`
|
||
|
TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"`
|
||
|
Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"`
|
||
|
Key []uint64 `protobuf:"varint,5,rep,packed,name=key,proto3" json:"key,omitempty"`
|
||
|
ShortKey []int32 `protobuf:"varint,19,rep,packed,name=short_key,json=shortKey,proto3" json:"short_key,omitempty"`
|
||
|
Nested *Nested `protobuf:"bytes,6,opt,name=nested,proto3" json:"nested,omitempty"`
|
||
|
RFunny []Message_Humour `protobuf:"varint,16,rep,packed,name=r_funny,json=rFunny,proto3,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"`
|
||
|
Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain,proto3" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||
|
Proto2Field *test_proto.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field,proto3" json:"proto2_field,omitempty"`
|
||
|
Proto2Value map[string]*test_proto.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value,proto3" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||
|
Anything *any.Any `protobuf:"bytes,14,opt,name=anything,proto3" json:"anything,omitempty"`
|
||
|
ManyThings []*any.Any `protobuf:"bytes,15,rep,name=many_things,json=manyThings,proto3" json:"many_things,omitempty"`
|
||
|
Submessage *Message `protobuf:"bytes,17,opt,name=submessage,proto3" json:"submessage,omitempty"`
|
||
|
Children []*Message `protobuf:"bytes,18,rep,name=children,proto3" json:"children,omitempty"`
|
||
|
StringMap map[string]string `protobuf:"bytes,20,rep,name=string_map,json=stringMap,proto3" json:"string_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *Message) Reset() { *m = Message{} }
|
||
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
||
|
func (*Message) ProtoMessage() {}
|
||
|
func (*Message) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_1c50d9b824d4ac38, []int{0}
|
||
|
}
|
||
|
|
||
|
func (m *Message) XXX_Unmarshal(b []byte) error {
|
||
|
return xxx_messageInfo_Message.Unmarshal(m, b)
|
||
|
}
|
||
|
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
||
|
}
|
||
|
func (m *Message) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_Message.Merge(m, src)
|
||
|
}
|
||
|
func (m *Message) XXX_Size() int {
|
||
|
return xxx_messageInfo_Message.Size(m)
|
||
|
}
|
||
|
func (m *Message) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_Message.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_Message proto.InternalMessageInfo
|
||
|
|
||
|
func (m *Message) GetName() string {
|
||
|
if m != nil {
|
||
|
return m.Name
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetHilarity() Message_Humour {
|
||
|
if m != nil {
|
||
|
return m.Hilarity
|
||
|
}
|
||
|
return Message_UNKNOWN
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetHeightInCm() uint32 {
|
||
|
if m != nil {
|
||
|
return m.HeightInCm
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetData() []byte {
|
||
|
if m != nil {
|
||
|
return m.Data
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetResultCount() int64 {
|
||
|
if m != nil {
|
||
|
return m.ResultCount
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetTrueScotsman() bool {
|
||
|
if m != nil {
|
||
|
return m.TrueScotsman
|
||
|
}
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetScore() float32 {
|
||
|
if m != nil {
|
||
|
return m.Score
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetKey() []uint64 {
|
||
|
if m != nil {
|
||
|
return m.Key
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetShortKey() []int32 {
|
||
|
if m != nil {
|
||
|
return m.ShortKey
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetNested() *Nested {
|
||
|
if m != nil {
|
||
|
return m.Nested
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetRFunny() []Message_Humour {
|
||
|
if m != nil {
|
||
|
return m.RFunny
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetTerrain() map[string]*Nested {
|
||
|
if m != nil {
|
||
|
return m.Terrain
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetProto2Field() *test_proto.SubDefaults {
|
||
|
if m != nil {
|
||
|
return m.Proto2Field
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetProto2Value() map[string]*test_proto.SubDefaults {
|
||
|
if m != nil {
|
||
|
return m.Proto2Value
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetAnything() *any.Any {
|
||
|
if m != nil {
|
||
|
return m.Anything
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetManyThings() []*any.Any {
|
||
|
if m != nil {
|
||
|
return m.ManyThings
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetSubmessage() *Message {
|
||
|
if m != nil {
|
||
|
return m.Submessage
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetChildren() []*Message {
|
||
|
if m != nil {
|
||
|
return m.Children
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Message) GetStringMap() map[string]string {
|
||
|
if m != nil {
|
||
|
return m.StringMap
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type Nested struct {
|
||
|
Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"`
|
||
|
Cute bool `protobuf:"varint,2,opt,name=cute,proto3" json:"cute,omitempty"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *Nested) Reset() { *m = Nested{} }
|
||
|
func (m *Nested) String() string { return proto.CompactTextString(m) }
|
||
|
func (*Nested) ProtoMessage() {}
|
||
|
func (*Nested) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_1c50d9b824d4ac38, []int{1}
|
||
|
}
|
||
|
|
||
|
func (m *Nested) XXX_Unmarshal(b []byte) error {
|
||
|
return xxx_messageInfo_Nested.Unmarshal(m, b)
|
||
|
}
|
||
|
func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
return xxx_messageInfo_Nested.Marshal(b, m, deterministic)
|
||
|
}
|
||
|
func (m *Nested) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_Nested.Merge(m, src)
|
||
|
}
|
||
|
func (m *Nested) XXX_Size() int {
|
||
|
return xxx_messageInfo_Nested.Size(m)
|
||
|
}
|
||
|
func (m *Nested) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_Nested.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_Nested proto.InternalMessageInfo
|
||
|
|
||
|
func (m *Nested) GetBunny() string {
|
||
|
if m != nil {
|
||
|
return m.Bunny
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *Nested) GetCute() bool {
|
||
|
if m != nil {
|
||
|
return m.Cute
|
||
|
}
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
type MessageWithMap struct {
|
||
|
ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping,proto3" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *MessageWithMap) Reset() { *m = MessageWithMap{} }
|
||
|
func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
|
||
|
func (*MessageWithMap) ProtoMessage() {}
|
||
|
func (*MessageWithMap) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_1c50d9b824d4ac38, []int{2}
|
||
|
}
|
||
|
|
||
|
func (m *MessageWithMap) XXX_Unmarshal(b []byte) error {
|
||
|
return xxx_messageInfo_MessageWithMap.Unmarshal(m, b)
|
||
|
}
|
||
|
func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic)
|
||
|
}
|
||
|
func (m *MessageWithMap) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_MessageWithMap.Merge(m, src)
|
||
|
}
|
||
|
func (m *MessageWithMap) XXX_Size() int {
|
||
|
return xxx_messageInfo_MessageWithMap.Size(m)
|
||
|
}
|
||
|
func (m *MessageWithMap) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_MessageWithMap.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo
|
||
|
|
||
|
func (m *MessageWithMap) GetByteMapping() map[bool][]byte {
|
||
|
if m != nil {
|
||
|
return m.ByteMapping
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type IntMap struct {
|
||
|
Rtt map[int32]int32 `protobuf:"bytes,1,rep,name=rtt,proto3" json:"rtt,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *IntMap) Reset() { *m = IntMap{} }
|
||
|
func (m *IntMap) String() string { return proto.CompactTextString(m) }
|
||
|
func (*IntMap) ProtoMessage() {}
|
||
|
func (*IntMap) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_1c50d9b824d4ac38, []int{3}
|
||
|
}
|
||
|
|
||
|
func (m *IntMap) XXX_Unmarshal(b []byte) error {
|
||
|
return xxx_messageInfo_IntMap.Unmarshal(m, b)
|
||
|
}
|
||
|
func (m *IntMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
return xxx_messageInfo_IntMap.Marshal(b, m, deterministic)
|
||
|
}
|
||
|
func (m *IntMap) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_IntMap.Merge(m, src)
|
||
|
}
|
||
|
func (m *IntMap) XXX_Size() int {
|
||
|
return xxx_messageInfo_IntMap.Size(m)
|
||
|
}
|
||
|
func (m *IntMap) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_IntMap.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_IntMap proto.InternalMessageInfo
|
||
|
|
||
|
func (m *IntMap) GetRtt() map[int32]int32 {
|
||
|
if m != nil {
|
||
|
return m.Rtt
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type IntMaps struct {
|
||
|
Maps []*IntMap `protobuf:"bytes,1,rep,name=maps,proto3" json:"maps,omitempty"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *IntMaps) Reset() { *m = IntMaps{} }
|
||
|
func (m *IntMaps) String() string { return proto.CompactTextString(m) }
|
||
|
func (*IntMaps) ProtoMessage() {}
|
||
|
func (*IntMaps) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_1c50d9b824d4ac38, []int{4}
|
||
|
}
|
||
|
|
||
|
func (m *IntMaps) XXX_Unmarshal(b []byte) error {
|
||
|
return xxx_messageInfo_IntMaps.Unmarshal(m, b)
|
||
|
}
|
||
|
func (m *IntMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
return xxx_messageInfo_IntMaps.Marshal(b, m, deterministic)
|
||
|
}
|
||
|
func (m *IntMaps) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_IntMaps.Merge(m, src)
|
||
|
}
|
||
|
func (m *IntMaps) XXX_Size() int {
|
||
|
return xxx_messageInfo_IntMaps.Size(m)
|
||
|
}
|
||
|
func (m *IntMaps) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_IntMaps.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_IntMaps proto.InternalMessageInfo
|
||
|
|
||
|
func (m *IntMaps) GetMaps() []*IntMap {
|
||
|
if m != nil {
|
||
|
return m.Maps
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type TestUTF8 struct {
|
||
|
Scalar string `protobuf:"bytes,1,opt,name=scalar,proto3" json:"scalar,omitempty"`
|
||
|
Vector []string `protobuf:"bytes,2,rep,name=vector,proto3" json:"vector,omitempty"`
|
||
|
// Types that are valid to be assigned to Oneof:
|
||
|
// *TestUTF8_Field
|
||
|
Oneof isTestUTF8_Oneof `protobuf_oneof:"oneof"`
|
||
|
MapKey map[string]int64 `protobuf:"bytes,4,rep,name=map_key,json=mapKey,proto3" json:"map_key,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||
|
MapValue map[int64]string `protobuf:"bytes,5,rep,name=map_value,json=mapValue,proto3" json:"map_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *TestUTF8) Reset() { *m = TestUTF8{} }
|
||
|
func (m *TestUTF8) String() string { return proto.CompactTextString(m) }
|
||
|
func (*TestUTF8) ProtoMessage() {}
|
||
|
func (*TestUTF8) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_1c50d9b824d4ac38, []int{5}
|
||
|
}
|
||
|
|
||
|
func (m *TestUTF8) XXX_Unmarshal(b []byte) error {
|
||
|
return xxx_messageInfo_TestUTF8.Unmarshal(m, b)
|
||
|
}
|
||
|
func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic)
|
||
|
}
|
||
|
func (m *TestUTF8) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_TestUTF8.Merge(m, src)
|
||
|
}
|
||
|
func (m *TestUTF8) XXX_Size() int {
|
||
|
return xxx_messageInfo_TestUTF8.Size(m)
|
||
|
}
|
||
|
func (m *TestUTF8) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_TestUTF8.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_TestUTF8 proto.InternalMessageInfo
|
||
|
|
||
|
func (m *TestUTF8) GetScalar() string {
|
||
|
if m != nil {
|
||
|
return m.Scalar
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *TestUTF8) GetVector() []string {
|
||
|
if m != nil {
|
||
|
return m.Vector
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type isTestUTF8_Oneof interface {
|
||
|
isTestUTF8_Oneof()
|
||
|
}
|
||
|
|
||
|
type TestUTF8_Field struct {
|
||
|
Field string `protobuf:"bytes,3,opt,name=field,proto3,oneof"`
|
||
|
}
|
||
|
|
||
|
func (*TestUTF8_Field) isTestUTF8_Oneof() {}
|
||
|
|
||
|
func (m *TestUTF8) GetOneof() isTestUTF8_Oneof {
|
||
|
if m != nil {
|
||
|
return m.Oneof
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *TestUTF8) GetField() string {
|
||
|
if x, ok := m.GetOneof().(*TestUTF8_Field); ok {
|
||
|
return x.Field
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *TestUTF8) GetMapKey() map[string]int64 {
|
||
|
if m != nil {
|
||
|
return m.MapKey
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *TestUTF8) GetMapValue() map[int64]string {
|
||
|
if m != nil {
|
||
|
return m.MapValue
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
||
|
func (*TestUTF8) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||
|
return _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{
|
||
|
(*TestUTF8_Field)(nil),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
||
|
m := msg.(*TestUTF8)
|
||
|
// oneof
|
||
|
switch x := m.Oneof.(type) {
|
||
|
case *TestUTF8_Field:
|
||
|
b.EncodeVarint(3<<3 | proto.WireBytes)
|
||
|
b.EncodeStringBytes(x.Field)
|
||
|
case nil:
|
||
|
default:
|
||
|
return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x)
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
||
|
m := msg.(*TestUTF8)
|
||
|
switch tag {
|
||
|
case 3: // oneof.field
|
||
|
if wire != proto.WireBytes {
|
||
|
return true, proto.ErrInternalBadWireType
|
||
|
}
|
||
|
x, err := b.DecodeStringBytes()
|
||
|
m.Oneof = &TestUTF8_Field{x}
|
||
|
return true, err
|
||
|
default:
|
||
|
return false, nil
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func _TestUTF8_OneofSizer(msg proto.Message) (n int) {
|
||
|
m := msg.(*TestUTF8)
|
||
|
// oneof
|
||
|
switch x := m.Oneof.(type) {
|
||
|
case *TestUTF8_Field:
|
||
|
n += 1 // tag and wire
|
||
|
n += proto.SizeVarint(uint64(len(x.Field)))
|
||
|
n += len(x.Field)
|
||
|
case nil:
|
||
|
default:
|
||
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
|
||
|
proto.RegisterType((*Message)(nil), "proto3_proto.Message")
|
||
|
proto.RegisterMapType((map[string]*test_proto.SubDefaults)(nil), "proto3_proto.Message.Proto2ValueEntry")
|
||
|
proto.RegisterMapType((map[string]string)(nil), "proto3_proto.Message.StringMapEntry")
|
||
|
proto.RegisterMapType((map[string]*Nested)(nil), "proto3_proto.Message.TerrainEntry")
|
||
|
proto.RegisterType((*Nested)(nil), "proto3_proto.Nested")
|
||
|
proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap")
|
||
|
proto.RegisterMapType((map[bool][]byte)(nil), "proto3_proto.MessageWithMap.ByteMappingEntry")
|
||
|
proto.RegisterType((*IntMap)(nil), "proto3_proto.IntMap")
|
||
|
proto.RegisterMapType((map[int32]int32)(nil), "proto3_proto.IntMap.RttEntry")
|
||
|
proto.RegisterType((*IntMaps)(nil), "proto3_proto.IntMaps")
|
||
|
proto.RegisterType((*TestUTF8)(nil), "proto3_proto.TestUTF8")
|
||
|
proto.RegisterMapType((map[string]int64)(nil), "proto3_proto.TestUTF8.MapKeyEntry")
|
||
|
proto.RegisterMapType((map[int64]string)(nil), "proto3_proto.TestUTF8.MapValueEntry")
|
||
|
}
|
||
|
|
||
|
func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor_1c50d9b824d4ac38) }
|
||
|
|
||
|
var fileDescriptor_1c50d9b824d4ac38 = []byte{
|
||
|
// 896 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x6f, 0x6f, 0xdb, 0xb6,
|
||
|
0x13, 0xae, 0x2c, 0xff, 0x91, 0xcf, 0x76, 0xea, 0x1f, 0x7f, 0x6e, 0xc7, 0x7a, 0x1b, 0xa0, 0x79,
|
||
|
0xc3, 0x20, 0x0c, 0xab, 0xb2, 0xb9, 0xc8, 0x90, 0xb5, 0xc5, 0x86, 0x24, 0x6b, 0x50, 0x23, 0xb1,
|
||
|
0x67, 0xd0, 0xce, 0x82, 0xb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