mistral-openapi-client 0.1.0

Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
Documentation
/*
 * Mistral AI API
 *
 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Filters {
    #[serde(rename = "AND", skip_serializing_if = "Option::is_none")]
    pub and: Option<Vec<models::FilterGroupAndInner>>,
    #[serde(rename = "OR", skip_serializing_if = "Option::is_none")]
    pub or: Option<Vec<models::FilterGroupAndInner>>,
    #[serde(rename = "field")]
    pub field: String,
    #[serde(rename = "op")]
    pub op: Op,
    #[serde(rename = "value", deserialize_with = "Option::deserialize")]
    pub value: Option<serde_json::Value>,
}

impl Filters {
    pub fn new(field: String, op: Op, value: Option<serde_json::Value>) -> Filters {
        Filters {
            and: None,
            or: None,
            field,
            op,
            value,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Op {
    #[serde(rename = "lt")]
    Lt,
    #[serde(rename = "lte")]
    Lte,
    #[serde(rename = "gt")]
    Gt,
    #[serde(rename = "gte")]
    Gte,
    #[serde(rename = "startswith")]
    Startswith,
    #[serde(rename = "istartswith")]
    Istartswith,
    #[serde(rename = "endswith")]
    Endswith,
    #[serde(rename = "iendswith")]
    Iendswith,
    #[serde(rename = "contains")]
    Contains,
    #[serde(rename = "icontains")]
    Icontains,
    #[serde(rename = "matches")]
    Matches,
    #[serde(rename = "notcontains")]
    Notcontains,
    #[serde(rename = "inotcontains")]
    Inotcontains,
    #[serde(rename = "eq")]
    Eq,
    #[serde(rename = "neq")]
    Neq,
    #[serde(rename = "isnull")]
    Isnull,
    #[serde(rename = "includes")]
    Includes,
    #[serde(rename = "excludes")]
    Excludes,
    #[serde(rename = "len_eq")]
    LenEq,
}

impl Default for Op {
    fn default() -> Op {
        Self::Lt
    }
}