thehive_client/models/
query_sort_expr.rs

1/*
2 * TheHive API
3 *
4 * Comprehensive OpenAPI specification inferred from the TheHive4py client library. This API allows interaction with TheHive platform for managing alerts, cases, observables, tasks, users, and other entities. 
5 *
6 * The version of the OpenAPI document: 2.1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct QuerySortExpr {
16    #[serde(rename = "_fields", skip_serializing_if = "Option::is_none")]
17    pub _fields: Option<Vec<Fields>>,
18}
19
20impl QuerySortExpr {
21    pub fn new() -> QuerySortExpr {
22        QuerySortExpr {
23            _fields: None,
24        }
25    }
26}
27/// 
28#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
29pub enum Fields {
30    #[serde(rename = "asc")]
31    Asc,
32    #[serde(rename = "desc")]
33    Desc,
34}
35
36impl Default for Fields {
37    fn default() -> Fields {
38        Self::Asc
39    }
40}
41