141 lines
4.9 KiB
Rust
141 lines
4.9 KiB
Rust
|
use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp;
|
||
|
|
||
|
pub const SUBJECT: &str = "bemily.messenger.chat.messages.ss.messages";
|
||
|
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct Message {
|
||
|
#[prost(string, tag = "1")]
|
||
|
pub id: ::prost::alloc::string::String,
|
||
|
#[prost(string, tag = "2")]
|
||
|
pub room_id: ::prost::alloc::string::String,
|
||
|
#[prost(string, optional, tag = "3")]
|
||
|
pub sender_id: ::core::option::Option<::prost::alloc::string::String>,
|
||
|
#[prost(enumeration = "MessageType", tag = "4")]
|
||
|
pub message_type: i32,
|
||
|
#[prost(string, tag = "5")]
|
||
|
pub message: ::prost::alloc::string::String,
|
||
|
#[prost(uint64, tag = "6")]
|
||
|
pub seq: u64,
|
||
|
#[prost(uint64, tag = "7")]
|
||
|
pub created_at: u64,
|
||
|
#[prost(uint64, tag = "8")]
|
||
|
pub updated_at: u64,
|
||
|
#[prost(uint64, optional, tag = "9")]
|
||
|
pub deleted_at: ::core::option::Option<u64>,
|
||
|
}
|
||
|
|
||
|
pub const SUBJECT_GET: &str = const_format::concatcp!(SUBJECT, ".Get");
|
||
|
/// subject = bemily.messenger.chat.messages.ss.messages.Get
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct GetRequest {
|
||
|
#[prost(string, tag = "1")]
|
||
|
pub id: ::prost::alloc::string::String,
|
||
|
}
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct GetResponse {
|
||
|
#[prost(message, optional, tag = "1")]
|
||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||
|
#[prost(message, optional, tag = "2")]
|
||
|
pub message: ::core::option::Option<Message>,
|
||
|
}
|
||
|
|
||
|
pub const SUBJECT_LIST_BY_IDS: &str = const_format::concatcp!(SUBJECT, ".ListByIds");
|
||
|
/// subject = bemily.messenger.chat.messages.ss.messages.ListByIds
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct ListByIdsRequest {
|
||
|
#[prost(string, repeated, tag = "1")]
|
||
|
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||
|
}
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct ListByIdsResponse {
|
||
|
#[prost(message, optional, tag = "1")]
|
||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||
|
#[prost(message, repeated, tag = "2")]
|
||
|
pub messages: ::prost::alloc::vec::Vec<Message>,
|
||
|
}
|
||
|
|
||
|
pub const SUBJECT_CREATE: &str = const_format::concatcp!(SUBJECT, ".Create");
|
||
|
/// subject = bemily.messenger.chat.messages.ss.messages.Create
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct CreateRequest {
|
||
|
#[prost(string, tag = "1")]
|
||
|
pub room_id: ::prost::alloc::string::String,
|
||
|
#[prost(string, optional, tag = "2")]
|
||
|
pub sender_id: ::core::option::Option<::prost::alloc::string::String>,
|
||
|
#[prost(enumeration = "MessageType", tag = "3")]
|
||
|
pub message_type: i32,
|
||
|
#[prost(string, tag = "4")]
|
||
|
pub message: ::prost::alloc::string::String,
|
||
|
}
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct CreateResponse {
|
||
|
#[prost(message, optional, tag = "1")]
|
||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||
|
#[prost(message, optional, tag = "2")]
|
||
|
pub message: ::core::option::Option<Message>,
|
||
|
}
|
||
|
|
||
|
pub const SUBJECT_CHANGE_MESSAGE: &str = const_format::concatcp!(SUBJECT, ".ChangeMessage");
|
||
|
/// subject = bemily.messenger.chat.messages.ss.messages.ChangeMessage
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct ChangeMessageRequest {
|
||
|
#[prost(string, tag = "1")]
|
||
|
pub id: ::prost::alloc::string::String,
|
||
|
#[prost(string, tag = "2")]
|
||
|
pub message: ::prost::alloc::string::String,
|
||
|
}
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct ChangeMessageResponse {
|
||
|
#[prost(message, optional, tag = "1")]
|
||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||
|
}
|
||
|
|
||
|
pub const SUBJECT_DELETE: &str = const_format::concatcp!(SUBJECT, ".Delete");
|
||
|
/// subject = bemily.messenger.chat.messages.ss.messages.Delete
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct DeleteRequest {
|
||
|
#[prost(string, tag = "1")]
|
||
|
pub id: ::prost::alloc::string::String,
|
||
|
}
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct DeleteResponse {
|
||
|
#[prost(message, optional, tag = "1")]
|
||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||
|
}
|
||
|
|
||
|
pub const SUBJECT_SYNCHRONIZE: &str = const_format::concatcp!(SUBJECT, ".Synchronize");
|
||
|
/// subject = bemily.messenger.chat.messages.ss.messages.Synchronize
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct SynchronizeRequest {
|
||
|
#[prost(string, tag = "1")]
|
||
|
pub identity_id: ::prost::alloc::string::String,
|
||
|
#[prost(uint64, optional, tag = "2")]
|
||
|
pub synchronized_at: ::core::option::Option<u64>,
|
||
|
}
|
||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||
|
pub struct SynchronizeResponse {
|
||
|
#[prost(message, optional, tag = "1")]
|
||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||
|
#[prost(uint64, optional, tag = "2")]
|
||
|
pub synchronized_at: ::core::option::Option<u64>,
|
||
|
#[prost(message, repeated, tag = "3")]
|
||
|
pub messages: ::prost::alloc::vec::Vec<Message>,
|
||
|
}
|
||
|
|
||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||
|
#[repr(i32)]
|
||
|
pub enum MessageType {
|
||
|
None = 0,
|
||
|
Normal = 1,
|
||
|
Mass = 2,
|
||
|
Image = 3,
|
||
|
Video = 4,
|
||
|
Sound = 5,
|
||
|
File = 6,
|
||
|
Emoticon = 7,
|
||
|
Smileme = 8,
|
||
|
Plan = 9,
|
||
|
Combination = 10,
|
||
|
Information = 11,
|
||
|
}
|