github.com/cloudwego/hertz@v0.9.3/pkg/common/testdata/proto/test.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.28.0
     4  // 	protoc        v3.19.3
     5  // source: test.proto
     6  
     7  package proto
     8  
     9  import (
    10  	reflect "reflect"
    11  	sync "sync"
    12  
    13  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    14  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    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  type FOO int32
    25  
    26  const (
    27  	FOO_X FOO = 17
    28  )
    29  
    30  // Enum value maps for FOO.
    31  var (
    32  	FOO_name = map[int32]string{
    33  		17: "X",
    34  	}
    35  	FOO_value = map[string]int32{
    36  		"X": 17,
    37  	}
    38  )
    39  
    40  func (x FOO) Enum() *FOO {
    41  	p := new(FOO)
    42  	*p = x
    43  	return p
    44  }
    45  
    46  func (x FOO) String() string {
    47  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    48  }
    49  
    50  func (FOO) Descriptor() protoreflect.EnumDescriptor {
    51  	return file_test_proto_enumTypes[0].Descriptor()
    52  }
    53  
    54  func (FOO) Type() protoreflect.EnumType {
    55  	return &file_test_proto_enumTypes[0]
    56  }
    57  
    58  func (x FOO) Number() protoreflect.EnumNumber {
    59  	return protoreflect.EnumNumber(x)
    60  }
    61  
    62  // Deprecated: Do not use.
    63  func (x *FOO) UnmarshalJSON(b []byte) error {
    64  	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
    65  	if err != nil {
    66  		return err
    67  	}
    68  	*x = FOO(num)
    69  	return nil
    70  }
    71  
    72  // Deprecated: Use FOO.Descriptor instead.
    73  func (FOO) EnumDescriptor() ([]byte, []int) {
    74  	return file_test_proto_rawDescGZIP(), []int{0}
    75  }
    76  
    77  type Test struct {
    78  	state         protoimpl.MessageState
    79  	sizeCache     protoimpl.SizeCache
    80  	unknownFields protoimpl.UnknownFields
    81  
    82  	Label         *string             `protobuf:"bytes,1,req,name=label" json:"label,omitempty"`
    83  	Type          *int32              `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"`
    84  	Reps          []int64             `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"`
    85  	Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"`
    86  }
    87  
    88  // Default values for Test fields.
    89  const (
    90  	Default_Test_Type = int32(77)
    91  )
    92  
    93  func (x *Test) Reset() {
    94  	*x = Test{}
    95  	if protoimpl.UnsafeEnabled {
    96  		mi := &file_test_proto_msgTypes[0]
    97  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    98  		ms.StoreMessageInfo(mi)
    99  	}
   100  }
   101  
   102  func (x *Test) String() string {
   103  	return protoimpl.X.MessageStringOf(x)
   104  }
   105  
   106  func (*Test) ProtoMessage() {}
   107  
   108  func (x *Test) ProtoReflect() protoreflect.Message {
   109  	mi := &file_test_proto_msgTypes[0]
   110  	if protoimpl.UnsafeEnabled && x != nil {
   111  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   112  		if ms.LoadMessageInfo() == nil {
   113  			ms.StoreMessageInfo(mi)
   114  		}
   115  		return ms
   116  	}
   117  	return mi.MessageOf(x)
   118  }
   119  
   120  // Deprecated: Use Test.ProtoReflect.Descriptor instead.
   121  func (*Test) Descriptor() ([]byte, []int) {
   122  	return file_test_proto_rawDescGZIP(), []int{0}
   123  }
   124  
   125  func (x *Test) GetLabel() string {
   126  	if x != nil && x.Label != nil {
   127  		return *x.Label
   128  	}
   129  	return ""
   130  }
   131  
   132  func (x *Test) GetType() int32 {
   133  	if x != nil && x.Type != nil {
   134  		return *x.Type
   135  	}
   136  	return Default_Test_Type
   137  }
   138  
   139  func (x *Test) GetReps() []int64 {
   140  	if x != nil {
   141  		return x.Reps
   142  	}
   143  	return nil
   144  }
   145  
   146  func (x *Test) GetOptionalgroup() *Test_OptionalGroup {
   147  	if x != nil {
   148  		return x.Optionalgroup
   149  	}
   150  	return nil
   151  }
   152  
   153  type TestStruct struct {
   154  	state         protoimpl.MessageState
   155  	sizeCache     protoimpl.SizeCache
   156  	unknownFields protoimpl.UnknownFields
   157  
   158  	Body []byte `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
   159  }
   160  
   161  func (x *TestStruct) Reset() {
   162  	*x = TestStruct{}
   163  	if protoimpl.UnsafeEnabled {
   164  		mi := &file_test_proto_msgTypes[1]
   165  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   166  		ms.StoreMessageInfo(mi)
   167  	}
   168  }
   169  
   170  func (x *TestStruct) String() string {
   171  	return protoimpl.X.MessageStringOf(x)
   172  }
   173  
   174  func (*TestStruct) ProtoMessage() {}
   175  
   176  func (x *TestStruct) ProtoReflect() protoreflect.Message {
   177  	mi := &file_test_proto_msgTypes[1]
   178  	if protoimpl.UnsafeEnabled && x != nil {
   179  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   180  		if ms.LoadMessageInfo() == nil {
   181  			ms.StoreMessageInfo(mi)
   182  		}
   183  		return ms
   184  	}
   185  	return mi.MessageOf(x)
   186  }
   187  
   188  // Deprecated: Use TestStruct.ProtoReflect.Descriptor instead.
   189  func (*TestStruct) Descriptor() ([]byte, []int) {
   190  	return file_test_proto_rawDescGZIP(), []int{1}
   191  }
   192  
   193  func (x *TestStruct) GetBody() []byte {
   194  	if x != nil {
   195  		return x.Body
   196  	}
   197  	return nil
   198  }
   199  
   200  type Test_OptionalGroup struct {
   201  	state         protoimpl.MessageState
   202  	sizeCache     protoimpl.SizeCache
   203  	unknownFields protoimpl.UnknownFields
   204  
   205  	RequiredField *string `protobuf:"bytes,5,req,name=RequiredField" json:"RequiredField,omitempty"`
   206  }
   207  
   208  func (x *Test_OptionalGroup) Reset() {
   209  	*x = Test_OptionalGroup{}
   210  	if protoimpl.UnsafeEnabled {
   211  		mi := &file_test_proto_msgTypes[2]
   212  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   213  		ms.StoreMessageInfo(mi)
   214  	}
   215  }
   216  
   217  func (x *Test_OptionalGroup) String() string {
   218  	return protoimpl.X.MessageStringOf(x)
   219  }
   220  
   221  func (*Test_OptionalGroup) ProtoMessage() {}
   222  
   223  func (x *Test_OptionalGroup) ProtoReflect() protoreflect.Message {
   224  	mi := &file_test_proto_msgTypes[2]
   225  	if protoimpl.UnsafeEnabled && x != nil {
   226  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   227  		if ms.LoadMessageInfo() == nil {
   228  			ms.StoreMessageInfo(mi)
   229  		}
   230  		return ms
   231  	}
   232  	return mi.MessageOf(x)
   233  }
   234  
   235  // Deprecated: Use Test_OptionalGroup.ProtoReflect.Descriptor instead.
   236  func (*Test_OptionalGroup) Descriptor() ([]byte, []int) {
   237  	return file_test_proto_rawDescGZIP(), []int{0, 0}
   238  }
   239  
   240  func (x *Test_OptionalGroup) GetRequiredField() string {
   241  	if x != nil && x.RequiredField != nil {
   242  		return *x.RequiredField
   243  	}
   244  	return ""
   245  }
   246  
   247  var File_test_proto protoreflect.FileDescriptor
   248  
   249  var file_test_proto_rawDesc = []byte{
   250  	0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x70, 0x72,
   251  	0x6f, 0x74, 0x6f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x04, 0x54,
   252  	0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x02,
   253  	0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x04, 0x74, 0x79, 0x70,
   254  	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x02, 0x37, 0x37, 0x52, 0x04, 0x74, 0x79, 0x70,
   255  	0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52,
   256  	0x04, 0x72, 0x65, 0x70, 0x73, 0x12, 0x46, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61,
   257  	0x6c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x20, 0x2e, 0x70,
   258  	0x72, 0x6f, 0x74, 0x6f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x73, 0x74,
   259  	0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0d,
   260  	0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x35, 0x0a,
   261  	0x0d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24,
   262  	0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x18,
   263  	0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46,
   264  	0x69, 0x65, 0x6c, 0x64, 0x22, 0x20, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x75,
   265  	0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
   266  	0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x2a, 0x0c, 0x0a, 0x03, 0x46, 0x4f, 0x4f, 0x12, 0x05, 0x0a,
   267  	0x01, 0x58, 0x10, 0x11, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65,
   268  	0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
   269  }
   270  
   271  var (
   272  	file_test_proto_rawDescOnce sync.Once
   273  	file_test_proto_rawDescData = file_test_proto_rawDesc
   274  )
   275  
   276  func file_test_proto_rawDescGZIP() []byte {
   277  	file_test_proto_rawDescOnce.Do(func() {
   278  		file_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_proto_rawDescData)
   279  	})
   280  	return file_test_proto_rawDescData
   281  }
   282  
   283  var (
   284  	file_test_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   285  	file_test_proto_msgTypes  = make([]protoimpl.MessageInfo, 3)
   286  	file_test_proto_goTypes   = []interface{}{
   287  		(FOO)(0),                   // 0: proto.FOO
   288  		(*Test)(nil),               // 1: proto.Test
   289  		(*TestStruct)(nil),         // 2: proto.TestStruct
   290  		(*Test_OptionalGroup)(nil), // 3: proto.Test.OptionalGroup
   291  	}
   292  )
   293  
   294  var file_test_proto_depIdxs = []int32{
   295  	3, // 0: proto.Test.optionalgroup:type_name -> proto.Test.OptionalGroup
   296  	1, // [1:1] is the sub-list for method output_type
   297  	1, // [1:1] is the sub-list for method input_type
   298  	1, // [1:1] is the sub-list for extension type_name
   299  	1, // [1:1] is the sub-list for extension extendee
   300  	0, // [0:1] is the sub-list for field type_name
   301  }
   302  
   303  func init() { file_test_proto_init() }
   304  func file_test_proto_init() {
   305  	if File_test_proto != nil {
   306  		return
   307  	}
   308  	if !protoimpl.UnsafeEnabled {
   309  		file_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   310  			switch v := v.(*Test); i {
   311  			case 0:
   312  				return &v.state
   313  			case 1:
   314  				return &v.sizeCache
   315  			case 2:
   316  				return &v.unknownFields
   317  			default:
   318  				return nil
   319  			}
   320  		}
   321  		file_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   322  			switch v := v.(*TestStruct); i {
   323  			case 0:
   324  				return &v.state
   325  			case 1:
   326  				return &v.sizeCache
   327  			case 2:
   328  				return &v.unknownFields
   329  			default:
   330  				return nil
   331  			}
   332  		}
   333  		file_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   334  			switch v := v.(*Test_OptionalGroup); i {
   335  			case 0:
   336  				return &v.state
   337  			case 1:
   338  				return &v.sizeCache
   339  			case 2:
   340  				return &v.unknownFields
   341  			default:
   342  				return nil
   343  			}
   344  		}
   345  	}
   346  	type x struct{}
   347  	out := protoimpl.TypeBuilder{
   348  		File: protoimpl.DescBuilder{
   349  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   350  			RawDescriptor: file_test_proto_rawDesc,
   351  			NumEnums:      1,
   352  			NumMessages:   3,
   353  			NumExtensions: 0,
   354  			NumServices:   0,
   355  		},
   356  		GoTypes:           file_test_proto_goTypes,
   357  		DependencyIndexes: file_test_proto_depIdxs,
   358  		EnumInfos:         file_test_proto_enumTypes,
   359  		MessageInfos:      file_test_proto_msgTypes,
   360  	}.Build()
   361  	File_test_proto = out.File
   362  	file_test_proto_rawDesc = nil
   363  	file_test_proto_goTypes = nil
   364  	file_test_proto_depIdxs = nil
   365  }