/*
* 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.603.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AutomationFactConditionOneOf {
/// A fact name from the catalog.
#[serde(rename = "field")]
pub field: String,
#[serde(rename = "op")]
pub op: Op,
#[serde(rename = "value")]
pub value: Box<models::AutomationFactConditionOneOfValue>,
}
impl AutomationFactConditionOneOf {
pub fn new(
field: String,
op: Op,
value: models::AutomationFactConditionOneOfValue,
) -> AutomationFactConditionOneOf {
AutomationFactConditionOneOf {
field,
op,
value: Box::new(value),
}
}
}
///
#[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
}
}