horust_commands_lib/proto/
messages.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct HorustMsgMessage {
4    #[prost(oneof = "horust_msg_message::MessageType", tags = "1, 2")]
5    pub message_type: ::core::option::Option<horust_msg_message::MessageType>,
6}
7/// Nested message and enum types in `HorustMsgMessage`.
8pub mod horust_msg_message {
9    #[derive(Clone, PartialEq, ::prost::Oneof)]
10    pub enum MessageType {
11        #[prost(message, tag = "1")]
12        Request(super::HorustMsgRequest),
13        #[prost(message, tag = "2")]
14        Response(super::HorustMsgResponse),
15    }
16}
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct HorustMsgRequest {
19    #[prost(oneof = "horust_msg_request::Request", tags = "1, 2")]
20    pub request: ::core::option::Option<horust_msg_request::Request>,
21}
22/// Nested message and enum types in `HorustMsgRequest`.
23pub mod horust_msg_request {
24    #[derive(Clone, PartialEq, ::prost::Oneof)]
25    pub enum Request {
26        #[prost(message, tag = "1")]
27        StatusRequest(super::HorustMsgServiceStatusRequest),
28        #[prost(message, tag = "2")]
29        ChangeRequest(super::HorustMsgServiceChangeRequest),
30    }
31}
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct HorustMsgResponse {
34    #[prost(oneof = "horust_msg_response::Response", tags = "1, 2")]
35    pub response: ::core::option::Option<horust_msg_response::Response>,
36}
37/// Nested message and enum types in `HorustMsgResponse`.
38pub mod horust_msg_response {
39    #[derive(Clone, PartialEq, ::prost::Oneof)]
40    pub enum Response {
41        #[prost(message, tag = "1")]
42        Error(super::HorustMsgError),
43        #[prost(message, tag = "2")]
44        StatusResponse(super::HorustMsgServiceStatusResponse),
45    }
46}
47#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct HorustMsgError {
49    #[prost(string, tag = "1")]
50    pub error_string: ::prost::alloc::string::String,
51}
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct HorustMsgServiceStatusRequest {
54    #[prost(string, tag = "1")]
55    pub service_name: ::prost::alloc::string::String,
56}
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct HorustMsgServiceStatusResponse {
59    #[prost(string, tag = "1")]
60    pub service_name: ::prost::alloc::string::String,
61    #[prost(enumeration = "HorustMsgServiceStatus", tag = "2")]
62    pub service_status: i32,
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct HorustMsgServiceChangeRequest {
66    #[prost(string, tag = "1")]
67    pub service_name: ::prost::alloc::string::String,
68    #[prost(enumeration = "HorustMsgServiceStatus", tag = "2")]
69    pub service_status: i32,
70}
71/// return the current status - similar to HorustServiceStatusReponse.
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct HorustMsgServiceChangeResponse {
74    #[prost(string, tag = "1")]
75    pub service_name: ::prost::alloc::string::String,
76    #[prost(enumeration = "HorustMsgServiceStatus", tag = "2")]
77    pub service_status: i32,
78}
79#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
80#[repr(i32)]
81pub enum HorustMsgServiceStatus {
82    Starting = 0,
83    Started = 1,
84    Running = 2,
85    Inkilling = 3,
86    Success = 4,
87    Finished = 5,
88    Finishedfailed = 6,
89    Failed = 7,
90    Initial = 8,
91}
92impl HorustMsgServiceStatus {
93    /// String value of the enum field names used in the ProtoBuf definition.
94    ///
95    /// The values are not transformed in any way and thus are considered stable
96    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
97    pub fn as_str_name(&self) -> &'static str {
98        match self {
99            Self::Starting => "STARTING",
100            Self::Started => "STARTED",
101            Self::Running => "RUNNING",
102            Self::Inkilling => "INKILLING",
103            Self::Success => "SUCCESS",
104            Self::Finished => "FINISHED",
105            Self::Finishedfailed => "FINISHEDFAILED",
106            Self::Failed => "FAILED",
107            Self::Initial => "INITIAL",
108        }
109    }
110    /// Creates an enum from field names used in the ProtoBuf definition.
111    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
112        match value {
113            "STARTING" => Some(Self::Starting),
114            "STARTED" => Some(Self::Started),
115            "RUNNING" => Some(Self::Running),
116            "INKILLING" => Some(Self::Inkilling),
117            "SUCCESS" => Some(Self::Success),
118            "FINISHED" => Some(Self::Finished),
119            "FINISHEDFAILED" => Some(Self::Finishedfailed),
120            "FAILED" => Some(Self::Failed),
121            "INITIAL" => Some(Self::Initial),
122            _ => None,
123        }
124    }
125}