blob: 5a5a3b32ad7b32c8ad9e295e277013596993f567 [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: imp/imp.proto
package imp // import "github.com/golang/protobuf/protoc-gen-go/testdata/imp"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import imp2 "github.com/golang/protobuf/protoc-gen-go/testdata/imp/imp2"
import imp3 "github.com/golang/protobuf/protoc-gen-go/testdata/imp/imp3"
// 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
// PubliclyImportedMessage from public import imp/imp2/imp2.proto
type PubliclyImportedMessage imp2.PubliclyImportedMessage
func (m *PubliclyImportedMessage) Reset() { (*imp2.PubliclyImportedMessage)(m).Reset() }
func (m *PubliclyImportedMessage) String() string { return (*imp2.PubliclyImportedMessage)(m).String() }
func (*PubliclyImportedMessage) ProtoMessage() {}
func (m *PubliclyImportedMessage) XXX_Unmarshal(buf []byte) error {
return (*imp2.PubliclyImportedMessage)(m).XXX_Unmarshal(buf)
}
func (m *PubliclyImportedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return (*imp2.PubliclyImportedMessage)(m).XXX_Marshal(b, deterministic)
}
func (m *PubliclyImportedMessage) XXX_Size() int { return (*imp2.PubliclyImportedMessage)(m).XXX_Size() }
func (m *PubliclyImportedMessage) XXX_DiscardUnknown() {
(*imp2.PubliclyImportedMessage)(m).XXX_DiscardUnknown()
}
func (m *PubliclyImportedMessage) GetField() int64 {
return (*imp2.PubliclyImportedMessage)(m).GetField()
}
// PubliclyImportedMessage2 from public import imp/imp2/imp2.proto
type PubliclyImportedMessage2 imp2.PubliclyImportedMessage2
func (m *PubliclyImportedMessage2) Reset() { (*imp2.PubliclyImportedMessage2)(m).Reset() }
func (m *PubliclyImportedMessage2) String() string {
return (*imp2.PubliclyImportedMessage2)(m).String()
}
func (*PubliclyImportedMessage2) ProtoMessage() {}
func (m *PubliclyImportedMessage2) XXX_Unmarshal(buf []byte) error {
return (*imp2.PubliclyImportedMessage2)(m).XXX_Unmarshal(buf)
}
func (m *PubliclyImportedMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return (*imp2.PubliclyImportedMessage2)(m).XXX_Marshal(b, deterministic)
}
func (m *PubliclyImportedMessage2) XXX_Size() int {
return (*imp2.PubliclyImportedMessage2)(m).XXX_Size()
}
func (m *PubliclyImportedMessage2) XXX_DiscardUnknown() {
(*imp2.PubliclyImportedMessage2)(m).XXX_DiscardUnknown()
}
func (m *PubliclyImportedMessage2) GetField() *PubliclyImportedMessage {
return (*PubliclyImportedMessage)((*imp2.PubliclyImportedMessage2)(m).GetField())
}
// PubliclyImportedEnum from public import imp/imp2/imp2.proto
type PubliclyImportedEnum imp2.PubliclyImportedEnum
var PubliclyImportedEnum_name = imp2.PubliclyImportedEnum_name
var PubliclyImportedEnum_value = imp2.PubliclyImportedEnum_value
func (x PubliclyImportedEnum) String() string { return (imp2.PubliclyImportedEnum)(x).String() }
func (x PubliclyImportedEnum) Enum() *PubliclyImportedEnum {
return (*PubliclyImportedEnum)((imp2.PubliclyImportedEnum)(x).Enum())
}
func (x *PubliclyImportedEnum) UnmarshalJSON(data []byte) error {
return (*imp2.PubliclyImportedEnum)(x).UnmarshalJSON(data)
}
const PubliclyImportedEnum_GLASSES = PubliclyImportedEnum(imp2.PubliclyImportedEnum_GLASSES)
const PubliclyImportedEnum_HAIR = PubliclyImportedEnum(imp2.PubliclyImportedEnum_HAIR)
type ImportedMessage_Owner int32
const (
ImportedMessage_DAVE ImportedMessage_Owner = 1
ImportedMessage_MIKE ImportedMessage_Owner = 2
)
var ImportedMessage_Owner_name = map[int32]string{
1: "DAVE",
2: "MIKE",
}
var ImportedMessage_Owner_value = map[string]int32{
"DAVE": 1,
"MIKE": 2,
}
func (x ImportedMessage_Owner) Enum() *ImportedMessage_Owner {
p := new(ImportedMessage_Owner)
*p = x
return p
}
func (x ImportedMessage_Owner) String() string {
return proto.EnumName(ImportedMessage_Owner_name, int32(x))
}
func (x *ImportedMessage_Owner) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ImportedMessage_Owner_value, data, "ImportedMessage_Owner")
if err != nil {
return err
}
*x = ImportedMessage_Owner(value)
return nil
}
func (ImportedMessage_Owner) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_imp_6424de66809c2ae5, []int{0, 0}
}
type ImportedMessage struct {
Field *int64 `protobuf:"varint,1,req,name=field" json:"field,omitempty"`
// The forwarded getters for these fields are fiddly to get right.
LocalMsg *ImportedMessage2 `protobuf:"bytes,2,opt,name=local_msg,json=localMsg" json:"local_msg,omitempty"`
ForeignMsg *imp3.ForeignImportedMessage `protobuf:"bytes,3,opt,name=foreign_msg,json=foreignMsg" json:"foreign_msg,omitempty"`
EnumField *ImportedMessage_Owner `protobuf:"varint,4,opt,name=enum_field,json=enumField,enum=imp.ImportedMessage_Owner" json:"enum_field,omitempty"`
// Types that are valid to be assigned to Union:
// *ImportedMessage_State
Union isImportedMessage_Union `protobuf_oneof:"union"`
Name []string `protobuf:"bytes,5,rep,name=name" json:"name,omitempty"`
Boss []ImportedMessage_Owner `protobuf:"varint,6,rep,name=boss,enum=imp.ImportedMessage_Owner" json:"boss,omitempty"`
Memo []*ImportedMessage2 `protobuf:"bytes,7,rep,name=memo" json:"memo,omitempty"`
MsgMap map[string]*ImportedMessage2 `protobuf:"bytes,8,rep,name=msg_map,json=msgMap" json:"msg_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportedMessage) Reset() { *m = ImportedMessage{} }
func (m *ImportedMessage) String() string { return proto.CompactTextString(m) }
func (*ImportedMessage) ProtoMessage() {}
func (*ImportedMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_imp_6424de66809c2ae5, []int{0}
}
var extRange_ImportedMessage = []proto.ExtensionRange{
{90, 100},
}
func (*ImportedMessage) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_ImportedMessage
}
func (m *ImportedMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportedMessage.Unmarshal(m, b)
}
func (m *ImportedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportedMessage.Marshal(b, m, deterministic)
}
func (dst *ImportedMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportedMessage.Merge(dst, src)
}
func (m *ImportedMessage) XXX_Size() int {
return xxx_messageInfo_ImportedMessage.Size(m)
}
func (m *ImportedMessage) XXX_DiscardUnknown() {
xxx_messageInfo_ImportedMessage.DiscardUnknown(m)
}
var xxx_messageInfo_ImportedMessage proto.InternalMessageInfo
type isImportedMessage_Union interface {
isImportedMessage_Union()
}
type ImportedMessage_State struct {
State int32 `protobuf:"varint,9,opt,name=state,oneof"`
}
func (*ImportedMessage_State) isImportedMessage_Union() {}
func (m *ImportedMessage) GetUnion() isImportedMessage_Union {
if m != nil {
return m.Union
}
return nil
}
func (m *ImportedMessage) GetField() int64 {
if m != nil && m.Field != nil {
return *m.Field
}
return 0
}
func (m *ImportedMessage) GetLocalMsg() *ImportedMessage2 {
if m != nil {
return m.LocalMsg
}
return nil
}
func (m *ImportedMessage) GetForeignMsg() *imp3.ForeignImportedMessage {
if m != nil {
return m.ForeignMsg
}
return nil
}
func (m *ImportedMessage) GetEnumField() ImportedMessage_Owner {
if m != nil && m.EnumField != nil {
return *m.EnumField
}
return ImportedMessage_DAVE
}
func (m *ImportedMessage) GetState() int32 {
if x, ok := m.GetUnion().(*ImportedMessage_State); ok {
return x.State
}
return 0
}
func (m *ImportedMessage) GetName() []string {
if m != nil {
return m.Name
}
return nil
}
func (m *ImportedMessage) GetBoss() []ImportedMessage_Owner {
if m != nil {
return m.Boss
}
return nil
}
func (m *ImportedMessage) GetMemo() []*ImportedMessage2 {
if m != nil {
return m.Memo
}
return nil
}
func (m *ImportedMessage) GetMsgMap() map[string]*ImportedMessage2 {
if m != nil {
return m.MsgMap
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*ImportedMessage) 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 _ImportedMessage_OneofMarshaler, _ImportedMessage_OneofUnmarshaler, _ImportedMessage_OneofSizer, []interface{}{
(*ImportedMessage_State)(nil),
}
}
func _ImportedMessage_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*ImportedMessage)
// union
switch x := m.Union.(type) {
case *ImportedMessage_State:
b.EncodeVarint(9<<3 | proto.WireVarint)
b.EncodeVarint(uint64(x.State))
case nil:
default:
return fmt.Errorf("ImportedMessage.Union has unexpected type %T", x)
}
return nil
}
func _ImportedMessage_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*ImportedMessage)
switch tag {
case 9: // union.state
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.Union = &ImportedMessage_State{int32(x)}
return true, err
default:
return false, nil
}
}
func _ImportedMessage_OneofSizer(msg proto.Message) (n int) {
m := msg.(*ImportedMessage)
// union
switch x := m.Union.(type) {
case *ImportedMessage_State:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(x.State))
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type ImportedMessage2 struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportedMessage2) Reset() { *m = ImportedMessage2{} }
func (m *ImportedMessage2) String() string { return proto.CompactTextString(m) }
func (*ImportedMessage2) ProtoMessage() {}
func (*ImportedMessage2) Descriptor() ([]byte, []int) {
return fileDescriptor_imp_6424de66809c2ae5, []int{1}
}
func (m *ImportedMessage2) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportedMessage2.Unmarshal(m, b)
}
func (m *ImportedMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportedMessage2.Marshal(b, m, deterministic)
}
func (dst *ImportedMessage2) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportedMessage2.Merge(dst, src)
}
func (m *ImportedMessage2) XXX_Size() int {
return xxx_messageInfo_ImportedMessage2.Size(m)
}
func (m *ImportedMessage2) XXX_DiscardUnknown() {
xxx_messageInfo_ImportedMessage2.DiscardUnknown(m)
}
var xxx_messageInfo_ImportedMessage2 proto.InternalMessageInfo
type ImportedExtendable struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `protobuf_messageset:"1" json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportedExtendable) Reset() { *m = ImportedExtendable{} }
func (m *ImportedExtendable) String() string { return proto.CompactTextString(m) }
func (*ImportedExtendable) ProtoMessage() {}
func (*ImportedExtendable) Descriptor() ([]byte, []int) {
return fileDescriptor_imp_6424de66809c2ae5, []int{2}
}
func (m *ImportedExtendable) MarshalJSON() ([]byte, error) {
return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
}
func (m *ImportedExtendable) UnmarshalJSON(buf []byte) error {
return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
}
var extRange_ImportedExtendable = []proto.ExtensionRange{
{100, 2147483646},
}
func (*ImportedExtendable) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_ImportedExtendable
}
func (m *ImportedExtendable) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportedExtendable.Unmarshal(m, b)
}
func (m *ImportedExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportedExtendable.Marshal(b, m, deterministic)
}
func (dst *ImportedExtendable) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportedExtendable.Merge(dst, src)
}
func (m *ImportedExtendable) XXX_Size() int {
return xxx_messageInfo_ImportedExtendable.Size(m)
}
func (m *ImportedExtendable) XXX_DiscardUnknown() {
xxx_messageInfo_ImportedExtendable.DiscardUnknown(m)
}
var xxx_messageInfo_ImportedExtendable proto.InternalMessageInfo
func init() {
proto.RegisterType((*ImportedMessage)(nil), "imp.ImportedMessage")
proto.RegisterMapType((map[string]*ImportedMessage2)(nil), "imp.ImportedMessage.MsgMapEntry")
proto.RegisterType((*ImportedMessage2)(nil), "imp.ImportedMessage2")
proto.RegisterType((*ImportedExtendable)(nil), "imp.ImportedExtendable")
proto.RegisterEnum("imp.ImportedMessage_Owner", ImportedMessage_Owner_name, ImportedMessage_Owner_value)
}
func init() { proto.RegisterFile("imp/imp.proto", fileDescriptor_imp_6424de66809c2ae5) }
var fileDescriptor_imp_6424de66809c2ae5 = []byte{
// 427 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x4d, 0x6f, 0xd4, 0x30,
0x10, 0xad, 0xf3, 0xd1, 0x4d, 0x66, 0x05, 0x44, 0xe6, 0x43, 0xd1, 0xf6, 0x62, 0xe5, 0x14, 0x8a,
0x9a, 0x95, 0x82, 0x10, 0xb4, 0xe2, 0x42, 0xc5, 0x56, 0x54, 0x28, 0xa2, 0xca, 0x81, 0x43, 0x2f,
0x2b, 0xef, 0xc6, 0x6b, 0x22, 0x62, 0x3b, 0x8a, 0x1d, 0xa0, 0xff, 0x83, 0xff, 0x1b, 0x14, 0xa7,
0x20, 0xb4, 0x2a, 0xf4, 0x32, 0x7a, 0xf3, 0xfc, 0xde, 0xcc, 0xd8, 0x1e, 0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