manticoresearch 2.0.0

Сlient for Manticore Search.
Documentation
/*
 * Manticore Search Client
 *
 * Сlient for Manticore Search. 
 *
 * The version of the OpenAPI document: 5.0.0
 * Contact: info@manticoresearch.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Join {
    /// Type of the join operation
    #[serde(rename = "type")]
    pub r#type: Type,
    /// List of objects defining joined tables
    #[serde(rename = "on")]
    pub on: Vec<models::JoinOn>,
    #[serde(rename = "query", skip_serializing_if = "Option::is_none")]
    pub query: Option<Box<models::FulltextFilter>>,
    /// Basic table of the join operation
    #[serde(rename = "table")]
    pub table: String,
}

impl Join {
    pub fn new(r#type: Type, on: Vec<models::JoinOn>, table: String) -> Join {
        Join {
            r#type,
            on,
            query: None,
            table,
        }
    }
}
/// Type of the join operation
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "inner")]
    Inner,
    #[serde(rename = "left")]
    Left,
}

impl Default for Type {
    fn default() -> Type {
        Self::Inner
    }
}