github.com/gogo/protobuf@v1.3.2/protoc-gen-gogo/testdata/import_public/sub/a.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: import_public/sub/a.proto 3 4 package sub 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 math "math" 10 ) 11 12 // Reference imports to suppress errors if they are not otherwise used. 13 var _ = proto.Marshal 14 var _ = fmt.Errorf 15 var _ = math.Inf 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the proto package it is being compiled against. 19 // A compilation error at this line likely means your copy of the 20 // proto package needs to be updated. 21 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 22 23 type E int32 24 25 const ( 26 E_ZERO E = 0 27 ) 28 29 var E_name = map[int32]string{ 30 0: "ZERO", 31 } 32 33 var E_value = map[string]int32{ 34 "ZERO": 0, 35 } 36 37 func (x E) Enum() *E { 38 p := new(E) 39 *p = x 40 return p 41 } 42 43 func (x E) String() string { 44 return proto.EnumName(E_name, int32(x)) 45 } 46 47 func (x *E) UnmarshalJSON(data []byte) error { 48 value, err := proto.UnmarshalJSONEnum(E_value, data, "E") 49 if err != nil { 50 return err 51 } 52 *x = E(value) 53 return nil 54 } 55 56 func (E) EnumDescriptor() ([]byte, []int) { 57 return fileDescriptor_382f7805394b5c4e, []int{0} 58 } 59 60 type M_Subenum int32 61 62 const ( 63 M_M_ZERO M_Subenum = 0 64 ) 65 66 var M_Subenum_name = map[int32]string{ 67 0: "M_ZERO", 68 } 69 70 var M_Subenum_value = map[string]int32{ 71 "M_ZERO": 0, 72 } 73 74 func (x M_Subenum) Enum() *M_Subenum { 75 p := new(M_Subenum) 76 *p = x 77 return p 78 } 79 80 func (x M_Subenum) String() string { 81 return proto.EnumName(M_Subenum_name, int32(x)) 82 } 83 84 func (x *M_Subenum) UnmarshalJSON(data []byte) error { 85 value, err := proto.UnmarshalJSONEnum(M_Subenum_value, data, "M_Subenum") 86 if err != nil { 87 return err 88 } 89 *x = M_Subenum(value) 90 return nil 91 } 92 93 func (M_Subenum) EnumDescriptor() ([]byte, []int) { 94 return fileDescriptor_382f7805394b5c4e, []int{0, 0} 95 } 96 97 type M_Submessage_Submessage_Subenum int32 98 99 const ( 100 M_Submessage_M_SUBMESSAGE_ZERO M_Submessage_Submessage_Subenum = 0 101 ) 102 103 var M_Submessage_Submessage_Subenum_name = map[int32]string{ 104 0: "M_SUBMESSAGE_ZERO", 105 } 106 107 var M_Submessage_Submessage_Subenum_value = map[string]int32{ 108 "M_SUBMESSAGE_ZERO": 0, 109 } 110 111 func (x M_Submessage_Submessage_Subenum) Enum() *M_Submessage_Submessage_Subenum { 112 p := new(M_Submessage_Submessage_Subenum) 113 *p = x 114 return p 115 } 116 117 func (x M_Submessage_Submessage_Subenum) String() string { 118 return proto.EnumName(M_Submessage_Submessage_Subenum_name, int32(x)) 119 } 120 121 func (x *M_Submessage_Submessage_Subenum) UnmarshalJSON(data []byte) error { 122 value, err := proto.UnmarshalJSONEnum(M_Submessage_Submessage_Subenum_value, data, "M_Submessage_Submessage_Subenum") 123 if err != nil { 124 return err 125 } 126 *x = M_Submessage_Submessage_Subenum(value) 127 return nil 128 } 129 130 func (M_Submessage_Submessage_Subenum) EnumDescriptor() ([]byte, []int) { 131 return fileDescriptor_382f7805394b5c4e, []int{0, 1, 0} 132 } 133 134 type M struct { 135 // Field using a type in the same Go package, but a different source file. 136 M2 *M2 `protobuf:"bytes,1,opt,name=m2" json:"m2,omitempty"` 137 // Types that are valid to be assigned to OneofField: 138 // *M_OneofInt32 139 // *M_OneofInt64 140 OneofField isM_OneofField `protobuf_oneof:"oneof_field"` 141 Grouping *M_Grouping `protobuf:"group,4,opt,name=Grouping,json=grouping" json:"grouping,omitempty"` 142 DefaultField *string `protobuf:"bytes,6,opt,name=default_field,json=defaultField,def=def" json:"default_field,omitempty"` 143 XXX_NoUnkeyedLiteral struct{} `json:"-"` 144 XXX_unrecognized []byte `json:"-"` 145 XXX_sizecache int32 `json:"-"` 146 } 147 148 func (m *M) Reset() { *m = M{} } 149 func (m *M) String() string { return proto.CompactTextString(m) } 150 func (*M) ProtoMessage() {} 151 func (*M) Descriptor() ([]byte, []int) { 152 return fileDescriptor_382f7805394b5c4e, []int{0} 153 } 154 func (m *M) XXX_Unmarshal(b []byte) error { 155 return xxx_messageInfo_M.Unmarshal(m, b) 156 } 157 func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 158 return xxx_messageInfo_M.Marshal(b, m, deterministic) 159 } 160 func (m *M) XXX_Merge(src proto.Message) { 161 xxx_messageInfo_M.Merge(m, src) 162 } 163 func (m *M) XXX_Size() int { 164 return xxx_messageInfo_M.Size(m) 165 } 166 func (m *M) XXX_DiscardUnknown() { 167 xxx_messageInfo_M.DiscardUnknown(m) 168 } 169 170 var xxx_messageInfo_M proto.InternalMessageInfo 171 172 const Default_M_DefaultField string = "def" 173 174 type isM_OneofField interface { 175 isM_OneofField() 176 } 177 178 type M_OneofInt32 struct { 179 OneofInt32 int32 `protobuf:"varint,2,opt,name=oneof_int32,json=oneofInt32,oneof" json:"oneof_int32,omitempty"` 180 } 181 type M_OneofInt64 struct { 182 OneofInt64 int64 `protobuf:"varint,3,opt,name=oneof_int64,json=oneofInt64,oneof" json:"oneof_int64,omitempty"` 183 } 184 185 func (*M_OneofInt32) isM_OneofField() {} 186 func (*M_OneofInt64) isM_OneofField() {} 187 188 func (m *M) GetOneofField() isM_OneofField { 189 if m != nil { 190 return m.OneofField 191 } 192 return nil 193 } 194 195 func (m *M) GetM2() *M2 { 196 if m != nil { 197 return m.M2 198 } 199 return nil 200 } 201 202 func (m *M) GetOneofInt32() int32 { 203 if x, ok := m.GetOneofField().(*M_OneofInt32); ok { 204 return x.OneofInt32 205 } 206 return 0 207 } 208 209 func (m *M) GetOneofInt64() int64 { 210 if x, ok := m.GetOneofField().(*M_OneofInt64); ok { 211 return x.OneofInt64 212 } 213 return 0 214 } 215 216 func (m *M) GetGrouping() *M_Grouping { 217 if m != nil { 218 return m.Grouping 219 } 220 return nil 221 } 222 223 func (m *M) GetDefaultField() string { 224 if m != nil && m.DefaultField != nil { 225 return *m.DefaultField 226 } 227 return Default_M_DefaultField 228 } 229 230 // XXX_OneofWrappers is for the internal use of the proto package. 231 func (*M) XXX_OneofWrappers() []interface{} { 232 return []interface{}{ 233 (*M_OneofInt32)(nil), 234 (*M_OneofInt64)(nil), 235 } 236 } 237 238 type M_Grouping struct { 239 GroupField *string `protobuf:"bytes,5,opt,name=group_field,json=groupField" json:"group_field,omitempty"` 240 XXX_NoUnkeyedLiteral struct{} `json:"-"` 241 XXX_unrecognized []byte `json:"-"` 242 XXX_sizecache int32 `json:"-"` 243 } 244 245 func (m *M_Grouping) Reset() { *m = M_Grouping{} } 246 func (m *M_Grouping) String() string { return proto.CompactTextString(m) } 247 func (*M_Grouping) ProtoMessage() {} 248 func (*M_Grouping) Descriptor() ([]byte, []int) { 249 return fileDescriptor_382f7805394b5c4e, []int{0, 0} 250 } 251 func (m *M_Grouping) XXX_Unmarshal(b []byte) error { 252 return xxx_messageInfo_M_Grouping.Unmarshal(m, b) 253 } 254 func (m *M_Grouping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 255 return xxx_messageInfo_M_Grouping.Marshal(b, m, deterministic) 256 } 257 func (m *M_Grouping) XXX_Merge(src proto.Message) { 258 xxx_messageInfo_M_Grouping.Merge(m, src) 259 } 260 func (m *M_Grouping) XXX_Size() int { 261 return xxx_messageInfo_M_Grouping.Size(m) 262 } 263 func (m *M_Grouping) XXX_DiscardUnknown() { 264 xxx_messageInfo_M_Grouping.DiscardUnknown(m) 265 } 266 267 var xxx_messageInfo_M_Grouping proto.InternalMessageInfo 268 269 func (m *M_Grouping) GetGroupField() string { 270 if m != nil && m.GroupField != nil { 271 return *m.GroupField 272 } 273 return "" 274 } 275 276 type M_Submessage struct { 277 // Types that are valid to be assigned to SubmessageOneofField: 278 // *M_Submessage_SubmessageOneofInt32 279 // *M_Submessage_SubmessageOneofInt64 280 SubmessageOneofField isM_Submessage_SubmessageOneofField `protobuf_oneof:"submessage_oneof_field"` 281 XXX_NoUnkeyedLiteral struct{} `json:"-"` 282 XXX_unrecognized []byte `json:"-"` 283 XXX_sizecache int32 `json:"-"` 284 } 285 286 func (m *M_Submessage) Reset() { *m = M_Submessage{} } 287 func (m *M_Submessage) String() string { return proto.CompactTextString(m) } 288 func (*M_Submessage) ProtoMessage() {} 289 func (*M_Submessage) Descriptor() ([]byte, []int) { 290 return fileDescriptor_382f7805394b5c4e, []int{0, 1} 291 } 292 func (m *M_Submessage) XXX_Unmarshal(b []byte) error { 293 return xxx_messageInfo_M_Submessage.Unmarshal(m, b) 294 } 295 func (m *M_Submessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 296 return xxx_messageInfo_M_Submessage.Marshal(b, m, deterministic) 297 } 298 func (m *M_Submessage) XXX_Merge(src proto.Message) { 299 xxx_messageInfo_M_Submessage.Merge(m, src) 300 } 301 func (m *M_Submessage) XXX_Size() int { 302 return xxx_messageInfo_M_Submessage.Size(m) 303 } 304 func (m *M_Submessage) XXX_DiscardUnknown() { 305 xxx_messageInfo_M_Submessage.DiscardUnknown(m) 306 } 307 308 var xxx_messageInfo_M_Submessage proto.InternalMessageInfo 309 310 type isM_Submessage_SubmessageOneofField interface { 311 isM_Submessage_SubmessageOneofField() 312 } 313 314 type M_Submessage_SubmessageOneofInt32 struct { 315 SubmessageOneofInt32 int32 `protobuf:"varint,1,opt,name=submessage_oneof_int32,json=submessageOneofInt32,oneof" json:"submessage_oneof_int32,omitempty"` 316 } 317 type M_Submessage_SubmessageOneofInt64 struct { 318 SubmessageOneofInt64 int64 `protobuf:"varint,2,opt,name=submessage_oneof_int64,json=submessageOneofInt64,oneof" json:"submessage_oneof_int64,omitempty"` 319 } 320 321 func (*M_Submessage_SubmessageOneofInt32) isM_Submessage_SubmessageOneofField() {} 322 func (*M_Submessage_SubmessageOneofInt64) isM_Submessage_SubmessageOneofField() {} 323 324 func (m *M_Submessage) GetSubmessageOneofField() isM_Submessage_SubmessageOneofField { 325 if m != nil { 326 return m.SubmessageOneofField 327 } 328 return nil 329 } 330 331 func (m *M_Submessage) GetSubmessageOneofInt32() int32 { 332 if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt32); ok { 333 return x.SubmessageOneofInt32 334 } 335 return 0 336 } 337 338 func (m *M_Submessage) GetSubmessageOneofInt64() int64 { 339 if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt64); ok { 340 return x.SubmessageOneofInt64 341 } 342 return 0 343 } 344 345 // XXX_OneofWrappers is for the internal use of the proto package. 346 func (*M_Submessage) XXX_OneofWrappers() []interface{} { 347 return []interface{}{ 348 (*M_Submessage_SubmessageOneofInt32)(nil), 349 (*M_Submessage_SubmessageOneofInt64)(nil), 350 } 351 } 352 353 var E_ExtensionField = &proto.ExtensionDesc{ 354 ExtendedType: (*M2)(nil), 355 ExtensionType: (*string)(nil), 356 Field: 1, 357 Name: "goproto.test.import_public.sub.extension_field", 358 Tag: "bytes,1,opt,name=extension_field", 359 Filename: "import_public/sub/a.proto", 360 } 361 362 func init() { 363 proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value) 364 proto.RegisterEnum("goproto.test.import_public.sub.M_Subenum", M_Subenum_name, M_Subenum_value) 365 proto.RegisterEnum("goproto.test.import_public.sub.M_Submessage_Submessage_Subenum", M_Submessage_Submessage_Subenum_name, M_Submessage_Submessage_Subenum_value) 366 proto.RegisterType((*M)(nil), "goproto.test.import_public.sub.M") 367 proto.RegisterType((*M_Grouping)(nil), "goproto.test.import_public.sub.M.Grouping") 368 proto.RegisterType((*M_Submessage)(nil), "goproto.test.import_public.sub.M.Submessage") 369 proto.RegisterExtension(E_ExtensionField) 370 } 371 372 func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_382f7805394b5c4e) } 373 374 var fileDescriptor_382f7805394b5c4e = []byte{ 375 // 407 bytes of a gzipped FileDescriptorProto 376 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x6e, 0x9b, 0x40, 377 0x10, 0xc6, 0xb3, 0xc6, 0x49, 0x9d, 0x71, 0xdd, 0x3f, 0xab, 0xa6, 0xa2, 0x39, 0xb4, 0x94, 0x13, 378 0x4a, 0x94, 0x45, 0xa2, 0x88, 0x43, 0x6e, 0x75, 0x45, 0xd2, 0xaa, 0x42, 0x91, 0x40, 0xbd, 0xe4, 379 0x82, 0x58, 0xb3, 0x6c, 0x91, 0x0c, 0x8b, 0xcc, 0xae, 0xd4, 0x47, 0xe8, 0x7b, 0xf5, 0xc5, 0x2a, 380 0x16, 0xb0, 0x63, 0xd5, 0x6d, 0x73, 0x5b, 0xe6, 0xfb, 0x7e, 0x33, 0x9a, 0x8f, 0x81, 0x37, 0x65, 381 0xd5, 0x88, 0x8d, 0x4c, 0x1b, 0x45, 0xd7, 0xe5, 0xca, 0x6d, 0x15, 0x75, 0x33, 0xd2, 0x6c, 0x84, 382 0x14, 0xf8, 0x2d, 0x17, 0xfa, 0x41, 0x24, 0x6b, 0x25, 0xd9, 0xf3, 0x91, 0x56, 0xd1, 0xf3, 0x03, 383 0x28, 0xed, 0x51, 0xfb, 0xe7, 0x14, 0x50, 0x84, 0x3d, 0x98, 0x54, 0x9e, 0x89, 0x2c, 0xe4, 0xcc, 384 0x3d, 0x9b, 0xfc, 0xbb, 0x1b, 0x89, 0xbc, 0x78, 0x52, 0x79, 0xf8, 0x3d, 0xcc, 0x45, 0xcd, 0x44, 385 0x91, 0x96, 0xb5, 0xfc, 0xe0, 0x99, 0x13, 0x0b, 0x39, 0xc7, 0x9f, 0x8f, 0x62, 0xd0, 0xc5, 0x2f, 386 0x5d, 0x6d, 0xcf, 0x12, 0xf8, 0xa6, 0x61, 0x21, 0xc7, 0x78, 0x68, 0x09, 0x7c, 0x7c, 0x03, 0x33, 387 0xbe, 0x11, 0xaa, 0x29, 0x6b, 0x6e, 0x4e,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e2, 0xa5, 0xfc, 0xae, 0x28, 0x59, 399 0x89, 0xca, 0xe5, 0x82, 0x0b, 0x57, 0x37, 0xa2, 0xaa, 0xe8, 0x1f, 0xab, 0x2b, 0xce, 0xea, 0x2b, 400 0x2d, 0x74, 0xbd, 0xf3, 0x4c, 0x66, 0xee, 0x1f, 0x57, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x4f, 401 0x37, 0x1b, 0x7d, 0x04, 0x03, 0x00, 0x00, 402 }