Files
stocklet/internal/pkg/protogen/events/v1/warehouse.pb.go
2024-04-16 22:27:52 +01:00

672 lines
27 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.31.0
// protoc (unknown)
// source: stocklet/events/v1/warehouse.proto
package events_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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 StockReservationEvent_Type int32
const (
StockReservationEvent_TYPE_UNSPECIFIED StockReservationEvent_Type = 0
StockReservationEvent_TYPE_INSUFFICIENT_STOCK StockReservationEvent_Type = 1
StockReservationEvent_TYPE_STOCK_RESERVED StockReservationEvent_Type = 2
StockReservationEvent_TYPE_STOCK_RETURNED StockReservationEvent_Type = 3
StockReservationEvent_TYPE_STOCK_CONSUMED StockReservationEvent_Type = 4
)
// Enum value maps for StockReservationEvent_Type.
var (
StockReservationEvent_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "TYPE_INSUFFICIENT_STOCK",
2: "TYPE_STOCK_RESERVED",
3: "TYPE_STOCK_RETURNED",
4: "TYPE_STOCK_CONSUMED",
}
StockReservationEvent_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"TYPE_INSUFFICIENT_STOCK": 1,
"TYPE_STOCK_RESERVED": 2,
"TYPE_STOCK_RETURNED": 3,
"TYPE_STOCK_CONSUMED": 4,
}
)
func (x StockReservationEvent_Type) Enum() *StockReservationEvent_Type {
p := new(StockReservationEvent_Type)
*p = x
return p
}
func (x StockReservationEvent_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (StockReservationEvent_Type) Descriptor() protoreflect.EnumDescriptor {
return file_stocklet_events_v1_warehouse_proto_enumTypes[0].Descriptor()
}
func (StockReservationEvent_Type) Type() protoreflect.EnumType {
return &file_stocklet_events_v1_warehouse_proto_enumTypes[0]
}
func (x StockReservationEvent_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use StockReservationEvent_Type.Descriptor instead.
func (StockReservationEvent_Type) EnumDescriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{3, 0}
}
type StockCreatedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Quantity int32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
}
func (x *StockCreatedEvent) Reset() {
*x = StockCreatedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockCreatedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockCreatedEvent) ProtoMessage() {}
func (x *StockCreatedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockCreatedEvent.ProtoReflect.Descriptor instead.
func (*StockCreatedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{0}
}
func (x *StockCreatedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *StockCreatedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *StockCreatedEvent) GetQuantity() int32 {
if x != nil {
return x.Quantity
}
return 0
}
type StockAddedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Amount int32 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
// If the stock is returned as a result of a stock reservation outcome,
// then the reservation id will be included for reference.
ReservationId *string `protobuf:"bytes,4,opt,name=reservation_id,json=reservationId,proto3,oneof" json:"reservation_id,omitempty"`
}
func (x *StockAddedEvent) Reset() {
*x = StockAddedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockAddedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockAddedEvent) ProtoMessage() {}
func (x *StockAddedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockAddedEvent.ProtoReflect.Descriptor instead.
func (*StockAddedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{1}
}
func (x *StockAddedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *StockAddedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *StockAddedEvent) GetAmount() int32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *StockAddedEvent) GetReservationId() string {
if x != nil && x.ReservationId != nil {
return *x.ReservationId
}
return ""
}
type StockRemovedEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
Amount int32 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
// If the stock is removed as a result of a stock reservation being closed,
// then the reservation id will be included for reference.
ReservationId *string `protobuf:"bytes,4,opt,name=reservation_id,json=reservationId,proto3,oneof" json:"reservation_id,omitempty"`
}
func (x *StockRemovedEvent) Reset() {
*x = StockRemovedEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockRemovedEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockRemovedEvent) ProtoMessage() {}
func (x *StockRemovedEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockRemovedEvent.ProtoReflect.Descriptor instead.
func (*StockRemovedEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{2}
}
func (x *StockRemovedEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *StockRemovedEvent) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *StockRemovedEvent) GetAmount() int32 {
if x != nil {
return x.Amount
}
return 0
}
func (x *StockRemovedEvent) GetReservationId() string {
if x != nil && x.ReservationId != nil {
return *x.ReservationId
}
return ""
}
type StockReservationEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
Type StockReservationEvent_Type `protobuf:"varint,2,opt,name=type,proto3,enum=stocklet.events.v1.StockReservationEvent_Type" json:"type,omitempty"`
OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
OrderMetadata *StockReservationEvent_OrderMetadata `protobuf:"bytes,4,opt,name=order_metadata,json=orderMetadata,proto3" json:"order_metadata,omitempty"`
ReservationId string `protobuf:"bytes,5,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"` // provided with type enum value 2+
ReservationStock map[string]int32 `protobuf:"bytes,6,rep,name=reservation_stock,json=reservationStock,proto3" json:"reservation_stock,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // Product ID: Quantity (provided with type enum value 2+)
InsufficientStock []string `protobuf:"bytes,7,rep,name=insufficient_stock,json=insufficientStock,proto3" json:"insufficient_stock,omitempty"` // Product IDs (only provided with TYPE_INSUFFICIENT_STOCK)
}
func (x *StockReservationEvent) Reset() {
*x = StockReservationEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockReservationEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockReservationEvent) ProtoMessage() {}
func (x *StockReservationEvent) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockReservationEvent.ProtoReflect.Descriptor instead.
func (*StockReservationEvent) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{3}
}
func (x *StockReservationEvent) GetRevision() int32 {
if x != nil {
return x.Revision
}
return 0
}
func (x *StockReservationEvent) GetType() StockReservationEvent_Type {
if x != nil {
return x.Type
}
return StockReservationEvent_TYPE_UNSPECIFIED
}
func (x *StockReservationEvent) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *StockReservationEvent) GetOrderMetadata() *StockReservationEvent_OrderMetadata {
if x != nil {
return x.OrderMetadata
}
return nil
}
func (x *StockReservationEvent) GetReservationId() string {
if x != nil {
return x.ReservationId
}
return ""
}
func (x *StockReservationEvent) GetReservationStock() map[string]int32 {
if x != nil {
return x.ReservationStock
}
return nil
}
func (x *StockReservationEvent) GetInsufficientStock() []string {
if x != nil {
return x.InsufficientStock
}
return nil
}
type StockReservationEvent_OrderMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
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"`
}
func (x *StockReservationEvent_OrderMetadata) Reset() {
*x = StockReservationEvent_OrderMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StockReservationEvent_OrderMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StockReservationEvent_OrderMetadata) ProtoMessage() {}
func (x *StockReservationEvent_OrderMetadata) ProtoReflect() protoreflect.Message {
mi := &file_stocklet_events_v1_warehouse_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StockReservationEvent_OrderMetadata.ProtoReflect.Descriptor instead.
func (*StockReservationEvent_OrderMetadata) Descriptor() ([]byte, []int) {
return file_stocklet_events_v1_warehouse_proto_rawDescGZIP(), []int{3, 0}
}
func (x *StockReservationEvent_OrderMetadata) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
func (x *StockReservationEvent_OrderMetadata) GetItemsPrice() float32 {
if x != nil {
return x.ItemsPrice
}
return 0
}
func (x *StockReservationEvent_OrderMetadata) GetTotalPrice() float32 {
if x != nil {
return x.TotalPrice
}
return 0
}
var File_stocklet_events_v1_warehouse_proto protoreflect.FileDescriptor
var file_stocklet_events_v1_warehouse_proto_rawDesc = []byte{
0x0a, 0x22, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x6a, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x63,
0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f,
0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x22, 0xa3, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x41, 0x64,
0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0e, 0x72,
0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x73, 0x65,
0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x11, 0x53,
0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a,
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61,
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x72,
0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42,
0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x69, 0x64, 0x22, 0xf6, 0x05, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x65,
0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08,
0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65,
0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x63,
0x6b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x5e, 0x0a, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72,
0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x37, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72,
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72,
0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x6c,
0x0a, 0x11, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74,
0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x73, 0x74, 0x6f, 0x63,
0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53,
0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x53, 0x74, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, 0x65, 0x73, 0x65,
0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x2d, 0x0a, 0x12,
0x69, 0x6e, 0x73, 0x75, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x6f,
0x63, 0x6b, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x69, 0x6e, 0x73, 0x75, 0x66, 0x66,
0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x1a, 0x72, 0x0a, 0x0d, 0x4f,
0x72, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a,
0x0b, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x02, 0x52, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1f,
0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x02, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a,
0x43, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55,
0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x4f, 0x43, 0x4b, 0x10, 0x01,
0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x43, 0x4b, 0x5f, 0x52,
0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x53, 0x54, 0x4f, 0x43, 0x4b, 0x5f, 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x45, 0x44,
0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x43, 0x4b,
0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x55, 0x4d, 0x45, 0x44, 0x10, 0x04, 0x42, 0x47, 0x5a, 0x45, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x65, 0x78, 0x6f, 0x6c, 0x61,
0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e,
0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_stocklet_events_v1_warehouse_proto_rawDescOnce sync.Once
file_stocklet_events_v1_warehouse_proto_rawDescData = file_stocklet_events_v1_warehouse_proto_rawDesc
)
func file_stocklet_events_v1_warehouse_proto_rawDescGZIP() []byte {
file_stocklet_events_v1_warehouse_proto_rawDescOnce.Do(func() {
file_stocklet_events_v1_warehouse_proto_rawDescData = protoimpl.X.CompressGZIP(file_stocklet_events_v1_warehouse_proto_rawDescData)
})
return file_stocklet_events_v1_warehouse_proto_rawDescData
}
var file_stocklet_events_v1_warehouse_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_stocklet_events_v1_warehouse_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_stocklet_events_v1_warehouse_proto_goTypes = []interface{}{
(StockReservationEvent_Type)(0), // 0: stocklet.events.v1.StockReservationEvent.Type
(*StockCreatedEvent)(nil), // 1: stocklet.events.v1.StockCreatedEvent
(*StockAddedEvent)(nil), // 2: stocklet.events.v1.StockAddedEvent
(*StockRemovedEvent)(nil), // 3: stocklet.events.v1.StockRemovedEvent
(*StockReservationEvent)(nil), // 4: stocklet.events.v1.StockReservationEvent
(*StockReservationEvent_OrderMetadata)(nil), // 5: stocklet.events.v1.StockReservationEvent.OrderMetadata
nil, // 6: stocklet.events.v1.StockReservationEvent.ReservationStockEntry
}
var file_stocklet_events_v1_warehouse_proto_depIdxs = []int32{
0, // 0: stocklet.events.v1.StockReservationEvent.type:type_name -> stocklet.events.v1.StockReservationEvent.Type
5, // 1: stocklet.events.v1.StockReservationEvent.order_metadata:type_name -> stocklet.events.v1.StockReservationEvent.OrderMetadata
6, // 2: stocklet.events.v1.StockReservationEvent.reservation_stock:type_name -> stocklet.events.v1.StockReservationEvent.ReservationStockEntry
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_stocklet_events_v1_warehouse_proto_init() }
func file_stocklet_events_v1_warehouse_proto_init() {
if File_stocklet_events_v1_warehouse_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stocklet_events_v1_warehouse_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockCreatedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockAddedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockRemovedEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockReservationEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StockReservationEvent_OrderMetadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_stocklet_events_v1_warehouse_proto_msgTypes[1].OneofWrappers = []interface{}{}
file_stocklet_events_v1_warehouse_proto_msgTypes[2].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stocklet_events_v1_warehouse_proto_rawDesc,
NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_stocklet_events_v1_warehouse_proto_goTypes,
DependencyIndexes: file_stocklet_events_v1_warehouse_proto_depIdxs,
EnumInfos: file_stocklet_events_v1_warehouse_proto_enumTypes,
MessageInfos: file_stocklet_events_v1_warehouse_proto_msgTypes,
}.Build()
File_stocklet_events_v1_warehouse_proto = out.File
file_stocklet_events_v1_warehouse_proto_rawDesc = nil
file_stocklet_events_v1_warehouse_proto_goTypes = nil
file_stocklet_events_v1_warehouse_proto_depIdxs = nil
}