prod.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  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, 0x1a, 0x0c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f,
  236. 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
  237. 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
  238. 0x28, 0x05, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x70, 0x72,
  239. 0x6f, 0x64, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e,
  240. 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x41, 0x72, 0x65,
  241. 0x61, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x41, 0x72, 0x65, 0x61, 0x22, 0x2d, 0x0a, 0x0c, 0x50,
  242. 0x72, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70,
  243. 0x72, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
  244. 0x09, 0x70, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x45, 0x0a, 0x0f, 0x51, 0x75,
  245. 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x16, 0x0a,
  246. 0x06, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70,
  247. 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,
  248. 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,
  249. 0x65, 0x22, 0x41, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x4c, 0x69,
  250. 0x73, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x18, 0x01, 0x20,
  251. 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50,
  252. 0x72, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f,
  253. 0x64, 0x52, 0x65, 0x73, 0x2a, 0x1f, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x41, 0x72, 0x65, 0x61,
  254. 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x05,
  255. 0x0a, 0x01, 0x43, 0x10, 0x02, 0x32, 0xec, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x65,
  256. 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64,
  257. 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
  258. 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73,
  259. 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70,
  260. 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76,
  261. 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x7d,
  262. 0x12, 0x45, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b,
  263. 0x73, 0x12, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x51, 0x75, 0x65,
  264. 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x17, 0x2e, 0x73,
  265. 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x53, 0x74, 0x6f, 0x63,
  266. 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x72,
  267. 0x6f, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
  268. 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e,
  269. 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x4d, 0x6f, 0x64,
  270. 0x65, 0x6c, 0x22, 0x00, 0x42, 0x07, 0x5a, 0x05, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x62, 0x06, 0x70,
  271. 0x72, 0x6f, 0x74, 0x6f, 0x33,
  272. }
  273. var (
  274. file_prod_proto_rawDescOnce sync.Once
  275. file_prod_proto_rawDescData = file_prod_proto_rawDesc
  276. )
  277. func file_prod_proto_rawDescGZIP() []byte {
  278. file_prod_proto_rawDescOnce.Do(func() {
  279. file_prod_proto_rawDescData = protoimpl.X.CompressGZIP(file_prod_proto_rawDescData)
  280. })
  281. return file_prod_proto_rawDescData
  282. }
  283. var file_prod_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  284. var file_prod_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  285. var file_prod_proto_goTypes = []interface{}{
  286. (ProdArea)(0), // 0: services.ProdArea
  287. (*ProdRequest)(nil), // 1: services.ProdRequest
  288. (*ProdResponse)(nil), // 2: services.ProdResponse
  289. (*QueryProdStocks)(nil), // 3: services.QueryProdStocks
  290. (*ProdStockList)(nil), // 4: services.ProdStockList
  291. (*ProdModel)(nil), // 5: services.ProdModel
  292. }
  293. var file_prod_proto_depIdxs = []int32{
  294. 0, // 0: services.ProdRequest.prod_area:type_name -> services.ProdArea
  295. 2, // 1: services.ProdStockList.prodRes:type_name -> services.ProdResponse
  296. 1, // 2: services.ProdService.GetProdStock:input_type -> services.ProdRequest
  297. 3, // 3: services.ProdService.GetProdStocks:input_type -> services.QueryProdStocks
  298. 1, // 4: services.ProdService.GetProdInfo:input_type -> services.ProdRequest
  299. 2, // 5: services.ProdService.GetProdStock:output_type -> services.ProdResponse
  300. 4, // 6: services.ProdService.GetProdStocks:output_type -> services.ProdStockList
  301. 5, // 7: services.ProdService.GetProdInfo:output_type -> services.ProdModel
  302. 5, // [5:8] is the sub-list for method output_type
  303. 2, // [2:5] is the sub-list for method input_type
  304. 2, // [2:2] is the sub-list for extension type_name
  305. 2, // [2:2] is the sub-list for extension extendee
  306. 0, // [0:2] is the sub-list for field type_name
  307. }
  308. func init() { file_prod_proto_init() }
  309. func file_prod_proto_init() {
  310. if File_prod_proto != nil {
  311. return
  312. }
  313. file_models_proto_init()
  314. if !protoimpl.UnsafeEnabled {
  315. file_prod_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  316. switch v := v.(*ProdRequest); i {
  317. case 0:
  318. return &v.state
  319. case 1:
  320. return &v.sizeCache
  321. case 2:
  322. return &v.unknownFields
  323. default:
  324. return nil
  325. }
  326. }
  327. file_prod_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  328. switch v := v.(*ProdResponse); i {
  329. case 0:
  330. return &v.state
  331. case 1:
  332. return &v.sizeCache
  333. case 2:
  334. return &v.unknownFields
  335. default:
  336. return nil
  337. }
  338. }
  339. file_prod_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  340. switch v := v.(*QueryProdStocks); i {
  341. case 0:
  342. return &v.state
  343. case 1:
  344. return &v.sizeCache
  345. case 2:
  346. return &v.unknownFields
  347. default:
  348. return nil
  349. }
  350. }
  351. file_prod_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  352. switch v := v.(*ProdStockList); i {
  353. case 0:
  354. return &v.state
  355. case 1:
  356. return &v.sizeCache
  357. case 2:
  358. return &v.unknownFields
  359. default:
  360. return nil
  361. }
  362. }
  363. }
  364. type x struct{}
  365. out := protoimpl.TypeBuilder{
  366. File: protoimpl.DescBuilder{
  367. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  368. RawDescriptor: file_prod_proto_rawDesc,
  369. NumEnums: 1,
  370. NumMessages: 4,
  371. NumExtensions: 0,
  372. NumServices: 1,
  373. },
  374. GoTypes: file_prod_proto_goTypes,
  375. DependencyIndexes: file_prod_proto_depIdxs,
  376. EnumInfos: file_prod_proto_enumTypes,
  377. MessageInfos: file_prod_proto_msgTypes,
  378. }.Build()
  379. File_prod_proto = out.File
  380. file_prod_proto_rawDesc = nil
  381. file_prod_proto_goTypes = nil
  382. file_prod_proto_depIdxs = nil
  383. }