From e26dc84cccec6f2ff1be8e6b8278e0494da73ddc Mon Sep 17 00:00:00 2001 From: Kaien Date: Fri, 20 Mar 2026 22:57:58 +0300 Subject: [PATCH] feat: add UserProfileService, UserMoodHistoryService, UserMessageService protos Add profiles.proto with UserProfileService and UserMoodHistoryService for managing Telegram user profiles, avatars, mood history, and memorable moments. Add messages.proto with UserMessageService for storing and querying chat messages. Co-Authored-By: Claude Sonnet 4.6 --- messages.pb.go | 1305 ++++++++++++++++++++++++++++++ messages.proto | 135 ++++ messages_grpc.pb.go | 582 +++++++++++++ profiles.pb.go | 1888 +++++++++++++++++++++++++++++++++++++++++++ profiles.proto | 196 +++++ profiles_grpc.pb.go | 651 +++++++++++++++ 6 files changed, 4757 insertions(+) create mode 100644 messages.pb.go create mode 100644 messages.proto create mode 100644 messages_grpc.pb.go create mode 100644 profiles.pb.go create mode 100644 profiles.proto create mode 100644 profiles_grpc.pb.go diff --git a/messages.pb.go b/messages.pb.go new file mode 100644 index 0000000..ae54fd0 --- /dev/null +++ b/messages.pb.go @@ -0,0 +1,1305 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.0 +// source: messages.proto + +package proto + +import ( + 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 ChatMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ChatId int64 `protobuf:"varint,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` + Text string `protobuf:"bytes,5,opt,name=text,proto3" json:"text,omitempty"` + MessageId int32 `protobuf:"varint,6,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChatMessage) Reset() { + *x = ChatMessage{} + mi := &file_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChatMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChatMessage) ProtoMessage() {} + +func (x *ChatMessage) ProtoReflect() protoreflect.Message { + mi := &file_messages_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 ChatMessage.ProtoReflect.Descriptor instead. +func (*ChatMessage) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{0} +} + +func (x *ChatMessage) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ChatMessage) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *ChatMessage) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *ChatMessage) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *ChatMessage) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *ChatMessage) GetMessageId() int32 { + if x != nil { + return x.MessageId + } + return 0 +} + +func (x *ChatMessage) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type ChatUserInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChatUserInfo) Reset() { + *x = ChatUserInfo{} + mi := &file_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChatUserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChatUserInfo) ProtoMessage() {} + +func (x *ChatUserInfo) ProtoReflect() protoreflect.Message { + mi := &file_messages_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 ChatUserInfo.ProtoReflect.Descriptor instead. +func (*ChatUserInfo) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{1} +} + +func (x *ChatUserInfo) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *ChatUserInfo) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +type SaveMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ChatId int64 `protobuf:"varint,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` + MessageId int32 `protobuf:"varint,5,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaveMessageRequest) Reset() { + *x = SaveMessageRequest{} + mi := &file_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaveMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveMessageRequest) ProtoMessage() {} + +func (x *SaveMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_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 SaveMessageRequest.ProtoReflect.Descriptor instead. +func (*SaveMessageRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{2} +} + +func (x *SaveMessageRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *SaveMessageRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *SaveMessageRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *SaveMessageRequest) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *SaveMessageRequest) GetMessageId() int32 { + if x != nil { + return x.MessageId + } + return 0 +} + +type GetRecentMessagesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ChatId int64 `protobuf:"varint,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRecentMessagesRequest) Reset() { + *x = GetRecentMessagesRequest{} + mi := &file_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRecentMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRecentMessagesRequest) ProtoMessage() {} + +func (x *GetRecentMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_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 GetRecentMessagesRequest.ProtoReflect.Descriptor instead. +func (*GetRecentMessagesRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{3} +} + +func (x *GetRecentMessagesRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GetRecentMessagesRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *GetRecentMessagesRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +type GetMessagesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Messages []*ChatMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessagesResponse) Reset() { + *x = GetMessagesResponse{} + mi := &file_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessagesResponse) ProtoMessage() {} + +func (x *GetMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[4] + 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 GetMessagesResponse.ProtoReflect.Descriptor instead. +func (*GetMessagesResponse) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{4} +} + +func (x *GetMessagesResponse) GetMessages() []*ChatMessage { + if x != nil { + return x.Messages + } + return nil +} + +type GetAllUsersInChatRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChatId int64 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAllUsersInChatRequest) Reset() { + *x = GetAllUsersInChatRequest{} + mi := &file_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAllUsersInChatRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllUsersInChatRequest) ProtoMessage() {} + +func (x *GetAllUsersInChatRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[5] + 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 GetAllUsersInChatRequest.ProtoReflect.Descriptor instead. +func (*GetAllUsersInChatRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{5} +} + +func (x *GetAllUsersInChatRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +type GetAllUsersInChatResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIds []int64 `protobuf:"varint,1,rep,packed,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAllUsersInChatResponse) Reset() { + *x = GetAllUsersInChatResponse{} + mi := &file_messages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAllUsersInChatResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllUsersInChatResponse) ProtoMessage() {} + +func (x *GetAllUsersInChatResponse) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[6] + 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 GetAllUsersInChatResponse.ProtoReflect.Descriptor instead. +func (*GetAllUsersInChatResponse) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{6} +} + +func (x *GetAllUsersInChatResponse) GetUserIds() []int64 { + if x != nil { + return x.UserIds + } + return nil +} + +type GetRandomUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChatId int64 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + ExcludeUserIds []int64 `protobuf:"varint,2,rep,packed,name=exclude_user_ids,json=excludeUserIds,proto3" json:"exclude_user_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRandomUserRequest) Reset() { + *x = GetRandomUserRequest{} + mi := &file_messages_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRandomUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRandomUserRequest) ProtoMessage() {} + +func (x *GetRandomUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[7] + 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 GetRandomUserRequest.ProtoReflect.Descriptor instead. +func (*GetRandomUserRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{7} +} + +func (x *GetRandomUserRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *GetRandomUserRequest) GetExcludeUserIds() []int64 { + if x != nil { + return x.ExcludeUserIds + } + return nil +} + +type GetRandomUserResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRandomUserResponse) Reset() { + *x = GetRandomUserResponse{} + mi := &file_messages_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRandomUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRandomUserResponse) ProtoMessage() {} + +func (x *GetRandomUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[8] + 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 GetRandomUserResponse.ProtoReflect.Descriptor instead. +func (*GetRandomUserResponse) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{8} +} + +func (x *GetRandomUserResponse) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GetRandomUserResponse) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +type GetUsersByChatRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChatId int64 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUsersByChatRequest) Reset() { + *x = GetUsersByChatRequest{} + mi := &file_messages_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUsersByChatRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersByChatRequest) ProtoMessage() {} + +func (x *GetUsersByChatRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[9] + 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 GetUsersByChatRequest.ProtoReflect.Descriptor instead. +func (*GetUsersByChatRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{9} +} + +func (x *GetUsersByChatRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +type GetUsersByChatResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Users []*ChatUserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUsersByChatResponse) Reset() { + *x = GetUsersByChatResponse{} + mi := &file_messages_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUsersByChatResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersByChatResponse) ProtoMessage() {} + +func (x *GetUsersByChatResponse) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[10] + 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 GetUsersByChatResponse.ProtoReflect.Descriptor instead. +func (*GetUsersByChatResponse) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{10} +} + +func (x *GetUsersByChatResponse) GetUsers() []*ChatUserInfo { + if x != nil { + return x.Users + } + return nil +} + +type GetMessageCountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessageCountResponse) Reset() { + *x = GetMessageCountResponse{} + mi := &file_messages_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessageCountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessageCountResponse) ProtoMessage() {} + +func (x *GetMessageCountResponse) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[11] + 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 GetMessageCountResponse.ProtoReflect.Descriptor instead. +func (*GetMessageCountResponse) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{11} +} + +func (x *GetMessageCountResponse) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +type GetUserMessageCountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ChatId int64 `protobuf:"varint,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUserMessageCountRequest) Reset() { + *x = GetUserMessageCountRequest{} + mi := &file_messages_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUserMessageCountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserMessageCountRequest) ProtoMessage() {} + +func (x *GetUserMessageCountRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[12] + 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 GetUserMessageCountRequest.ProtoReflect.Descriptor instead. +func (*GetUserMessageCountRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{12} +} + +func (x *GetUserMessageCountRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GetUserMessageCountRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +type GetMessagesInTimeRangeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ChatId int64 `protobuf:"varint,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + From *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` + To *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessagesInTimeRangeRequest) Reset() { + *x = GetMessagesInTimeRangeRequest{} + mi := &file_messages_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessagesInTimeRangeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessagesInTimeRangeRequest) ProtoMessage() {} + +func (x *GetMessagesInTimeRangeRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[13] + 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 GetMessagesInTimeRangeRequest.ProtoReflect.Descriptor instead. +func (*GetMessagesInTimeRangeRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{13} +} + +func (x *GetMessagesInTimeRangeRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GetMessagesInTimeRangeRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *GetMessagesInTimeRangeRequest) GetFrom() *timestamppb.Timestamp { + if x != nil { + return x.From + } + return nil +} + +func (x *GetMessagesInTimeRangeRequest) GetTo() *timestamppb.Timestamp { + if x != nil { + return x.To + } + return nil +} + +type FindSimilarMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ChatId int64 `protobuf:"varint,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` + WithinDays int32 `protobuf:"varint,4,opt,name=within_days,json=withinDays,proto3" json:"within_days,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FindSimilarMessageRequest) Reset() { + *x = FindSimilarMessageRequest{} + mi := &file_messages_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FindSimilarMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindSimilarMessageRequest) ProtoMessage() {} + +func (x *FindSimilarMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[14] + 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 FindSimilarMessageRequest.ProtoReflect.Descriptor instead. +func (*FindSimilarMessageRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{14} +} + +func (x *FindSimilarMessageRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *FindSimilarMessageRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *FindSimilarMessageRequest) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *FindSimilarMessageRequest) GetWithinDays() int32 { + if x != nil { + return x.WithinDays + } + return 0 +} + +type FindSimilarMessageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message *ChatMessage `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FindSimilarMessageResponse) Reset() { + *x = FindSimilarMessageResponse{} + mi := &file_messages_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FindSimilarMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindSimilarMessageResponse) ProtoMessage() {} + +func (x *FindSimilarMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[15] + 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 FindSimilarMessageResponse.ProtoReflect.Descriptor instead. +func (*FindSimilarMessageResponse) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{15} +} + +func (x *FindSimilarMessageResponse) GetMessage() *ChatMessage { + if x != nil { + return x.Message + } + return nil +} + +func (x *FindSimilarMessageResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type GetMessageByTelegramIDRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChatId int64 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + MessageId int32 `protobuf:"varint,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMessageByTelegramIDRequest) Reset() { + *x = GetMessageByTelegramIDRequest{} + mi := &file_messages_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMessageByTelegramIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMessageByTelegramIDRequest) ProtoMessage() {} + +func (x *GetMessageByTelegramIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[16] + 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 GetMessageByTelegramIDRequest.ProtoReflect.Descriptor instead. +func (*GetMessageByTelegramIDRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{16} +} + +func (x *GetMessageByTelegramIDRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *GetMessageByTelegramIDRequest) GetMessageId() int32 { + if x != nil { + return x.MessageId + } + return 0 +} + +type GetRecentChatMessagesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChatId int64 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + Since *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=since,proto3" json:"since,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRecentChatMessagesRequest) Reset() { + *x = GetRecentChatMessagesRequest{} + mi := &file_messages_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRecentChatMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRecentChatMessagesRequest) ProtoMessage() {} + +func (x *GetRecentChatMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[17] + 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 GetRecentChatMessagesRequest.ProtoReflect.Descriptor instead. +func (*GetRecentChatMessagesRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{17} +} + +func (x *GetRecentChatMessagesRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *GetRecentChatMessagesRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *GetRecentChatMessagesRequest) GetSince() *timestamppb.Timestamp { + if x != nil { + return x.Since + } + return nil +} + +type GetAllUserMessagesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAllUserMessagesRequest) Reset() { + *x = GetAllUserMessagesRequest{} + mi := &file_messages_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAllUserMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllUserMessagesRequest) ProtoMessage() {} + +func (x *GetAllUserMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[18] + 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 GetAllUserMessagesRequest.ProtoReflect.Descriptor instead. +func (*GetAllUserMessagesRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{18} +} + +func (x *GetAllUserMessagesRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +type GetRandomMessageFromChatRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChatId int64 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRandomMessageFromChatRequest) Reset() { + *x = GetRandomMessageFromChatRequest{} + mi := &file_messages_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRandomMessageFromChatRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRandomMessageFromChatRequest) ProtoMessage() {} + +func (x *GetRandomMessageFromChatRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_proto_msgTypes[19] + 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 GetRandomMessageFromChatRequest.ProtoReflect.Descriptor instead. +func (*GetRandomMessageFromChatRequest) Descriptor() ([]byte, []int) { + return file_messages_proto_rawDescGZIP(), []int{19} +} + +func (x *GetRandomMessageFromChatRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +var File_messages_proto protoreflect.FileDescriptor + +const file_messages_proto_rawDesc = "" + + "\n" + + "\x0emessages.proto\x12\x05users\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd9\x01\n" + + "\vChatMessage\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x17\n" + + "\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x17\n" + + "\achat_id\x18\x03 \x01(\x03R\x06chatId\x12\x1a\n" + + "\busername\x18\x04 \x01(\tR\busername\x12\x12\n" + + "\x04text\x18\x05 \x01(\tR\x04text\x12\x1d\n" + + "\n" + + "message_id\x18\x06 \x01(\x05R\tmessageId\x129\n" + + "\n" + + "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"C\n" + + "\fChatUserInfo\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" + + "\busername\x18\x02 \x01(\tR\busername\"\x95\x01\n" + + "\x12SaveMessageRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x17\n" + + "\achat_id\x18\x02 \x01(\x03R\x06chatId\x12\x1a\n" + + "\busername\x18\x03 \x01(\tR\busername\x12\x12\n" + + "\x04text\x18\x04 \x01(\tR\x04text\x12\x1d\n" + + "\n" + + "message_id\x18\x05 \x01(\x05R\tmessageId\"b\n" + + "\x18GetRecentMessagesRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x17\n" + + "\achat_id\x18\x02 \x01(\x03R\x06chatId\x12\x14\n" + + "\x05limit\x18\x03 \x01(\x05R\x05limit\"E\n" + + "\x13GetMessagesResponse\x12.\n" + + "\bmessages\x18\x01 \x03(\v2\x12.users.ChatMessageR\bmessages\"3\n" + + "\x18GetAllUsersInChatRequest\x12\x17\n" + + "\achat_id\x18\x01 \x01(\x03R\x06chatId\"6\n" + + "\x19GetAllUsersInChatResponse\x12\x19\n" + + "\buser_ids\x18\x01 \x03(\x03R\auserIds\"Y\n" + + "\x14GetRandomUserRequest\x12\x17\n" + + "\achat_id\x18\x01 \x01(\x03R\x06chatId\x12(\n" + + "\x10exclude_user_ids\x18\x02 \x03(\x03R\x0eexcludeUserIds\"L\n" + + "\x15GetRandomUserResponse\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" + + "\busername\x18\x02 \x01(\tR\busername\"0\n" + + "\x15GetUsersByChatRequest\x12\x17\n" + + "\achat_id\x18\x01 \x01(\x03R\x06chatId\"C\n" + + "\x16GetUsersByChatResponse\x12)\n" + + "\x05users\x18\x01 \x03(\v2\x13.users.ChatUserInfoR\x05users\"/\n" + + "\x17GetMessageCountResponse\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\"N\n" + + "\x1aGetUserMessageCountRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x17\n" + + "\achat_id\x18\x02 \x01(\x03R\x06chatId\"\xad\x01\n" + + "\x1dGetMessagesInTimeRangeRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x17\n" + + "\achat_id\x18\x02 \x01(\x03R\x06chatId\x12.\n" + + "\x04from\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x04from\x12*\n" + + "\x02to\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x02to\"\x82\x01\n" + + "\x19FindSimilarMessageRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x17\n" + + "\achat_id\x18\x02 \x01(\x03R\x06chatId\x12\x12\n" + + "\x04text\x18\x03 \x01(\tR\x04text\x12\x1f\n" + + "\vwithin_days\x18\x04 \x01(\x05R\n" + + "withinDays\"`\n" + + "\x1aFindSimilarMessageResponse\x12,\n" + + "\amessage\x18\x01 \x01(\v2\x12.users.ChatMessageR\amessage\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"W\n" + + "\x1dGetMessageByTelegramIDRequest\x12\x17\n" + + "\achat_id\x18\x01 \x01(\x03R\x06chatId\x12\x1d\n" + + "\n" + + "message_id\x18\x02 \x01(\x05R\tmessageId\"\x7f\n" + + "\x1cGetRecentChatMessagesRequest\x12\x17\n" + + "\achat_id\x18\x01 \x01(\x03R\x06chatId\x12\x14\n" + + "\x05limit\x18\x02 \x01(\x05R\x05limit\x120\n" + + "\x05since\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x05since\"4\n" + + "\x19GetAllUserMessagesRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\":\n" + + "\x1fGetRandomMessageFromChatRequest\x12\x17\n" + + "\achat_id\x18\x01 \x01(\x03R\x06chatId2\xf4\b\n" + + "\x12UserMessageService\x12@\n" + + "\vSaveMessage\x12\x19.users.SaveMessageRequest\x1a\x16.google.protobuf.Empty\x12P\n" + + "\x11GetRecentMessages\x12\x1f.users.GetRecentMessagesRequest\x1a\x1a.users.GetMessagesResponse\x12V\n" + + "\x11GetAllUsersInChat\x12\x1f.users.GetAllUsersInChatRequest\x1a .users.GetAllUsersInChatResponse\x12J\n" + + "\rGetRandomUser\x12\x1b.users.GetRandomUserRequest\x1a\x1c.users.GetRandomUserResponse\x12M\n" + + "\x0eGetUsersByChat\x12\x1c.users.GetUsersByChatRequest\x1a\x1d.users.GetUsersByChatResponse\x12N\n" + + "\x14GetTotalMessageCount\x12\x16.google.protobuf.Empty\x1a\x1e.users.GetMessageCountResponse\x12X\n" + + "\x13GetUserMessageCount\x12!.users.GetUserMessageCountRequest\x1a\x1e.users.GetMessageCountResponse\x12Z\n" + + "\x16GetMessagesInTimeRange\x12$.users.GetMessagesInTimeRangeRequest\x1a\x1a.users.GetMessagesResponse\x12Y\n" + + "\x12FindSimilarMessage\x12 .users.FindSimilarMessageRequest\x1a!.users.FindSimilarMessageResponse\x12a\n" + + "\x16GetMessageByTelegramID\x12$.users.GetMessageByTelegramIDRequest\x1a!.users.FindSimilarMessageResponse\x12X\n" + + "\x15GetRecentChatMessages\x12#.users.GetRecentChatMessagesRequest\x1a\x1a.users.GetMessagesResponse\x12R\n" + + "\x12GetAllUserMessages\x12 .users.GetAllUserMessagesRequest\x1a\x1a.users.GetMessagesResponse\x12e\n" + + "\x18GetRandomMessageFromChat\x12&.users.GetRandomMessageFromChatRequest\x1a!.users.FindSimilarMessageResponseB,Z*git.be.kaien.ru/l-ai/l-ai-core-proto/protob\x06proto3" + +var ( + file_messages_proto_rawDescOnce sync.Once + file_messages_proto_rawDescData []byte +) + +func file_messages_proto_rawDescGZIP() []byte { + file_messages_proto_rawDescOnce.Do(func() { + file_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc))) + }) + return file_messages_proto_rawDescData +} + +var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_messages_proto_goTypes = []any{ + (*ChatMessage)(nil), // 0: users.ChatMessage + (*ChatUserInfo)(nil), // 1: users.ChatUserInfo + (*SaveMessageRequest)(nil), // 2: users.SaveMessageRequest + (*GetRecentMessagesRequest)(nil), // 3: users.GetRecentMessagesRequest + (*GetMessagesResponse)(nil), // 4: users.GetMessagesResponse + (*GetAllUsersInChatRequest)(nil), // 5: users.GetAllUsersInChatRequest + (*GetAllUsersInChatResponse)(nil), // 6: users.GetAllUsersInChatResponse + (*GetRandomUserRequest)(nil), // 7: users.GetRandomUserRequest + (*GetRandomUserResponse)(nil), // 8: users.GetRandomUserResponse + (*GetUsersByChatRequest)(nil), // 9: users.GetUsersByChatRequest + (*GetUsersByChatResponse)(nil), // 10: users.GetUsersByChatResponse + (*GetMessageCountResponse)(nil), // 11: users.GetMessageCountResponse + (*GetUserMessageCountRequest)(nil), // 12: users.GetUserMessageCountRequest + (*GetMessagesInTimeRangeRequest)(nil), // 13: users.GetMessagesInTimeRangeRequest + (*FindSimilarMessageRequest)(nil), // 14: users.FindSimilarMessageRequest + (*FindSimilarMessageResponse)(nil), // 15: users.FindSimilarMessageResponse + (*GetMessageByTelegramIDRequest)(nil), // 16: users.GetMessageByTelegramIDRequest + (*GetRecentChatMessagesRequest)(nil), // 17: users.GetRecentChatMessagesRequest + (*GetAllUserMessagesRequest)(nil), // 18: users.GetAllUserMessagesRequest + (*GetRandomMessageFromChatRequest)(nil), // 19: users.GetRandomMessageFromChatRequest + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 21: google.protobuf.Empty +} +var file_messages_proto_depIdxs = []int32{ + 20, // 0: users.ChatMessage.created_at:type_name -> google.protobuf.Timestamp + 0, // 1: users.GetMessagesResponse.messages:type_name -> users.ChatMessage + 1, // 2: users.GetUsersByChatResponse.users:type_name -> users.ChatUserInfo + 20, // 3: users.GetMessagesInTimeRangeRequest.from:type_name -> google.protobuf.Timestamp + 20, // 4: users.GetMessagesInTimeRangeRequest.to:type_name -> google.protobuf.Timestamp + 0, // 5: users.FindSimilarMessageResponse.message:type_name -> users.ChatMessage + 20, // 6: users.GetRecentChatMessagesRequest.since:type_name -> google.protobuf.Timestamp + 2, // 7: users.UserMessageService.SaveMessage:input_type -> users.SaveMessageRequest + 3, // 8: users.UserMessageService.GetRecentMessages:input_type -> users.GetRecentMessagesRequest + 5, // 9: users.UserMessageService.GetAllUsersInChat:input_type -> users.GetAllUsersInChatRequest + 7, // 10: users.UserMessageService.GetRandomUser:input_type -> users.GetRandomUserRequest + 9, // 11: users.UserMessageService.GetUsersByChat:input_type -> users.GetUsersByChatRequest + 21, // 12: users.UserMessageService.GetTotalMessageCount:input_type -> google.protobuf.Empty + 12, // 13: users.UserMessageService.GetUserMessageCount:input_type -> users.GetUserMessageCountRequest + 13, // 14: users.UserMessageService.GetMessagesInTimeRange:input_type -> users.GetMessagesInTimeRangeRequest + 14, // 15: users.UserMessageService.FindSimilarMessage:input_type -> users.FindSimilarMessageRequest + 16, // 16: users.UserMessageService.GetMessageByTelegramID:input_type -> users.GetMessageByTelegramIDRequest + 17, // 17: users.UserMessageService.GetRecentChatMessages:input_type -> users.GetRecentChatMessagesRequest + 18, // 18: users.UserMessageService.GetAllUserMessages:input_type -> users.GetAllUserMessagesRequest + 19, // 19: users.UserMessageService.GetRandomMessageFromChat:input_type -> users.GetRandomMessageFromChatRequest + 21, // 20: users.UserMessageService.SaveMessage:output_type -> google.protobuf.Empty + 4, // 21: users.UserMessageService.GetRecentMessages:output_type -> users.GetMessagesResponse + 6, // 22: users.UserMessageService.GetAllUsersInChat:output_type -> users.GetAllUsersInChatResponse + 8, // 23: users.UserMessageService.GetRandomUser:output_type -> users.GetRandomUserResponse + 10, // 24: users.UserMessageService.GetUsersByChat:output_type -> users.GetUsersByChatResponse + 11, // 25: users.UserMessageService.GetTotalMessageCount:output_type -> users.GetMessageCountResponse + 11, // 26: users.UserMessageService.GetUserMessageCount:output_type -> users.GetMessageCountResponse + 4, // 27: users.UserMessageService.GetMessagesInTimeRange:output_type -> users.GetMessagesResponse + 15, // 28: users.UserMessageService.FindSimilarMessage:output_type -> users.FindSimilarMessageResponse + 15, // 29: users.UserMessageService.GetMessageByTelegramID:output_type -> users.FindSimilarMessageResponse + 4, // 30: users.UserMessageService.GetRecentChatMessages:output_type -> users.GetMessagesResponse + 4, // 31: users.UserMessageService.GetAllUserMessages:output_type -> users.GetMessagesResponse + 15, // 32: users.UserMessageService.GetRandomMessageFromChat:output_type -> users.FindSimilarMessageResponse + 20, // [20:33] is the sub-list for method output_type + 7, // [7:20] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_messages_proto_init() } +func file_messages_proto_init() { + if File_messages_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc)), + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_messages_proto_goTypes, + DependencyIndexes: file_messages_proto_depIdxs, + MessageInfos: file_messages_proto_msgTypes, + }.Build() + File_messages_proto = out.File + file_messages_proto_goTypes = nil + file_messages_proto_depIdxs = nil +} diff --git a/messages.proto b/messages.proto new file mode 100644 index 0000000..1a7e004 --- /dev/null +++ b/messages.proto @@ -0,0 +1,135 @@ +syntax = "proto3"; + +package users; + +option go_package = "git.be.kaien.ru/l-ai/l-ai-core-proto/proto"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +// UserMessageService manages stored user messages +service UserMessageService { + rpc SaveMessage(SaveMessageRequest) returns (google.protobuf.Empty); + rpc GetRecentMessages(GetRecentMessagesRequest) returns (GetMessagesResponse); + rpc GetAllUsersInChat(GetAllUsersInChatRequest) returns (GetAllUsersInChatResponse); + rpc GetRandomUser(GetRandomUserRequest) returns (GetRandomUserResponse); + rpc GetUsersByChat(GetUsersByChatRequest) returns (GetUsersByChatResponse); + rpc GetTotalMessageCount(google.protobuf.Empty) returns (GetMessageCountResponse); + rpc GetUserMessageCount(GetUserMessageCountRequest) returns (GetMessageCountResponse); + rpc GetMessagesInTimeRange(GetMessagesInTimeRangeRequest) returns (GetMessagesResponse); + rpc FindSimilarMessage(FindSimilarMessageRequest) returns (FindSimilarMessageResponse); + rpc GetMessageByTelegramID(GetMessageByTelegramIDRequest) returns (FindSimilarMessageResponse); + rpc GetRecentChatMessages(GetRecentChatMessagesRequest) returns (GetMessagesResponse); + rpc GetAllUserMessages(GetAllUserMessagesRequest) returns (GetMessagesResponse); + rpc GetRandomMessageFromChat(GetRandomMessageFromChatRequest) returns (FindSimilarMessageResponse); +} + +// --- Messages --- + +message ChatMessage { + int64 id = 1; + int64 user_id = 2; + int64 chat_id = 3; + string username = 4; + string text = 5; + int32 message_id = 6; + google.protobuf.Timestamp created_at = 7; +} + +message ChatUserInfo { + int64 user_id = 1; + string username = 2; +} + +// --- Request/Response messages --- + +message SaveMessageRequest { + int64 user_id = 1; + int64 chat_id = 2; + string username = 3; + string text = 4; + int32 message_id = 5; +} + +message GetRecentMessagesRequest { + int64 user_id = 1; + int64 chat_id = 2; + int32 limit = 3; +} + +message GetMessagesResponse { + repeated ChatMessage messages = 1; +} + +message GetAllUsersInChatRequest { + int64 chat_id = 1; +} + +message GetAllUsersInChatResponse { + repeated int64 user_ids = 1; +} + +message GetRandomUserRequest { + int64 chat_id = 1; + repeated int64 exclude_user_ids = 2; +} + +message GetRandomUserResponse { + int64 user_id = 1; + string username = 2; +} + +message GetUsersByChatRequest { + int64 chat_id = 1; +} + +message GetUsersByChatResponse { + repeated ChatUserInfo users = 1; +} + +message GetMessageCountResponse { + int64 count = 1; +} + +message GetUserMessageCountRequest { + int64 user_id = 1; + int64 chat_id = 2; +} + +message GetMessagesInTimeRangeRequest { + int64 user_id = 1; + int64 chat_id = 2; + google.protobuf.Timestamp from = 3; + google.protobuf.Timestamp to = 4; +} + +message FindSimilarMessageRequest { + int64 user_id = 1; + int64 chat_id = 2; + string text = 3; + int32 within_days = 4; +} + +message FindSimilarMessageResponse { + ChatMessage message = 1; + bool found = 2; +} + +message GetMessageByTelegramIDRequest { + int64 chat_id = 1; + int32 message_id = 2; +} + +message GetRecentChatMessagesRequest { + int64 chat_id = 1; + int32 limit = 2; + google.protobuf.Timestamp since = 3; +} + +message GetAllUserMessagesRequest { + int64 user_id = 1; +} + +message GetRandomMessageFromChatRequest { + int64 chat_id = 1; +} diff --git a/messages_grpc.pb.go b/messages_grpc.pb.go new file mode 100644 index 0000000..1ae4e29 --- /dev/null +++ b/messages_grpc.pb.go @@ -0,0 +1,582 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.1 +// - protoc v7.34.0 +// source: messages.proto + +package proto + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + UserMessageService_SaveMessage_FullMethodName = "/users.UserMessageService/SaveMessage" + UserMessageService_GetRecentMessages_FullMethodName = "/users.UserMessageService/GetRecentMessages" + UserMessageService_GetAllUsersInChat_FullMethodName = "/users.UserMessageService/GetAllUsersInChat" + UserMessageService_GetRandomUser_FullMethodName = "/users.UserMessageService/GetRandomUser" + UserMessageService_GetUsersByChat_FullMethodName = "/users.UserMessageService/GetUsersByChat" + UserMessageService_GetTotalMessageCount_FullMethodName = "/users.UserMessageService/GetTotalMessageCount" + UserMessageService_GetUserMessageCount_FullMethodName = "/users.UserMessageService/GetUserMessageCount" + UserMessageService_GetMessagesInTimeRange_FullMethodName = "/users.UserMessageService/GetMessagesInTimeRange" + UserMessageService_FindSimilarMessage_FullMethodName = "/users.UserMessageService/FindSimilarMessage" + UserMessageService_GetMessageByTelegramID_FullMethodName = "/users.UserMessageService/GetMessageByTelegramID" + UserMessageService_GetRecentChatMessages_FullMethodName = "/users.UserMessageService/GetRecentChatMessages" + UserMessageService_GetAllUserMessages_FullMethodName = "/users.UserMessageService/GetAllUserMessages" + UserMessageService_GetRandomMessageFromChat_FullMethodName = "/users.UserMessageService/GetRandomMessageFromChat" +) + +// UserMessageServiceClient is the client API for UserMessageService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// UserMessageService manages stored user messages +type UserMessageServiceClient interface { + SaveMessage(ctx context.Context, in *SaveMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + GetRecentMessages(ctx context.Context, in *GetRecentMessagesRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) + GetAllUsersInChat(ctx context.Context, in *GetAllUsersInChatRequest, opts ...grpc.CallOption) (*GetAllUsersInChatResponse, error) + GetRandomUser(ctx context.Context, in *GetRandomUserRequest, opts ...grpc.CallOption) (*GetRandomUserResponse, error) + GetUsersByChat(ctx context.Context, in *GetUsersByChatRequest, opts ...grpc.CallOption) (*GetUsersByChatResponse, error) + GetTotalMessageCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMessageCountResponse, error) + GetUserMessageCount(ctx context.Context, in *GetUserMessageCountRequest, opts ...grpc.CallOption) (*GetMessageCountResponse, error) + GetMessagesInTimeRange(ctx context.Context, in *GetMessagesInTimeRangeRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) + FindSimilarMessage(ctx context.Context, in *FindSimilarMessageRequest, opts ...grpc.CallOption) (*FindSimilarMessageResponse, error) + GetMessageByTelegramID(ctx context.Context, in *GetMessageByTelegramIDRequest, opts ...grpc.CallOption) (*FindSimilarMessageResponse, error) + GetRecentChatMessages(ctx context.Context, in *GetRecentChatMessagesRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) + GetAllUserMessages(ctx context.Context, in *GetAllUserMessagesRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) + GetRandomMessageFromChat(ctx context.Context, in *GetRandomMessageFromChatRequest, opts ...grpc.CallOption) (*FindSimilarMessageResponse, error) +} + +type userMessageServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUserMessageServiceClient(cc grpc.ClientConnInterface) UserMessageServiceClient { + return &userMessageServiceClient{cc} +} + +func (c *userMessageServiceClient) SaveMessage(ctx context.Context, in *SaveMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UserMessageService_SaveMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetRecentMessages(ctx context.Context, in *GetRecentMessagesRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMessagesResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetRecentMessages_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetAllUsersInChat(ctx context.Context, in *GetAllUsersInChatRequest, opts ...grpc.CallOption) (*GetAllUsersInChatResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAllUsersInChatResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetAllUsersInChat_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetRandomUser(ctx context.Context, in *GetRandomUserRequest, opts ...grpc.CallOption) (*GetRandomUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRandomUserResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetRandomUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetUsersByChat(ctx context.Context, in *GetUsersByChatRequest, opts ...grpc.CallOption) (*GetUsersByChatResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetUsersByChatResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetUsersByChat_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetTotalMessageCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMessageCountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMessageCountResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetTotalMessageCount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetUserMessageCount(ctx context.Context, in *GetUserMessageCountRequest, opts ...grpc.CallOption) (*GetMessageCountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMessageCountResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetUserMessageCount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetMessagesInTimeRange(ctx context.Context, in *GetMessagesInTimeRangeRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMessagesResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetMessagesInTimeRange_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) FindSimilarMessage(ctx context.Context, in *FindSimilarMessageRequest, opts ...grpc.CallOption) (*FindSimilarMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FindSimilarMessageResponse) + err := c.cc.Invoke(ctx, UserMessageService_FindSimilarMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetMessageByTelegramID(ctx context.Context, in *GetMessageByTelegramIDRequest, opts ...grpc.CallOption) (*FindSimilarMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FindSimilarMessageResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetMessageByTelegramID_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetRecentChatMessages(ctx context.Context, in *GetRecentChatMessagesRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMessagesResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetRecentChatMessages_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetAllUserMessages(ctx context.Context, in *GetAllUserMessagesRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMessagesResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetAllUserMessages_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMessageServiceClient) GetRandomMessageFromChat(ctx context.Context, in *GetRandomMessageFromChatRequest, opts ...grpc.CallOption) (*FindSimilarMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FindSimilarMessageResponse) + err := c.cc.Invoke(ctx, UserMessageService_GetRandomMessageFromChat_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserMessageServiceServer is the server API for UserMessageService service. +// All implementations must embed UnimplementedUserMessageServiceServer +// for forward compatibility. +// +// UserMessageService manages stored user messages +type UserMessageServiceServer interface { + SaveMessage(context.Context, *SaveMessageRequest) (*emptypb.Empty, error) + GetRecentMessages(context.Context, *GetRecentMessagesRequest) (*GetMessagesResponse, error) + GetAllUsersInChat(context.Context, *GetAllUsersInChatRequest) (*GetAllUsersInChatResponse, error) + GetRandomUser(context.Context, *GetRandomUserRequest) (*GetRandomUserResponse, error) + GetUsersByChat(context.Context, *GetUsersByChatRequest) (*GetUsersByChatResponse, error) + GetTotalMessageCount(context.Context, *emptypb.Empty) (*GetMessageCountResponse, error) + GetUserMessageCount(context.Context, *GetUserMessageCountRequest) (*GetMessageCountResponse, error) + GetMessagesInTimeRange(context.Context, *GetMessagesInTimeRangeRequest) (*GetMessagesResponse, error) + FindSimilarMessage(context.Context, *FindSimilarMessageRequest) (*FindSimilarMessageResponse, error) + GetMessageByTelegramID(context.Context, *GetMessageByTelegramIDRequest) (*FindSimilarMessageResponse, error) + GetRecentChatMessages(context.Context, *GetRecentChatMessagesRequest) (*GetMessagesResponse, error) + GetAllUserMessages(context.Context, *GetAllUserMessagesRequest) (*GetMessagesResponse, error) + GetRandomMessageFromChat(context.Context, *GetRandomMessageFromChatRequest) (*FindSimilarMessageResponse, error) + mustEmbedUnimplementedUserMessageServiceServer() +} + +// UnimplementedUserMessageServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedUserMessageServiceServer struct{} + +func (UnimplementedUserMessageServiceServer) SaveMessage(context.Context, *SaveMessageRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SaveMessage not implemented") +} +func (UnimplementedUserMessageServiceServer) GetRecentMessages(context.Context, *GetRecentMessagesRequest) (*GetMessagesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetRecentMessages not implemented") +} +func (UnimplementedUserMessageServiceServer) GetAllUsersInChat(context.Context, *GetAllUsersInChatRequest) (*GetAllUsersInChatResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAllUsersInChat not implemented") +} +func (UnimplementedUserMessageServiceServer) GetRandomUser(context.Context, *GetRandomUserRequest) (*GetRandomUserResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetRandomUser not implemented") +} +func (UnimplementedUserMessageServiceServer) GetUsersByChat(context.Context, *GetUsersByChatRequest) (*GetUsersByChatResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetUsersByChat not implemented") +} +func (UnimplementedUserMessageServiceServer) GetTotalMessageCount(context.Context, *emptypb.Empty) (*GetMessageCountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetTotalMessageCount not implemented") +} +func (UnimplementedUserMessageServiceServer) GetUserMessageCount(context.Context, *GetUserMessageCountRequest) (*GetMessageCountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetUserMessageCount not implemented") +} +func (UnimplementedUserMessageServiceServer) GetMessagesInTimeRange(context.Context, *GetMessagesInTimeRangeRequest) (*GetMessagesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMessagesInTimeRange not implemented") +} +func (UnimplementedUserMessageServiceServer) FindSimilarMessage(context.Context, *FindSimilarMessageRequest) (*FindSimilarMessageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method FindSimilarMessage not implemented") +} +func (UnimplementedUserMessageServiceServer) GetMessageByTelegramID(context.Context, *GetMessageByTelegramIDRequest) (*FindSimilarMessageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMessageByTelegramID not implemented") +} +func (UnimplementedUserMessageServiceServer) GetRecentChatMessages(context.Context, *GetRecentChatMessagesRequest) (*GetMessagesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetRecentChatMessages not implemented") +} +func (UnimplementedUserMessageServiceServer) GetAllUserMessages(context.Context, *GetAllUserMessagesRequest) (*GetMessagesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAllUserMessages not implemented") +} +func (UnimplementedUserMessageServiceServer) GetRandomMessageFromChat(context.Context, *GetRandomMessageFromChatRequest) (*FindSimilarMessageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetRandomMessageFromChat not implemented") +} +func (UnimplementedUserMessageServiceServer) mustEmbedUnimplementedUserMessageServiceServer() {} +func (UnimplementedUserMessageServiceServer) testEmbeddedByValue() {} + +// UnsafeUserMessageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserMessageServiceServer will +// result in compilation errors. +type UnsafeUserMessageServiceServer interface { + mustEmbedUnimplementedUserMessageServiceServer() +} + +func RegisterUserMessageServiceServer(s grpc.ServiceRegistrar, srv UserMessageServiceServer) { + // If the following call panics, it indicates UnimplementedUserMessageServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&UserMessageService_ServiceDesc, srv) +} + +func _UserMessageService_SaveMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SaveMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).SaveMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_SaveMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).SaveMessage(ctx, req.(*SaveMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetRecentMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRecentMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetRecentMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetRecentMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetRecentMessages(ctx, req.(*GetRecentMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetAllUsersInChat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllUsersInChatRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetAllUsersInChat(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetAllUsersInChat_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetAllUsersInChat(ctx, req.(*GetAllUsersInChatRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetRandomUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRandomUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetRandomUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetRandomUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetRandomUser(ctx, req.(*GetRandomUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetUsersByChat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUsersByChatRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetUsersByChat(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetUsersByChat_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetUsersByChat(ctx, req.(*GetUsersByChatRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetTotalMessageCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetTotalMessageCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetTotalMessageCount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetTotalMessageCount(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetUserMessageCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserMessageCountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetUserMessageCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetUserMessageCount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetUserMessageCount(ctx, req.(*GetUserMessageCountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetMessagesInTimeRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMessagesInTimeRangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetMessagesInTimeRange(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetMessagesInTimeRange_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetMessagesInTimeRange(ctx, req.(*GetMessagesInTimeRangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_FindSimilarMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindSimilarMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).FindSimilarMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_FindSimilarMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).FindSimilarMessage(ctx, req.(*FindSimilarMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetMessageByTelegramID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMessageByTelegramIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetMessageByTelegramID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetMessageByTelegramID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetMessageByTelegramID(ctx, req.(*GetMessageByTelegramIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetRecentChatMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRecentChatMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetRecentChatMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetRecentChatMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetRecentChatMessages(ctx, req.(*GetRecentChatMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetAllUserMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllUserMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetAllUserMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetAllUserMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetAllUserMessages(ctx, req.(*GetAllUserMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMessageService_GetRandomMessageFromChat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRandomMessageFromChatRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMessageServiceServer).GetRandomMessageFromChat(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMessageService_GetRandomMessageFromChat_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMessageServiceServer).GetRandomMessageFromChat(ctx, req.(*GetRandomMessageFromChatRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UserMessageService_ServiceDesc is the grpc.ServiceDesc for UserMessageService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UserMessageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "users.UserMessageService", + HandlerType: (*UserMessageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SaveMessage", + Handler: _UserMessageService_SaveMessage_Handler, + }, + { + MethodName: "GetRecentMessages", + Handler: _UserMessageService_GetRecentMessages_Handler, + }, + { + MethodName: "GetAllUsersInChat", + Handler: _UserMessageService_GetAllUsersInChat_Handler, + }, + { + MethodName: "GetRandomUser", + Handler: _UserMessageService_GetRandomUser_Handler, + }, + { + MethodName: "GetUsersByChat", + Handler: _UserMessageService_GetUsersByChat_Handler, + }, + { + MethodName: "GetTotalMessageCount", + Handler: _UserMessageService_GetTotalMessageCount_Handler, + }, + { + MethodName: "GetUserMessageCount", + Handler: _UserMessageService_GetUserMessageCount_Handler, + }, + { + MethodName: "GetMessagesInTimeRange", + Handler: _UserMessageService_GetMessagesInTimeRange_Handler, + }, + { + MethodName: "FindSimilarMessage", + Handler: _UserMessageService_FindSimilarMessage_Handler, + }, + { + MethodName: "GetMessageByTelegramID", + Handler: _UserMessageService_GetMessageByTelegramID_Handler, + }, + { + MethodName: "GetRecentChatMessages", + Handler: _UserMessageService_GetRecentChatMessages_Handler, + }, + { + MethodName: "GetAllUserMessages", + Handler: _UserMessageService_GetAllUserMessages_Handler, + }, + { + MethodName: "GetRandomMessageFromChat", + Handler: _UserMessageService_GetRandomMessageFromChat_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "messages.proto", +} diff --git a/profiles.pb.go b/profiles.pb.go new file mode 100644 index 0000000..2b3684b --- /dev/null +++ b/profiles.pb.go @@ -0,0 +1,1888 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.0 +// source: profiles.proto + +package proto + +import ( + 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 UserStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + TotalMessages int64 `protobuf:"varint,1,opt,name=total_messages,json=totalMessages,proto3" json:"total_messages,omitempty"` + FavoriteTopic string `protobuf:"bytes,2,opt,name=favorite_topic,json=favoriteTopic,proto3" json:"favorite_topic,omitempty"` + MostActiveDay string `protobuf:"bytes,3,opt,name=most_active_day,json=mostActiveDay,proto3" json:"most_active_day,omitempty"` + MostActiveHour string `protobuf:"bytes,4,opt,name=most_active_hour,json=mostActiveHour,proto3" json:"most_active_hour,omitempty"` + FavoriteEmoji string `protobuf:"bytes,5,opt,name=favorite_emoji,json=favoriteEmoji,proto3" json:"favorite_emoji,omitempty"` + AngerLevel float64 `protobuf:"fixed64,6,opt,name=anger_level,json=angerLevel,proto3" json:"anger_level,omitempty"` + HumorLevel float64 `protobuf:"fixed64,7,opt,name=humor_level,json=humorLevel,proto3" json:"humor_level,omitempty"` + SarcasmLevel float64 `protobuf:"fixed64,8,opt,name=sarcasm_level,json=sarcasmLevel,proto3" json:"sarcasm_level,omitempty"` + TopicFrequency map[string]int64 `protobuf:"bytes,9,rep,name=topic_frequency,json=topicFrequency,proto3" json:"topic_frequency,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MessagesByHour map[string]int64 `protobuf:"bytes,10,rep,name=messages_by_hour,json=messagesByHour,proto3" json:"messages_by_hour,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MessagesByDay map[string]int64 `protobuf:"bytes,11,rep,name=messages_by_day,json=messagesByDay,proto3" json:"messages_by_day,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + ReactionCount int64 `protobuf:"varint,12,opt,name=reaction_count,json=reactionCount,proto3" json:"reaction_count,omitempty"` + BotAttitude int32 `protobuf:"varint,13,opt,name=bot_attitude,json=botAttitude,proto3" json:"bot_attitude,omitempty"` + BotAttitudeReason string `protobuf:"bytes,14,opt,name=bot_attitude_reason,json=botAttitudeReason,proto3" json:"bot_attitude_reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserStats) Reset() { + *x = UserStats{} + mi := &file_profiles_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserStats) ProtoMessage() {} + +func (x *UserStats) ProtoReflect() protoreflect.Message { + mi := &file_profiles_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 UserStats.ProtoReflect.Descriptor instead. +func (*UserStats) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{0} +} + +func (x *UserStats) GetTotalMessages() int64 { + if x != nil { + return x.TotalMessages + } + return 0 +} + +func (x *UserStats) GetFavoriteTopic() string { + if x != nil { + return x.FavoriteTopic + } + return "" +} + +func (x *UserStats) GetMostActiveDay() string { + if x != nil { + return x.MostActiveDay + } + return "" +} + +func (x *UserStats) GetMostActiveHour() string { + if x != nil { + return x.MostActiveHour + } + return "" +} + +func (x *UserStats) GetFavoriteEmoji() string { + if x != nil { + return x.FavoriteEmoji + } + return "" +} + +func (x *UserStats) GetAngerLevel() float64 { + if x != nil { + return x.AngerLevel + } + return 0 +} + +func (x *UserStats) GetHumorLevel() float64 { + if x != nil { + return x.HumorLevel + } + return 0 +} + +func (x *UserStats) GetSarcasmLevel() float64 { + if x != nil { + return x.SarcasmLevel + } + return 0 +} + +func (x *UserStats) GetTopicFrequency() map[string]int64 { + if x != nil { + return x.TopicFrequency + } + return nil +} + +func (x *UserStats) GetMessagesByHour() map[string]int64 { + if x != nil { + return x.MessagesByHour + } + return nil +} + +func (x *UserStats) GetMessagesByDay() map[string]int64 { + if x != nil { + return x.MessagesByDay + } + return nil +} + +func (x *UserStats) GetReactionCount() int64 { + if x != nil { + return x.ReactionCount + } + return 0 +} + +func (x *UserStats) GetBotAttitude() int32 { + if x != nil { + return x.BotAttitude + } + return 0 +} + +func (x *UserStats) GetBotAttitudeReason() string { + if x != nil { + return x.BotAttitudeReason + } + return "" +} + +type UserFavorites struct { + state protoimpl.MessageState `protogen:"open.v1"` + WhenMad string `protobuf:"bytes,1,opt,name=when_mad,json=whenMad,proto3" json:"when_mad,omitempty"` + WhenHappy string `protobuf:"bytes,2,opt,name=when_happy,json=whenHappy,proto3" json:"when_happy,omitempty"` + WhenAskHelp string `protobuf:"bytes,3,opt,name=when_ask_help,json=whenAskHelp,proto3" json:"when_ask_help,omitempty"` + PreferredNick string `protobuf:"bytes,4,opt,name=preferred_nick,json=preferredNick,proto3" json:"preferred_nick,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserFavorites) Reset() { + *x = UserFavorites{} + mi := &file_profiles_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserFavorites) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserFavorites) ProtoMessage() {} + +func (x *UserFavorites) ProtoReflect() protoreflect.Message { + mi := &file_profiles_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 UserFavorites.ProtoReflect.Descriptor instead. +func (*UserFavorites) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{1} +} + +func (x *UserFavorites) GetWhenMad() string { + if x != nil { + return x.WhenMad + } + return "" +} + +func (x *UserFavorites) GetWhenHappy() string { + if x != nil { + return x.WhenHappy + } + return "" +} + +func (x *UserFavorites) GetWhenAskHelp() string { + if x != nil { + return x.WhenAskHelp + } + return "" +} + +func (x *UserFavorites) GetPreferredNick() string { + if x != nil { + return x.PreferredNick + } + return "" +} + +type AvatarStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + Strength float64 `protobuf:"fixed64,1,opt,name=strength,proto3" json:"strength,omitempty"` + Agility float64 `protobuf:"fixed64,2,opt,name=agility,proto3" json:"agility,omitempty"` + Wisdom float64 `protobuf:"fixed64,3,opt,name=wisdom,proto3" json:"wisdom,omitempty"` + Charisma float64 `protobuf:"fixed64,4,opt,name=charisma,proto3" json:"charisma,omitempty"` + Tilt float64 `protobuf:"fixed64,5,opt,name=tilt,proto3" json:"tilt,omitempty"` + HumorLevel float64 `protobuf:"fixed64,6,opt,name=humor_level,json=humorLevel,proto3" json:"humor_level,omitempty"` + SarcasmLvl float64 `protobuf:"fixed64,7,opt,name=sarcasm_lvl,json=sarcasmLvl,proto3" json:"sarcasm_lvl,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AvatarStats) Reset() { + *x = AvatarStats{} + mi := &file_profiles_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AvatarStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AvatarStats) ProtoMessage() {} + +func (x *AvatarStats) ProtoReflect() protoreflect.Message { + mi := &file_profiles_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 AvatarStats.ProtoReflect.Descriptor instead. +func (*AvatarStats) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{2} +} + +func (x *AvatarStats) GetStrength() float64 { + if x != nil { + return x.Strength + } + return 0 +} + +func (x *AvatarStats) GetAgility() float64 { + if x != nil { + return x.Agility + } + return 0 +} + +func (x *AvatarStats) GetWisdom() float64 { + if x != nil { + return x.Wisdom + } + return 0 +} + +func (x *AvatarStats) GetCharisma() float64 { + if x != nil { + return x.Charisma + } + return 0 +} + +func (x *AvatarStats) GetTilt() float64 { + if x != nil { + return x.Tilt + } + return 0 +} + +func (x *AvatarStats) GetHumorLevel() float64 { + if x != nil { + return x.HumorLevel + } + return 0 +} + +func (x *AvatarStats) GetSarcasmLvl() float64 { + if x != nil { + return x.SarcasmLvl + } + return 0 +} + +type Skill struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Level int32 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` + Power float64 `protobuf:"fixed64,3,opt,name=power,proto3" json:"power,omitempty"` + Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` + UnlockedAt int64 `protobuf:"varint,5,opt,name=unlocked_at,json=unlockedAt,proto3" json:"unlocked_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Skill) Reset() { + *x = Skill{} + mi := &file_profiles_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Skill) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Skill) ProtoMessage() {} + +func (x *Skill) ProtoReflect() protoreflect.Message { + mi := &file_profiles_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 Skill.ProtoReflect.Descriptor instead. +func (*Skill) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{3} +} + +func (x *Skill) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Skill) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *Skill) GetPower() float64 { + if x != nil { + return x.Power + } + return 0 +} + +func (x *Skill) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *Skill) GetUnlockedAt() int64 { + if x != nil { + return x.UnlockedAt + } + return 0 +} + +type Avatar struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Class string `protobuf:"bytes,3,opt,name=class,proto3" json:"class,omitempty"` + Level int32 `protobuf:"varint,4,opt,name=level,proto3" json:"level,omitempty"` + Experience int64 `protobuf:"varint,5,opt,name=experience,proto3" json:"experience,omitempty"` + Stats *AvatarStats `protobuf:"bytes,6,opt,name=stats,proto3" json:"stats,omitempty"` + Skills []*Skill `protobuf:"bytes,7,rep,name=skills,proto3" json:"skills,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Avatar) Reset() { + *x = Avatar{} + mi := &file_profiles_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Avatar) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Avatar) ProtoMessage() {} + +func (x *Avatar) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[4] + 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 Avatar.ProtoReflect.Descriptor instead. +func (*Avatar) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{4} +} + +func (x *Avatar) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Avatar) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Avatar) GetClass() string { + if x != nil { + return x.Class + } + return "" +} + +func (x *Avatar) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *Avatar) GetExperience() int64 { + if x != nil { + return x.Experience + } + return 0 +} + +func (x *Avatar) GetStats() *AvatarStats { + if x != nil { + return x.Stats + } + return nil +} + +func (x *Avatar) GetSkills() []*Skill { + if x != nil { + return x.Skills + } + return nil +} + +func (x *Avatar) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Avatar) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type UserProfile struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + GlobalUserId int64 `protobuf:"varint,2,opt,name=global_user_id,json=globalUserId,proto3" json:"global_user_id,omitempty"` + UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` + JoinDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=join_date,json=joinDate,proto3" json:"join_date,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Avatar *Avatar `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` + Stats *UserStats `protobuf:"bytes,8,opt,name=stats,proto3" json:"stats,omitempty"` + Favorites *UserFavorites `protobuf:"bytes,9,opt,name=favorites,proto3" json:"favorites,omitempty"` + Catchphrases []byte `protobuf:"bytes,10,opt,name=catchphrases,proto3" json:"catchphrases,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserProfile) Reset() { + *x = UserProfile{} + mi := &file_profiles_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserProfile) ProtoMessage() {} + +func (x *UserProfile) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[5] + 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 UserProfile.ProtoReflect.Descriptor instead. +func (*UserProfile) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{5} +} + +func (x *UserProfile) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *UserProfile) GetGlobalUserId() int64 { + if x != nil { + return x.GlobalUserId + } + return 0 +} + +func (x *UserProfile) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *UserProfile) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *UserProfile) GetJoinDate() *timestamppb.Timestamp { + if x != nil { + return x.JoinDate + } + return nil +} + +func (x *UserProfile) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *UserProfile) GetAvatar() *Avatar { + if x != nil { + return x.Avatar + } + return nil +} + +func (x *UserProfile) GetStats() *UserStats { + if x != nil { + return x.Stats + } + return nil +} + +func (x *UserProfile) GetFavorites() *UserFavorites { + if x != nil { + return x.Favorites + } + return nil +} + +func (x *UserProfile) GetCatchphrases() []byte { + if x != nil { + return x.Catchphrases + } + return nil +} + +type UserMoodHistory struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + Mood int32 `protobuf:"varint,4,opt,name=mood,proto3" json:"mood,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reason string `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserMoodHistory) Reset() { + *x = UserMoodHistory{} + mi := &file_profiles_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserMoodHistory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserMoodHistory) ProtoMessage() {} + +func (x *UserMoodHistory) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[6] + 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 UserMoodHistory.ProtoReflect.Descriptor instead. +func (*UserMoodHistory) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{6} +} + +func (x *UserMoodHistory) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *UserMoodHistory) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *UserMoodHistory) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *UserMoodHistory) GetMood() int32 { + if x != nil { + return x.Mood + } + return 0 +} + +func (x *UserMoodHistory) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *UserMoodHistory) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type MemorableMoment struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Date *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"` + Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` + BotResponse string `protobuf:"bytes,5,opt,name=bot_response,json=botResponse,proto3" json:"bot_response,omitempty"` + ReactionCount int64 `protobuf:"varint,6,opt,name=reaction_count,json=reactionCount,proto3" json:"reaction_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemorableMoment) Reset() { + *x = MemorableMoment{} + mi := &file_profiles_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemorableMoment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemorableMoment) ProtoMessage() {} + +func (x *MemorableMoment) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[7] + 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 MemorableMoment.ProtoReflect.Descriptor instead. +func (*MemorableMoment) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{7} +} + +func (x *MemorableMoment) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *MemorableMoment) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *MemorableMoment) GetDate() *timestamppb.Timestamp { + if x != nil { + return x.Date + } + return nil +} + +func (x *MemorableMoment) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *MemorableMoment) GetBotResponse() string { + if x != nil { + return x.BotResponse + } + return "" +} + +func (x *MemorableMoment) GetReactionCount() int64 { + if x != nil { + return x.ReactionCount + } + return 0 +} + +type GetOrCreateProfileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetOrCreateProfileRequest) Reset() { + *x = GetOrCreateProfileRequest{} + mi := &file_profiles_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetOrCreateProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrCreateProfileRequest) ProtoMessage() {} + +func (x *GetOrCreateProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[8] + 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 GetOrCreateProfileRequest.ProtoReflect.Descriptor instead. +func (*GetOrCreateProfileRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{8} +} + +func (x *GetOrCreateProfileRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GetOrCreateProfileRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +type GetProfileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProfileRequest) Reset() { + *x = GetProfileRequest{} + mi := &file_profiles_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProfileRequest) ProtoMessage() {} + +func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[9] + 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 GetProfileRequest.ProtoReflect.Descriptor instead. +func (*GetProfileRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{9} +} + +func (x *GetProfileRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +type GetAllProfilesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Profiles []*UserProfile `protobuf:"bytes,1,rep,name=profiles,proto3" json:"profiles,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAllProfilesResponse) Reset() { + *x = GetAllProfilesResponse{} + mi := &file_profiles_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAllProfilesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllProfilesResponse) ProtoMessage() {} + +func (x *GetAllProfilesResponse) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[10] + 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 GetAllProfilesResponse.ProtoReflect.Descriptor instead. +func (*GetAllProfilesResponse) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{10} +} + +func (x *GetAllProfilesResponse) GetProfiles() []*UserProfile { + if x != nil { + return x.Profiles + } + return nil +} + +type AddMessageToStatsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` + Hour string `protobuf:"bytes,3,opt,name=hour,proto3" json:"hour,omitempty"` + Day string `protobuf:"bytes,4,opt,name=day,proto3" json:"day,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddMessageToStatsRequest) Reset() { + *x = AddMessageToStatsRequest{} + mi := &file_profiles_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddMessageToStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMessageToStatsRequest) ProtoMessage() {} + +func (x *AddMessageToStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[11] + 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 AddMessageToStatsRequest.ProtoReflect.Descriptor instead. +func (*AddMessageToStatsRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{11} +} + +func (x *AddMessageToStatsRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *AddMessageToStatsRequest) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *AddMessageToStatsRequest) GetHour() string { + if x != nil { + return x.Hour + } + return "" +} + +func (x *AddMessageToStatsRequest) GetDay() string { + if x != nil { + return x.Day + } + return "" +} + +type UpdateReactionCountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Increment int64 `protobuf:"varint,2,opt,name=increment,proto3" json:"increment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateReactionCountRequest) Reset() { + *x = UpdateReactionCountRequest{} + mi := &file_profiles_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateReactionCountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReactionCountRequest) ProtoMessage() {} + +func (x *UpdateReactionCountRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[12] + 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 UpdateReactionCountRequest.ProtoReflect.Descriptor instead. +func (*UpdateReactionCountRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateReactionCountRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *UpdateReactionCountRequest) GetIncrement() int64 { + if x != nil { + return x.Increment + } + return 0 +} + +type SetBotAttitudeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + IsDelta bool `protobuf:"varint,4,opt,name=is_delta,json=isDelta,proto3" json:"is_delta,omitempty"` // if true, value is a delta; if false, value is absolute + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetBotAttitudeRequest) Reset() { + *x = SetBotAttitudeRequest{} + mi := &file_profiles_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetBotAttitudeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetBotAttitudeRequest) ProtoMessage() {} + +func (x *SetBotAttitudeRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[13] + 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 SetBotAttitudeRequest.ProtoReflect.Descriptor instead. +func (*SetBotAttitudeRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{13} +} + +func (x *SetBotAttitudeRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *SetBotAttitudeRequest) GetValue() int32 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *SetBotAttitudeRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *SetBotAttitudeRequest) GetIsDelta() bool { + if x != nil { + return x.IsDelta + } + return false +} + +type SaveMemorableMomentRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` + BotResponse string `protobuf:"bytes,3,opt,name=bot_response,json=botResponse,proto3" json:"bot_response,omitempty"` + ReactionCount int64 `protobuf:"varint,4,opt,name=reaction_count,json=reactionCount,proto3" json:"reaction_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaveMemorableMomentRequest) Reset() { + *x = SaveMemorableMomentRequest{} + mi := &file_profiles_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaveMemorableMomentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveMemorableMomentRequest) ProtoMessage() {} + +func (x *SaveMemorableMomentRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[14] + 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 SaveMemorableMomentRequest.ProtoReflect.Descriptor instead. +func (*SaveMemorableMomentRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{14} +} + +func (x *SaveMemorableMomentRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *SaveMemorableMomentRequest) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *SaveMemorableMomentRequest) GetBotResponse() string { + if x != nil { + return x.BotResponse + } + return "" +} + +func (x *SaveMemorableMomentRequest) GetReactionCount() int64 { + if x != nil { + return x.ReactionCount + } + return 0 +} + +type GetMemorableMomentsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMemorableMomentsRequest) Reset() { + *x = GetMemorableMomentsRequest{} + mi := &file_profiles_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMemorableMomentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemorableMomentsRequest) ProtoMessage() {} + +func (x *GetMemorableMomentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[15] + 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 GetMemorableMomentsRequest.ProtoReflect.Descriptor instead. +func (*GetMemorableMomentsRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{15} +} + +func (x *GetMemorableMomentsRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GetMemorableMomentsRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +type GetMemorableMomentsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Moments []*MemorableMoment `protobuf:"bytes,1,rep,name=moments,proto3" json:"moments,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMemorableMomentsResponse) Reset() { + *x = GetMemorableMomentsResponse{} + mi := &file_profiles_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMemorableMomentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemorableMomentsResponse) ProtoMessage() {} + +func (x *GetMemorableMomentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[16] + 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 GetMemorableMomentsResponse.ProtoReflect.Descriptor instead. +func (*GetMemorableMomentsResponse) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{16} +} + +func (x *GetMemorableMomentsResponse) GetMoments() []*MemorableMoment { + if x != nil { + return x.Moments + } + return nil +} + +type RecordMoodHistoryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Mood int32 `protobuf:"varint,3,opt,name=mood,proto3" json:"mood,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordMoodHistoryRequest) Reset() { + *x = RecordMoodHistoryRequest{} + mi := &file_profiles_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordMoodHistoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordMoodHistoryRequest) ProtoMessage() {} + +func (x *RecordMoodHistoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[17] + 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 RecordMoodHistoryRequest.ProtoReflect.Descriptor instead. +func (*RecordMoodHistoryRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{17} +} + +func (x *RecordMoodHistoryRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *RecordMoodHistoryRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *RecordMoodHistoryRequest) GetMood() int32 { + if x != nil { + return x.Mood + } + return 0 +} + +func (x *RecordMoodHistoryRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type GetMoodHistoryByUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + From *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMoodHistoryByUserRequest) Reset() { + *x = GetMoodHistoryByUserRequest{} + mi := &file_profiles_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMoodHistoryByUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMoodHistoryByUserRequest) ProtoMessage() {} + +func (x *GetMoodHistoryByUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[18] + 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 GetMoodHistoryByUserRequest.ProtoReflect.Descriptor instead. +func (*GetMoodHistoryByUserRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{18} +} + +func (x *GetMoodHistoryByUserRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GetMoodHistoryByUserRequest) GetFrom() *timestamppb.Timestamp { + if x != nil { + return x.From + } + return nil +} + +func (x *GetMoodHistoryByUserRequest) GetTo() *timestamppb.Timestamp { + if x != nil { + return x.To + } + return nil +} + +type GetMoodHistoryByTimeRangeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + From *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + To *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMoodHistoryByTimeRangeRequest) Reset() { + *x = GetMoodHistoryByTimeRangeRequest{} + mi := &file_profiles_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMoodHistoryByTimeRangeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMoodHistoryByTimeRangeRequest) ProtoMessage() {} + +func (x *GetMoodHistoryByTimeRangeRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[19] + 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 GetMoodHistoryByTimeRangeRequest.ProtoReflect.Descriptor instead. +func (*GetMoodHistoryByTimeRangeRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{19} +} + +func (x *GetMoodHistoryByTimeRangeRequest) GetFrom() *timestamppb.Timestamp { + if x != nil { + return x.From + } + return nil +} + +func (x *GetMoodHistoryByTimeRangeRequest) GetTo() *timestamppb.Timestamp { + if x != nil { + return x.To + } + return nil +} + +type GetRecentMoodHistoryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRecentMoodHistoryRequest) Reset() { + *x = GetRecentMoodHistoryRequest{} + mi := &file_profiles_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRecentMoodHistoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRecentMoodHistoryRequest) ProtoMessage() {} + +func (x *GetRecentMoodHistoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[20] + 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 GetRecentMoodHistoryRequest.ProtoReflect.Descriptor instead. +func (*GetRecentMoodHistoryRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{20} +} + +func (x *GetRecentMoodHistoryRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +type GetLastMoodBeforeTimeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Before *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLastMoodBeforeTimeRequest) Reset() { + *x = GetLastMoodBeforeTimeRequest{} + mi := &file_profiles_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLastMoodBeforeTimeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLastMoodBeforeTimeRequest) ProtoMessage() {} + +func (x *GetLastMoodBeforeTimeRequest) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[21] + 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 GetLastMoodBeforeTimeRequest.ProtoReflect.Descriptor instead. +func (*GetLastMoodBeforeTimeRequest) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{21} +} + +func (x *GetLastMoodBeforeTimeRequest) GetBefore() *timestamppb.Timestamp { + if x != nil { + return x.Before + } + return nil +} + +type GetMoodHistoryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + History []*UserMoodHistory `protobuf:"bytes,1,rep,name=history,proto3" json:"history,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMoodHistoryResponse) Reset() { + *x = GetMoodHistoryResponse{} + mi := &file_profiles_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMoodHistoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMoodHistoryResponse) ProtoMessage() {} + +func (x *GetMoodHistoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_profiles_proto_msgTypes[22] + 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 GetMoodHistoryResponse.ProtoReflect.Descriptor instead. +func (*GetMoodHistoryResponse) Descriptor() ([]byte, []int) { + return file_profiles_proto_rawDescGZIP(), []int{22} +} + +func (x *GetMoodHistoryResponse) GetHistory() []*UserMoodHistory { + if x != nil { + return x.History + } + return nil +} + +var File_profiles_proto protoreflect.FileDescriptor + +const file_profiles_proto_rawDesc = "" + + "\n" + + "\x0eprofiles.proto\x12\x05users\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\x06\n" + + "\tUserStats\x12%\n" + + "\x0etotal_messages\x18\x01 \x01(\x03R\rtotalMessages\x12%\n" + + "\x0efavorite_topic\x18\x02 \x01(\tR\rfavoriteTopic\x12&\n" + + "\x0fmost_active_day\x18\x03 \x01(\tR\rmostActiveDay\x12(\n" + + "\x10most_active_hour\x18\x04 \x01(\tR\x0emostActiveHour\x12%\n" + + "\x0efavorite_emoji\x18\x05 \x01(\tR\rfavoriteEmoji\x12\x1f\n" + + "\vanger_level\x18\x06 \x01(\x01R\n" + + "angerLevel\x12\x1f\n" + + "\vhumor_level\x18\a \x01(\x01R\n" + + "humorLevel\x12#\n" + + "\rsarcasm_level\x18\b \x01(\x01R\fsarcasmLevel\x12M\n" + + "\x0ftopic_frequency\x18\t \x03(\v2$.users.UserStats.TopicFrequencyEntryR\x0etopicFrequency\x12N\n" + + "\x10messages_by_hour\x18\n" + + " \x03(\v2$.users.UserStats.MessagesByHourEntryR\x0emessagesByHour\x12K\n" + + "\x0fmessages_by_day\x18\v \x03(\v2#.users.UserStats.MessagesByDayEntryR\rmessagesByDay\x12%\n" + + "\x0ereaction_count\x18\f \x01(\x03R\rreactionCount\x12!\n" + + "\fbot_attitude\x18\r \x01(\x05R\vbotAttitude\x12.\n" + + "\x13bot_attitude_reason\x18\x0e \x01(\tR\x11botAttitudeReason\x1aA\n" + + "\x13TopicFrequencyEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\x1aA\n" + + "\x13MessagesByHourEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\x1a@\n" + + "\x12MessagesByDayEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\"\x94\x01\n" + + "\rUserFavorites\x12\x19\n" + + "\bwhen_mad\x18\x01 \x01(\tR\awhenMad\x12\x1d\n" + + "\n" + + "when_happy\x18\x02 \x01(\tR\twhenHappy\x12\"\n" + + "\rwhen_ask_help\x18\x03 \x01(\tR\vwhenAskHelp\x12%\n" + + "\x0epreferred_nick\x18\x04 \x01(\tR\rpreferredNick\"\xcd\x01\n" + + "\vAvatarStats\x12\x1a\n" + + "\bstrength\x18\x01 \x01(\x01R\bstrength\x12\x18\n" + + "\aagility\x18\x02 \x01(\x01R\aagility\x12\x16\n" + + "\x06wisdom\x18\x03 \x01(\x01R\x06wisdom\x12\x1a\n" + + "\bcharisma\x18\x04 \x01(\x01R\bcharisma\x12\x12\n" + + "\x04tilt\x18\x05 \x01(\x01R\x04tilt\x12\x1f\n" + + "\vhumor_level\x18\x06 \x01(\x01R\n" + + "humorLevel\x12\x1f\n" + + "\vsarcasm_lvl\x18\a \x01(\x01R\n" + + "sarcasmLvl\"\x80\x01\n" + + "\x05Skill\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05level\x18\x02 \x01(\x05R\x05level\x12\x14\n" + + "\x05power\x18\x03 \x01(\x01R\x05power\x12\x16\n" + + "\x06active\x18\x04 \x01(\bR\x06active\x12\x1f\n" + + "\vunlocked_at\x18\x05 \x01(\x03R\n" + + "unlockedAt\"\xbe\x02\n" + + "\x06Avatar\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05class\x18\x03 \x01(\tR\x05class\x12\x14\n" + + "\x05level\x18\x04 \x01(\x05R\x05level\x12\x1e\n" + + "\n" + + "experience\x18\x05 \x01(\x03R\n" + + "experience\x12(\n" + + "\x05stats\x18\x06 \x01(\v2\x12.users.AvatarStatsR\x05stats\x12$\n" + + "\x06skills\x18\a \x03(\v2\f.users.SkillR\x06skills\x129\n" + + "\n" + + "created_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x93\x03\n" + + "\vUserProfile\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12$\n" + + "\x0eglobal_user_id\x18\x02 \x01(\x03R\fglobalUserId\x12\x17\n" + + "\auser_id\x18\x03 \x01(\x03R\x06userId\x12\x1a\n" + + "\busername\x18\x04 \x01(\tR\busername\x127\n" + + "\tjoin_date\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\bjoinDate\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12%\n" + + "\x06avatar\x18\a \x01(\v2\r.users.AvatarR\x06avatar\x12&\n" + + "\x05stats\x18\b \x01(\v2\x10.users.UserStatsR\x05stats\x122\n" + + "\tfavorites\x18\t \x01(\v2\x14.users.UserFavoritesR\tfavorites\x12\"\n" + + "\fcatchphrases\x18\n" + + " \x01(\fR\fcatchphrases\"\xbc\x01\n" + + "\x0fUserMoodHistory\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x17\n" + + "\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x1a\n" + + "\busername\x18\x03 \x01(\tR\busername\x12\x12\n" + + "\x04mood\x18\x04 \x01(\x05R\x04mood\x128\n" + + "\ttimestamp\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\x12\x16\n" + + "\x06reason\x18\x06 \x01(\tR\x06reason\"\xc8\x01\n" + + "\x0fMemorableMoment\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x17\n" + + "\auser_id\x18\x02 \x01(\x03R\x06userId\x12.\n" + + "\x04date\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x04date\x12\x12\n" + + "\x04text\x18\x04 \x01(\tR\x04text\x12!\n" + + "\fbot_response\x18\x05 \x01(\tR\vbotResponse\x12%\n" + + "\x0ereaction_count\x18\x06 \x01(\x03R\rreactionCount\"P\n" + + "\x19GetOrCreateProfileRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" + + "\busername\x18\x02 \x01(\tR\busername\",\n" + + "\x11GetProfileRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\"H\n" + + "\x16GetAllProfilesResponse\x12.\n" + + "\bprofiles\x18\x01 \x03(\v2\x12.users.UserProfileR\bprofiles\"o\n" + + "\x18AddMessageToStatsRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x14\n" + + "\x05topic\x18\x02 \x01(\tR\x05topic\x12\x12\n" + + "\x04hour\x18\x03 \x01(\tR\x04hour\x12\x10\n" + + "\x03day\x18\x04 \x01(\tR\x03day\"S\n" + + "\x1aUpdateReactionCountRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1c\n" + + "\tincrement\x18\x02 \x01(\x03R\tincrement\"y\n" + + "\x15SetBotAttitudeRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x14\n" + + "\x05value\x18\x02 \x01(\x05R\x05value\x12\x16\n" + + "\x06reason\x18\x03 \x01(\tR\x06reason\x12\x19\n" + + "\bis_delta\x18\x04 \x01(\bR\aisDelta\"\x93\x01\n" + + "\x1aSaveMemorableMomentRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x12\n" + + "\x04text\x18\x02 \x01(\tR\x04text\x12!\n" + + "\fbot_response\x18\x03 \x01(\tR\vbotResponse\x12%\n" + + "\x0ereaction_count\x18\x04 \x01(\x03R\rreactionCount\"K\n" + + "\x1aGetMemorableMomentsRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x14\n" + + "\x05limit\x18\x02 \x01(\x05R\x05limit\"O\n" + + "\x1bGetMemorableMomentsResponse\x120\n" + + "\amoments\x18\x01 \x03(\v2\x16.users.MemorableMomentR\amoments\"{\n" + + "\x18RecordMoodHistoryRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" + + "\busername\x18\x02 \x01(\tR\busername\x12\x12\n" + + "\x04mood\x18\x03 \x01(\x05R\x04mood\x12\x16\n" + + "\x06reason\x18\x04 \x01(\tR\x06reason\"\x92\x01\n" + + "\x1bGetMoodHistoryByUserRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12.\n" + + "\x04from\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x04from\x12*\n" + + "\x02to\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x02to\"~\n" + + " GetMoodHistoryByTimeRangeRequest\x12.\n" + + "\x04from\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x04from\x12*\n" + + "\x02to\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02to\"3\n" + + "\x1bGetRecentMoodHistoryRequest\x12\x14\n" + + "\x05limit\x18\x01 \x01(\x05R\x05limit\"R\n" + + "\x1cGetLastMoodBeforeTimeRequest\x122\n" + + "\x06before\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x06before\"J\n" + + "\x16GetMoodHistoryResponse\x120\n" + + "\ahistory\x18\x01 \x03(\v2\x16.users.UserMoodHistoryR\ahistory2\xd7\x05\n" + + "\x12UserProfileService\x12J\n" + + "\x12GetOrCreateProfile\x12 .users.GetOrCreateProfileRequest\x1a\x12.users.UserProfile\x12:\n" + + "\n" + + "GetProfile\x12\x18.users.GetProfileRequest\x1a\x12.users.UserProfile\x12S\n" + + "\x1aGetAllProfilesWithMessages\x12\x16.google.protobuf.Empty\x1a\x1d.users.GetAllProfilesResponse\x12L\n" + + "\x11AddMessageToStats\x12\x1f.users.AddMessageToStatsRequest\x1a\x16.google.protobuf.Empty\x12P\n" + + "\x13UpdateReactionCount\x12!.users.UpdateReactionCountRequest\x1a\x16.google.protobuf.Empty\x12F\n" + + "\x0eSetBotAttitude\x12\x1c.users.SetBotAttitudeRequest\x1a\x16.google.protobuf.Empty\x12P\n" + + "\x13SaveMemorableMoment\x12!.users.SaveMemorableMomentRequest\x1a\x16.google.protobuf.Empty\x12\\\n" + + "\x13GetMemorableMoments\x12!.users.GetMemorableMomentsRequest\x1a\".users.GetMemorableMomentsResponse\x12L\n" + + "\x11RecordMoodHistory\x12\x1f.users.RecordMoodHistoryRequest\x1a\x16.google.protobuf.Empty2\x90\x03\n" + + "\x16UserMoodHistoryService\x12Y\n" + + "\x14GetMoodHistoryByUser\x12\".users.GetMoodHistoryByUserRequest\x1a\x1d.users.GetMoodHistoryResponse\x12c\n" + + "\x19GetMoodHistoryByTimeRange\x12'.users.GetMoodHistoryByTimeRangeRequest\x1a\x1d.users.GetMoodHistoryResponse\x12Y\n" + + "\x14GetRecentMoodHistory\x12\".users.GetRecentMoodHistoryRequest\x1a\x1d.users.GetMoodHistoryResponse\x12[\n" + + "\x15GetLastMoodBeforeTime\x12#.users.GetLastMoodBeforeTimeRequest\x1a\x1d.users.GetMoodHistoryResponseB,Z*git.be.kaien.ru/l-ai/l-ai-core-proto/protob\x06proto3" + +var ( + file_profiles_proto_rawDescOnce sync.Once + file_profiles_proto_rawDescData []byte +) + +func file_profiles_proto_rawDescGZIP() []byte { + file_profiles_proto_rawDescOnce.Do(func() { + file_profiles_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_profiles_proto_rawDesc), len(file_profiles_proto_rawDesc))) + }) + return file_profiles_proto_rawDescData +} + +var file_profiles_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_profiles_proto_goTypes = []any{ + (*UserStats)(nil), // 0: users.UserStats + (*UserFavorites)(nil), // 1: users.UserFavorites + (*AvatarStats)(nil), // 2: users.AvatarStats + (*Skill)(nil), // 3: users.Skill + (*Avatar)(nil), // 4: users.Avatar + (*UserProfile)(nil), // 5: users.UserProfile + (*UserMoodHistory)(nil), // 6: users.UserMoodHistory + (*MemorableMoment)(nil), // 7: users.MemorableMoment + (*GetOrCreateProfileRequest)(nil), // 8: users.GetOrCreateProfileRequest + (*GetProfileRequest)(nil), // 9: users.GetProfileRequest + (*GetAllProfilesResponse)(nil), // 10: users.GetAllProfilesResponse + (*AddMessageToStatsRequest)(nil), // 11: users.AddMessageToStatsRequest + (*UpdateReactionCountRequest)(nil), // 12: users.UpdateReactionCountRequest + (*SetBotAttitudeRequest)(nil), // 13: users.SetBotAttitudeRequest + (*SaveMemorableMomentRequest)(nil), // 14: users.SaveMemorableMomentRequest + (*GetMemorableMomentsRequest)(nil), // 15: users.GetMemorableMomentsRequest + (*GetMemorableMomentsResponse)(nil), // 16: users.GetMemorableMomentsResponse + (*RecordMoodHistoryRequest)(nil), // 17: users.RecordMoodHistoryRequest + (*GetMoodHistoryByUserRequest)(nil), // 18: users.GetMoodHistoryByUserRequest + (*GetMoodHistoryByTimeRangeRequest)(nil), // 19: users.GetMoodHistoryByTimeRangeRequest + (*GetRecentMoodHistoryRequest)(nil), // 20: users.GetRecentMoodHistoryRequest + (*GetLastMoodBeforeTimeRequest)(nil), // 21: users.GetLastMoodBeforeTimeRequest + (*GetMoodHistoryResponse)(nil), // 22: users.GetMoodHistoryResponse + nil, // 23: users.UserStats.TopicFrequencyEntry + nil, // 24: users.UserStats.MessagesByHourEntry + nil, // 25: users.UserStats.MessagesByDayEntry + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 27: google.protobuf.Empty +} +var file_profiles_proto_depIdxs = []int32{ + 23, // 0: users.UserStats.topic_frequency:type_name -> users.UserStats.TopicFrequencyEntry + 24, // 1: users.UserStats.messages_by_hour:type_name -> users.UserStats.MessagesByHourEntry + 25, // 2: users.UserStats.messages_by_day:type_name -> users.UserStats.MessagesByDayEntry + 2, // 3: users.Avatar.stats:type_name -> users.AvatarStats + 3, // 4: users.Avatar.skills:type_name -> users.Skill + 26, // 5: users.Avatar.created_at:type_name -> google.protobuf.Timestamp + 26, // 6: users.Avatar.updated_at:type_name -> google.protobuf.Timestamp + 26, // 7: users.UserProfile.join_date:type_name -> google.protobuf.Timestamp + 26, // 8: users.UserProfile.updated_at:type_name -> google.protobuf.Timestamp + 4, // 9: users.UserProfile.avatar:type_name -> users.Avatar + 0, // 10: users.UserProfile.stats:type_name -> users.UserStats + 1, // 11: users.UserProfile.favorites:type_name -> users.UserFavorites + 26, // 12: users.UserMoodHistory.timestamp:type_name -> google.protobuf.Timestamp + 26, // 13: users.MemorableMoment.date:type_name -> google.protobuf.Timestamp + 5, // 14: users.GetAllProfilesResponse.profiles:type_name -> users.UserProfile + 7, // 15: users.GetMemorableMomentsResponse.moments:type_name -> users.MemorableMoment + 26, // 16: users.GetMoodHistoryByUserRequest.from:type_name -> google.protobuf.Timestamp + 26, // 17: users.GetMoodHistoryByUserRequest.to:type_name -> google.protobuf.Timestamp + 26, // 18: users.GetMoodHistoryByTimeRangeRequest.from:type_name -> google.protobuf.Timestamp + 26, // 19: users.GetMoodHistoryByTimeRangeRequest.to:type_name -> google.protobuf.Timestamp + 26, // 20: users.GetLastMoodBeforeTimeRequest.before:type_name -> google.protobuf.Timestamp + 6, // 21: users.GetMoodHistoryResponse.history:type_name -> users.UserMoodHistory + 8, // 22: users.UserProfileService.GetOrCreateProfile:input_type -> users.GetOrCreateProfileRequest + 9, // 23: users.UserProfileService.GetProfile:input_type -> users.GetProfileRequest + 27, // 24: users.UserProfileService.GetAllProfilesWithMessages:input_type -> google.protobuf.Empty + 11, // 25: users.UserProfileService.AddMessageToStats:input_type -> users.AddMessageToStatsRequest + 12, // 26: users.UserProfileService.UpdateReactionCount:input_type -> users.UpdateReactionCountRequest + 13, // 27: users.UserProfileService.SetBotAttitude:input_type -> users.SetBotAttitudeRequest + 14, // 28: users.UserProfileService.SaveMemorableMoment:input_type -> users.SaveMemorableMomentRequest + 15, // 29: users.UserProfileService.GetMemorableMoments:input_type -> users.GetMemorableMomentsRequest + 17, // 30: users.UserProfileService.RecordMoodHistory:input_type -> users.RecordMoodHistoryRequest + 18, // 31: users.UserMoodHistoryService.GetMoodHistoryByUser:input_type -> users.GetMoodHistoryByUserRequest + 19, // 32: users.UserMoodHistoryService.GetMoodHistoryByTimeRange:input_type -> users.GetMoodHistoryByTimeRangeRequest + 20, // 33: users.UserMoodHistoryService.GetRecentMoodHistory:input_type -> users.GetRecentMoodHistoryRequest + 21, // 34: users.UserMoodHistoryService.GetLastMoodBeforeTime:input_type -> users.GetLastMoodBeforeTimeRequest + 5, // 35: users.UserProfileService.GetOrCreateProfile:output_type -> users.UserProfile + 5, // 36: users.UserProfileService.GetProfile:output_type -> users.UserProfile + 10, // 37: users.UserProfileService.GetAllProfilesWithMessages:output_type -> users.GetAllProfilesResponse + 27, // 38: users.UserProfileService.AddMessageToStats:output_type -> google.protobuf.Empty + 27, // 39: users.UserProfileService.UpdateReactionCount:output_type -> google.protobuf.Empty + 27, // 40: users.UserProfileService.SetBotAttitude:output_type -> google.protobuf.Empty + 27, // 41: users.UserProfileService.SaveMemorableMoment:output_type -> google.protobuf.Empty + 16, // 42: users.UserProfileService.GetMemorableMoments:output_type -> users.GetMemorableMomentsResponse + 27, // 43: users.UserProfileService.RecordMoodHistory:output_type -> google.protobuf.Empty + 22, // 44: users.UserMoodHistoryService.GetMoodHistoryByUser:output_type -> users.GetMoodHistoryResponse + 22, // 45: users.UserMoodHistoryService.GetMoodHistoryByTimeRange:output_type -> users.GetMoodHistoryResponse + 22, // 46: users.UserMoodHistoryService.GetRecentMoodHistory:output_type -> users.GetMoodHistoryResponse + 22, // 47: users.UserMoodHistoryService.GetLastMoodBeforeTime:output_type -> users.GetMoodHistoryResponse + 35, // [35:48] is the sub-list for method output_type + 22, // [22:35] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_profiles_proto_init() } +func file_profiles_proto_init() { + if File_profiles_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_profiles_proto_rawDesc), len(file_profiles_proto_rawDesc)), + NumEnums: 0, + NumMessages: 26, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_profiles_proto_goTypes, + DependencyIndexes: file_profiles_proto_depIdxs, + MessageInfos: file_profiles_proto_msgTypes, + }.Build() + File_profiles_proto = out.File + file_profiles_proto_goTypes = nil + file_profiles_proto_depIdxs = nil +} diff --git a/profiles.proto b/profiles.proto new file mode 100644 index 0000000..7d29d61 --- /dev/null +++ b/profiles.proto @@ -0,0 +1,196 @@ +syntax = "proto3"; + +package users; + +option go_package = "git.be.kaien.ru/l-ai/l-ai-core-proto/proto"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +// UserProfileService manages Telegram user profiles, avatars, and mood history +service UserProfileService { + rpc GetOrCreateProfile(GetOrCreateProfileRequest) returns (UserProfile); + rpc GetProfile(GetProfileRequest) returns (UserProfile); + rpc GetAllProfilesWithMessages(google.protobuf.Empty) returns (GetAllProfilesResponse); + rpc AddMessageToStats(AddMessageToStatsRequest) returns (google.protobuf.Empty); + rpc UpdateReactionCount(UpdateReactionCountRequest) returns (google.protobuf.Empty); + rpc SetBotAttitude(SetBotAttitudeRequest) returns (google.protobuf.Empty); + rpc SaveMemorableMoment(SaveMemorableMomentRequest) returns (google.protobuf.Empty); + rpc GetMemorableMoments(GetMemorableMomentsRequest) returns (GetMemorableMomentsResponse); + rpc RecordMoodHistory(RecordMoodHistoryRequest) returns (google.protobuf.Empty); +} + +// UserMoodHistoryService provides mood history queries +service UserMoodHistoryService { + rpc GetMoodHistoryByUser(GetMoodHistoryByUserRequest) returns (GetMoodHistoryResponse); + rpc GetMoodHistoryByTimeRange(GetMoodHistoryByTimeRangeRequest) returns (GetMoodHistoryResponse); + rpc GetRecentMoodHistory(GetRecentMoodHistoryRequest) returns (GetMoodHistoryResponse); + rpc GetLastMoodBeforeTime(GetLastMoodBeforeTimeRequest) returns (GetMoodHistoryResponse); +} + +// --- Messages --- + +message UserStats { + int64 total_messages = 1; + string favorite_topic = 2; + string most_active_day = 3; + string most_active_hour = 4; + string favorite_emoji = 5; + double anger_level = 6; + double humor_level = 7; + double sarcasm_level = 8; + map topic_frequency = 9; + map messages_by_hour = 10; + map messages_by_day = 11; + int64 reaction_count = 12; + int32 bot_attitude = 13; + string bot_attitude_reason = 14; +} + +message UserFavorites { + string when_mad = 1; + string when_happy = 2; + string when_ask_help = 3; + string preferred_nick = 4; +} + +message AvatarStats { + double strength = 1; + double agility = 2; + double wisdom = 3; + double charisma = 4; + double tilt = 5; + double humor_level = 6; + double sarcasm_lvl = 7; +} + +message Skill { + string name = 1; + int32 level = 2; + double power = 3; + bool active = 4; + int64 unlocked_at = 5; +} + +message Avatar { + int64 id = 1; + string name = 2; + string class = 3; + int32 level = 4; + int64 experience = 5; + AvatarStats stats = 6; + repeated Skill skills = 7; + google.protobuf.Timestamp created_at = 8; + google.protobuf.Timestamp updated_at = 9; +} + +message UserProfile { + int64 id = 1; + int64 global_user_id = 2; + int64 user_id = 3; + string username = 4; + google.protobuf.Timestamp join_date = 5; + google.protobuf.Timestamp updated_at = 6; + Avatar avatar = 7; + UserStats stats = 8; + UserFavorites favorites = 9; + bytes catchphrases = 10; +} + +message UserMoodHistory { + int64 id = 1; + int64 user_id = 2; + string username = 3; + int32 mood = 4; + google.protobuf.Timestamp timestamp = 5; + string reason = 6; +} + +message MemorableMoment { + int64 id = 1; + int64 user_id = 2; + google.protobuf.Timestamp date = 3; + string text = 4; + string bot_response = 5; + int64 reaction_count = 6; +} + +// --- Request/Response messages --- + +message GetOrCreateProfileRequest { + int64 user_id = 1; + string username = 2; +} + +message GetProfileRequest { + int64 user_id = 1; +} + +message GetAllProfilesResponse { + repeated UserProfile profiles = 1; +} + +message AddMessageToStatsRequest { + int64 user_id = 1; + string topic = 2; + string hour = 3; + string day = 4; +} + +message UpdateReactionCountRequest { + int64 user_id = 1; + int64 increment = 2; +} + +message SetBotAttitudeRequest { + int64 user_id = 1; + int32 value = 2; + string reason = 3; + bool is_delta = 4; // if true, value is a delta; if false, value is absolute +} + +message SaveMemorableMomentRequest { + int64 user_id = 1; + string text = 2; + string bot_response = 3; + int64 reaction_count = 4; +} + +message GetMemorableMomentsRequest { + int64 user_id = 1; + int32 limit = 2; +} + +message GetMemorableMomentsResponse { + repeated MemorableMoment moments = 1; +} + +message RecordMoodHistoryRequest { + int64 user_id = 1; + string username = 2; + int32 mood = 3; + string reason = 4; +} + +message GetMoodHistoryByUserRequest { + int64 user_id = 1; + google.protobuf.Timestamp from = 2; + google.protobuf.Timestamp to = 3; +} + +message GetMoodHistoryByTimeRangeRequest { + google.protobuf.Timestamp from = 1; + google.protobuf.Timestamp to = 2; +} + +message GetRecentMoodHistoryRequest { + int32 limit = 1; +} + +message GetLastMoodBeforeTimeRequest { + google.protobuf.Timestamp before = 1; +} + +message GetMoodHistoryResponse { + repeated UserMoodHistory history = 1; +} diff --git a/profiles_grpc.pb.go b/profiles_grpc.pb.go new file mode 100644 index 0000000..506cd73 --- /dev/null +++ b/profiles_grpc.pb.go @@ -0,0 +1,651 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.1 +// - protoc v7.34.0 +// source: profiles.proto + +package proto + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + UserProfileService_GetOrCreateProfile_FullMethodName = "/users.UserProfileService/GetOrCreateProfile" + UserProfileService_GetProfile_FullMethodName = "/users.UserProfileService/GetProfile" + UserProfileService_GetAllProfilesWithMessages_FullMethodName = "/users.UserProfileService/GetAllProfilesWithMessages" + UserProfileService_AddMessageToStats_FullMethodName = "/users.UserProfileService/AddMessageToStats" + UserProfileService_UpdateReactionCount_FullMethodName = "/users.UserProfileService/UpdateReactionCount" + UserProfileService_SetBotAttitude_FullMethodName = "/users.UserProfileService/SetBotAttitude" + UserProfileService_SaveMemorableMoment_FullMethodName = "/users.UserProfileService/SaveMemorableMoment" + UserProfileService_GetMemorableMoments_FullMethodName = "/users.UserProfileService/GetMemorableMoments" + UserProfileService_RecordMoodHistory_FullMethodName = "/users.UserProfileService/RecordMoodHistory" +) + +// UserProfileServiceClient is the client API for UserProfileService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// UserProfileService manages Telegram user profiles, avatars, and mood history +type UserProfileServiceClient interface { + GetOrCreateProfile(ctx context.Context, in *GetOrCreateProfileRequest, opts ...grpc.CallOption) (*UserProfile, error) + GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*UserProfile, error) + GetAllProfilesWithMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllProfilesResponse, error) + AddMessageToStats(ctx context.Context, in *AddMessageToStatsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + UpdateReactionCount(ctx context.Context, in *UpdateReactionCountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + SetBotAttitude(ctx context.Context, in *SetBotAttitudeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + SaveMemorableMoment(ctx context.Context, in *SaveMemorableMomentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + GetMemorableMoments(ctx context.Context, in *GetMemorableMomentsRequest, opts ...grpc.CallOption) (*GetMemorableMomentsResponse, error) + RecordMoodHistory(ctx context.Context, in *RecordMoodHistoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type userProfileServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUserProfileServiceClient(cc grpc.ClientConnInterface) UserProfileServiceClient { + return &userProfileServiceClient{cc} +} + +func (c *userProfileServiceClient) GetOrCreateProfile(ctx context.Context, in *GetOrCreateProfileRequest, opts ...grpc.CallOption) (*UserProfile, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UserProfile) + err := c.cc.Invoke(ctx, UserProfileService_GetOrCreateProfile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userProfileServiceClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*UserProfile, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UserProfile) + err := c.cc.Invoke(ctx, UserProfileService_GetProfile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userProfileServiceClient) GetAllProfilesWithMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllProfilesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAllProfilesResponse) + err := c.cc.Invoke(ctx, UserProfileService_GetAllProfilesWithMessages_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userProfileServiceClient) AddMessageToStats(ctx context.Context, in *AddMessageToStatsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UserProfileService_AddMessageToStats_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userProfileServiceClient) UpdateReactionCount(ctx context.Context, in *UpdateReactionCountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UserProfileService_UpdateReactionCount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userProfileServiceClient) SetBotAttitude(ctx context.Context, in *SetBotAttitudeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UserProfileService_SetBotAttitude_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userProfileServiceClient) SaveMemorableMoment(ctx context.Context, in *SaveMemorableMomentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UserProfileService_SaveMemorableMoment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userProfileServiceClient) GetMemorableMoments(ctx context.Context, in *GetMemorableMomentsRequest, opts ...grpc.CallOption) (*GetMemorableMomentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMemorableMomentsResponse) + err := c.cc.Invoke(ctx, UserProfileService_GetMemorableMoments_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userProfileServiceClient) RecordMoodHistory(ctx context.Context, in *RecordMoodHistoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UserProfileService_RecordMoodHistory_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserProfileServiceServer is the server API for UserProfileService service. +// All implementations must embed UnimplementedUserProfileServiceServer +// for forward compatibility. +// +// UserProfileService manages Telegram user profiles, avatars, and mood history +type UserProfileServiceServer interface { + GetOrCreateProfile(context.Context, *GetOrCreateProfileRequest) (*UserProfile, error) + GetProfile(context.Context, *GetProfileRequest) (*UserProfile, error) + GetAllProfilesWithMessages(context.Context, *emptypb.Empty) (*GetAllProfilesResponse, error) + AddMessageToStats(context.Context, *AddMessageToStatsRequest) (*emptypb.Empty, error) + UpdateReactionCount(context.Context, *UpdateReactionCountRequest) (*emptypb.Empty, error) + SetBotAttitude(context.Context, *SetBotAttitudeRequest) (*emptypb.Empty, error) + SaveMemorableMoment(context.Context, *SaveMemorableMomentRequest) (*emptypb.Empty, error) + GetMemorableMoments(context.Context, *GetMemorableMomentsRequest) (*GetMemorableMomentsResponse, error) + RecordMoodHistory(context.Context, *RecordMoodHistoryRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedUserProfileServiceServer() +} + +// UnimplementedUserProfileServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedUserProfileServiceServer struct{} + +func (UnimplementedUserProfileServiceServer) GetOrCreateProfile(context.Context, *GetOrCreateProfileRequest) (*UserProfile, error) { + return nil, status.Error(codes.Unimplemented, "method GetOrCreateProfile not implemented") +} +func (UnimplementedUserProfileServiceServer) GetProfile(context.Context, *GetProfileRequest) (*UserProfile, error) { + return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") +} +func (UnimplementedUserProfileServiceServer) GetAllProfilesWithMessages(context.Context, *emptypb.Empty) (*GetAllProfilesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAllProfilesWithMessages not implemented") +} +func (UnimplementedUserProfileServiceServer) AddMessageToStats(context.Context, *AddMessageToStatsRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method AddMessageToStats not implemented") +} +func (UnimplementedUserProfileServiceServer) UpdateReactionCount(context.Context, *UpdateReactionCountRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateReactionCount not implemented") +} +func (UnimplementedUserProfileServiceServer) SetBotAttitude(context.Context, *SetBotAttitudeRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SetBotAttitude not implemented") +} +func (UnimplementedUserProfileServiceServer) SaveMemorableMoment(context.Context, *SaveMemorableMomentRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SaveMemorableMoment not implemented") +} +func (UnimplementedUserProfileServiceServer) GetMemorableMoments(context.Context, *GetMemorableMomentsRequest) (*GetMemorableMomentsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMemorableMoments not implemented") +} +func (UnimplementedUserProfileServiceServer) RecordMoodHistory(context.Context, *RecordMoodHistoryRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method RecordMoodHistory not implemented") +} +func (UnimplementedUserProfileServiceServer) mustEmbedUnimplementedUserProfileServiceServer() {} +func (UnimplementedUserProfileServiceServer) testEmbeddedByValue() {} + +// UnsafeUserProfileServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserProfileServiceServer will +// result in compilation errors. +type UnsafeUserProfileServiceServer interface { + mustEmbedUnimplementedUserProfileServiceServer() +} + +func RegisterUserProfileServiceServer(s grpc.ServiceRegistrar, srv UserProfileServiceServer) { + // If the following call panics, it indicates UnimplementedUserProfileServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&UserProfileService_ServiceDesc, srv) +} + +func _UserProfileService_GetOrCreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOrCreateProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).GetOrCreateProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_GetOrCreateProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).GetOrCreateProfile(ctx, req.(*GetOrCreateProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserProfileService_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).GetProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_GetProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).GetProfile(ctx, req.(*GetProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserProfileService_GetAllProfilesWithMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).GetAllProfilesWithMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_GetAllProfilesWithMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).GetAllProfilesWithMessages(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserProfileService_AddMessageToStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddMessageToStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).AddMessageToStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_AddMessageToStats_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).AddMessageToStats(ctx, req.(*AddMessageToStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserProfileService_UpdateReactionCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReactionCountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).UpdateReactionCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_UpdateReactionCount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).UpdateReactionCount(ctx, req.(*UpdateReactionCountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserProfileService_SetBotAttitude_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetBotAttitudeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).SetBotAttitude(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_SetBotAttitude_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).SetBotAttitude(ctx, req.(*SetBotAttitudeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserProfileService_SaveMemorableMoment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SaveMemorableMomentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).SaveMemorableMoment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_SaveMemorableMoment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).SaveMemorableMoment(ctx, req.(*SaveMemorableMomentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserProfileService_GetMemorableMoments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMemorableMomentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).GetMemorableMoments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_GetMemorableMoments_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).GetMemorableMoments(ctx, req.(*GetMemorableMomentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserProfileService_RecordMoodHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordMoodHistoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserProfileServiceServer).RecordMoodHistory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserProfileService_RecordMoodHistory_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserProfileServiceServer).RecordMoodHistory(ctx, req.(*RecordMoodHistoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UserProfileService_ServiceDesc is the grpc.ServiceDesc for UserProfileService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UserProfileService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "users.UserProfileService", + HandlerType: (*UserProfileServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetOrCreateProfile", + Handler: _UserProfileService_GetOrCreateProfile_Handler, + }, + { + MethodName: "GetProfile", + Handler: _UserProfileService_GetProfile_Handler, + }, + { + MethodName: "GetAllProfilesWithMessages", + Handler: _UserProfileService_GetAllProfilesWithMessages_Handler, + }, + { + MethodName: "AddMessageToStats", + Handler: _UserProfileService_AddMessageToStats_Handler, + }, + { + MethodName: "UpdateReactionCount", + Handler: _UserProfileService_UpdateReactionCount_Handler, + }, + { + MethodName: "SetBotAttitude", + Handler: _UserProfileService_SetBotAttitude_Handler, + }, + { + MethodName: "SaveMemorableMoment", + Handler: _UserProfileService_SaveMemorableMoment_Handler, + }, + { + MethodName: "GetMemorableMoments", + Handler: _UserProfileService_GetMemorableMoments_Handler, + }, + { + MethodName: "RecordMoodHistory", + Handler: _UserProfileService_RecordMoodHistory_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "profiles.proto", +} + +const ( + UserMoodHistoryService_GetMoodHistoryByUser_FullMethodName = "/users.UserMoodHistoryService/GetMoodHistoryByUser" + UserMoodHistoryService_GetMoodHistoryByTimeRange_FullMethodName = "/users.UserMoodHistoryService/GetMoodHistoryByTimeRange" + UserMoodHistoryService_GetRecentMoodHistory_FullMethodName = "/users.UserMoodHistoryService/GetRecentMoodHistory" + UserMoodHistoryService_GetLastMoodBeforeTime_FullMethodName = "/users.UserMoodHistoryService/GetLastMoodBeforeTime" +) + +// UserMoodHistoryServiceClient is the client API for UserMoodHistoryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// UserMoodHistoryService provides mood history queries +type UserMoodHistoryServiceClient interface { + GetMoodHistoryByUser(ctx context.Context, in *GetMoodHistoryByUserRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) + GetMoodHistoryByTimeRange(ctx context.Context, in *GetMoodHistoryByTimeRangeRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) + GetRecentMoodHistory(ctx context.Context, in *GetRecentMoodHistoryRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) + GetLastMoodBeforeTime(ctx context.Context, in *GetLastMoodBeforeTimeRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) +} + +type userMoodHistoryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUserMoodHistoryServiceClient(cc grpc.ClientConnInterface) UserMoodHistoryServiceClient { + return &userMoodHistoryServiceClient{cc} +} + +func (c *userMoodHistoryServiceClient) GetMoodHistoryByUser(ctx context.Context, in *GetMoodHistoryByUserRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMoodHistoryResponse) + err := c.cc.Invoke(ctx, UserMoodHistoryService_GetMoodHistoryByUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMoodHistoryServiceClient) GetMoodHistoryByTimeRange(ctx context.Context, in *GetMoodHistoryByTimeRangeRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMoodHistoryResponse) + err := c.cc.Invoke(ctx, UserMoodHistoryService_GetMoodHistoryByTimeRange_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMoodHistoryServiceClient) GetRecentMoodHistory(ctx context.Context, in *GetRecentMoodHistoryRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMoodHistoryResponse) + err := c.cc.Invoke(ctx, UserMoodHistoryService_GetRecentMoodHistory_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userMoodHistoryServiceClient) GetLastMoodBeforeTime(ctx context.Context, in *GetLastMoodBeforeTimeRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMoodHistoryResponse) + err := c.cc.Invoke(ctx, UserMoodHistoryService_GetLastMoodBeforeTime_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserMoodHistoryServiceServer is the server API for UserMoodHistoryService service. +// All implementations must embed UnimplementedUserMoodHistoryServiceServer +// for forward compatibility. +// +// UserMoodHistoryService provides mood history queries +type UserMoodHistoryServiceServer interface { + GetMoodHistoryByUser(context.Context, *GetMoodHistoryByUserRequest) (*GetMoodHistoryResponse, error) + GetMoodHistoryByTimeRange(context.Context, *GetMoodHistoryByTimeRangeRequest) (*GetMoodHistoryResponse, error) + GetRecentMoodHistory(context.Context, *GetRecentMoodHistoryRequest) (*GetMoodHistoryResponse, error) + GetLastMoodBeforeTime(context.Context, *GetLastMoodBeforeTimeRequest) (*GetMoodHistoryResponse, error) + mustEmbedUnimplementedUserMoodHistoryServiceServer() +} + +// UnimplementedUserMoodHistoryServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedUserMoodHistoryServiceServer struct{} + +func (UnimplementedUserMoodHistoryServiceServer) GetMoodHistoryByUser(context.Context, *GetMoodHistoryByUserRequest) (*GetMoodHistoryResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMoodHistoryByUser not implemented") +} +func (UnimplementedUserMoodHistoryServiceServer) GetMoodHistoryByTimeRange(context.Context, *GetMoodHistoryByTimeRangeRequest) (*GetMoodHistoryResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMoodHistoryByTimeRange not implemented") +} +func (UnimplementedUserMoodHistoryServiceServer) GetRecentMoodHistory(context.Context, *GetRecentMoodHistoryRequest) (*GetMoodHistoryResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetRecentMoodHistory not implemented") +} +func (UnimplementedUserMoodHistoryServiceServer) GetLastMoodBeforeTime(context.Context, *GetLastMoodBeforeTimeRequest) (*GetMoodHistoryResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetLastMoodBeforeTime not implemented") +} +func (UnimplementedUserMoodHistoryServiceServer) mustEmbedUnimplementedUserMoodHistoryServiceServer() { +} +func (UnimplementedUserMoodHistoryServiceServer) testEmbeddedByValue() {} + +// UnsafeUserMoodHistoryServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserMoodHistoryServiceServer will +// result in compilation errors. +type UnsafeUserMoodHistoryServiceServer interface { + mustEmbedUnimplementedUserMoodHistoryServiceServer() +} + +func RegisterUserMoodHistoryServiceServer(s grpc.ServiceRegistrar, srv UserMoodHistoryServiceServer) { + // If the following call panics, it indicates UnimplementedUserMoodHistoryServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&UserMoodHistoryService_ServiceDesc, srv) +} + +func _UserMoodHistoryService_GetMoodHistoryByUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMoodHistoryByUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMoodHistoryServiceServer).GetMoodHistoryByUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMoodHistoryService_GetMoodHistoryByUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMoodHistoryServiceServer).GetMoodHistoryByUser(ctx, req.(*GetMoodHistoryByUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMoodHistoryService_GetMoodHistoryByTimeRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMoodHistoryByTimeRangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMoodHistoryServiceServer).GetMoodHistoryByTimeRange(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMoodHistoryService_GetMoodHistoryByTimeRange_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMoodHistoryServiceServer).GetMoodHistoryByTimeRange(ctx, req.(*GetMoodHistoryByTimeRangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMoodHistoryService_GetRecentMoodHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRecentMoodHistoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMoodHistoryServiceServer).GetRecentMoodHistory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMoodHistoryService_GetRecentMoodHistory_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMoodHistoryServiceServer).GetRecentMoodHistory(ctx, req.(*GetRecentMoodHistoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserMoodHistoryService_GetLastMoodBeforeTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLastMoodBeforeTimeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserMoodHistoryServiceServer).GetLastMoodBeforeTime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserMoodHistoryService_GetLastMoodBeforeTime_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserMoodHistoryServiceServer).GetLastMoodBeforeTime(ctx, req.(*GetLastMoodBeforeTimeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UserMoodHistoryService_ServiceDesc is the grpc.ServiceDesc for UserMoodHistoryService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UserMoodHistoryService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "users.UserMoodHistoryService", + HandlerType: (*UserMoodHistoryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMoodHistoryByUser", + Handler: _UserMoodHistoryService_GetMoodHistoryByUser_Handler, + }, + { + MethodName: "GetMoodHistoryByTimeRange", + Handler: _UserMoodHistoryService_GetMoodHistoryByTimeRange_Handler, + }, + { + MethodName: "GetRecentMoodHistory", + Handler: _UserMoodHistoryService_GetRecentMoodHistory_Handler, + }, + { + MethodName: "GetLastMoodBeforeTime", + Handler: _UserMoodHistoryService_GetLastMoodBeforeTime_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "profiles.proto", +}