| // Copyright 2025 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // This file contains a basic file layout for testing feature resolution. It is |
| // constructed in a way where it can be easily transformed to newer editions. |
| |
| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // source: cmd/protoc-gen-go/testdata/featureresolution/basic.proto |
| |
| package featureresolution |
| |
| import ( |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| reflect "reflect" |
| sync "sync" |
| unsafe "unsafe" |
| ) |
| |
| type TopEnum int32 |
| |
| const ( |
| TopEnum_TOP_ENUM_UNKNOWN TopEnum = 0 |
| TopEnum_TOP_ENUM_VALUE1 TopEnum = 1 |
| TopEnum_TOP_ENUM_VALUE2 TopEnum = 2 |
| ) |
| |
| // Enum value maps for TopEnum. |
| var ( |
| TopEnum_name = map[int32]string{ |
| 0: "TOP_ENUM_UNKNOWN", |
| 1: "TOP_ENUM_VALUE1", |
| 2: "TOP_ENUM_VALUE2", |
| } |
| TopEnum_value = map[string]int32{ |
| "TOP_ENUM_UNKNOWN": 0, |
| "TOP_ENUM_VALUE1": 1, |
| "TOP_ENUM_VALUE2": 2, |
| } |
| ) |
| |
| func (x TopEnum) Enum() *TopEnum { |
| p := new(TopEnum) |
| *p = x |
| return p |
| } |
| |
| func (x TopEnum) String() string { |
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| } |
| |
| func (TopEnum) Descriptor() protoreflect.EnumDescriptor { |
| return file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_enumTypes[0].Descriptor() |
| } |
| |
| func (TopEnum) Type() protoreflect.EnumType { |
| return &file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_enumTypes[0] |
| } |
| |
| func (x TopEnum) Number() protoreflect.EnumNumber { |
| return protoreflect.EnumNumber(x) |
| } |
| |
| // Deprecated: Use TopEnum.Descriptor instead. |
| func (TopEnum) EnumDescriptor() ([]byte, []int) { |
| return file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescGZIP(), []int{0} |
| } |
| |
| type TopMessage_NestedEnum int32 |
| |
| const ( |
| TopMessage_UNKNOWN TopMessage_NestedEnum = 0 |
| TopMessage_VALUE1 TopMessage_NestedEnum = 1 |
| TopMessage_VALUE2 TopMessage_NestedEnum = 2 |
| ) |
| |
| // Enum value maps for TopMessage_NestedEnum. |
| var ( |
| TopMessage_NestedEnum_name = map[int32]string{ |
| 0: "UNKNOWN", |
| 1: "VALUE1", |
| 2: "VALUE2", |
| } |
| TopMessage_NestedEnum_value = map[string]int32{ |
| "UNKNOWN": 0, |
| "VALUE1": 1, |
| "VALUE2": 2, |
| } |
| ) |
| |
| func (x TopMessage_NestedEnum) Enum() *TopMessage_NestedEnum { |
| p := new(TopMessage_NestedEnum) |
| *p = x |
| return p |
| } |
| |
| func (x TopMessage_NestedEnum) String() string { |
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| } |
| |
| func (TopMessage_NestedEnum) Descriptor() protoreflect.EnumDescriptor { |
| return file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_enumTypes[1].Descriptor() |
| } |
| |
| func (TopMessage_NestedEnum) Type() protoreflect.EnumType { |
| return &file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_enumTypes[1] |
| } |
| |
| func (x TopMessage_NestedEnum) Number() protoreflect.EnumNumber { |
| return protoreflect.EnumNumber(x) |
| } |
| |
| // Deprecated: Use TopMessage_NestedEnum.Descriptor instead. |
| func (TopMessage_NestedEnum) EnumDescriptor() ([]byte, []int) { |
| return file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescGZIP(), []int{0, 0} |
| } |
| |
| type TopMessage struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Field *int32 `protobuf:"varint,1,opt,name=field" json:"field,omitempty"` |
| // Types that are valid to be assigned to O: |
| // |
| // *TopMessage_OneofField |
| O isTopMessage_O `protobuf_oneof:"o"` |
| extensionFields protoimpl.ExtensionFields |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *TopMessage) Reset() { |
| *x = TopMessage{} |
| mi := &file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_msgTypes[0] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *TopMessage) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*TopMessage) ProtoMessage() {} |
| |
| func (x *TopMessage) ProtoReflect() protoreflect.Message { |
| mi := &file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_msgTypes[0] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use TopMessage.ProtoReflect.Descriptor instead. |
| func (*TopMessage) Descriptor() ([]byte, []int) { |
| return file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescGZIP(), []int{0} |
| } |
| |
| func (x *TopMessage) GetField() int32 { |
| if x != nil && x.Field != nil { |
| return *x.Field |
| } |
| return 0 |
| } |
| |
| func (x *TopMessage) GetO() isTopMessage_O { |
| if x != nil { |
| return x.O |
| } |
| return nil |
| } |
| |
| func (x *TopMessage) GetOneofField() string { |
| if x != nil { |
| if x, ok := x.O.(*TopMessage_OneofField); ok { |
| return x.OneofField |
| } |
| } |
| return "" |
| } |
| |
| type isTopMessage_O interface { |
| isTopMessage_O() |
| } |
| |
| type TopMessage_OneofField struct { |
| OneofField string `protobuf:"bytes,2,opt,name=oneof_field,json=oneofField,oneof"` |
| } |
| |
| func (*TopMessage_OneofField) isTopMessage_O() {} |
| |
| type TopMessage_NestedMessage struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| NumericField *int32 `protobuf:"varint,1,opt,name=numeric_field,json=numericField" json:"numeric_field,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *TopMessage_NestedMessage) Reset() { |
| *x = TopMessage_NestedMessage{} |
| mi := &file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_msgTypes[1] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *TopMessage_NestedMessage) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*TopMessage_NestedMessage) ProtoMessage() {} |
| |
| func (x *TopMessage_NestedMessage) ProtoReflect() protoreflect.Message { |
| mi := &file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_msgTypes[1] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use TopMessage_NestedMessage.ProtoReflect.Descriptor instead. |
| func (*TopMessage_NestedMessage) Descriptor() ([]byte, []int) { |
| return file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescGZIP(), []int{0, 0} |
| } |
| |
| func (x *TopMessage_NestedMessage) GetNumericField() int32 { |
| if x != nil && x.NumericField != nil { |
| return *x.NumericField |
| } |
| return 0 |
| } |
| |
| var file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_extTypes = []protoimpl.ExtensionInfo{ |
| { |
| ExtendedType: (*TopMessage)(nil), |
| ExtensionType: (*string)(nil), |
| Field: 104, |
| Name: "net.proto2.go.testdata.featureresolution.ext", |
| Tag: "bytes,104,opt,name=ext", |
| Filename: "cmd/protoc-gen-go/testdata/featureresolution/basic.proto", |
| }, |
| { |
| ExtendedType: (*TopMessage)(nil), |
| ExtensionType: (*int32)(nil), |
| Field: 100, |
| Name: "net.proto2.go.testdata.featureresolution.TopMessage.ext", |
| Tag: "varint,100,opt,name=ext", |
| Filename: "cmd/protoc-gen-go/testdata/featureresolution/basic.proto", |
| }, |
| } |
| |
| // Extension fields to TopMessage. |
| var ( |
| // optional string ext = 104; |
| E_Ext = &file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_extTypes[0] |
| // optional int32 ext = 100; |
| E_TopMessage_Ext = &file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_extTypes[1] |
| ) |
| |
| var File_cmd_protoc_gen_go_testdata_featureresolution_basic_proto protoreflect.FileDescriptor |
| |
| const file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDesc = "" + |
| "\n" + |
| "8cmd/protoc-gen-go/testdata/featureresolution/basic.proto\x12(net.proto2.go.testdata.featureresolution\"\x82\x02\n" + |
| "\n" + |
| "TopMessage\x12\x14\n" + |
| "\x05field\x18\x01 \x01(\x05R\x05field\x12!\n" + |
| "\voneof_field\x18\x02 \x01(\tH\x00R\n" + |
| "oneofField\x1a4\n" + |
| "\rNestedMessage\x12#\n" + |
| "\rnumeric_field\x18\x01 \x01(\x05R\fnumericField\"1\n" + |
| "\n" + |
| "NestedEnum\x12\v\n" + |
| "\aUNKNOWN\x10\x00\x12\n" + |
| "\n" + |
| "\x06VALUE1\x10\x01\x12\n" + |
| "\n" + |
| "\x06VALUE2\x10\x02*\x05\bd\x10\xc8\x012F\n" + |
| "\x03ext\x124.net.proto2.go.testdata.featureresolution.TopMessage\x18d \x01(\x05R\x03extB\x03\n" + |
| "\x01o*I\n" + |
| "\aTopEnum\x12\x14\n" + |
| "\x10TOP_ENUM_UNKNOWN\x10\x00\x12\x13\n" + |
| "\x0fTOP_ENUM_VALUE1\x10\x01\x12\x13\n" + |
| "\x0fTOP_ENUM_VALUE2\x10\x022\x84\x01\n" + |
| "\n" + |
| "TopService\x12v\n" + |
| "\x06Method\x124.net.proto2.go.testdata.featureresolution.TopMessage\x1a4.net.proto2.go.testdata.featureresolution.TopMessage\"\x00:F\n" + |
| "\x03ext\x124.net.proto2.go.testdata.featureresolution.TopMessage\x18h \x01(\tR\x03extBIZGgoogle.golang.org/protobuf/cmd/protoc-gen-go/testdata/featureresolutionb\beditionsp\xe8\a" |
| |
| var ( |
| file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescOnce sync.Once |
| file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescData []byte |
| ) |
| |
| func file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescGZIP() []byte { |
| file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescOnce.Do(func() { |
| file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDesc), len(file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDesc))) |
| }) |
| return file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDescData |
| } |
| |
| var file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_enumTypes = make([]protoimpl.EnumInfo, 2) |
| var file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
| var file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_goTypes = []any{ |
| (TopEnum)(0), // 0: net.proto2.go.testdata.featureresolution.TopEnum |
| (TopMessage_NestedEnum)(0), // 1: net.proto2.go.testdata.featureresolution.TopMessage.NestedEnum |
| (*TopMessage)(nil), // 2: net.proto2.go.testdata.featureresolution.TopMessage |
| (*TopMessage_NestedMessage)(nil), // 3: net.proto2.go.testdata.featureresolution.TopMessage.NestedMessage |
| } |
| var file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_depIdxs = []int32{ |
| 2, // 0: net.proto2.go.testdata.featureresolution.ext:extendee -> net.proto2.go.testdata.featureresolution.TopMessage |
| 2, // 1: net.proto2.go.testdata.featureresolution.TopMessage.ext:extendee -> net.proto2.go.testdata.featureresolution.TopMessage |
| 2, // 2: net.proto2.go.testdata.featureresolution.TopService.Method:input_type -> net.proto2.go.testdata.featureresolution.TopMessage |
| 2, // 3: net.proto2.go.testdata.featureresolution.TopService.Method:output_type -> net.proto2.go.testdata.featureresolution.TopMessage |
| 3, // [3:4] is the sub-list for method output_type |
| 2, // [2:3] is the sub-list for method input_type |
| 2, // [2:2] is the sub-list for extension type_name |
| 0, // [0:2] is the sub-list for extension extendee |
| 0, // [0:0] is the sub-list for field type_name |
| } |
| |
| func init() { file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_init() } |
| func file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_init() { |
| if File_cmd_protoc_gen_go_testdata_featureresolution_basic_proto != nil { |
| return |
| } |
| file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_msgTypes[0].OneofWrappers = []any{ |
| (*TopMessage_OneofField)(nil), |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: unsafe.Slice(unsafe.StringData(file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDesc), len(file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_rawDesc)), |
| NumEnums: 2, |
| NumMessages: 2, |
| NumExtensions: 2, |
| NumServices: 1, |
| }, |
| GoTypes: file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_goTypes, |
| DependencyIndexes: file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_depIdxs, |
| EnumInfos: file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_enumTypes, |
| MessageInfos: file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_msgTypes, |
| ExtensionInfos: file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_extTypes, |
| }.Build() |
| File_cmd_protoc_gen_go_testdata_featureresolution_basic_proto = out.File |
| file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_goTypes = nil |
| file_cmd_protoc_gen_go_testdata_featureresolution_basic_proto_depIdxs = nil |
| } |