linkbreakers 1.87.7

Official Rust SDK for the Linkbreakers API
Documentation
/*
 * Linkbreakers API
 *
 * This is a documentation of all the APIs of Linkbreakers
 *
 * The version of the OpenAPI document: 1.87.7
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhooksServiceUpdateBody {
    #[serde(rename = "endpointUrl", skip_serializing_if = "Option::is_none")]
    pub endpoint_url: Option<String>,
    /// Filter webhook notifications by a specific link ID. Only events from this link will trigger webhook notifications. If empty, all links in the workspace will trigger notifications.
    #[serde(rename = "linkId", skip_serializing_if = "Option::is_none")]
    pub link_id: Option<String>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<models::WebhookSource>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<models::WebhookStatus>,
    /// Filter webhook notifications by workflow step kinds. Only workflow steps matching these kinds will trigger webhook notifications. If empty, all workflow step kinds will trigger notifications.
    #[serde(rename = "triggers", skip_serializing_if = "Option::is_none")]
    pub triggers: Option<Vec<Triggers>>,
}

impl WebhooksServiceUpdateBody {
    pub fn new() -> WebhooksServiceUpdateBody {
        WebhooksServiceUpdateBody {
            endpoint_url: None,
            link_id: None,
            name: None,
            source: None,
            status: None,
            triggers: None,
        }
    }
}
/// Filter webhook notifications by workflow step kinds. Only workflow steps matching these kinds will trigger webhook notifications. If empty, all workflow step kinds will trigger notifications.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Triggers {
    #[serde(rename = "KIND_UNSPECIFIED")]
    KindUnspecified,
    #[serde(rename = "KIND_ENTRY")]
    KindEntry,
    #[serde(rename = "KIND_EXIT")]
    KindExit,
    #[serde(rename = "KIND_INTERACTION")]
    KindInteraction,
    #[serde(rename = "KIND_CONDITION")]
    KindCondition,
}

impl Default for Triggers {
    fn default() -> Triggers {
        Self::KindUnspecified
    }
}