// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.7 // protoc (unknown) // source: broker/models.proto package broker 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 PrivilegeType int32 const ( PrivilegeType_Full PrivilegeType = 0 PrivilegeType_Day PrivilegeType = 1 PrivilegeType_Count PrivilegeType = 2 ) // Enum value maps for PrivilegeType. var ( PrivilegeType_name = map[int32]string{ 0: "Full", 1: "Day", 2: "Count", } PrivilegeType_value = map[string]int32{ "Full": 0, "Day": 1, "Count": 2, } ) func (x PrivilegeType) Enum() *PrivilegeType { p := new(PrivilegeType) *p = x return p } func (x PrivilegeType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (PrivilegeType) Descriptor() protoreflect.EnumDescriptor { return file_broker_models_proto_enumTypes[0].Descriptor() } func (PrivilegeType) Type() protoreflect.EnumType { return &file_broker_models_proto_enumTypes[0] } func (x PrivilegeType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use PrivilegeType.Descriptor instead. func (PrivilegeType) EnumDescriptor() ([]byte, []int) { return file_broker_models_proto_rawDescGZIP(), []int{0} } type PrivilegeMessage struct { state protoimpl.MessageState `protogen:"open.v1"` PrivilegeID string `protobuf:"bytes,1,opt,name=PrivilegeID,proto3" json:"PrivilegeID,omitempty"` ServiceKey string `protobuf:"bytes,2,opt,name=ServiceKey,proto3" json:"ServiceKey,omitempty"` Type PrivilegeType `protobuf:"varint,3,opt,name=Type,proto3,enum=broker.PrivilegeType" json:"Type,omitempty"` Value string `protobuf:"bytes,4,opt,name=Value,proto3" json:"Value,omitempty"` Amount uint64 `protobuf:"varint,5,opt,name=Amount,proto3" json:"Amount,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *PrivilegeMessage) Reset() { *x = PrivilegeMessage{} mi := &file_broker_models_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *PrivilegeMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*PrivilegeMessage) ProtoMessage() {} func (x *PrivilegeMessage) ProtoReflect() protoreflect.Message { mi := &file_broker_models_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 PrivilegeMessage.ProtoReflect.Descriptor instead. func (*PrivilegeMessage) Descriptor() ([]byte, []int) { return file_broker_models_proto_rawDescGZIP(), []int{0} } func (x *PrivilegeMessage) GetPrivilegeID() string { if x != nil { return x.PrivilegeID } return "" } func (x *PrivilegeMessage) GetServiceKey() string { if x != nil { return x.ServiceKey } return "" } func (x *PrivilegeMessage) GetType() PrivilegeType { if x != nil { return x.Type } return PrivilegeType_Full } func (x *PrivilegeMessage) GetValue() string { if x != nil { return x.Value } return "" } func (x *PrivilegeMessage) GetAmount() uint64 { if x != nil { return x.Amount } return 0 } type TariffMessage struct { state protoimpl.MessageState `protogen:"open.v1"` Privileges []*PrivilegeMessage `protobuf:"bytes,1,rep,name=Privileges,proto3" json:"Privileges,omitempty"` UserID string `protobuf:"bytes,2,opt,name=UserID,proto3" json:"UserID,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *TariffMessage) Reset() { *x = TariffMessage{} mi := &file_broker_models_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *TariffMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*TariffMessage) ProtoMessage() {} func (x *TariffMessage) ProtoReflect() protoreflect.Message { mi := &file_broker_models_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 TariffMessage.ProtoReflect.Descriptor instead. func (*TariffMessage) Descriptor() ([]byte, []int) { return file_broker_models_proto_rawDescGZIP(), []int{1} } func (x *TariffMessage) GetPrivileges() []*PrivilegeMessage { if x != nil { return x.Privileges } return nil } func (x *TariffMessage) GetUserID() string { if x != nil { return x.UserID } return "" } var File_broker_models_proto protoreflect.FileDescriptor const file_broker_models_proto_rawDesc = "" + "\n" + "\x13broker/models.proto\x12\x06broker\"\xad\x01\n" + "\x10PrivilegeMessage\x12 \n" + "\vPrivilegeID\x18\x01 \x01(\tR\vPrivilegeID\x12\x1e\n" + "\n" + "ServiceKey\x18\x02 \x01(\tR\n" + "ServiceKey\x12)\n" + "\x04Type\x18\x03 \x01(\x0e2\x15.broker.PrivilegeTypeR\x04Type\x12\x14\n" + "\x05Value\x18\x04 \x01(\tR\x05Value\x12\x16\n" + "\x06Amount\x18\x05 \x01(\x04R\x06Amount\"a\n" + "\rTariffMessage\x128\n" + "\n" + "Privileges\x18\x01 \x03(\v2\x18.broker.PrivilegeMessageR\n" + "Privileges\x12\x16\n" + "\x06UserID\x18\x02 \x01(\tR\x06UserID*-\n" + "\rPrivilegeType\x12\b\n" + "\x04Full\x10\x00\x12\a\n" + "\x03Day\x10\x01\x12\t\n" + "\x05Count\x10\x02B\n" + "Z\b./brokerb\x06proto3" var ( file_broker_models_proto_rawDescOnce sync.Once file_broker_models_proto_rawDescData []byte ) func file_broker_models_proto_rawDescGZIP() []byte { file_broker_models_proto_rawDescOnce.Do(func() { file_broker_models_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_broker_models_proto_rawDesc), len(file_broker_models_proto_rawDesc))) }) return file_broker_models_proto_rawDescData } var file_broker_models_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_broker_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_broker_models_proto_goTypes = []any{ (PrivilegeType)(0), // 0: broker.PrivilegeType (*PrivilegeMessage)(nil), // 1: broker.PrivilegeMessage (*TariffMessage)(nil), // 2: broker.TariffMessage } var file_broker_models_proto_depIdxs = []int32{ 0, // 0: broker.PrivilegeMessage.Type:type_name -> broker.PrivilegeType 1, // 1: broker.TariffMessage.Privileges:type_name -> broker.PrivilegeMessage 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_broker_models_proto_init() } func file_broker_models_proto_init() { if File_broker_models_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_broker_models_proto_rawDesc), len(file_broker_models_proto_rawDesc)), NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_broker_models_proto_goTypes, DependencyIndexes: file_broker_models_proto_depIdxs, EnumInfos: file_broker_models_proto_enumTypes, MessageInfos: file_broker_models_proto_msgTypes, }.Build() File_broker_models_proto = out.File file_broker_models_proto_goTypes = nil file_broker_models_proto_depIdxs = nil }