// Copyright (C) 2024 Declan Teevan // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.12 // protoc (unknown) // source: stocklet/events/v1/order.proto package events_v1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // Order Status = processing type OrderCreatedEvent struct { state protoimpl.MessageState `protogen:"open.v1"` Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` CustomerId string `protobuf:"bytes,3,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` ItemQuantities map[string]int32 `protobuf:"bytes,4,rep,name=item_quantities,json=itemQuantities,proto3" json:"item_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *OrderCreatedEvent) Reset() { *x = OrderCreatedEvent{} mi := &file_stocklet_events_v1_order_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *OrderCreatedEvent) String() string { return protoimpl.X.MessageStringOf(x) } func (*OrderCreatedEvent) ProtoMessage() {} func (x *OrderCreatedEvent) ProtoReflect() protoreflect.Message { mi := &file_stocklet_events_v1_order_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OrderCreatedEvent.ProtoReflect.Descriptor instead. func (*OrderCreatedEvent) Descriptor() ([]byte, []int) { return file_stocklet_events_v1_order_proto_rawDescGZIP(), []int{0} } func (x *OrderCreatedEvent) GetRevision() int32 { if x != nil { return x.Revision } return 0 } func (x *OrderCreatedEvent) GetOrderId() string { if x != nil { return x.OrderId } return "" } func (x *OrderCreatedEvent) GetCustomerId() string { if x != nil { return x.CustomerId } return "" } func (x *OrderCreatedEvent) GetItemQuantities() map[string]int32 { if x != nil { return x.ItemQuantities } return nil } // Order Status = pending type OrderPendingEvent struct { state protoimpl.MessageState `protogen:"open.v1"` Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` CustomerId string `protobuf:"bytes,3,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` ItemQuantities map[string]int32 `protobuf:"bytes,4,rep,name=item_quantities,json=itemQuantities,proto3" json:"item_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` ItemsPrice float32 `protobuf:"fixed32,5,opt,name=items_price,json=itemsPrice,proto3" json:"items_price,omitempty"` TotalPrice float32 `protobuf:"fixed32,6,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *OrderPendingEvent) Reset() { *x = OrderPendingEvent{} mi := &file_stocklet_events_v1_order_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *OrderPendingEvent) String() string { return protoimpl.X.MessageStringOf(x) } func (*OrderPendingEvent) ProtoMessage() {} func (x *OrderPendingEvent) ProtoReflect() protoreflect.Message { mi := &file_stocklet_events_v1_order_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OrderPendingEvent.ProtoReflect.Descriptor instead. func (*OrderPendingEvent) Descriptor() ([]byte, []int) { return file_stocklet_events_v1_order_proto_rawDescGZIP(), []int{1} } func (x *OrderPendingEvent) GetRevision() int32 { if x != nil { return x.Revision } return 0 } func (x *OrderPendingEvent) GetOrderId() string { if x != nil { return x.OrderId } return "" } func (x *OrderPendingEvent) GetCustomerId() string { if x != nil { return x.CustomerId } return "" } func (x *OrderPendingEvent) GetItemQuantities() map[string]int32 { if x != nil { return x.ItemQuantities } return nil } func (x *OrderPendingEvent) GetItemsPrice() float32 { if x != nil { return x.ItemsPrice } return 0 } func (x *OrderPendingEvent) GetTotalPrice() float32 { if x != nil { return x.TotalPrice } return 0 } // Order Status = rejected type OrderRejectedEvent struct { state protoimpl.MessageState `protogen:"open.v1"` Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` TransactionId *string `protobuf:"bytes,3,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"` ShippingId *string `protobuf:"bytes,4,opt,name=shipping_id,json=shippingId,proto3,oneof" json:"shipping_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *OrderRejectedEvent) Reset() { *x = OrderRejectedEvent{} mi := &file_stocklet_events_v1_order_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *OrderRejectedEvent) String() string { return protoimpl.X.MessageStringOf(x) } func (*OrderRejectedEvent) ProtoMessage() {} func (x *OrderRejectedEvent) ProtoReflect() protoreflect.Message { mi := &file_stocklet_events_v1_order_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OrderRejectedEvent.ProtoReflect.Descriptor instead. func (*OrderRejectedEvent) Descriptor() ([]byte, []int) { return file_stocklet_events_v1_order_proto_rawDescGZIP(), []int{2} } func (x *OrderRejectedEvent) GetRevision() int32 { if x != nil { return x.Revision } return 0 } func (x *OrderRejectedEvent) GetOrderId() string { if x != nil { return x.OrderId } return "" } func (x *OrderRejectedEvent) GetTransactionId() string { if x != nil && x.TransactionId != nil { return *x.TransactionId } return "" } func (x *OrderRejectedEvent) GetShippingId() string { if x != nil && x.ShippingId != nil { return *x.ShippingId } return "" } // Order Status = approved type OrderApprovedEvent struct { state protoimpl.MessageState `protogen:"open.v1"` Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` TransactionId string `protobuf:"bytes,3,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` ShippingId string `protobuf:"bytes,4,opt,name=shipping_id,json=shippingId,proto3" json:"shipping_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *OrderApprovedEvent) Reset() { *x = OrderApprovedEvent{} mi := &file_stocklet_events_v1_order_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *OrderApprovedEvent) String() string { return protoimpl.X.MessageStringOf(x) } func (*OrderApprovedEvent) ProtoMessage() {} func (x *OrderApprovedEvent) ProtoReflect() protoreflect.Message { mi := &file_stocklet_events_v1_order_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use OrderApprovedEvent.ProtoReflect.Descriptor instead. func (*OrderApprovedEvent) Descriptor() ([]byte, []int) { return file_stocklet_events_v1_order_proto_rawDescGZIP(), []int{3} } func (x *OrderApprovedEvent) GetRevision() int32 { if x != nil { return x.Revision } return 0 } func (x *OrderApprovedEvent) GetOrderId() string { if x != nil { return x.OrderId } return "" } func (x *OrderApprovedEvent) GetTransactionId() string { if x != nil { return x.TransactionId } return "" } func (x *OrderApprovedEvent) GetShippingId() string { if x != nil { return x.ShippingId } return "" } var File_stocklet_events_v1_order_proto protoreflect.FileDescriptor const file_stocklet_events_v1_order_proto_rawDesc = "" + "\n" + "\x1estocklet/events/v1/order.proto\x12\x12stocklet.events.v1\"\x92\x02\n" + "\x11OrderCreatedEvent\x12\x1a\n" + "\brevision\x18\x01 \x01(\x05R\brevision\x12\x19\n" + "\border_id\x18\x02 \x01(\tR\aorderId\x12\x1f\n" + "\vcustomer_id\x18\x03 \x01(\tR\n" + "customerId\x12b\n" + "\x0fitem_quantities\x18\x04 \x03(\v29.stocklet.events.v1.OrderCreatedEvent.ItemQuantitiesEntryR\x0eitemQuantities\x1aA\n" + "\x13ItemQuantitiesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"\xd4\x02\n" + "\x11OrderPendingEvent\x12\x1a\n" + "\brevision\x18\x01 \x01(\x05R\brevision\x12\x19\n" + "\border_id\x18\x02 \x01(\tR\aorderId\x12\x1f\n" + "\vcustomer_id\x18\x03 \x01(\tR\n" + "customerId\x12b\n" + "\x0fitem_quantities\x18\x04 \x03(\v29.stocklet.events.v1.OrderPendingEvent.ItemQuantitiesEntryR\x0eitemQuantities\x12\x1f\n" + "\vitems_price\x18\x05 \x01(\x02R\n" + "itemsPrice\x12\x1f\n" + "\vtotal_price\x18\x06 \x01(\x02R\n" + "totalPrice\x1aA\n" + "\x13ItemQuantitiesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"\xc0\x01\n" + "\x12OrderRejectedEvent\x12\x1a\n" + "\brevision\x18\x01 \x01(\x05R\brevision\x12\x19\n" + "\border_id\x18\x02 \x01(\tR\aorderId\x12*\n" + "\x0etransaction_id\x18\x03 \x01(\tH\x00R\rtransactionId\x88\x01\x01\x12$\n" + "\vshipping_id\x18\x04 \x01(\tH\x01R\n" + "shippingId\x88\x01\x01B\x11\n" + "\x0f_transaction_idB\x0e\n" + "\f_shipping_id\"\x93\x01\n" + "\x12OrderApprovedEvent\x12\x1a\n" + "\brevision\x18\x01 \x01(\x05R\brevision\x12\x19\n" + "\border_id\x18\x02 \x01(\tR\aorderId\x12%\n" + "\x0etransaction_id\x18\x03 \x01(\tR\rtransactionId\x12\x1f\n" + "\vshipping_id\x18\x04 \x01(\tR\n" + "shippingIdBGZEgithub.com/hexolan/stocklet/internal/pkg/protogen/events/v1;events_v1b\x06proto3" var ( file_stocklet_events_v1_order_proto_rawDescOnce sync.Once file_stocklet_events_v1_order_proto_rawDescData []byte ) func file_stocklet_events_v1_order_proto_rawDescGZIP() []byte { file_stocklet_events_v1_order_proto_rawDescOnce.Do(func() { file_stocklet_events_v1_order_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_stocklet_events_v1_order_proto_rawDesc), len(file_stocklet_events_v1_order_proto_rawDesc))) }) return file_stocklet_events_v1_order_proto_rawDescData } var file_stocklet_events_v1_order_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_stocklet_events_v1_order_proto_goTypes = []any{ (*OrderCreatedEvent)(nil), // 0: stocklet.events.v1.OrderCreatedEvent (*OrderPendingEvent)(nil), // 1: stocklet.events.v1.OrderPendingEvent (*OrderRejectedEvent)(nil), // 2: stocklet.events.v1.OrderRejectedEvent (*OrderApprovedEvent)(nil), // 3: stocklet.events.v1.OrderApprovedEvent nil, // 4: stocklet.events.v1.OrderCreatedEvent.ItemQuantitiesEntry nil, // 5: stocklet.events.v1.OrderPendingEvent.ItemQuantitiesEntry } var file_stocklet_events_v1_order_proto_depIdxs = []int32{ 4, // 0: stocklet.events.v1.OrderCreatedEvent.item_quantities:type_name -> stocklet.events.v1.OrderCreatedEvent.ItemQuantitiesEntry 5, // 1: stocklet.events.v1.OrderPendingEvent.item_quantities:type_name -> stocklet.events.v1.OrderPendingEvent.ItemQuantitiesEntry 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_stocklet_events_v1_order_proto_init() } func file_stocklet_events_v1_order_proto_init() { if File_stocklet_events_v1_order_proto != nil { return } file_stocklet_events_v1_order_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_stocklet_events_v1_order_proto_rawDesc), len(file_stocklet_events_v1_order_proto_rawDesc)), NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 0, }, GoTypes: file_stocklet_events_v1_order_proto_goTypes, DependencyIndexes: file_stocklet_events_v1_order_proto_depIdxs, MessageInfos: file_stocklet_events_v1_order_proto_msgTypes, }.Build() File_stocklet_events_v1_order_proto = out.File file_stocklet_events_v1_order_proto_goTypes = nil file_stocklet_events_v1_order_proto_depIdxs = nil }