/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.587.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// AutomationFactCondition : Narrows by the facts of the event or post, such as `platform` or `likes`: one comparison, or a group where `all` must hold or `any` is enough. Groups nest. A leaf whose `field` is not a fact of the event or post is refused. Text compares ignoring case. A number or date that does not parse never matches.
/// Narrows by the facts of the event or post, such as `platform` or `likes`: one comparison, or a group where `all` must hold or `any` is enough. Groups nest. A leaf whose `field` is not a fact of the event or post is refused. Text compares ignoring case. A number or date that does not parse never matches.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum AutomationFactCondition {
AutomationFactConditionOneOf(Box<models::AutomationFactConditionOneOf>),
AutomationFactConditionOneOf1(Box<models::AutomationFactConditionOneOf1>),
AutomationFactConditionOneOf2(Box<models::AutomationFactConditionOneOf2>),
}
impl Default for AutomationFactCondition {
fn default() -> Self {
Self::AutomationFactConditionOneOf(Default::default())
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Op {
#[serde(rename = "equals")]
Equals,
#[serde(rename = "not_equals")]
NotEquals,
#[serde(rename = "contains")]
Contains,
#[serde(rename = "not_contains")]
NotContains,
#[serde(rename = "starts_with")]
StartsWith,
#[serde(rename = "ends_with")]
EndsWith,
#[serde(rename = "exists")]
Exists,
#[serde(rename = "not_exists")]
NotExists,
#[serde(rename = "matches")]
Matches,
#[serde(rename = "greater_than")]
GreaterThan,
#[serde(rename = "less_than")]
LessThan,
#[serde(rename = "greater_or_equal")]
GreaterOrEqual,
#[serde(rename = "less_or_equal")]
LessOrEqual,
#[serde(rename = "before")]
Before,
#[serde(rename = "after")]
After,
#[serde(rename = "has_tag")]
HasTag,
#[serde(rename = "not_has_tag")]
NotHasTag,
#[serde(rename = "is_true")]
IsTrue,
#[serde(rename = "is_false")]
IsFalse,
}
impl Default for Op {
fn default() -> Op {
Self::Equals
}
}