hatchet-sdk 0.2.8

This is an unofficial Rust SDK for Hatchet, a distributed, fault-tolerant task queue.
Documentation
/*
 * Hatchet API
 *
 * The Hatchet API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TenantUpdateRequest {
    /// The name of the tenant.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Whether the tenant has opted out of analytics.
    #[serde(rename = "analyticsOptOut", skip_serializing_if = "Option::is_none")]
    pub analytics_opt_out: Option<bool>,
    /// Whether to alert tenant members.
    #[serde(rename = "alertMemberEmails", skip_serializing_if = "Option::is_none")]
    pub alert_member_emails: Option<bool>,
    /// Whether to send alerts when workflow runs fail.
    #[serde(
        rename = "enableWorkflowRunFailureAlerts",
        skip_serializing_if = "Option::is_none"
    )]
    pub enable_workflow_run_failure_alerts: Option<bool>,
    /// Whether to enable alerts when tokens are approaching expiration.
    #[serde(
        rename = "enableExpiringTokenAlerts",
        skip_serializing_if = "Option::is_none"
    )]
    pub enable_expiring_token_alerts: Option<bool>,
    /// Whether to enable alerts when tenant resources are approaching limits.
    #[serde(
        rename = "enableTenantResourceLimitAlerts",
        skip_serializing_if = "Option::is_none"
    )]
    pub enable_tenant_resource_limit_alerts: Option<bool>,
    /// The max frequency at which to alert.
    #[serde(
        rename = "maxAlertingFrequency",
        skip_serializing_if = "Option::is_none"
    )]
    pub max_alerting_frequency: Option<String>,
    /// The version of the tenant.
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<Version>,
    /// The UI of the tenant.
    #[serde(rename = "uiVersion", skip_serializing_if = "Option::is_none")]
    pub ui_version: Option<UiVersion>,
}

impl TenantUpdateRequest {
    pub fn new() -> TenantUpdateRequest {
        TenantUpdateRequest {
            name: None,
            analytics_opt_out: None,
            alert_member_emails: None,
            enable_workflow_run_failure_alerts: None,
            enable_expiring_token_alerts: None,
            enable_tenant_resource_limit_alerts: None,
            max_alerting_frequency: None,
            version: None,
            ui_version: None,
        }
    }
}
/// The version of the tenant.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Version {
    #[serde(rename = "V0")]
    V0,
    #[serde(rename = "V1")]
    V1,
}

impl Default for Version {
    fn default() -> Version {
        Self::V0
    }
}
/// The UI of the tenant.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum UiVersion {
    #[serde(rename = "V0")]
    V0,
    #[serde(rename = "V1")]
    V1,
}

impl Default for UiVersion {
    fn default() -> UiVersion {
        Self::V0
    }
}