nopackage.pb.go 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. // Copyright 2018 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated by protoc-gen-go. DO NOT EDIT.
  5. // source: nopackage/nopackage.proto
  6. package nopackage
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. reflect "reflect"
  11. sync "sync"
  12. )
  13. type Enum int32
  14. const (
  15. Enum_ZERO Enum = 0
  16. )
  17. // Enum value maps for Enum.
  18. var (
  19. Enum_name = map[int32]string{
  20. 0: "ZERO",
  21. }
  22. Enum_value = map[string]int32{
  23. "ZERO": 0,
  24. }
  25. )
  26. func (x Enum) Enum() *Enum {
  27. p := new(Enum)
  28. *p = x
  29. return p
  30. }
  31. func (x Enum) String() string {
  32. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  33. }
  34. func (Enum) Descriptor() protoreflect.EnumDescriptor {
  35. return file_nopackage_nopackage_proto_enumTypes[0].Descriptor()
  36. }
  37. func (Enum) Type() protoreflect.EnumType {
  38. return &file_nopackage_nopackage_proto_enumTypes[0]
  39. }
  40. func (x Enum) Number() protoreflect.EnumNumber {
  41. return protoreflect.EnumNumber(x)
  42. }
  43. // Deprecated: Do not use.
  44. func (x *Enum) UnmarshalJSON(b []byte) error {
  45. num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
  46. if err != nil {
  47. return err
  48. }
  49. *x = Enum(num)
  50. return nil
  51. }
  52. // Deprecated: Use Enum.Descriptor instead.
  53. func (Enum) EnumDescriptor() ([]byte, []int) {
  54. return file_nopackage_nopackage_proto_rawDescGZIP(), []int{0}
  55. }
  56. type Message struct {
  57. state protoimpl.MessageState
  58. sizeCache protoimpl.SizeCache
  59. unknownFields protoimpl.UnknownFields
  60. StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"`
  61. EnumField *Enum `protobuf:"varint,2,opt,name=enum_field,json=enumField,enum=Enum,def=0" json:"enum_field,omitempty"`
  62. }
  63. // Default values for Message fields.
  64. const (
  65. Default_Message_EnumField = Enum_ZERO
  66. )
  67. func (x *Message) Reset() {
  68. *x = Message{}
  69. }
  70. func (x *Message) String() string {
  71. return protoimpl.X.MessageStringOf(x)
  72. }
  73. func (*Message) ProtoMessage() {}
  74. func (x *Message) ProtoReflect() protoreflect.Message {
  75. mi := &file_nopackage_nopackage_proto_msgTypes[0]
  76. if protoimpl.UnsafeEnabled && x != nil {
  77. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  78. if ms.LoadMessageInfo() == nil {
  79. ms.StoreMessageInfo(mi)
  80. }
  81. return ms
  82. }
  83. return mi.MessageOf(x)
  84. }
  85. // Deprecated: Use Message.ProtoReflect.Descriptor instead.
  86. func (*Message) Descriptor() ([]byte, []int) {
  87. return file_nopackage_nopackage_proto_rawDescGZIP(), []int{0}
  88. }
  89. func (x *Message) GetStringField() string {
  90. if x != nil && x.StringField != nil {
  91. return *x.StringField
  92. }
  93. return ""
  94. }
  95. func (x *Message) GetEnumField() Enum {
  96. if x != nil && x.EnumField != nil {
  97. return *x.EnumField
  98. }
  99. return Default_Message_EnumField
  100. }
  101. var File_nopackage_nopackage_proto protoreflect.FileDescriptor
  102. var file_nopackage_nopackage_proto_rawDesc = []byte{
  103. 0x0a, 0x19, 0x6e, 0x6f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2f, 0x6e, 0x6f, 0x70, 0x61,
  104. 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x07, 0x4d,
  105. 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
  106. 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74,
  107. 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x0a, 0x65, 0x6e, 0x75,
  108. 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x05, 0x2e,
  109. 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d,
  110. 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2a, 0x10, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x08, 0x0a,
  111. 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00,
  112. }
  113. var (
  114. file_nopackage_nopackage_proto_rawDescOnce sync.Once
  115. file_nopackage_nopackage_proto_rawDescData = file_nopackage_nopackage_proto_rawDesc
  116. )
  117. func file_nopackage_nopackage_proto_rawDescGZIP() []byte {
  118. file_nopackage_nopackage_proto_rawDescOnce.Do(func() {
  119. file_nopackage_nopackage_proto_rawDescData = protoimpl.X.CompressGZIP(file_nopackage_nopackage_proto_rawDescData)
  120. })
  121. return file_nopackage_nopackage_proto_rawDescData
  122. }
  123. var file_nopackage_nopackage_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  124. var file_nopackage_nopackage_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  125. var file_nopackage_nopackage_proto_goTypes = []interface{}{
  126. (Enum)(0), // 0: Enum
  127. (*Message)(nil), // 1: Message
  128. }
  129. var file_nopackage_nopackage_proto_depIdxs = []int32{
  130. 0, // 0: Message.enum_field:type_name -> Enum
  131. 1, // [1:1] is the sub-list for method output_type
  132. 1, // [1:1] is the sub-list for method input_type
  133. 1, // [1:1] is the sub-list for extension type_name
  134. 1, // [1:1] is the sub-list for extension extendee
  135. 0, // [0:1] is the sub-list for field type_name
  136. }
  137. func init() { file_nopackage_nopackage_proto_init() }
  138. func file_nopackage_nopackage_proto_init() {
  139. if File_nopackage_nopackage_proto != nil {
  140. return
  141. }
  142. if !protoimpl.UnsafeEnabled {
  143. file_nopackage_nopackage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  144. switch v := v.(*Message); i {
  145. case 0:
  146. return &v.state
  147. case 1:
  148. return &v.sizeCache
  149. case 2:
  150. return &v.unknownFields
  151. default:
  152. return nil
  153. }
  154. }
  155. }
  156. type x struct{}
  157. out := protoimpl.TypeBuilder{
  158. File: protoimpl.DescBuilder{
  159. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  160. RawDescriptor: file_nopackage_nopackage_proto_rawDesc,
  161. NumEnums: 1,
  162. NumMessages: 1,
  163. NumExtensions: 0,
  164. NumServices: 0,
  165. },
  166. GoTypes: file_nopackage_nopackage_proto_goTypes,
  167. DependencyIndexes: file_nopackage_nopackage_proto_depIdxs,
  168. EnumInfos: file_nopackage_nopackage_proto_enumTypes,
  169. MessageInfos: file_nopackage_nopackage_proto_msgTypes,
  170. }.Build()
  171. File_nopackage_nopackage_proto = out.File
  172. file_nopackage_nopackage_proto_rawDesc = nil
  173. file_nopackage_nopackage_proto_goTypes = nil
  174. file_nopackage_nopackage_proto_depIdxs = nil
  175. }