cx_api/generated/
com.coralogixapis.dashboards.v1.ast.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct FolderPath {
6    #[prost(string, repeated, tag = "1")]
7    pub segments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
8}
9#[derive(serde::Serialize, serde::Deserialize)]
10#[serde(rename_all = "snake_case")]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct Widget {
13    /// Widget unique identifier
14    #[prost(message, optional, tag = "1")]
15    pub id: ::core::option::Option<super::Uuid>,
16    #[prost(message, optional, tag = "2")]
17    pub title: ::core::option::Option<::prost::alloc::string::String>,
18    #[prost(message, optional, tag = "3")]
19    pub description: ::core::option::Option<::prost::alloc::string::String>,
20    #[prost(message, optional, tag = "4")]
21    pub definition: ::core::option::Option<widget::Definition>,
22    /// Appearance was probably planned but is unused and deprecated
23    #[deprecated]
24    #[prost(message, optional, tag = "5")]
25    pub appearance: ::core::option::Option<widget::Appearance>,
26    /// these are existing in DB but not mapped in the API
27    #[prost(message, optional, tag = "6")]
28    pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
29    #[prost(message, optional, tag = "7")]
30    pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
31}
32/// Nested message and enum types in `Widget`.
33pub mod widget {
34    #[derive(serde::Serialize, serde::Deserialize)]
35    #[serde(rename_all = "snake_case")]
36    #[derive(Clone, PartialEq, ::prost::Message)]
37    pub struct Definition {
38        #[prost(oneof = "definition::Value", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
39        pub value: ::core::option::Option<definition::Value>,
40    }
41    /// Nested message and enum types in `Definition`.
42    pub mod definition {
43        #[derive(serde::Serialize, serde::Deserialize)]
44        #[serde(rename_all = "snake_case")]
45        #[derive(Clone, PartialEq, ::prost::Oneof)]
46        pub enum Value {
47            #[prost(message, tag = "1")]
48            LineChart(super::super::widgets::LineChart),
49            #[prost(message, tag = "2")]
50            DataTable(super::super::widgets::DataTable),
51            #[prost(message, tag = "3")]
52            Gauge(super::super::widgets::Gauge),
53            #[prost(message, tag = "4")]
54            PieChart(super::super::widgets::PieChart),
55            #[prost(message, tag = "5")]
56            BarChart(super::super::widgets::BarChart),
57            #[prost(message, tag = "6")]
58            HorizontalBarChart(super::super::widgets::HorizontalBarChart),
59            #[prost(message, tag = "7")]
60            Markdown(super::super::widgets::Markdown),
61            #[prost(message, tag = "8")]
62            Hexagon(super::super::widgets::Hexagon),
63            #[prost(message, tag = "9")]
64            Dynamic(super::super::widgets::Dynamic),
65        }
66    }
67    #[derive(serde::Serialize, serde::Deserialize)]
68    #[serde(rename_all = "snake_case")]
69    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
70    pub struct Appearance {
71        #[prost(message, optional, tag = "1")]
72        pub width: ::core::option::Option<i32>,
73    }
74}
75#[derive(serde::Serialize, serde::Deserialize)]
76#[serde(rename_all = "snake_case")]
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct Layout {
79    #[prost(message, repeated, tag = "1")]
80    pub sections: ::prost::alloc::vec::Vec<Section>,
81}
82#[derive(serde::Serialize, serde::Deserialize)]
83#[serde(rename_all = "snake_case")]
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct Section {
86    /// Section unique identifier
87    #[prost(message, optional, tag = "1")]
88    pub id: ::core::option::Option<super::Uuid>,
89    #[prost(message, repeated, tag = "2")]
90    pub rows: ::prost::alloc::vec::Vec<Row>,
91    #[prost(message, optional, tag = "3")]
92    pub options: ::core::option::Option<SectionOptions>,
93}
94#[derive(serde::Serialize, serde::Deserialize)]
95#[serde(rename_all = "snake_case")]
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct Row {
98    /// Row unique identifier
99    #[prost(message, optional, tag = "1")]
100    pub id: ::core::option::Option<super::Uuid>,
101    #[prost(message, optional, tag = "2")]
102    pub appearance: ::core::option::Option<row::Appearance>,
103    #[prost(message, repeated, tag = "3")]
104    pub widgets: ::prost::alloc::vec::Vec<Widget>,
105}
106/// Nested message and enum types in `Row`.
107pub mod row {
108    #[derive(serde::Serialize, serde::Deserialize)]
109    #[serde(rename_all = "snake_case")]
110    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
111    pub struct Appearance {
112        #[prost(message, optional, tag = "1")]
113        pub height: ::core::option::Option<i32>,
114    }
115}
116#[derive(serde::Serialize, serde::Deserialize)]
117#[serde(rename_all = "snake_case")]
118#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct RepetitiveVar {
120    #[prost(message, optional, tag = "1")]
121    pub name: ::core::option::Option<::prost::alloc::string::String>,
122}
123#[derive(serde::Serialize, serde::Deserialize)]
124#[serde(rename_all = "snake_case")]
125#[derive(Clone, PartialEq, ::prost::Message)]
126pub struct SectionOptions {
127    #[prost(oneof = "section_options::Value", tags = "1, 2")]
128    pub value: ::core::option::Option<section_options::Value>,
129}
130/// Nested message and enum types in `SectionOptions`.
131pub mod section_options {
132    #[derive(serde::Serialize, serde::Deserialize)]
133    #[serde(rename_all = "snake_case")]
134    #[derive(Clone, PartialEq, ::prost::Oneof)]
135    pub enum Value {
136        #[prost(message, tag = "1")]
137        Internal(super::InternalSectionOptions),
138        #[prost(message, tag = "2")]
139        Custom(super::CustomSectionOptions),
140    }
141}
142#[derive(serde::Serialize, serde::Deserialize)]
143#[serde(rename_all = "snake_case")]
144#[derive(Clone, Copy, PartialEq, ::prost::Message)]
145pub struct InternalSectionOptions {}
146#[derive(serde::Serialize, serde::Deserialize)]
147#[serde(rename_all = "snake_case")]
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct CustomSectionOptions {
150    #[prost(message, optional, tag = "1")]
151    pub name: ::core::option::Option<::prost::alloc::string::String>,
152    #[prost(message, optional, tag = "2")]
153    pub description: ::core::option::Option<::prost::alloc::string::String>,
154    #[prost(message, optional, tag = "3")]
155    pub collapsed: ::core::option::Option<bool>,
156    #[prost(message, optional, tag = "4")]
157    pub color: ::core::option::Option<SectionColor>,
158    #[prost(message, optional, tag = "5")]
159    pub repetitive_var: ::core::option::Option<RepetitiveVar>,
160}
161#[derive(serde::Serialize, serde::Deserialize)]
162#[serde(rename_all = "snake_case")]
163#[derive(Clone, Copy, PartialEq, ::prost::Message)]
164pub struct SectionColor {
165    #[prost(oneof = "section_color::Value", tags = "1")]
166    pub value: ::core::option::Option<section_color::Value>,
167}
168/// Nested message and enum types in `SectionColor`.
169pub mod section_color {
170    #[derive(serde::Serialize, serde::Deserialize)]
171    #[serde(rename_all = "snake_case")]
172    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
173    pub enum Value {
174        #[prost(enumeration = "super::SectionPredefinedColor", tag = "1")]
175        Predefined(i32),
176    }
177}
178#[derive(serde::Serialize, serde::Deserialize)]
179#[serde(rename_all = "snake_case")]
180#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
181#[repr(i32)]
182pub enum SectionPredefinedColor {
183    Unspecified = 0,
184    Cyan = 1,
185    Green = 2,
186    Blue = 3,
187    Purple = 4,
188    Magenta = 5,
189    Pink = 6,
190    Orange = 7,
191}
192impl SectionPredefinedColor {
193    /// String value of the enum field names used in the ProtoBuf definition.
194    ///
195    /// The values are not transformed in any way and thus are considered stable
196    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
197    pub fn as_str_name(&self) -> &'static str {
198        match self {
199            Self::Unspecified => "SECTION_PREDEFINED_COLOR_UNSPECIFIED",
200            Self::Cyan => "SECTION_PREDEFINED_COLOR_CYAN",
201            Self::Green => "SECTION_PREDEFINED_COLOR_GREEN",
202            Self::Blue => "SECTION_PREDEFINED_COLOR_BLUE",
203            Self::Purple => "SECTION_PREDEFINED_COLOR_PURPLE",
204            Self::Magenta => "SECTION_PREDEFINED_COLOR_MAGENTA",
205            Self::Pink => "SECTION_PREDEFINED_COLOR_PINK",
206            Self::Orange => "SECTION_PREDEFINED_COLOR_ORANGE",
207        }
208    }
209    /// Creates an enum from field names used in the ProtoBuf definition.
210    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
211        match value {
212            "SECTION_PREDEFINED_COLOR_UNSPECIFIED" => Some(Self::Unspecified),
213            "SECTION_PREDEFINED_COLOR_CYAN" => Some(Self::Cyan),
214            "SECTION_PREDEFINED_COLOR_GREEN" => Some(Self::Green),
215            "SECTION_PREDEFINED_COLOR_BLUE" => Some(Self::Blue),
216            "SECTION_PREDEFINED_COLOR_PURPLE" => Some(Self::Purple),
217            "SECTION_PREDEFINED_COLOR_MAGENTA" => Some(Self::Magenta),
218            "SECTION_PREDEFINED_COLOR_PINK" => Some(Self::Pink),
219            "SECTION_PREDEFINED_COLOR_ORANGE" => Some(Self::Orange),
220            _ => None,
221        }
222    }
223}
224#[derive(serde::Serialize, serde::Deserialize)]
225#[serde(rename_all = "snake_case")]
226#[derive(Clone, PartialEq, ::prost::Message)]
227pub struct Dashboard {
228    /// A unique identifier of the dashboard.
229    #[prost(message, optional, tag = "1")]
230    pub id: ::core::option::Option<::prost::alloc::string::String>,
231    /// The display name of the dashboard.
232    #[prost(message, optional, tag = "2")]
233    pub name: ::core::option::Option<::prost::alloc::string::String>,
234    /// A brief description or summary of the dashboard's purpose or content.
235    #[prost(message, optional, tag = "3")]
236    pub description: ::core::option::Option<::prost::alloc::string::String>,
237    /// The layout configuration for the dashboard's visual elements.
238    #[prost(message, optional, tag = "4")]
239    pub layout: ::core::option::Option<Layout>,
240    /// A list of variables that can be used within the dashboard for dynamic content.
241    #[deprecated]
242    #[prost(message, repeated, tag = "5")]
243    pub variables: ::prost::alloc::vec::Vec<variables::Variable>,
244    #[prost(message, repeated, tag = "16")]
245    pub variables_v2: ::prost::alloc::vec::Vec<variables_v2::VariableV2>,
246    /// A list of filters that can be applied to the dashboard's data.
247    #[prost(message, repeated, tag = "6")]
248    pub filters: ::prost::alloc::vec::Vec<filters::Filter>,
249    #[prost(message, repeated, tag = "11")]
250    pub annotations: ::prost::alloc::vec::Vec<annotations::Annotation>,
251    #[prost(message, optional, tag = "15")]
252    pub slug_name: ::core::option::Option<::prost::alloc::string::String>,
253    #[prost(message, repeated, tag = "17")]
254    pub actions: ::prost::alloc::vec::Vec<super::common::DashboardAction>,
255    /// Specifies the time frame for the dashboard's data. Can be either absolute or relative.
256    #[prost(oneof = "dashboard::TimeFrame", tags = "7, 8")]
257    pub time_frame: ::core::option::Option<dashboard::TimeFrame>,
258    /// A polymorphic field for the dashboard's folder. Either a folder ID or a folder path is supported.
259    #[prost(oneof = "dashboard::Folder", tags = "9, 10")]
260    pub folder: ::core::option::Option<dashboard::Folder>,
261    /// The auto refresh interval for the dashboard.
262    #[prost(oneof = "dashboard::AutoRefresh", tags = "12, 13, 14")]
263    pub auto_refresh: ::core::option::Option<dashboard::AutoRefresh>,
264}
265/// Nested message and enum types in `Dashboard`.
266pub mod dashboard {
267    #[derive(serde::Serialize, serde::Deserialize)]
268    #[serde(rename_all = "snake_case")]
269    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
270    pub struct AutoRefreshOff {}
271    #[derive(serde::Serialize, serde::Deserialize)]
272    #[serde(rename_all = "snake_case")]
273    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
274    pub struct AutoRefreshTwoMinutes {}
275    #[derive(serde::Serialize, serde::Deserialize)]
276    #[serde(rename_all = "snake_case")]
277    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
278    pub struct AutoRefreshFiveMinutes {}
279    /// Specifies the time frame for the dashboard's data. Can be either absolute or relative.
280    #[derive(serde::Serialize, serde::Deserialize)]
281    #[serde(rename_all = "snake_case")]
282    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
283    pub enum TimeFrame {
284        /// Absolute time frame specifying a fixed start and end time.
285        #[prost(message, tag = "7")]
286        AbsoluteTimeFrame(super::super::common::TimeFrame),
287        /// Relative time frame specifying a duration from the current time.
288        #[prost(message, tag = "8")]
289        RelativeTimeFrame(::prost_wkt_types::Duration),
290    }
291    /// A polymorphic field for the dashboard's folder. Either a folder ID or a folder path is supported.
292    #[derive(serde::Serialize, serde::Deserialize)]
293    #[serde(rename_all = "snake_case")]
294    #[derive(Clone, PartialEq, ::prost::Oneof)]
295    pub enum Folder {
296        #[prost(message, tag = "9")]
297        FolderId(super::super::Uuid),
298        #[prost(message, tag = "10")]
299        FolderPath(super::FolderPath),
300    }
301    /// The auto refresh interval for the dashboard.
302    #[derive(serde::Serialize, serde::Deserialize)]
303    #[serde(rename_all = "snake_case")]
304    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
305    pub enum AutoRefresh {
306        #[prost(message, tag = "12")]
307        Off(AutoRefreshOff),
308        #[prost(message, tag = "13")]
309        TwoMinutes(AutoRefreshTwoMinutes),
310        #[prost(message, tag = "14")]
311        FiveMinutes(AutoRefreshFiveMinutes),
312    }
313}