github.com/jhump/protoreflect@v1.16.0/internal/testprotos/pkg/desc_test_pkg.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: pkg/desc_test_pkg.proto
     6  
     7  package pkg
     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 Foo int32
    24  
    25  const (
    26  	Foo_ABC Foo = 0
    27  	Foo_DEF Foo = 1
    28  	Foo_GHI Foo = 2
    29  	Foo_JKL Foo = 3
    30  	Foo_MNO Foo = 4
    31  	Foo_PQR Foo = 5
    32  	Foo_STU Foo = 6
    33  	Foo_VWX Foo = 7
    34  	Foo_Y_Z Foo = 8
    35  )
    36  
    37  // Enum value maps for Foo.
    38  var (
    39  	Foo_name = map[int32]string{
    40  		0: "ABC",
    41  		1: "DEF",
    42  		2: "GHI",
    43  		3: "JKL",
    44  		4: "MNO",
    45  		5: "PQR",
    46  		6: "STU",
    47  		7: "VWX",
    48  		8: "Y_Z",
    49  	}
    50  	Foo_value = map[string]int32{
    51  		"ABC": 0,
    52  		"DEF": 1,
    53  		"GHI": 2,
    54  		"JKL": 3,
    55  		"MNO": 4,
    56  		"PQR": 5,
    57  		"STU": 6,
    58  		"VWX": 7,
    59  		"Y_Z": 8,
    60  	}
    61  )
    62  
    63  func (x Foo) Enum() *Foo {
    64  	p := new(Foo)
    65  	*p = x
    66  	return p
    67  }
    68  
    69  func (x Foo) String() string {
    70  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    71  }
    72  
    73  func (Foo) Descriptor() protoreflect.EnumDescriptor {
    74  	return file_pkg_desc_test_pkg_proto_enumTypes[0].Descriptor()
    75  }
    76  
    77  func (Foo) Type() protoreflect.EnumType {
    78  	return &file_pkg_desc_test_pkg_proto_enumTypes[0]
    79  }
    80  
    81  func (x Foo) Number() protoreflect.EnumNumber {
    82  	return protoreflect.EnumNumber(x)
    83  }
    84  
    85  // Deprecated: Do not use.
    86  func (x *Foo) UnmarshalJSON(b []byte) error {
    87  	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
    88  	if err != nil {
    89  		return err
    90  	}
    91  	*x = Foo(num)
    92  	return nil
    93  }
    94  
    95  // Deprecated: Use Foo.Descriptor instead.
    96  func (Foo) EnumDescriptor() ([]byte, []int) {
    97  	return file_pkg_desc_test_pkg_proto_rawDescGZIP(), []int{0}
    98  }
    99  
   100  type Bar struct {
   101  	state         protoimpl.MessageState
   102  	sizeCache     protoimpl.SizeCache
   103  	unknownFields protoimpl.UnknownFields
   104  
   105  	Baz []Foo `protobuf:"varint,1,rep,name=baz,enum=jhump.protoreflect.desc.Foo" json:"baz,omitempty"`
   106  }
   107  
   108  func (x *Bar) Reset() {
   109  	*x = Bar{}
   110  	if protoimpl.UnsafeEnabled {
   111  		mi := &file_pkg_desc_test_pkg_proto_msgTypes[0]
   112  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   113  		ms.StoreMessageInfo(mi)
   114  	}
   115  }
   116  
   117  func (x *Bar) String() string {
   118  	return protoimpl.X.MessageStringOf(x)
   119  }
   120  
   121  func (*Bar) ProtoMessage() {}
   122  
   123  func (x *Bar) ProtoReflect() protoreflect.Message {
   124  	mi := &file_pkg_desc_test_pkg_proto_msgTypes[0]
   125  	if protoimpl.UnsafeEnabled && x != nil {
   126  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   127  		if ms.LoadMessageInfo() == nil {
   128  			ms.StoreMessageInfo(mi)
   129  		}
   130  		return ms
   131  	}
   132  	return mi.MessageOf(x)
   133  }
   134  
   135  // Deprecated: Use Bar.ProtoReflect.Descriptor instead.
   136  func (*Bar) Descriptor() ([]byte, []int) {
   137  	return file_pkg_desc_test_pkg_proto_rawDescGZIP(), []int{0}
   138  }
   139  
   140  func (x *Bar) GetBaz() []Foo {
   141  	if x != nil {
   142  		return x.Baz
   143  	}
   144  	return nil
   145  }
   146  
   147  var File_pkg_desc_test_pkg_proto protoreflect.FileDescriptor
   148  
   149  var file_pkg_desc_test_pkg_proto_rawDesc = []byte{
   150  	0x0a, 0x17, 0x70, 0x6b, 0x67, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f,
   151  	0x70, 0x6b, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6a, 0x68, 0x75, 0x6d, 0x70,
   152  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65,
   153  	0x73, 0x63, 0x22, 0x35, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x2e, 0x0a, 0x03, 0x62, 0x61, 0x7a,
   154  	0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6a, 0x68, 0x75, 0x6d, 0x70, 0x2e, 0x70,
   155  	0x72, 0x6f, 0x74, 0x6f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x73, 0x63,
   156  	0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x2a, 0x56, 0x0a, 0x03, 0x46, 0x6f, 0x6f,
   157  	0x12, 0x07, 0x0a, 0x03, 0x41, 0x42, 0x43, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x45, 0x46,
   158  	0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x48, 0x49, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4a,
   159  	0x4b, 0x4c, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x4e, 0x4f, 0x10, 0x04, 0x12, 0x07, 0x0a,
   160  	0x03, 0x50, 0x51, 0x52, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x54, 0x55, 0x10, 0x06, 0x12,
   161  	0x07, 0x0a, 0x03, 0x56, 0x57, 0x58, 0x10, 0x07, 0x12, 0x07, 0x0a, 0x03, 0x59, 0x5f, 0x5a, 0x10,
   162  	0x08, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
   163  	0x6a, 0x68, 0x75, 0x6d, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x72, 0x65, 0x66, 0x6c, 0x65,
   164  	0x63, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74,
   165  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x3b, 0x70, 0x6b, 0x67,
   166  }
   167  
   168  var (
   169  	file_pkg_desc_test_pkg_proto_rawDescOnce sync.Once
   170  	file_pkg_desc_test_pkg_proto_rawDescData = file_pkg_desc_test_pkg_proto_rawDesc
   171  )
   172  
   173  func file_pkg_desc_test_pkg_proto_rawDescGZIP() []byte {
   174  	file_pkg_desc_test_pkg_proto_rawDescOnce.Do(func() {
   175  		file_pkg_desc_test_pkg_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_desc_test_pkg_proto_rawDescData)
   176  	})
   177  	return file_pkg_desc_test_pkg_proto_rawDescData
   178  }
   179  
   180  var file_pkg_desc_test_pkg_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   181  var file_pkg_desc_test_pkg_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   182  var file_pkg_desc_test_pkg_proto_goTypes = []interface{}{
   183  	(Foo)(0),    // 0: jhump.protoreflect.desc.Foo
   184  	(*Bar)(nil), // 1: jhump.protoreflect.desc.Bar
   185  }
   186  var file_pkg_desc_test_pkg_proto_depIdxs = []int32{
   187  	0, // 0: jhump.protoreflect.desc.Bar.baz:type_name -> jhump.protoreflect.desc.Foo
   188  	1, // [1:1] is the sub-list for method output_type
   189  	1, // [1:1] is the sub-list for method input_type
   190  	1, // [1:1] is the sub-list for extension type_name
   191  	1, // [1:1] is the sub-list for extension extendee
   192  	0, // [0:1] is the sub-list for field type_name
   193  }
   194  
   195  func init() { file_pkg_desc_test_pkg_proto_init() }
   196  func file_pkg_desc_test_pkg_proto_init() {
   197  	if File_pkg_desc_test_pkg_proto != nil {
   198  		return
   199  	}
   200  	if !protoimpl.UnsafeEnabled {
   201  		file_pkg_desc_test_pkg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   202  			switch v := v.(*Bar); i {
   203  			case 0:
   204  				return &v.state
   205  			case 1:
   206  				return &v.sizeCache
   207  			case 2:
   208  				return &v.unknownFields
   209  			default:
   210  				return nil
   211  			}
   212  		}
   213  	}
   214  	type x struct{}
   215  	out := protoimpl.TypeBuilder{
   216  		File: protoimpl.DescBuilder{
   217  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   218  			RawDescriptor: file_pkg_desc_test_pkg_proto_rawDesc,
   219  			NumEnums:      1,
   220  			NumMessages:   1,
   221  			NumExtensions: 0,
   222  			NumServices:   0,
   223  		},
   224  		GoTypes:           file_pkg_desc_test_pkg_proto_goTypes,
   225  		DependencyIndexes: file_pkg_desc_test_pkg_proto_depIdxs,
   226  		EnumInfos:         file_pkg_desc_test_pkg_proto_enumTypes,
   227  		MessageInfos:      file_pkg_desc_test_pkg_proto_msgTypes,
   228  	}.Build()
   229  	File_pkg_desc_test_pkg_proto = out.File
   230  	file_pkg_desc_test_pkg_proto_rawDesc = nil
   231  	file_pkg_desc_test_pkg_proto_goTypes = nil
   232  	file_pkg_desc_test_pkg_proto_depIdxs = nil
   233  }