talos_rust_client/generated/
common.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "camelCase")]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Error {
6    #[prost(enumeration = "Code", tag = "1")]
7    pub code: i32,
8    #[prost(string, tag = "2")]
9    pub message: ::prost::alloc::string::String,
10    #[prost(message, repeated, tag = "3")]
11    pub details: ::prost::alloc::vec::Vec<super::google::protobuf::Any>,
12}
13/// Common metadata message nested in all reply message types
14#[derive(serde::Serialize, serde::Deserialize)]
15#[serde(rename_all = "camelCase")]
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct Metadata {
18    /// hostname of the server response comes from (injected by proxy)
19    #[prost(string, tag = "1")]
20    pub hostname: ::prost::alloc::string::String,
21    /// error is set if request failed to the upstream (rest of response is
22    /// undefined)
23    #[prost(string, tag = "2")]
24    pub error: ::prost::alloc::string::String,
25    /// error as gRPC Status
26    #[prost(message, optional, tag = "3")]
27    pub status: ::core::option::Option<super::google::rpc::Status>,
28}
29#[derive(serde::Serialize, serde::Deserialize)]
30#[serde(rename_all = "camelCase")]
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct Data {
33    #[prost(message, optional, tag = "1")]
34    pub metadata: ::core::option::Option<Metadata>,
35    #[prost(bytes = "vec", tag = "2")]
36    pub bytes: ::prost::alloc::vec::Vec<u8>,
37}
38#[derive(serde::Serialize, serde::Deserialize)]
39#[serde(rename_all = "camelCase")]
40#[derive(Clone, PartialEq, ::prost::Message)]
41pub struct DataResponse {
42    #[prost(message, repeated, tag = "1")]
43    pub messages: ::prost::alloc::vec::Vec<Data>,
44}
45#[derive(serde::Serialize, serde::Deserialize)]
46#[serde(rename_all = "camelCase")]
47#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct Empty {
49    #[prost(message, optional, tag = "1")]
50    pub metadata: ::core::option::Option<Metadata>,
51}
52#[derive(serde::Serialize, serde::Deserialize)]
53#[serde(rename_all = "camelCase")]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct EmptyResponse {
56    #[prost(message, repeated, tag = "1")]
57    pub messages: ::prost::alloc::vec::Vec<Empty>,
58}
59#[derive(serde::Serialize, serde::Deserialize)]
60#[serde(rename_all = "camelCase")]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct Url {
63    #[prost(string, tag = "1")]
64    pub full_path: ::prost::alloc::string::String,
65}
66#[derive(serde::Serialize, serde::Deserialize)]
67#[serde(rename_all = "camelCase")]
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct PemEncodedCertificateAndKey {
70    #[prost(bytes = "vec", tag = "1")]
71    pub crt: ::prost::alloc::vec::Vec<u8>,
72    #[prost(bytes = "vec", tag = "2")]
73    pub key: ::prost::alloc::vec::Vec<u8>,
74}
75#[derive(serde::Serialize, serde::Deserialize)]
76#[serde(rename_all = "camelCase")]
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct PemEncodedKey {
79    #[prost(bytes = "vec", tag = "1")]
80    pub key: ::prost::alloc::vec::Vec<u8>,
81}
82#[derive(serde::Serialize, serde::Deserialize)]
83#[serde(rename_all = "camelCase")]
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct PemEncodedCertificate {
86    #[prost(bytes = "vec", tag = "1")]
87    pub crt: ::prost::alloc::vec::Vec<u8>,
88}
89#[derive(serde::Serialize, serde::Deserialize)]
90#[serde(rename_all = "camelCase")]
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct NetIp {
93    #[prost(bytes = "vec", tag = "1")]
94    pub ip: ::prost::alloc::vec::Vec<u8>,
95}
96#[derive(serde::Serialize, serde::Deserialize)]
97#[serde(rename_all = "camelCase")]
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct NetIpPort {
100    #[prost(bytes = "vec", tag = "1")]
101    pub ip: ::prost::alloc::vec::Vec<u8>,
102    #[prost(int32, tag = "2")]
103    pub port: i32,
104}
105#[derive(serde::Serialize, serde::Deserialize)]
106#[serde(rename_all = "camelCase")]
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct NetIpPrefix {
109    #[prost(bytes = "vec", tag = "1")]
110    pub ip: ::prost::alloc::vec::Vec<u8>,
111    #[prost(int32, tag = "2")]
112    pub prefix_length: i32,
113}
114#[derive(serde::Serialize, serde::Deserialize)]
115#[serde(rename_all = "camelCase")]
116#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
117#[repr(i32)]
118pub enum Code {
119    Fatal = 0,
120    Locked = 1,
121    Canceled = 2,
122}
123impl Code {
124    /// String value of the enum field names used in the ProtoBuf definition.
125    ///
126    /// The values are not transformed in any way and thus are considered stable
127    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
128    pub fn as_str_name(&self) -> &'static str {
129        match self {
130            Self::Fatal => "FATAL",
131            Self::Locked => "LOCKED",
132            Self::Canceled => "CANCELED",
133        }
134    }
135    /// Creates an enum from field names used in the ProtoBuf definition.
136    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
137        match value {
138            "FATAL" => Some(Self::Fatal),
139            "LOCKED" => Some(Self::Locked),
140            "CANCELED" => Some(Self::Canceled),
141            _ => None,
142        }
143    }
144}
145#[derive(serde::Serialize, serde::Deserialize)]
146#[serde(rename_all = "camelCase")]
147#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
148#[repr(i32)]
149pub enum ContainerDriver {
150    Containerd = 0,
151    Cri = 1,
152}
153impl ContainerDriver {
154    /// String value of the enum field names used in the ProtoBuf definition.
155    ///
156    /// The values are not transformed in any way and thus are considered stable
157    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
158    pub fn as_str_name(&self) -> &'static str {
159        match self {
160            Self::Containerd => "CONTAINERD",
161            Self::Cri => "CRI",
162        }
163    }
164    /// Creates an enum from field names used in the ProtoBuf definition.
165    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
166        match value {
167            "CONTAINERD" => Some(Self::Containerd),
168            "CRI" => Some(Self::Cri),
169            _ => None,
170        }
171    }
172}
173#[derive(serde::Serialize, serde::Deserialize)]
174#[serde(rename_all = "camelCase")]
175#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
176#[repr(i32)]
177pub enum ContainerdNamespace {
178    NsUnknown = 0,
179    NsSystem = 1,
180    NsCri = 2,
181}
182impl ContainerdNamespace {
183    /// String value of the enum field names used in the ProtoBuf definition.
184    ///
185    /// The values are not transformed in any way and thus are considered stable
186    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
187    pub fn as_str_name(&self) -> &'static str {
188        match self {
189            Self::NsUnknown => "NS_UNKNOWN",
190            Self::NsSystem => "NS_SYSTEM",
191            Self::NsCri => "NS_CRI",
192        }
193    }
194    /// Creates an enum from field names used in the ProtoBuf definition.
195    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
196        match value {
197            "NS_UNKNOWN" => Some(Self::NsUnknown),
198            "NS_SYSTEM" => Some(Self::NsSystem),
199            "NS_CRI" => Some(Self::NsCri),
200            _ => None,
201        }
202    }
203}