#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Request {
#[prost(oneof="request::RequestType", tags="1, 2, 3, 4")]
pub request_type: ::core::option::Option<request::RequestType>,
}
pub mod request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RequestType {
#[prost(bool, tag="1")]
GetDeviceInfo(bool),
#[prost(bool, tag="2")]
GetLockState(bool),
#[prost(bool, tag="3")]
RequestUnlock(bool),
#[prost(bool, tag="4")]
Lock(bool),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Response {
#[prost(oneof="response::ResponseType", tags="1, 2")]
pub response_type: ::core::option::Option<response::ResponseType>,
}
pub mod response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ResponseType {
#[prost(message, tag="1")]
GetDeviceInfo(super::GetDeviceInfoResponse),
#[prost(enumeration="super::LockState", tag="2")]
GetLockState(i32),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDeviceInfoResponse {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(bytes="vec", tag="2")]
pub serial_number: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Notification {
#[prost(oneof="notification::NotificationType", tags="1")]
pub notification_type: ::core::option::Option<notification::NotificationType>,
}
pub mod notification {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum NotificationType {
#[prost(enumeration="super::LockState", tag="1")]
LockStateChanged(i32),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LockState {
ZmkStudioCoreLockStateLocked = 0,
ZmkStudioCoreLockStateUnlocking = 1,
ZmkStudioCoreLockStateUnlocked = 2,
}
impl LockState {
pub fn as_str_name(&self) -> &'static str {
match self {
LockState::ZmkStudioCoreLockStateLocked => "ZMK_STUDIO_CORE_LOCK_STATE_LOCKED",
LockState::ZmkStudioCoreLockStateUnlocking => "ZMK_STUDIO_CORE_LOCK_STATE_UNLOCKING",
LockState::ZmkStudioCoreLockStateUnlocked => "ZMK_STUDIO_CORE_LOCK_STATE_UNLOCKED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ZMK_STUDIO_CORE_LOCK_STATE_LOCKED" => Some(Self::ZmkStudioCoreLockStateLocked),
"ZMK_STUDIO_CORE_LOCK_STATE_UNLOCKING" => Some(Self::ZmkStudioCoreLockStateUnlocking),
"ZMK_STUDIO_CORE_LOCK_STATE_UNLOCKED" => Some(Self::ZmkStudioCoreLockStateUnlocked),
_ => None,
}
}
}