prod.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.34.0
  4. // protoc v5.26.1
  5. // source: prod.proto
  6. package prod
  7. import (
  8. _ "google.golang.org/genproto/googleapis/api/annotations"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. type ProdArea int32
  21. const (
  22. ProdArea_A ProdArea = 0
  23. ProdArea_B ProdArea = 1
  24. ProdArea_C ProdArea = 2
  25. )
  26. // Enum value maps for ProdArea.
  27. var (
  28. ProdArea_name = map[int32]string{
  29. 0: "A",
  30. 1: "B",
  31. 2: "C",
  32. }
  33. ProdArea_value = map[string]int32{
  34. "A": 0,
  35. "B": 1,
  36. "C": 2,
  37. }
  38. )
  39. func (x ProdArea) Enum() *ProdArea {
  40. p := new(ProdArea)
  41. *p = x
  42. return p
  43. }
  44. func (x ProdArea) String() string {
  45. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  46. }
  47. func (ProdArea) Descriptor() protoreflect.EnumDescriptor {
  48. return file_prod_proto_enumTypes[0].Descriptor()
  49. }
  50. func (ProdArea) Type() protoreflect.EnumType {
  51. return &file_prod_proto_enumTypes[0]
  52. }
  53. func (x ProdArea) Number() protoreflect.EnumNumber {
  54. return protoreflect.EnumNumber(x)
  55. }
  56. // Deprecated: Use ProdArea.Descriptor instead.
  57. func (ProdArea) EnumDescriptor() ([]byte, []int) {
  58. return file_prod_proto_rawDescGZIP(), []int{0}
  59. }
  60. type ProdRequest struct {
  61. state protoimpl.MessageState
  62. sizeCache protoimpl.SizeCache
  63. unknownFields protoimpl.UnknownFields
  64. ProdId int32 `protobuf:"varint,1,opt,name=prod_id,json=prodId,proto3" json:"prod_id,omitempty"`
  65. ProdArea ProdArea `protobuf:"varint,2,opt,name=prod_area,json=prodArea,proto3,enum=services.ProdArea" json:"prod_area,omitempty"`
  66. }
  67. func (x *ProdRequest) Reset() {
  68. *x = ProdRequest{}
  69. if protoimpl.UnsafeEnabled {
  70. mi := &file_prod_proto_msgTypes[0]
  71. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  72. ms.StoreMessageInfo(mi)
  73. }
  74. }
  75. func (x *ProdRequest) String() string {
  76. return protoimpl.X.MessageStringOf(x)
  77. }
  78. func (*ProdRequest) ProtoMessage() {}
  79. func (x *ProdRequest) ProtoReflect() protoreflect.Message {
  80. mi := &file_prod_proto_msgTypes[0]
  81. if protoimpl.UnsafeEnabled && x != nil {
  82. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  83. if ms.LoadMessageInfo() == nil {
  84. ms.StoreMessageInfo(mi)
  85. }
  86. return ms
  87. }
  88. return mi.MessageOf(x)
  89. }
  90. // Deprecated: Use ProdRequest.ProtoReflect.Descriptor instead.
  91. func (*ProdRequest) Descriptor() ([]byte, []int) {
  92. return file_prod_proto_rawDescGZIP(), []int{0}
  93. }
  94. func (x *ProdRequest) GetProdId() int32 {
  95. if x != nil {
  96. return x.ProdId
  97. }
  98. return 0
  99. }
  100. func (x *ProdRequest) GetProdArea() ProdArea {
  101. if x != nil {
  102. return x.ProdArea
  103. }
  104. return ProdArea_A
  105. }
  106. type ProdResponse struct {
  107. state protoimpl.MessageState
  108. sizeCache protoimpl.SizeCache
  109. unknownFields protoimpl.UnknownFields
  110. ProdStock int32 `protobuf:"varint,1,opt,name=prod_stock,json=prodStock,proto3" json:"prod_stock,omitempty"`
  111. }
  112. func (x *ProdResponse) Reset() {
  113. *x = ProdResponse{}
  114. if protoimpl.UnsafeEnabled {
  115. mi := &file_prod_proto_msgTypes[1]
  116. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  117. ms.StoreMessageInfo(mi)
  118. }
  119. }
  120. func (x *ProdResponse) String() string {
  121. return protoimpl.X.MessageStringOf(x)
  122. }
  123. func (*ProdResponse) ProtoMessage() {}
  124. func (x *ProdResponse) ProtoReflect() protoreflect.Message {
  125. mi := &file_prod_proto_msgTypes[1]
  126. if protoimpl.UnsafeEnabled && x != nil {
  127. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  128. if ms.LoadMessageInfo() == nil {
  129. ms.StoreMessageInfo(mi)
  130. }
  131. return ms
  132. }
  133. return mi.MessageOf(x)
  134. }
  135. // Deprecated: Use ProdResponse.ProtoReflect.Descriptor instead.
  136. func (*ProdResponse) Descriptor() ([]byte, []int) {
  137. return file_prod_proto_rawDescGZIP(), []int{1}
  138. }
  139. func (x *ProdResponse) GetProdStock() int32 {
  140. if x != nil {
  141. return x.ProdStock
  142. }
  143. return 0
  144. }
  145. type QueryProdStocks struct {
  146. state protoimpl.MessageState
  147. sizeCache protoimpl.SizeCache
  148. unknownFields protoimpl.UnknownFields
  149. PageNo int32 `protobuf:"varint,1,opt,name=pageNo,proto3" json:"pageNo,omitempty"`
  150. PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
  151. }
  152. func (x *QueryProdStocks) Reset() {
  153. *x = QueryProdStocks{}
  154. if protoimpl.UnsafeEnabled {
  155. mi := &file_prod_proto_msgTypes[2]
  156. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  157. ms.StoreMessageInfo(mi)
  158. }
  159. }
  160. func (x *QueryProdStocks) String() string {
  161. return protoimpl.X.MessageStringOf(x)
  162. }
  163. func (*QueryProdStocks) ProtoMessage() {}
  164. func (x *QueryProdStocks) ProtoReflect() protoreflect.Message {
  165. mi := &file_prod_proto_msgTypes[2]
  166. if protoimpl.UnsafeEnabled && x != nil {
  167. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  168. if ms.LoadMessageInfo() == nil {
  169. ms.StoreMessageInfo(mi)
  170. }
  171. return ms
  172. }
  173. return mi.MessageOf(x)
  174. }
  175. // Deprecated: Use QueryProdStocks.ProtoReflect.Descriptor instead.
  176. func (*QueryProdStocks) Descriptor() ([]byte, []int) {
  177. return file_prod_proto_rawDescGZIP(), []int{2}
  178. }
  179. func (x *QueryProdStocks) GetPageNo() int32 {
  180. if x != nil {
  181. return x.PageNo
  182. }
  183. return 0
  184. }
  185. func (x *QueryProdStocks) GetPageSize() int32 {
  186. if x != nil {
  187. return x.PageSize
  188. }
  189. return 0
  190. }
  191. type ProdStockList struct {
  192. state protoimpl.MessageState
  193. sizeCache protoimpl.SizeCache
  194. unknownFields protoimpl.UnknownFields
  195. ProdRes []*ProdResponse `protobuf:"bytes,1,rep,name=prodRes,proto3" json:"prodRes,omitempty"`
  196. }
  197. func (x *ProdStockList) Reset() {
  198. *x = ProdStockList{}
  199. if protoimpl.UnsafeEnabled {
  200. mi := &file_prod_proto_msgTypes[3]
  201. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  202. ms.StoreMessageInfo(mi)
  203. }
  204. }
  205. func (x *ProdStockList) String() string {
  206. return protoimpl.X.MessageStringOf(x)
  207. }
  208. func (*ProdStockList) ProtoMessage() {}
  209. func (x *ProdStockList) ProtoReflect() protoreflect.Message {
  210. mi := &file_prod_proto_msgTypes[3]
  211. if protoimpl.UnsafeEnabled && x != nil {
  212. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  213. if ms.LoadMessageInfo() == nil {
  214. ms.StoreMessageInfo(mi)
  215. }
  216. return ms
  217. }
  218. return mi.MessageOf(x)
  219. }
  220. // Deprecated: Use ProdStockList.ProtoReflect.Descriptor instead.
  221. func (*ProdStockList) Descriptor() ([]byte, []int) {
  222. return file_prod_proto_rawDescGZIP(), []int{3}
  223. }
  224. func (x *ProdStockList) GetProdRes() []*ProdResponse {
  225. if x != nil {
  226. return x.ProdRes
  227. }
  228. return nil
  229. }
  230. var File_prod_proto protoreflect.FileDescriptor
  231. var file_prod_proto_rawDesc = []byte{
  232. 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x73, 0x65,
  233. 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
  234. 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
  235. 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75,
  236. 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01,
  237. 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x09,
  238. 0x70, 0x72, 0x6f, 0x64, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
  239. 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x41,
  240. 0x72, 0x65, 0x61, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x41, 0x72, 0x65, 0x61, 0x22, 0x2d, 0x0a,
  241. 0x0c, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a,
  242. 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28,
  243. 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x45, 0x0a, 0x0f,
  244. 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, 0x12,
  245. 0x16, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
  246. 0x06, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
  247. 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
  248. 0x69, 0x7a, 0x65, 0x22, 0x41, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b,
  249. 0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x18,
  250. 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
  251. 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x70,
  252. 0x72, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x2a, 0x1f, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x41, 0x72,
  253. 0x65, 0x61, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01,
  254. 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, 0x32, 0xaf, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64,
  255. 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x72,
  256. 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
  257. 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
  258. 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65,
  259. 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12,
  260. 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x64, 0x5f, 0x69,
  261. 0x64, 0x7d, 0x12, 0x45, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f,
  262. 0x63, 0x6b, 0x73, 0x12, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x51,
  263. 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x17,
  264. 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74,
  265. 0x6f, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x42, 0x07, 0x5a, 0x05, 0x2f, 0x70, 0x72,
  266. 0x6f, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  267. }
  268. var (
  269. file_prod_proto_rawDescOnce sync.Once
  270. file_prod_proto_rawDescData = file_prod_proto_rawDesc
  271. )
  272. func file_prod_proto_rawDescGZIP() []byte {
  273. file_prod_proto_rawDescOnce.Do(func() {
  274. file_prod_proto_rawDescData = protoimpl.X.CompressGZIP(file_prod_proto_rawDescData)
  275. })
  276. return file_prod_proto_rawDescData
  277. }
  278. var file_prod_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  279. var file_prod_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  280. var file_prod_proto_goTypes = []interface{}{
  281. (ProdArea)(0), // 0: services.ProdArea
  282. (*ProdRequest)(nil), // 1: services.ProdRequest
  283. (*ProdResponse)(nil), // 2: services.ProdResponse
  284. (*QueryProdStocks)(nil), // 3: services.QueryProdStocks
  285. (*ProdStockList)(nil), // 4: services.ProdStockList
  286. }
  287. var file_prod_proto_depIdxs = []int32{
  288. 0, // 0: services.ProdRequest.prod_area:type_name -> services.ProdArea
  289. 2, // 1: services.ProdStockList.prodRes:type_name -> services.ProdResponse
  290. 1, // 2: services.ProdService.GetProdStock:input_type -> services.ProdRequest
  291. 3, // 3: services.ProdService.GetProdStocks:input_type -> services.QueryProdStocks
  292. 2, // 4: services.ProdService.GetProdStock:output_type -> services.ProdResponse
  293. 4, // 5: services.ProdService.GetProdStocks:output_type -> services.ProdStockList
  294. 4, // [4:6] is the sub-list for method output_type
  295. 2, // [2:4] is the sub-list for method input_type
  296. 2, // [2:2] is the sub-list for extension type_name
  297. 2, // [2:2] is the sub-list for extension extendee
  298. 0, // [0:2] is the sub-list for field type_name
  299. }
  300. func init() { file_prod_proto_init() }
  301. func file_prod_proto_init() {
  302. if File_prod_proto != nil {
  303. return
  304. }
  305. if !protoimpl.UnsafeEnabled {
  306. file_prod_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  307. switch v := v.(*ProdRequest); i {
  308. case 0:
  309. return &v.state
  310. case 1:
  311. return &v.sizeCache
  312. case 2:
  313. return &v.unknownFields
  314. default:
  315. return nil
  316. }
  317. }
  318. file_prod_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  319. switch v := v.(*ProdResponse); i {
  320. case 0:
  321. return &v.state
  322. case 1:
  323. return &v.sizeCache
  324. case 2:
  325. return &v.unknownFields
  326. default:
  327. return nil
  328. }
  329. }
  330. file_prod_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  331. switch v := v.(*QueryProdStocks); i {
  332. case 0:
  333. return &v.state
  334. case 1:
  335. return &v.sizeCache
  336. case 2:
  337. return &v.unknownFields
  338. default:
  339. return nil
  340. }
  341. }
  342. file_prod_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  343. switch v := v.(*ProdStockList); i {
  344. case 0:
  345. return &v.state
  346. case 1:
  347. return &v.sizeCache
  348. case 2:
  349. return &v.unknownFields
  350. default:
  351. return nil
  352. }
  353. }
  354. }
  355. type x struct{}
  356. out := protoimpl.TypeBuilder{
  357. File: protoimpl.DescBuilder{
  358. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  359. RawDescriptor: file_prod_proto_rawDesc,
  360. NumEnums: 1,
  361. NumMessages: 4,
  362. NumExtensions: 0,
  363. NumServices: 1,
  364. },
  365. GoTypes: file_prod_proto_goTypes,
  366. DependencyIndexes: file_prod_proto_depIdxs,
  367. EnumInfos: file_prod_proto_enumTypes,
  368. MessageInfos: file_prod_proto_msgTypes,
  369. }.Build()
  370. File_prod_proto = out.File
  371. file_prod_proto_rawDesc = nil
  372. file_prod_proto_goTypes = nil
  373. file_prod_proto_depIdxs = nil
  374. }