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