// this file is @generated
use serde::{Deserialize, Serialize};

use super::connector_kind::ConnectorKind;

#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct ConnectorUpsertIn {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub logo: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub kind: Option<ConnectorKind>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub instructions: Option<String>,

    #[serde(rename = "allowedEventTypes")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub allowed_event_types: Option<std::collections::BTreeSet<String>>,

    pub transformation: String,

    #[serde(rename = "featureFlags")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub feature_flags: Option<std::collections::BTreeSet<String>>,
}

impl ConnectorUpsertIn {
    pub fn new(transformation: String) -> Self {
        Self {
            name: None,
            logo: None,
            description: None,
            kind: None,
            instructions: None,
            allowed_event_types: None,
            transformation,
            feature_flags: None,
        }
    }
}
