cx_api/generated/
com.coralogixapis.apm.common.v2.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 OrderBy {
6    #[prost(message, optional, tag = "1")]
7    pub field_name: ::core::option::Option<::prost::alloc::string::String>,
8    #[prost(enumeration = "OrderByDirection", tag = "2")]
9    pub direction: i32,
10}
11#[derive(serde::Serialize, serde::Deserialize)]
12#[serde(rename_all = "snake_case")]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
14#[repr(i32)]
15pub enum OrderByDirection {
16    Unspecified = 0,
17    Asc = 1,
18    Desc = 2,
19}
20impl OrderByDirection {
21    /// String value of the enum field names used in the ProtoBuf definition.
22    ///
23    /// The values are not transformed in any way and thus are considered stable
24    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
25    pub fn as_str_name(&self) -> &'static str {
26        match self {
27            Self::Unspecified => "ORDER_BY_DIRECTION_UNSPECIFIED",
28            Self::Asc => "ORDER_BY_DIRECTION_ASC",
29            Self::Desc => "ORDER_BY_DIRECTION_DESC",
30        }
31    }
32    /// Creates an enum from field names used in the ProtoBuf definition.
33    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
34        match value {
35            "ORDER_BY_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
36            "ORDER_BY_DIRECTION_ASC" => Some(Self::Asc),
37            "ORDER_BY_DIRECTION_DESC" => Some(Self::Desc),
38            _ => None,
39        }
40    }
41}