github.com/jhump/protoreflect@v1.16.0/internal/testprotos/desc_test_editions.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.33.0-devel 4 // protoc v5.26.1 5 // source: desc_test_editions.proto 6 7 package testprotos 8 9 import ( 10 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 reflect "reflect" 13 sync "sync" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 type Closed int32 24 25 const ( 26 Closed_CLOSED_C Closed = 1 27 Closed_CLOSED_A Closed = 2 28 ) 29 30 // Enum value maps for Closed. 31 var ( 32 Closed_name = map[int32]string{ 33 1: "CLOSED_C", 34 2: "CLOSED_A", 35 } 36 Closed_value = map[string]int32{ 37 "CLOSED_C": 1, 38 "CLOSED_A": 2, 39 } 40 ) 41 42 func (x Closed) Enum() *Closed { 43 p := new(Closed) 44 *p = x 45 return p 46 } 47 48 func (x Closed) String() string { 49 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 50 } 51 52 func (Closed) Descriptor() protoreflect.EnumDescriptor { 53 return file_desc_test_editions_proto_enumTypes[0].Descriptor() 54 } 55 56 func (Closed) Type() protoreflect.EnumType { 57 return &file_desc_test_editions_proto_enumTypes[0] 58 } 59 60 func (x Closed) Number() protoreflect.EnumNumber { 61 return protoreflect.EnumNumber(x) 62 } 63 64 // Deprecated: Use Closed.Descriptor instead. 65 func (Closed) EnumDescriptor() ([]byte, []int) { 66 return file_desc_test_editions_proto_rawDescGZIP(), []int{0} 67 } 68 69 type Open int32 70 71 const ( 72 Open_OPEN_B Open = 0 73 Open_OPEN_C Open = -1 74 Open_OPEN_A Open = 2 75 ) 76 77 // Enum value maps for Open. 78 var ( 79 Open_name = map[int32]string{ 80 0: "OPEN_B", 81 -1: "OPEN_C", 82 2: "OPEN_A", 83 } 84 Open_value = map[string]int32{ 85 "OPEN_B": 0, 86 "OPEN_C": -1, 87 "OPEN_A": 2, 88 } 89 ) 90 91 func (x Open) Enum() *Open { 92 p := new(Open) 93 *p = x 94 return p 95 } 96 97 func (x Open) String() string { 98 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 99 } 100 101 func (Open) Descriptor() protoreflect.EnumDescriptor { 102 return file_desc_test_editions_proto_enumTypes[1].Descriptor() 103 } 104 105 func (Open) Type() protoreflect.EnumType { 106 return &file_desc_test_editions_proto_enumTypes[1] 107 } 108 109 func (x Open) Number() protoreflect.EnumNumber { 110 return protoreflect.EnumNumber(x) 111 } 112 113 // Deprecated: Use Open.Descriptor instead. 114 func (Open) EnumDescriptor() ([]byte, []int) { 115 return file_desc_test_editions_proto_rawDescGZIP(), []int{1} 116 } 117 118 type Foo struct { 119 state protoimpl.MessageState 120 sizeCache protoimpl.SizeCache 121 unknownFields protoimpl.UnknownFields 122 123 A *int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` 124 RequiredField *int32 `protobuf:"varint,2,req,name=required_field,json=requiredField" json:"required_field,omitempty"` 125 DefaultField *int32 `protobuf:"varint,3,opt,name=default_field,json=defaultField,def=99" json:"default_field,omitempty"` 126 Delimitedfield *Foo_DelimitedField `protobuf:"group,4,opt,name=DelimitedField,json=delimitedfield" json:"delimitedfield,omitempty"` 127 } 128 129 // Default values for Foo fields. 130 const ( 131 Default_Foo_DefaultField = int32(99) 132 ) 133 134 func (x *Foo) Reset() { 135 *x = Foo{} 136 if protoimpl.UnsafeEnabled { 137 mi := &file_desc_test_editions_proto_msgTypes[0] 138 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 139 ms.StoreMessageInfo(mi) 140 } 141 } 142 143 func (x *Foo) String() string { 144 return protoimpl.X.MessageStringOf(x) 145 } 146 147 func (*Foo) ProtoMessage() {} 148 149 func (x *Foo) ProtoReflect() protoreflect.Message { 150 mi := &file_desc_test_editions_proto_msgTypes[0] 151 if protoimpl.UnsafeEnabled && x != nil { 152 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 153 if ms.LoadMessageInfo() == nil { 154 ms.StoreMessageInfo(mi) 155 } 156 return ms 157 } 158 return mi.MessageOf(x) 159 } 160 161 // Deprecated: Use Foo.ProtoReflect.Descriptor instead. 162 func (*Foo) Descriptor() ([]byte, []int) { 163 return file_desc_test_editions_proto_rawDescGZIP(), []int{0} 164 } 165 166 func (x *Foo) GetA() int32 { 167 if x != nil && x.A != nil { 168 return *x.A 169 } 170 return 0 171 } 172 173 func (x *Foo) GetRequiredField() int32 { 174 if x != nil && x.RequiredField != nil { 175 return *x.RequiredField 176 } 177 return 0 178 } 179 180 func (x *Foo) GetDefaultField() int32 { 181 if x != nil && x.DefaultField != nil { 182 return *x.DefaultField 183 } 184 return Default_Foo_DefaultField 185 } 186 187 func (x *Foo) GetDelimitedfield() *Foo_DelimitedField { 188 if x != nil { 189 return x.Delimitedfield 190 } 191 return nil 192 } 193 194 type Foo_DelimitedField struct { 195 state protoimpl.MessageState 196 sizeCache protoimpl.SizeCache 197 unknownFields protoimpl.UnknownFields 198 199 B *int32 `protobuf:"varint,1,opt,name=b" json:"b,omitempty"` 200 } 201 202 func (x *Foo_DelimitedField) Reset() { 203 *x = Foo_DelimitedField{} 204 if protoimpl.UnsafeEnabled { 205 mi := &file_desc_test_editions_proto_msgTypes[1] 206 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 207 ms.StoreMessageInfo(mi) 208 } 209 } 210 211 func (x *Foo_DelimitedField) String() string { 212 return protoimpl.X.MessageStringOf(x) 213 } 214 215 func (*Foo_DelimitedField) ProtoMessage() {} 216 217 func (x *Foo_DelimitedField) ProtoReflect() protoreflect.Message { 218 mi := &file_desc_test_editions_proto_msgTypes[1] 219 if protoimpl.UnsafeEnabled && x != nil { 220 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 221 if ms.LoadMessageInfo() == nil { 222 ms.StoreMessageInfo(mi) 223 } 224 return ms 225 } 226 return mi.MessageOf(x) 227 } 228 229 // Deprecated: Use Foo_DelimitedField.ProtoReflect.Descriptor instead. 230 func (*Foo_DelimitedField) Descriptor() ([]byte, []int) { 231 return file_desc_test_editions_proto_rawDescGZIP(), []int{0, 0} 232 } 233 234 func (x *Foo_DelimitedField) GetB() int32 { 235 if x != nil && x.B != nil { 236 return *x.B 237 } 238 return 0 239 } 240 241 var File_desc_test_editions_proto protoreflect.FileDescriptor 242 243 var file_desc_test_editions_proto_rawDesc = []byte{ 244 0x0a, 0x18, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x64, 0x69, 0x74, 245 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x74, 0x65, 0x73, 0x74, 246 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0xe9, 0x01, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x0c, 247 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x12, 0x2c, 0x0a, 0x0e, 248 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 249 0x20, 0x01, 0x28, 0x05, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x71, 250 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x27, 0x0a, 0x0d, 0x64, 0x65, 251 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 252 0x05, 0x3a, 0x02, 0x39, 0x39, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x69, 253 0x65, 0x6c, 0x64, 0x12, 0x4d, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 254 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 255 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 256 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x05, 0xaa, 0x01, 0x02, 257 0x28, 0x02, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x66, 0x69, 0x65, 258 0x6c, 0x64, 0x1a, 0x1e, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, 259 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 260 0x01, 0x62, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 261 0x6c, 0x64, 0x2a, 0x38, 0x0a, 0x06, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x0c, 0x0a, 0x08, 262 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x5f, 0x43, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4c, 263 0x4f, 0x53, 0x45, 0x44, 0x5f, 0x41, 0x10, 0x02, 0x2a, 0x08, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 264 0x5f, 0x45, 0x2a, 0x08, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x5f, 0x46, 0x2a, 0x39, 0x0a, 0x04, 265 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x42, 0x10, 0x00, 266 0x12, 0x13, 0x0a, 0x06, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x43, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 267 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x41, 0x10, 268 0x02, 0x1a, 0x04, 0x3a, 0x02, 0x10, 0x01, 0x42, 0x38, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 269 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x68, 0x75, 0x6d, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 270 0x6f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 271 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x92, 0x03, 0x02, 0x10, 272 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07, 273 } 274 275 var ( 276 file_desc_test_editions_proto_rawDescOnce sync.Once 277 file_desc_test_editions_proto_rawDescData = file_desc_test_editions_proto_rawDesc 278 ) 279 280 func file_desc_test_editions_proto_rawDescGZIP() []byte { 281 file_desc_test_editions_proto_rawDescOnce.Do(func() { 282 file_desc_test_editions_proto_rawDescData = protoimpl.X.CompressGZIP(file_desc_test_editions_proto_rawDescData) 283 }) 284 return file_desc_test_editions_proto_rawDescData 285 } 286 287 var file_desc_test_editions_proto_enumTypes = make([]protoimpl.EnumInfo, 2) 288 var file_desc_test_editions_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 289 var file_desc_test_editions_proto_goTypes = []interface{}{ 290 (Closed)(0), // 0: testprotos.Closed 291 (Open)(0), // 1: testprotos.Open 292 (*Foo)(nil), // 2: testprotos.Foo 293 (*Foo_DelimitedField)(nil), // 3: testprotos.Foo.DelimitedField 294 } 295 var file_desc_test_editions_proto_depIdxs = []int32{ 296 3, // 0: testprotos.Foo.delimitedfield:type_name -> testprotos.Foo.DelimitedField 297 1, // [1:1] is the sub-list for method output_type 298 1, // [1:1] is the sub-list for method input_type 299 1, // [1:1] is the sub-list for extension type_name 300 1, // [1:1] is the sub-list for extension extendee 301 0, // [0:1] is the sub-list for field type_name 302 } 303 304 func init() { file_desc_test_editions_proto_init() } 305 func file_desc_test_editions_proto_init() { 306 if File_desc_test_editions_proto != nil { 307 return 308 } 309 if !protoimpl.UnsafeEnabled { 310 file_desc_test_editions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 311 switch v := v.(*Foo); i { 312 case 0: 313 return &v.state 314 case 1: 315 return &v.sizeCache 316 case 2: 317 return &v.unknownFields 318 default: 319 return nil 320 } 321 } 322 file_desc_test_editions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 323 switch v := v.(*Foo_DelimitedField); i { 324 case 0: 325 return &v.state 326 case 1: 327 return &v.sizeCache 328 case 2: 329 return &v.unknownFields 330 default: 331 return nil 332 } 333 } 334 } 335 type x struct{} 336 out := protoimpl.TypeBuilder{ 337 File: protoimpl.DescBuilder{ 338 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 339 RawDescriptor: file_desc_test_editions_proto_rawDesc, 340 NumEnums: 2, 341 NumMessages: 2, 342 NumExtensions: 0, 343 NumServices: 0, 344 }, 345 GoTypes: file_desc_test_editions_proto_goTypes, 346 DependencyIndexes: file_desc_test_editions_proto_depIdxs, 347 EnumInfos: file_desc_test_editions_proto_enumTypes, 348 MessageInfos: file_desc_test_editions_proto_msgTypes, 349 }.Build() 350 File_desc_test_editions_proto = out.File 351 file_desc_test_editions_proto_rawDesc = nil 352 file_desc_test_editions_proto_goTypes = nil 353 file_desc_test_editions_proto_depIdxs = nil 354 }