// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.7 // protoc (unknown) // source: discount/service.proto package discount import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" 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 GetDiscountByIDRequest struct { state protoimpl.MessageState `protogen:"open.v1"` ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetDiscountByIDRequest) Reset() { *x = GetDiscountByIDRequest{} mi := &file_discount_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *GetDiscountByIDRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetDiscountByIDRequest) ProtoMessage() {} func (x *GetDiscountByIDRequest) ProtoReflect() protoreflect.Message { mi := &file_discount_service_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 GetDiscountByIDRequest.ProtoReflect.Descriptor instead. func (*GetDiscountByIDRequest) Descriptor() ([]byte, []int) { return file_discount_service_proto_rawDescGZIP(), []int{0} } func (x *GetDiscountByIDRequest) GetID() string { if x != nil { return x.ID } return "" } type ApplyDiscountRequest struct { state protoimpl.MessageState `protogen:"open.v1"` UserInformation *UserInformation `protobuf:"bytes,1,opt,name=UserInformation,proto3" json:"UserInformation,omitempty"` Products []*ProductInformation `protobuf:"bytes,2,rep,name=Products,proto3" json:"Products,omitempty"` Date *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Date,proto3" json:"Date,omitempty"` Coupon *string `protobuf:"bytes,4,opt,name=Coupon,proto3,oneof" json:"Coupon,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ApplyDiscountRequest) Reset() { *x = ApplyDiscountRequest{} mi := &file_discount_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ApplyDiscountRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ApplyDiscountRequest) ProtoMessage() {} func (x *ApplyDiscountRequest) ProtoReflect() protoreflect.Message { mi := &file_discount_service_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 ApplyDiscountRequest.ProtoReflect.Descriptor instead. func (*ApplyDiscountRequest) Descriptor() ([]byte, []int) { return file_discount_service_proto_rawDescGZIP(), []int{1} } func (x *ApplyDiscountRequest) GetUserInformation() *UserInformation { if x != nil { return x.UserInformation } return nil } func (x *ApplyDiscountRequest) GetProducts() []*ProductInformation { if x != nil { return x.Products } return nil } func (x *ApplyDiscountRequest) GetDate() *timestamppb.Timestamp { if x != nil { return x.Date } return nil } func (x *ApplyDiscountRequest) GetCoupon() string { if x != nil && x.Coupon != nil { return *x.Coupon } return "" } type ApplyDiscountResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Price uint64 `protobuf:"varint,1,opt,name=Price,proto3" json:"Price,omitempty"` AppliedDiscounts []*Discount `protobuf:"bytes,2,rep,name=AppliedDiscounts,proto3" json:"AppliedDiscounts,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ApplyDiscountResponse) Reset() { *x = ApplyDiscountResponse{} mi := &file_discount_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ApplyDiscountResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ApplyDiscountResponse) ProtoMessage() {} func (x *ApplyDiscountResponse) ProtoReflect() protoreflect.Message { mi := &file_discount_service_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 ApplyDiscountResponse.ProtoReflect.Descriptor instead. func (*ApplyDiscountResponse) Descriptor() ([]byte, []int) { return file_discount_service_proto_rawDescGZIP(), []int{2} } func (x *ApplyDiscountResponse) GetPrice() uint64 { if x != nil { return x.Price } return 0 } func (x *ApplyDiscountResponse) GetAppliedDiscounts() []*Discount { if x != nil { return x.AppliedDiscounts } return nil } type CreateDiscountRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Layer uint32 `protobuf:"varint,2,opt,name=Layer,proto3" json:"Layer,omitempty"` Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` Condition *DiscountCondition `protobuf:"bytes,4,opt,name=Condition,proto3" json:"Condition,omitempty"` Target *DiscountCalculationTarget `protobuf:"bytes,5,opt,name=Target,proto3" json:"Target,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *CreateDiscountRequest) Reset() { *x = CreateDiscountRequest{} mi := &file_discount_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *CreateDiscountRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateDiscountRequest) ProtoMessage() {} func (x *CreateDiscountRequest) ProtoReflect() protoreflect.Message { mi := &file_discount_service_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 CreateDiscountRequest.ProtoReflect.Descriptor instead. func (*CreateDiscountRequest) Descriptor() ([]byte, []int) { return file_discount_service_proto_rawDescGZIP(), []int{3} } func (x *CreateDiscountRequest) GetName() string { if x != nil { return x.Name } return "" } func (x *CreateDiscountRequest) GetLayer() uint32 { if x != nil { return x.Layer } return 0 } func (x *CreateDiscountRequest) GetDescription() string { if x != nil { return x.Description } return "" } func (x *CreateDiscountRequest) GetCondition() *DiscountCondition { if x != nil { return x.Condition } return nil } func (x *CreateDiscountRequest) GetTarget() *DiscountCalculationTarget { if x != nil { return x.Target } return nil } var File_discount_service_proto protoreflect.FileDescriptor const file_discount_service_proto_rawDesc = "" + "\n" + "\x16discount/service.proto\x12\bdiscount\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1ddiscount/discount.model.proto\"(\n" + "\x16GetDiscountByIDRequest\x12\x0e\n" + "\x02ID\x18\x01 \x01(\tR\x02ID\"\xed\x01\n" + "\x14ApplyDiscountRequest\x12C\n" + "\x0fUserInformation\x18\x01 \x01(\v2\x19.discount.UserInformationR\x0fUserInformation\x128\n" + "\bProducts\x18\x02 \x03(\v2\x1c.discount.ProductInformationR\bProducts\x12.\n" + "\x04Date\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x04Date\x12\x1b\n" + "\x06Coupon\x18\x04 \x01(\tH\x00R\x06Coupon\x88\x01\x01B\t\n" + "\a_Coupon\"m\n" + "\x15ApplyDiscountResponse\x12\x14\n" + "\x05Price\x18\x01 \x01(\x04R\x05Price\x12>\n" + "\x10AppliedDiscounts\x18\x02 \x03(\v2\x12.discount.DiscountR\x10AppliedDiscounts\"\xdb\x01\n" + "\x15CreateDiscountRequest\x12\x12\n" + "\x04Name\x18\x01 \x01(\tR\x04Name\x12\x14\n" + "\x05Layer\x18\x02 \x01(\rR\x05Layer\x12 \n" + "\vDescription\x18\x03 \x01(\tR\vDescription\x129\n" + "\tCondition\x18\x04 \x01(\v2\x1b.discount.DiscountConditionR\tCondition\x12;\n" + "\x06Target\x18\x05 \x01(\v2#.discount.DiscountCalculationTargetR\x06Target2\x80\a\n" + "\x0fDiscountService\x12R\n" + "\x0fGetAllDiscounts\x12\x16.google.protobuf.Empty\x1a\x13.discount.Discounts\"\x12\x82\xd3\xe4\x93\x02\f\x12\n" + "/discounts\x12f\n" + "\x10GetUserDiscounts\x12 .discount.GetDiscountByIDRequest\x1a\x13.discount.Discounts\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/discount/user/{ID}\x12i\n" + "\x12DetermineDiscounts\x12\x1e.discount.ApplyDiscountRequest\x1a\x13.discount.Discounts\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/discount/determine\x12m\n" + "\x0eApplyDiscounts\x12\x1e.discount.ApplyDiscountRequest\x1a\x1f.discount.ApplyDiscountResponse\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/discount/apply\x12_\n" + "\x0fGetDiscountByID\x12 .discount.GetDiscountByIDRequest\x1a\x12.discount.Discount\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/discount/{ID}\x12[\n" + "\x0eCreateDiscount\x12\x1f.discount.CreateDiscountRequest\x1a\x12.discount.Discount\"\x14\x82\xd3\xe4\x93\x02\x0e:\x01*\"\t/discount\x12\\\n" + "\x0fReplaceDiscount\x12\x1a.discount.DiscountOptional\x1a\x12.discount.Discount\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\x1a\x0e/discount/{ID}\x12[\n" + "\x0eUpdateDiscount\x12\x1a.discount.DiscountOptional\x1a\x12.discount.Discount\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*2\x0e/discount/{ID}\x12^\n" + "\x0eDeleteDiscount\x12 .discount.GetDiscountByIDRequest\x1a\x12.discount.Discount\"\x16\x82\xd3\xe4\x93\x02\x10*\x0e/discount/{ID}B\fZ\n" + "./discountb\x06proto3" var ( file_discount_service_proto_rawDescOnce sync.Once file_discount_service_proto_rawDescData []byte ) func file_discount_service_proto_rawDescGZIP() []byte { file_discount_service_proto_rawDescOnce.Do(func() { file_discount_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_discount_service_proto_rawDesc), len(file_discount_service_proto_rawDesc))) }) return file_discount_service_proto_rawDescData } var file_discount_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_discount_service_proto_goTypes = []any{ (*GetDiscountByIDRequest)(nil), // 0: discount.GetDiscountByIDRequest (*ApplyDiscountRequest)(nil), // 1: discount.ApplyDiscountRequest (*ApplyDiscountResponse)(nil), // 2: discount.ApplyDiscountResponse (*CreateDiscountRequest)(nil), // 3: discount.CreateDiscountRequest (*UserInformation)(nil), // 4: discount.UserInformation (*ProductInformation)(nil), // 5: discount.ProductInformation (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp (*Discount)(nil), // 7: discount.Discount (*DiscountCondition)(nil), // 8: discount.DiscountCondition (*DiscountCalculationTarget)(nil), // 9: discount.DiscountCalculationTarget (*emptypb.Empty)(nil), // 10: google.protobuf.Empty (*DiscountOptional)(nil), // 11: discount.DiscountOptional (*Discounts)(nil), // 12: discount.Discounts } var file_discount_service_proto_depIdxs = []int32{ 4, // 0: discount.ApplyDiscountRequest.UserInformation:type_name -> discount.UserInformation 5, // 1: discount.ApplyDiscountRequest.Products:type_name -> discount.ProductInformation 6, // 2: discount.ApplyDiscountRequest.Date:type_name -> google.protobuf.Timestamp 7, // 3: discount.ApplyDiscountResponse.AppliedDiscounts:type_name -> discount.Discount 8, // 4: discount.CreateDiscountRequest.Condition:type_name -> discount.DiscountCondition 9, // 5: discount.CreateDiscountRequest.Target:type_name -> discount.DiscountCalculationTarget 10, // 6: discount.DiscountService.GetAllDiscounts:input_type -> google.protobuf.Empty 0, // 7: discount.DiscountService.GetUserDiscounts:input_type -> discount.GetDiscountByIDRequest 1, // 8: discount.DiscountService.DetermineDiscounts:input_type -> discount.ApplyDiscountRequest 1, // 9: discount.DiscountService.ApplyDiscounts:input_type -> discount.ApplyDiscountRequest 0, // 10: discount.DiscountService.GetDiscountByID:input_type -> discount.GetDiscountByIDRequest 3, // 11: discount.DiscountService.CreateDiscount:input_type -> discount.CreateDiscountRequest 11, // 12: discount.DiscountService.ReplaceDiscount:input_type -> discount.DiscountOptional 11, // 13: discount.DiscountService.UpdateDiscount:input_type -> discount.DiscountOptional 0, // 14: discount.DiscountService.DeleteDiscount:input_type -> discount.GetDiscountByIDRequest 12, // 15: discount.DiscountService.GetAllDiscounts:output_type -> discount.Discounts 12, // 16: discount.DiscountService.GetUserDiscounts:output_type -> discount.Discounts 12, // 17: discount.DiscountService.DetermineDiscounts:output_type -> discount.Discounts 2, // 18: discount.DiscountService.ApplyDiscounts:output_type -> discount.ApplyDiscountResponse 7, // 19: discount.DiscountService.GetDiscountByID:output_type -> discount.Discount 7, // 20: discount.DiscountService.CreateDiscount:output_type -> discount.Discount 7, // 21: discount.DiscountService.ReplaceDiscount:output_type -> discount.Discount 7, // 22: discount.DiscountService.UpdateDiscount:output_type -> discount.Discount 7, // 23: discount.DiscountService.DeleteDiscount:output_type -> discount.Discount 15, // [15:24] is the sub-list for method output_type 6, // [6:15] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name } func init() { file_discount_service_proto_init() } func file_discount_service_proto_init() { if File_discount_service_proto != nil { return } file_discount_discount_model_proto_init() file_discount_service_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_discount_service_proto_rawDesc), len(file_discount_service_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_discount_service_proto_goTypes, DependencyIndexes: file_discount_service_proto_depIdxs, MessageInfos: file_discount_service_proto_msgTypes, }.Build() File_discount_service_proto = out.File file_discount_service_proto_goTypes = nil file_discount_service_proto_depIdxs = nil }