...

Source file src/github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum/oneof_enum.pb.go

Documentation: github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.28.1
     4  // 	protoc        (unknown)
     5  // source: examples/internal/proto/oneofenum/oneof_enum.proto
     6  
     7  package oneofenum
     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 ExampleEnum int32
    24  
    25  const (
    26  	ExampleEnum_EXAMPLE_ENUM_UNSPECIFIED ExampleEnum = 0
    27  	ExampleEnum_EXAMPLE_ENUM_FIRST       ExampleEnum = 1
    28  )
    29  
    30  // Enum value maps for ExampleEnum.
    31  var (
    32  	ExampleEnum_name = map[int32]string{
    33  		0: "EXAMPLE_ENUM_UNSPECIFIED",
    34  		1: "EXAMPLE_ENUM_FIRST",
    35  	}
    36  	ExampleEnum_value = map[string]int32{
    37  		"EXAMPLE_ENUM_UNSPECIFIED": 0,
    38  		"EXAMPLE_ENUM_FIRST":       1,
    39  	}
    40  )
    41  
    42  func (x ExampleEnum) Enum() *ExampleEnum {
    43  	p := new(ExampleEnum)
    44  	*p = x
    45  	return p
    46  }
    47  
    48  func (x ExampleEnum) String() string {
    49  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    50  }
    51  
    52  func (ExampleEnum) Descriptor() protoreflect.EnumDescriptor {
    53  	return file_examples_internal_proto_oneofenum_oneof_enum_proto_enumTypes[0].Descriptor()
    54  }
    55  
    56  func (ExampleEnum) Type() protoreflect.EnumType {
    57  	return &file_examples_internal_proto_oneofenum_oneof_enum_proto_enumTypes[0]
    58  }
    59  
    60  func (x ExampleEnum) Number() protoreflect.EnumNumber {
    61  	return protoreflect.EnumNumber(x)
    62  }
    63  
    64  // Deprecated: Use ExampleEnum.Descriptor instead.
    65  func (ExampleEnum) EnumDescriptor() ([]byte, []int) {
    66  	return file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescGZIP(), []int{0}
    67  }
    68  
    69  type OneofEnumMessage struct {
    70  	state         protoimpl.MessageState
    71  	sizeCache     protoimpl.SizeCache
    72  	unknownFields protoimpl.UnknownFields
    73  
    74  	// Types that are assignable to One:
    75  	//
    76  	//	*OneofEnumMessage_ExampleEnum
    77  	One isOneofEnumMessage_One `protobuf_oneof:"one"`
    78  }
    79  
    80  func (x *OneofEnumMessage) Reset() {
    81  	*x = OneofEnumMessage{}
    82  	if protoimpl.UnsafeEnabled {
    83  		mi := &file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes[0]
    84  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    85  		ms.StoreMessageInfo(mi)
    86  	}
    87  }
    88  
    89  func (x *OneofEnumMessage) String() string {
    90  	return protoimpl.X.MessageStringOf(x)
    91  }
    92  
    93  func (*OneofEnumMessage) ProtoMessage() {}
    94  
    95  func (x *OneofEnumMessage) ProtoReflect() protoreflect.Message {
    96  	mi := &file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes[0]
    97  	if protoimpl.UnsafeEnabled && x != nil {
    98  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    99  		if ms.LoadMessageInfo() == nil {
   100  			ms.StoreMessageInfo(mi)
   101  		}
   102  		return ms
   103  	}
   104  	return mi.MessageOf(x)
   105  }
   106  
   107  // Deprecated: Use OneofEnumMessage.ProtoReflect.Descriptor instead.
   108  func (*OneofEnumMessage) Descriptor() ([]byte, []int) {
   109  	return file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescGZIP(), []int{0}
   110  }
   111  
   112  func (m *OneofEnumMessage) GetOne() isOneofEnumMessage_One {
   113  	if m != nil {
   114  		return m.One
   115  	}
   116  	return nil
   117  }
   118  
   119  func (x *OneofEnumMessage) GetExampleEnum() ExampleEnum {
   120  	if x, ok := x.GetOne().(*OneofEnumMessage_ExampleEnum); ok {
   121  		return x.ExampleEnum
   122  	}
   123  	return ExampleEnum_EXAMPLE_ENUM_UNSPECIFIED
   124  }
   125  
   126  type isOneofEnumMessage_One interface {
   127  	isOneofEnumMessage_One()
   128  }
   129  
   130  type OneofEnumMessage_ExampleEnum struct {
   131  	ExampleEnum ExampleEnum `protobuf:"varint,1,opt,name=example_enum,json=exampleEnum,proto3,enum=grpc.gateway.examples.internal.proto.oneofenum.ExampleEnum,oneof"`
   132  }
   133  
   134  func (*OneofEnumMessage_ExampleEnum) isOneofEnumMessage_One() {}
   135  
   136  var File_examples_internal_proto_oneofenum_oneof_enum_proto protoreflect.FileDescriptor
   137  
   138  var file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDesc = []byte{
   139  	0x0a, 0x32, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72,
   140  	0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x65,
   141  	0x6e, 0x75, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70,
   142  	0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
   143  	0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65,
   144  	0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6f, 0x6e, 0x65, 0x6f, 0x66,
   145  	0x65, 0x6e, 0x75, 0x6d, 0x22, 0x7b, 0x0a, 0x10, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x45, 0x6e, 0x75,
   146  	0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x60, 0x0a, 0x0c, 0x65, 0x78, 0x61, 0x6d,
   147  	0x70, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b,
   148  	0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78,
   149  	0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
   150  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x75, 0x6d, 0x2e,
   151  	0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x65,
   152  	0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x05, 0x0a, 0x03, 0x6f, 0x6e,
   153  	0x65, 0x2a, 0x43, 0x0a, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d,
   154  	0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d,
   155  	0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16,
   156  	0x0a, 0x12, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46,
   157  	0x49, 0x52, 0x53, 0x54, 0x10, 0x01, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
   158  	0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73,
   159  	0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
   160  	0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74,
   161  	0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x6e, 0x65, 0x6f,
   162  	0x66, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   163  }
   164  
   165  var (
   166  	file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescOnce sync.Once
   167  	file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescData = file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDesc
   168  )
   169  
   170  func file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescGZIP() []byte {
   171  	file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescOnce.Do(func() {
   172  		file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescData = protoimpl.X.CompressGZIP(file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescData)
   173  	})
   174  	return file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescData
   175  }
   176  
   177  var file_examples_internal_proto_oneofenum_oneof_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   178  var file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   179  var file_examples_internal_proto_oneofenum_oneof_enum_proto_goTypes = []interface{}{
   180  	(ExampleEnum)(0),         // 0: grpc.gateway.examples.internal.proto.oneofenum.ExampleEnum
   181  	(*OneofEnumMessage)(nil), // 1: grpc.gateway.examples.internal.proto.oneofenum.OneofEnumMessage
   182  }
   183  var file_examples_internal_proto_oneofenum_oneof_enum_proto_depIdxs = []int32{
   184  	0, // 0: grpc.gateway.examples.internal.proto.oneofenum.OneofEnumMessage.example_enum:type_name -> grpc.gateway.examples.internal.proto.oneofenum.ExampleEnum
   185  	1, // [1:1] is the sub-list for method output_type
   186  	1, // [1:1] is the sub-list for method input_type
   187  	1, // [1:1] is the sub-list for extension type_name
   188  	1, // [1:1] is the sub-list for extension extendee
   189  	0, // [0:1] is the sub-list for field type_name
   190  }
   191  
   192  func init() { file_examples_internal_proto_oneofenum_oneof_enum_proto_init() }
   193  func file_examples_internal_proto_oneofenum_oneof_enum_proto_init() {
   194  	if File_examples_internal_proto_oneofenum_oneof_enum_proto != nil {
   195  		return
   196  	}
   197  	if !protoimpl.UnsafeEnabled {
   198  		file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   199  			switch v := v.(*OneofEnumMessage); i {
   200  			case 0:
   201  				return &v.state
   202  			case 1:
   203  				return &v.sizeCache
   204  			case 2:
   205  				return &v.unknownFields
   206  			default:
   207  				return nil
   208  			}
   209  		}
   210  	}
   211  	file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes[0].OneofWrappers = []interface{}{
   212  		(*OneofEnumMessage_ExampleEnum)(nil),
   213  	}
   214  	type x struct{}
   215  	out := protoimpl.TypeBuilder{
   216  		File: protoimpl.DescBuilder{
   217  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   218  			RawDescriptor: file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDesc,
   219  			NumEnums:      1,
   220  			NumMessages:   1,
   221  			NumExtensions: 0,
   222  			NumServices:   0,
   223  		},
   224  		GoTypes:           file_examples_internal_proto_oneofenum_oneof_enum_proto_goTypes,
   225  		DependencyIndexes: file_examples_internal_proto_oneofenum_oneof_enum_proto_depIdxs,
   226  		EnumInfos:         file_examples_internal_proto_oneofenum_oneof_enum_proto_enumTypes,
   227  		MessageInfos:      file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes,
   228  	}.Build()
   229  	File_examples_internal_proto_oneofenum_oneof_enum_proto = out.File
   230  	file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDesc = nil
   231  	file_examples_internal_proto_oneofenum_oneof_enum_proto_goTypes = nil
   232  	file_examples_internal_proto_oneofenum_oneof_enum_proto_depIdxs = nil
   233  }
   234  

View as plain text