mirror of
https://github.com/hexolan/stocklet.git
synced 2026-12-01 03:09:10 +00:00
d05489c01b
Signed-off-by: Declan Teevan <dt@hexolan.com>
399 lines
15 KiB
Go
399 lines
15 KiB
Go
// 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 <https://www.gnu.org/licenses/>.
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.12
|
|
// protoc (unknown)
|
|
// source: stocklet/events/v1/shipping.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)
|
|
)
|
|
|
|
type ShipmentAllocationEvent_Type int32
|
|
|
|
const (
|
|
ShipmentAllocationEvent_TYPE_UNSPECIFIED ShipmentAllocationEvent_Type = 0
|
|
ShipmentAllocationEvent_TYPE_FAILED ShipmentAllocationEvent_Type = 1
|
|
ShipmentAllocationEvent_TYPE_ALLOCATED ShipmentAllocationEvent_Type = 2
|
|
ShipmentAllocationEvent_TYPE_ALLOCATION_RELEASED ShipmentAllocationEvent_Type = 3
|
|
)
|
|
|
|
// Enum value maps for ShipmentAllocationEvent_Type.
|
|
var (
|
|
ShipmentAllocationEvent_Type_name = map[int32]string{
|
|
0: "TYPE_UNSPECIFIED",
|
|
1: "TYPE_FAILED",
|
|
2: "TYPE_ALLOCATED",
|
|
3: "TYPE_ALLOCATION_RELEASED",
|
|
}
|
|
ShipmentAllocationEvent_Type_value = map[string]int32{
|
|
"TYPE_UNSPECIFIED": 0,
|
|
"TYPE_FAILED": 1,
|
|
"TYPE_ALLOCATED": 2,
|
|
"TYPE_ALLOCATION_RELEASED": 3,
|
|
}
|
|
)
|
|
|
|
func (x ShipmentAllocationEvent_Type) Enum() *ShipmentAllocationEvent_Type {
|
|
p := new(ShipmentAllocationEvent_Type)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x ShipmentAllocationEvent_Type) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (ShipmentAllocationEvent_Type) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_stocklet_events_v1_shipping_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (ShipmentAllocationEvent_Type) Type() protoreflect.EnumType {
|
|
return &file_stocklet_events_v1_shipping_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x ShipmentAllocationEvent_Type) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use ShipmentAllocationEvent_Type.Descriptor instead.
|
|
func (ShipmentAllocationEvent_Type) EnumDescriptor() ([]byte, []int) {
|
|
return file_stocklet_events_v1_shipping_proto_rawDescGZIP(), []int{0, 0}
|
|
}
|
|
|
|
type ShipmentAllocationEvent struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
|
|
Type ShipmentAllocationEvent_Type `protobuf:"varint,2,opt,name=type,proto3,enum=stocklet.events.v1.ShipmentAllocationEvent_Type" json:"type,omitempty"`
|
|
OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
|
|
OrderMetadata *ShipmentAllocationEvent_OrderMetadata `protobuf:"bytes,4,opt,name=order_metadata,json=orderMetadata,proto3" json:"order_metadata,omitempty"`
|
|
ShipmentId string `protobuf:"bytes,5,opt,name=shipment_id,json=shipmentId,proto3" json:"shipment_id,omitempty"` // provided with type enum value 2+
|
|
ProductQuantities map[string]int32 `protobuf:"bytes,6,rep,name=product_quantities,json=productQuantities,proto3" json:"product_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent) Reset() {
|
|
*x = ShipmentAllocationEvent{}
|
|
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ShipmentAllocationEvent) ProtoMessage() {}
|
|
|
|
func (x *ShipmentAllocationEvent) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_events_v1_shipping_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 ShipmentAllocationEvent.ProtoReflect.Descriptor instead.
|
|
func (*ShipmentAllocationEvent) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_events_v1_shipping_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent) GetRevision() int32 {
|
|
if x != nil {
|
|
return x.Revision
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent) GetType() ShipmentAllocationEvent_Type {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return ShipmentAllocationEvent_TYPE_UNSPECIFIED
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent) GetOrderId() string {
|
|
if x != nil {
|
|
return x.OrderId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent) GetOrderMetadata() *ShipmentAllocationEvent_OrderMetadata {
|
|
if x != nil {
|
|
return x.OrderMetadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent) GetShipmentId() string {
|
|
if x != nil {
|
|
return x.ShipmentId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent) GetProductQuantities() map[string]int32 {
|
|
if x != nil {
|
|
return x.ProductQuantities
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ShipmentDispatchedEvent struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
|
|
ShipmentId string `protobuf:"bytes,2,opt,name=shipment_id,json=shipmentId,proto3" json:"shipment_id,omitempty"`
|
|
OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
|
|
ProductQuantities map[string]int32 `protobuf:"bytes,4,rep,name=product_quantities,json=productQuantities,proto3" json:"product_quantities,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ShipmentDispatchedEvent) Reset() {
|
|
*x = ShipmentDispatchedEvent{}
|
|
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ShipmentDispatchedEvent) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ShipmentDispatchedEvent) ProtoMessage() {}
|
|
|
|
func (x *ShipmentDispatchedEvent) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_events_v1_shipping_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 ShipmentDispatchedEvent.ProtoReflect.Descriptor instead.
|
|
func (*ShipmentDispatchedEvent) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_events_v1_shipping_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *ShipmentDispatchedEvent) GetRevision() int32 {
|
|
if x != nil {
|
|
return x.Revision
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ShipmentDispatchedEvent) GetShipmentId() string {
|
|
if x != nil {
|
|
return x.ShipmentId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ShipmentDispatchedEvent) GetOrderId() string {
|
|
if x != nil {
|
|
return x.OrderId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ShipmentDispatchedEvent) GetProductQuantities() map[string]int32 {
|
|
if x != nil {
|
|
return x.ProductQuantities
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ShipmentAllocationEvent_OrderMetadata struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
|
|
ItemsPrice float32 `protobuf:"fixed32,2,opt,name=items_price,json=itemsPrice,proto3" json:"items_price,omitempty"`
|
|
TotalPrice float32 `protobuf:"fixed32,3,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent_OrderMetadata) Reset() {
|
|
*x = ShipmentAllocationEvent_OrderMetadata{}
|
|
mi := &file_stocklet_events_v1_shipping_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent_OrderMetadata) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ShipmentAllocationEvent_OrderMetadata) ProtoMessage() {}
|
|
|
|
func (x *ShipmentAllocationEvent_OrderMetadata) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_events_v1_shipping_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 ShipmentAllocationEvent_OrderMetadata.ProtoReflect.Descriptor instead.
|
|
func (*ShipmentAllocationEvent_OrderMetadata) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_events_v1_shipping_proto_rawDescGZIP(), []int{0, 0}
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent_OrderMetadata) GetCustomerId() string {
|
|
if x != nil {
|
|
return x.CustomerId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent_OrderMetadata) GetItemsPrice() float32 {
|
|
if x != nil {
|
|
return x.ItemsPrice
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ShipmentAllocationEvent_OrderMetadata) GetTotalPrice() float32 {
|
|
if x != nil {
|
|
return x.TotalPrice
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_stocklet_events_v1_shipping_proto protoreflect.FileDescriptor
|
|
|
|
const file_stocklet_events_v1_shipping_proto_rawDesc = "" +
|
|
"\n" +
|
|
"!stocklet/events/v1/shipping.proto\x12\x12stocklet.events.v1\"\xa7\x05\n" +
|
|
"\x17ShipmentAllocationEvent\x12\x1a\n" +
|
|
"\brevision\x18\x01 \x01(\x05R\brevision\x12D\n" +
|
|
"\x04type\x18\x02 \x01(\x0e20.stocklet.events.v1.ShipmentAllocationEvent.TypeR\x04type\x12\x19\n" +
|
|
"\border_id\x18\x03 \x01(\tR\aorderId\x12`\n" +
|
|
"\x0eorder_metadata\x18\x04 \x01(\v29.stocklet.events.v1.ShipmentAllocationEvent.OrderMetadataR\rorderMetadata\x12\x1f\n" +
|
|
"\vshipment_id\x18\x05 \x01(\tR\n" +
|
|
"shipmentId\x12q\n" +
|
|
"\x12product_quantities\x18\x06 \x03(\v2B.stocklet.events.v1.ShipmentAllocationEvent.ProductQuantitiesEntryR\x11productQuantities\x1ar\n" +
|
|
"\rOrderMetadata\x12\x1f\n" +
|
|
"\vcustomer_id\x18\x01 \x01(\tR\n" +
|
|
"customerId\x12\x1f\n" +
|
|
"\vitems_price\x18\x02 \x01(\x02R\n" +
|
|
"itemsPrice\x12\x1f\n" +
|
|
"\vtotal_price\x18\x03 \x01(\x02R\n" +
|
|
"totalPrice\x1aD\n" +
|
|
"\x16ProductQuantitiesEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"_\n" +
|
|
"\x04Type\x12\x14\n" +
|
|
"\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n" +
|
|
"\vTYPE_FAILED\x10\x01\x12\x12\n" +
|
|
"\x0eTYPE_ALLOCATED\x10\x02\x12\x1c\n" +
|
|
"\x18TYPE_ALLOCATION_RELEASED\x10\x03\"\xaa\x02\n" +
|
|
"\x17ShipmentDispatchedEvent\x12\x1a\n" +
|
|
"\brevision\x18\x01 \x01(\x05R\brevision\x12\x1f\n" +
|
|
"\vshipment_id\x18\x02 \x01(\tR\n" +
|
|
"shipmentId\x12\x19\n" +
|
|
"\border_id\x18\x03 \x01(\tR\aorderId\x12q\n" +
|
|
"\x12product_quantities\x18\x04 \x03(\v2B.stocklet.events.v1.ShipmentDispatchedEvent.ProductQuantitiesEntryR\x11productQuantities\x1aD\n" +
|
|
"\x16ProductQuantitiesEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01BGZEgithub.com/hexolan/stocklet/internal/pkg/protogen/events/v1;events_v1b\x06proto3"
|
|
|
|
var (
|
|
file_stocklet_events_v1_shipping_proto_rawDescOnce sync.Once
|
|
file_stocklet_events_v1_shipping_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_stocklet_events_v1_shipping_proto_rawDescGZIP() []byte {
|
|
file_stocklet_events_v1_shipping_proto_rawDescOnce.Do(func() {
|
|
file_stocklet_events_v1_shipping_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_stocklet_events_v1_shipping_proto_rawDesc), len(file_stocklet_events_v1_shipping_proto_rawDesc)))
|
|
})
|
|
return file_stocklet_events_v1_shipping_proto_rawDescData
|
|
}
|
|
|
|
var file_stocklet_events_v1_shipping_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_stocklet_events_v1_shipping_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
var file_stocklet_events_v1_shipping_proto_goTypes = []any{
|
|
(ShipmentAllocationEvent_Type)(0), // 0: stocklet.events.v1.ShipmentAllocationEvent.Type
|
|
(*ShipmentAllocationEvent)(nil), // 1: stocklet.events.v1.ShipmentAllocationEvent
|
|
(*ShipmentDispatchedEvent)(nil), // 2: stocklet.events.v1.ShipmentDispatchedEvent
|
|
(*ShipmentAllocationEvent_OrderMetadata)(nil), // 3: stocklet.events.v1.ShipmentAllocationEvent.OrderMetadata
|
|
nil, // 4: stocklet.events.v1.ShipmentAllocationEvent.ProductQuantitiesEntry
|
|
nil, // 5: stocklet.events.v1.ShipmentDispatchedEvent.ProductQuantitiesEntry
|
|
}
|
|
var file_stocklet_events_v1_shipping_proto_depIdxs = []int32{
|
|
0, // 0: stocklet.events.v1.ShipmentAllocationEvent.type:type_name -> stocklet.events.v1.ShipmentAllocationEvent.Type
|
|
3, // 1: stocklet.events.v1.ShipmentAllocationEvent.order_metadata:type_name -> stocklet.events.v1.ShipmentAllocationEvent.OrderMetadata
|
|
4, // 2: stocklet.events.v1.ShipmentAllocationEvent.product_quantities:type_name -> stocklet.events.v1.ShipmentAllocationEvent.ProductQuantitiesEntry
|
|
5, // 3: stocklet.events.v1.ShipmentDispatchedEvent.product_quantities:type_name -> stocklet.events.v1.ShipmentDispatchedEvent.ProductQuantitiesEntry
|
|
4, // [4:4] is the sub-list for method output_type
|
|
4, // [4:4] is the sub-list for method input_type
|
|
4, // [4:4] is the sub-list for extension type_name
|
|
4, // [4:4] is the sub-list for extension extendee
|
|
0, // [0:4] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_stocklet_events_v1_shipping_proto_init() }
|
|
func file_stocklet_events_v1_shipping_proto_init() {
|
|
if File_stocklet_events_v1_shipping_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_stocklet_events_v1_shipping_proto_rawDesc), len(file_stocklet_events_v1_shipping_proto_rawDesc)),
|
|
NumEnums: 1,
|
|
NumMessages: 5,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_stocklet_events_v1_shipping_proto_goTypes,
|
|
DependencyIndexes: file_stocklet_events_v1_shipping_proto_depIdxs,
|
|
EnumInfos: file_stocklet_events_v1_shipping_proto_enumTypes,
|
|
MessageInfos: file_stocklet_events_v1_shipping_proto_msgTypes,
|
|
}.Build()
|
|
File_stocklet_events_v1_shipping_proto = out.File
|
|
file_stocklet_events_v1_shipping_proto_goTypes = nil
|
|
file_stocklet_events_v1_shipping_proto_depIdxs = nil
|
|
}
|