#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueueMsg {
#[prost(int64, tag="1")]
pub ts: i64,
#[prost(map="string, string", tag="2")]
pub headers: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(string, tag="3")]
pub key: ::prost::alloc::string::String,
#[prost(bytes="vec", tag="4")]
pub payload: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommonResponse {
#[prost(int32, tag="1")]
pub code: i32,
#[prost(string, tag="2")]
pub msg: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidateDeviceAuthRequest {
#[prost(uint32, tag="1")]
pub r#type: u32,
#[prost(string, tag="2")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub certificate: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidateDeviceAuthResponse {
#[prost(message, optional, tag="1")]
pub common: ::core::option::Option<CommonResponse>,
#[prost(message, optional, tag="2")]
pub device_info: ::core::option::Option<DeviceInfoProto>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceInfoProto {
#[prost(int64, tag="1")]
pub tenant_id: i64,
#[prost(int64, tag="2")]
pub product_id: i64,
#[prost(int64, tag="4")]
pub device_id: i64,
#[prost(string, tag="5")]
pub device_name: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub device_type: ::prost::alloc::string::String,
#[prost(string, tag="7")]
pub additional_info: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProductInfoProto {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceCredentialsProto {
#[prost(int64, tag="1")]
pub mode: i64,
#[prost(string, tag="2")]
pub client_id: ::prost::alloc::string::String,
#[prost(bytes="vec", tag="3")]
pub csr: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag="4")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProvisionConnectRequest {
#[prost(string, tag="1")]
pub key: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub secret: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProvisionConnectResponse {
#[prost(message, optional, tag="1")]
pub common: ::core::option::Option<CommonResponse>,
#[prost(int64, tag="2")]
pub product_id: i64,
#[prost(int64, tag="3")]
pub tenant_id: i64,
#[prost(string, tag="4")]
pub device_type: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProvisionRequest {
#[prost(bool, tag="3")]
pub gateway: bool,
#[prost(string, tag="4")]
pub device_name: ::prost::alloc::string::String,
#[prost(message, optional, tag="6")]
pub credentials: ::core::option::Option<DeviceCredentialsProto>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProvisionResponse {
#[prost(message, optional, tag="1")]
pub common: ::core::option::Option<CommonResponse>,
#[prost(message, optional, tag="2")]
pub device_info: ::core::option::Option<DeviceInfoProto>,
#[prost(message, optional, tag="3")]
pub credentials: ::core::option::Option<DeviceCredentialsResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceCredentialsResponse {
#[prost(int64, tag="1")]
pub mode: i64,
#[prost(string, tag="2")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub ca: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub certificate: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionInfoProto {
#[prost(enumeration="TransportType", tag="1")]
pub transport: i32,
#[prost(string, tag="2")]
pub node_id: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub session_id: ::prost::alloc::string::String,
#[prost(int64, tag="4")]
pub tenant_id: i64,
#[prost(int64, tag="5")]
pub device_id: i64,
#[prost(int64, tag="6")]
pub product_id: i64,
#[prost(string, tag="7")]
pub device_name: ::prost::alloc::string::String,
#[prost(string, tag="8")]
pub device_type: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceSessionEventNotify {
#[prost(enumeration="SessionType", tag="1")]
pub r#type: i32,
#[prost(enumeration="SessionEvent", tag="2")]
pub event: i32,
#[prost(message, optional, tag="3")]
pub session_info: ::core::option::Option<SessionInfoProto>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HousekeeperTaskNotify {
#[prost(string, tag="1")]
pub entity_type: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub entity_id: i64,
#[prost(int64, tag="3")]
pub tenant_id: i64,
#[prost(enumeration="HousekeeperTaskType", tag="4")]
pub r#type: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SessionEvent {
Unset = 0,
Open = 1,
Closed = 2,
}
impl SessionEvent {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unset => "SESSION_EVENT_UNSET",
Self::Open => "OPEN",
Self::Closed => "CLOSED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SESSION_EVENT_UNSET" => Some(Self::Unset),
"OPEN" => Some(Self::Open),
"CLOSED" => Some(Self::Closed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SessionType {
SessionUnset = 0,
Sync = 1,
Async = 2,
}
impl SessionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::SessionUnset => "SESSION_UNSET",
Self::Sync => "SYNC",
Self::Async => "ASYNC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SESSION_UNSET" => Some(Self::SessionUnset),
"SYNC" => Some(Self::Sync),
"ASYNC" => Some(Self::Async),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransportType {
TransportUnset = 0,
Tcp = 1,
Mqtt = 2,
Http = 3,
Coap = 4,
Lwm2m = 5,
Snmp = 6,
Ws = 7,
}
impl TransportType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::TransportUnset => "TRANSPORT_UNSET",
Self::Tcp => "TCP",
Self::Mqtt => "MQTT",
Self::Http => "HTTP",
Self::Coap => "COAP",
Self::Lwm2m => "LWM2M",
Self::Snmp => "SNMP",
Self::Ws => "WS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRANSPORT_UNSET" => Some(Self::TransportUnset),
"TCP" => Some(Self::Tcp),
"MQTT" => Some(Self::Mqtt),
"HTTP" => Some(Self::Http),
"COAP" => Some(Self::Coap),
"LWM2M" => Some(Self::Lwm2m),
"SNMP" => Some(Self::Snmp),
"WS" => Some(Self::Ws),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HousekeeperTaskType {
HousekeeperTaskUnset = 0,
EntityCleanup = 1,
}
impl HousekeeperTaskType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::HousekeeperTaskUnset => "HOUSEKEEPER_TASK_UNSET",
Self::EntityCleanup => "ENTITY_CLEANUP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HOUSEKEEPER_TASK_UNSET" => Some(Self::HousekeeperTaskUnset),
"ENTITY_CLEANUP" => Some(Self::EntityCleanup),
_ => None,
}
}
}