aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/assets/prost_nested_session/nested_session_contract.rs
blob: 1a9e117ae583014804c6561fe45f637263870b96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NestedSessionMessage {
    #[prost(oneof="nested_session_message::Payload", tags="1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 14")]
    pub payload: ::core::option::Option<nested_session_message::Payload>,
}
/// Nested message and enum types in `NestedSessionMessage`.
pub mod nested_session_message {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Payload {
        #[prost(message, tag="1")]
        Announce(super::Announce),
        #[prost(message, tag="2")]
        FocusHost(super::FocusHost),
        #[prost(message, tag="3")]
        HostFullscreen(super::ToggleHostFullscreen),
        #[prost(message, tag="4")]
        Pong(super::Pong),
        #[prost(message, tag="5")]
        Bye(super::Bye),
        #[prost(message, tag="8")]
        AnnounceAck(super::AnnounceAck),
        #[prost(message, tag="9")]
        FocusGained(super::FocusGained),
        #[prost(message, tag="10")]
        FocusLost(super::FocusLost),
        #[prost(message, tag="11")]
        FullscreenState(super::FullscreenState),
        #[prost(message, tag="12")]
        AncestryUpdate(super::AncestryUpdate),
        #[prost(message, tag="13")]
        Ping(super::Ping),
        #[prost(message, tag="14")]
        ShortcutUpdate(super::ShortcutUpdate),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Announce {
    #[prost(string, tag="1")]
    pub session_name: ::prost::alloc::string::String,
    #[prost(enumeration="NestedCapability", repeated, tag="2")]
    pub capabilities: ::prost::alloc::vec::Vec<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FocusHost {
    #[prost(enumeration="NestedDirection", tag="1")]
    pub direction: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToggleHostFullscreen {
    #[prost(bool, tag="1")]
    pub fullscreen: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pong {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Bye {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnnounceAck {
    #[prost(string, repeated, tag="1")]
    pub ancestry: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration="NestedCapability", repeated, tag="2")]
    pub capabilities: ::prost::alloc::vec::Vec<i32>,
    #[prost(string, repeated, tag="3")]
    pub descend_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShortcutUpdate {
    #[prost(string, repeated, tag="1")]
    pub ascend_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="2")]
    pub descend_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FocusGained {
    #[prost(enumeration="NestedDirection", tag="1")]
    pub from_direction: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FocusLost {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FullscreenState {
    #[prost(bool, tag="1")]
    pub fullscreen: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AncestryUpdate {
    #[prost(string, repeated, tag="1")]
    pub ancestry: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ping {
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NestedCapability {
    Unspecified = 0,
    NestedControl = 1,
}
impl NestedCapability {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            NestedCapability::Unspecified => "NESTED_CAPABILITY_UNSPECIFIED",
            NestedCapability::NestedControl => "NESTED_CAPABILITY_NESTED_CONTROL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NESTED_CAPABILITY_UNSPECIFIED" => Some(Self::Unspecified),
            "NESTED_CAPABILITY_NESTED_CONTROL" => Some(Self::NestedControl),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NestedDirection {
    Unspecified = 0,
    Left = 1,
    Right = 2,
    Up = 3,
    Down = 4,
}
impl NestedDirection {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            NestedDirection::Unspecified => "NESTED_DIRECTION_UNSPECIFIED",
            NestedDirection::Left => "NESTED_DIRECTION_LEFT",
            NestedDirection::Right => "NESTED_DIRECTION_RIGHT",
            NestedDirection::Up => "NESTED_DIRECTION_UP",
            NestedDirection::Down => "NESTED_DIRECTION_DOWN",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NESTED_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
            "NESTED_DIRECTION_LEFT" => Some(Self::Left),
            "NESTED_DIRECTION_RIGHT" => Some(Self::Right),
            "NESTED_DIRECTION_UP" => Some(Self::Up),
            "NESTED_DIRECTION_DOWN" => Some(Self::Down),
            _ => None,
        }
    }
}