Skip to main content

talos_api_rs/api/generated/
common.rs

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