diff --git a/crates/clickhouse-cloud-api/src/models.rs b/crates/clickhouse-cloud-api/src/models.rs index 9982c5c..dc43b6c 100644 --- a/crates/clickhouse-cloud-api/src/models.rs +++ b/crates/clickhouse-cloud-api/src/models.rs @@ -130,6 +130,7 @@ mod activity; mod api_keys; mod backups; mod byoc; +mod clickpipes; mod invitations; mod members; mod organization_private_endpoints; @@ -167,6 +168,7 @@ pub use byoc::{ ByocInfrastructurePatchRequest, ByocInfrastructurePostRequest, ByocInfrastructurePostRequestRegionid, }; +pub use clickpipes::*; pub use invitations::{ Invitation, InvitationPostRequest, InvitationPostRequestRole, InvitationRole, }; @@ -246,2246 +248,2001 @@ pub use udfs::{ UdfVersionCreateRequestV2Type, UdfVersionListResponse, }; -/// Inline enum for `ClickPipe.state`. +/// Inline enum for `ClickStackAlertChannelEmail.type`. +/// +/// The spec gives both alert-channel variants the same `enum: ["webhook", +/// "email"]`, so `#[default]` sits on `Email` rather than on the first value: +/// this field discriminates the `ClickStackAlertChannel` union, and defaulting +/// it to `webhook` would make `ClickStackAlertChannelEmail::default()` +/// deserialize back as the webhook variant. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeState { +pub enum ClickStackAlertChannelEmailType { + #[serde(rename = "webhook")] + Webhook, + #[serde(rename = "email")] #[default] - Unknown, - Provisioning, - Running, - Stopping, - Stopped, - Failed, - Completed, - InternalError, - Setup, - Snapshot, - Paused, - Pausing, - Modifying, - Resync, - Degraded, + Email, /// Catch-all for unknown or newly-added values. #[serde(untagged)] - Other(String), + Unknown(String), } -impl std::fmt::Display for ClickPipeState { +impl std::fmt::Display for ClickStackAlertChannelEmailType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Unknown => write!(f, "Unknown"), - Self::Provisioning => write!(f, "Provisioning"), - Self::Running => write!(f, "Running"), - Self::Stopping => write!(f, "Stopping"), - Self::Stopped => write!(f, "Stopped"), - Self::Failed => write!(f, "Failed"), - Self::Completed => write!(f, "Completed"), - Self::InternalError => write!(f, "InternalError"), - Self::Setup => write!(f, "Setup"), - Self::Snapshot => write!(f, "Snapshot"), - Self::Paused => write!(f, "Paused"), - Self::Pausing => write!(f, "Pausing"), - Self::Modifying => write!(f, "Modifying"), - Self::Resync => write!(f, "Resync"), - Self::Degraded => write!(f, "Degraded"), - Self::Other(s) => write!(f, "{s}"), + Self::Webhook => write!(f, "webhook"), + Self::Email => write!(f, "email"), + Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeBigQueryPipeSettings.replicationMode`. +/// Inline enum for `ClickStackAlertChannelWebhook.severity`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeBigQueryPipeSettingsReplicationmode { - #[serde(rename = "snapshot")] +pub enum ClickStackAlertChannelWebhookSeverity { + #[serde(rename = "critical")] #[default] - Snapshot, + Critical, + #[serde(rename = "error")] + Error, + #[serde(rename = "warning")] + Warning, + #[serde(rename = "info")] + Info, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeBigQueryPipeSettingsReplicationmode { +impl std::fmt::Display for ClickStackAlertChannelWebhookSeverity { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Snapshot => write!(f, "snapshot"), + Self::Critical => write!(f, "critical"), + Self::Error => write!(f, "error"), + Self::Warning => write!(f, "warning"), + Self::Info => write!(f, "info"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeBigQueryPipeTableMapping.tableEngine`. +/// Inline enum for `ClickStackAlertChannelWebhook.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeBigQueryPipeTableMappingTableengine { +pub enum ClickStackAlertChannelWebhookType { + #[serde(rename = "webhook")] #[default] - MergeTree, - ReplacingMergeTree, - Null, + Webhook, + #[serde(rename = "email")] + Email, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeBigQueryPipeTableMappingTableengine { +impl std::fmt::Display for ClickStackAlertChannelWebhookType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::MergeTree => write!(f, "MergeTree"), - Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), - Self::Null => write!(f, "Null"), + Self::Webhook => write!(f, "webhook"), + Self::Email => write!(f, "email"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeDestinationTableEngine.type`. +/// Inline enum for `ClickStackAlertExecutionError.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeDestinationTableEngineType { +pub enum ClickStackAlertExecutionErrorType { #[default] - MergeTree, - ReplacingMergeTree, - SummingMergeTree, - Null, + QUERY_ERROR, + WEBHOOK_ERROR, + INVALID_ALERT, + UNKNOWN, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeDestinationTableEngineType { +impl std::fmt::Display for ClickStackAlertExecutionErrorType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::MergeTree => write!(f, "MergeTree"), - Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), - Self::SummingMergeTree => write!(f, "SummingMergeTree"), - Self::Null => write!(f, "Null"), + Self::QUERY_ERROR => write!(f, "QUERY_ERROR"), + Self::WEBHOOK_ERROR => write!(f, "WEBHOOK_ERROR"), + Self::INVALID_ALERT => write!(f, "INVALID_ALERT"), + Self::UNKNOWN => write!(f, "UNKNOWN"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeKafkaOffset.strategy`. +/// Inline enum for `ClickStackAlertResponse.interval`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeKafkaOffsetStrategy { - #[serde(rename = "from_beginning")] +pub enum ClickStackAlertResponseInterval { + #[serde(rename = "1m")] #[default] - From_beginning, - #[serde(rename = "from_latest")] - From_latest, - #[serde(rename = "from_timestamp")] - From_timestamp, + _1m, + #[serde(rename = "5m")] + _5m, + #[serde(rename = "15m")] + _15m, + #[serde(rename = "30m")] + _30m, + #[serde(rename = "1h")] + _1h, + #[serde(rename = "6h")] + _6h, + #[serde(rename = "12h")] + _12h, + #[serde(rename = "1d")] + _1d, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeKafkaOffsetStrategy { +impl std::fmt::Display for ClickStackAlertResponseInterval { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::From_beginning => write!(f, "from_beginning"), - Self::From_latest => write!(f, "from_latest"), - Self::From_timestamp => write!(f, "from_timestamp"), + Self::_1m => write!(f, "1m"), + Self::_5m => write!(f, "5m"), + Self::_15m => write!(f, "15m"), + Self::_30m => write!(f, "30m"), + Self::_1h => write!(f, "1h"), + Self::_6h => write!(f, "6h"), + Self::_12h => write!(f, "12h"), + Self::_1d => write!(f, "1d"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeKafkaSchemaRegistry.authentication`. +/// Inline enum for `ClickStackAlertResponse.source`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeKafkaSchemaRegistryAuthentication { +pub enum ClickStackAlertResponseSource { + #[serde(rename = "saved_search")] #[default] - PLAIN, + Saved_search, + #[serde(rename = "tile")] + Tile, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeKafkaSchemaRegistryAuthentication { +impl std::fmt::Display for ClickStackAlertResponseSource { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::PLAIN => write!(f, "PLAIN"), + Self::Saved_search => write!(f, "saved_search"), + Self::Tile => write!(f, "tile"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeKafkaSource.authentication`. +/// Inline enum for `ClickStackAlertResponse.state`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeKafkaSourceAuthentication { +pub enum ClickStackAlertResponseState { #[default] - PLAIN, - #[serde(rename = "SCRAM-SHA-256")] - SCRAM_SHA_256, - #[serde(rename = "SCRAM-SHA-512")] - SCRAM_SHA_512, - IAM_ROLE, - IAM_USER, - MUTUAL_TLS, + ALERT, + OK, + INSUFFICIENT_DATA, + DISABLED, + PENDING, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeKafkaSourceAuthentication { +impl std::fmt::Display for ClickStackAlertResponseState { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::PLAIN => write!(f, "PLAIN"), - Self::SCRAM_SHA_256 => write!(f, "SCRAM-SHA-256"), - Self::SCRAM_SHA_512 => write!(f, "SCRAM-SHA-512"), - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), - Self::MUTUAL_TLS => write!(f, "MUTUAL_TLS"), + Self::ALERT => write!(f, "ALERT"), + Self::OK => write!(f, "OK"), + Self::INSUFFICIENT_DATA => write!(f, "INSUFFICIENT_DATA"), + Self::DISABLED => write!(f, "DISABLED"), + Self::PENDING => write!(f, "PENDING"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeKafkaSource.format`. +/// Inline enum for `ClickStackAlertResponse.thresholdType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeKafkaSourceFormat { +pub enum ClickStackAlertResponseThresholdtype { + #[serde(rename = "above")] #[default] - JSONEachRow, - Avro, - AvroConfluent, - Protobuf, + Above, + #[serde(rename = "below")] + Below, + #[serde(rename = "above_exclusive")] + Above_exclusive, + #[serde(rename = "below_or_equal")] + Below_or_equal, + #[serde(rename = "equal")] + Equal, + #[serde(rename = "not_equal")] + Not_equal, + #[serde(rename = "between")] + Between, + #[serde(rename = "not_between")] + Not_between, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeKafkaSourceFormat { +impl std::fmt::Display for ClickStackAlertResponseThresholdtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::JSONEachRow => write!(f, "JSONEachRow"), - Self::Avro => write!(f, "Avro"), - Self::AvroConfluent => write!(f, "AvroConfluent"), - Self::Protobuf => write!(f, "Protobuf"), + Self::Above => write!(f, "above"), + Self::Below => write!(f, "below"), + Self::Above_exclusive => write!(f, "above_exclusive"), + Self::Below_or_equal => write!(f, "below_or_equal"), + Self::Equal => write!(f, "equal"), + Self::Not_equal => write!(f, "not_equal"), + Self::Between => write!(f, "between"), + Self::Not_between => write!(f, "not_between"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeKafkaSource.type`. +/// Inline enum for `ClickStackBackgroundChart.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeKafkaSourceType { - #[serde(rename = "kafka")] +pub enum ClickStackBackgroundChartType { + #[serde(rename = "line")] #[default] - Kafka, - #[serde(rename = "redpanda")] - Redpanda, - #[serde(rename = "msk")] - Msk, - #[serde(rename = "gcmk")] - Gcmk, - #[serde(rename = "confluent")] - Confluent, - #[serde(rename = "warpstream")] - Warpstream, - #[serde(rename = "azureeventhub")] - Azureeventhub, - #[serde(rename = "dokafka")] - Dokafka, + Line, + #[serde(rename = "area")] + Area, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeKafkaSourceType { +impl std::fmt::Display for ClickStackBackgroundChartType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Kafka => write!(f, "kafka"), - Self::Redpanda => write!(f, "redpanda"), - Self::Msk => write!(f, "msk"), - Self::Gcmk => write!(f, "gcmk"), - Self::Confluent => write!(f, "confluent"), - Self::Warpstream => write!(f, "warpstream"), - Self::Azureeventhub => write!(f, "azureeventhub"), - Self::Dokafka => write!(f, "dokafka"), + Self::Line => write!(f, "line"), + Self::Area => write!(f, "area"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeKinesisSource.authentication`. +/// Inline enum for `ClickStackBarBuilderChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeKinesisSourceAuthentication { +pub enum ClickStackBarBuilderChartConfigDisplaytype { + #[serde(rename = "stacked_bar")] #[default] - IAM_ROLE, - IAM_USER, + Stacked_bar, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeKinesisSourceAuthentication { +impl std::fmt::Display for ClickStackBarBuilderChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), + Self::Stacked_bar => write!(f, "stacked_bar"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeKinesisSource.format`. +/// Inline enum for `ClickStackBarRawSqlChartConfig.configType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeKinesisSourceFormat { +pub enum ClickStackBarRawSqlChartConfigConfigtype { + #[serde(rename = "sql")] #[default] - JSONEachRow, - Avro, - AvroConfluent, + Sql, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeKinesisSourceFormat { +impl std::fmt::Display for ClickStackBarRawSqlChartConfigConfigtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::JSONEachRow => write!(f, "JSONEachRow"), - Self::Avro => write!(f, "Avro"), - Self::AvroConfluent => write!(f, "AvroConfluent"), + Self::Sql => write!(f, "sql"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeKinesisSource.iteratorType`. +/// Inline enum for `ClickStackBarRawSqlChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeKinesisSourceIteratortype { +pub enum ClickStackBarRawSqlChartConfigDisplaytype { + #[serde(rename = "stacked_bar")] #[default] - TRIM_HORIZON, - LATEST, - AT_TIMESTAMP, + Stacked_bar, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeKinesisSourceIteratortype { +impl std::fmt::Display for ClickStackBarRawSqlChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::TRIM_HORIZON => write!(f, "TRIM_HORIZON"), - Self::LATEST => write!(f, "LATEST"), - Self::AT_TIMESTAMP => write!(f, "AT_TIMESTAMP"), + Self::Stacked_bar => write!(f, "stacked_bar"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMongoDBPipeSettings.replicationMode`. +/// Inline enum for `ClickStackBetweenColorCondition.operator`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMongoDBPipeSettingsReplicationmode { - #[serde(rename = "cdc")] +pub enum ClickStackBetweenColorConditionOperator { + #[serde(rename = "between")] #[default] - Cdc, - #[serde(rename = "snapshot")] - Snapshot, - #[serde(rename = "cdc_only")] - Cdc_only, + Between, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMongoDBPipeSettingsReplicationmode { +impl std::fmt::Display for ClickStackBetweenColorConditionOperator { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Cdc => write!(f, "cdc"), - Self::Snapshot => write!(f, "snapshot"), - Self::Cdc_only => write!(f, "cdc_only"), + Self::Between => write!(f, "between"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMongoDBPipeTableMapping.tableEngine`. +/// Inline enum for `ClickStackCategoricalBarBuilderChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMongoDBPipeTableMappingTableengine { +pub enum ClickStackCategoricalBarBuilderChartConfigDisplaytype { + #[serde(rename = "bar")] #[default] - MergeTree, - ReplacingMergeTree, - Null, + Bar, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMongoDBPipeTableMappingTableengine { +impl std::fmt::Display for ClickStackCategoricalBarBuilderChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::MergeTree => write!(f, "MergeTree"), - Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), - Self::Null => write!(f, "Null"), + Self::Bar => write!(f, "bar"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMongoDBSource.readPreference`. +/// Inline enum for `ClickStackCategoricalBarRawSqlChartConfig.configType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMongoDBSourceReadpreference { - #[serde(rename = "primary")] +pub enum ClickStackCategoricalBarRawSqlChartConfigConfigtype { + #[serde(rename = "sql")] #[default] - Primary, - #[serde(rename = "primaryPreferred")] - PrimaryPreferred, - #[serde(rename = "secondary")] - Secondary, - #[serde(rename = "secondaryPreferred")] - SecondaryPreferred, - #[serde(rename = "nearest")] - Nearest, + Sql, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMongoDBSourceReadpreference { +impl std::fmt::Display for ClickStackCategoricalBarRawSqlChartConfigConfigtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Primary => write!(f, "primary"), - Self::PrimaryPreferred => write!(f, "primaryPreferred"), - Self::Secondary => write!(f, "secondary"), - Self::SecondaryPreferred => write!(f, "secondaryPreferred"), - Self::Nearest => write!(f, "nearest"), + Self::Sql => write!(f, "sql"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMutateKafkaSchemaRegistry.authentication`. +/// Inline enum for `ClickStackCategoricalBarRawSqlChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMutateKafkaSchemaRegistryAuthentication { +pub enum ClickStackCategoricalBarRawSqlChartConfigDisplaytype { + #[serde(rename = "bar")] #[default] - PLAIN, + Bar, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMutateKafkaSchemaRegistryAuthentication { +impl std::fmt::Display for ClickStackCategoricalBarRawSqlChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::PLAIN => write!(f, "PLAIN"), + Self::Bar => write!(f, "bar"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMutateMongoDBSource.readPreference`. +/// Palette-token colors shared by ClickStack chart tiles. +/// +/// Used by `ClickStackBackgroundChart`, `ClickStackNumericColorCondition`, +/// `ClickStackBetweenColorCondition`, `ClickStackEqualityColorCondition`, +/// `ClickStackNumberBuilderChartConfig`, and `ClickStackNumberRawSqlChartConfig`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMutateMongoDBSourceReadpreference { - #[serde(rename = "primary")] +pub enum ClickStackChartColor { + #[serde(rename = "chart-blue")] #[default] - Primary, - #[serde(rename = "primaryPreferred")] - PrimaryPreferred, - #[serde(rename = "secondary")] - Secondary, - #[serde(rename = "secondaryPreferred")] - SecondaryPreferred, - #[serde(rename = "nearest")] - Nearest, + Chart_blue, + #[serde(rename = "chart-orange")] + Chart_orange, + #[serde(rename = "chart-red")] + Chart_red, + #[serde(rename = "chart-cyan")] + Chart_cyan, + #[serde(rename = "chart-green")] + Chart_green, + #[serde(rename = "chart-pink")] + Chart_pink, + #[serde(rename = "chart-purple")] + Chart_purple, + #[serde(rename = "chart-light-blue")] + Chart_light_blue, + #[serde(rename = "chart-brown")] + Chart_brown, + #[serde(rename = "chart-gray")] + Chart_gray, + #[serde(rename = "chart-success")] + Chart_success, + #[serde(rename = "chart-warning")] + Chart_warning, + #[serde(rename = "chart-error")] + Chart_error, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMutateMongoDBSourceReadpreference { +impl std::fmt::Display for ClickStackChartColor { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Primary => write!(f, "primary"), - Self::PrimaryPreferred => write!(f, "primaryPreferred"), - Self::Secondary => write!(f, "secondary"), - Self::SecondaryPreferred => write!(f, "secondaryPreferred"), - Self::Nearest => write!(f, "nearest"), + Self::Chart_blue => write!(f, "chart-blue"), + Self::Chart_orange => write!(f, "chart-orange"), + Self::Chart_red => write!(f, "chart-red"), + Self::Chart_cyan => write!(f, "chart-cyan"), + Self::Chart_green => write!(f, "chart-green"), + Self::Chart_pink => write!(f, "chart-pink"), + Self::Chart_purple => write!(f, "chart-purple"), + Self::Chart_light_blue => write!(f, "chart-light-blue"), + Self::Chart_brown => write!(f, "chart-brown"), + Self::Chart_gray => write!(f, "chart-gray"), + Self::Chart_success => write!(f, "chart-success"), + Self::Chart_warning => write!(f, "chart-warning"), + Self::Chart_error => write!(f, "chart-error"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMutateMySQLSource.authentication`. +/// Inline enum for `ClickStackCreateAlertRequest.interval`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMutateMySQLSourceAuthentication { - #[serde(rename = "basic")] +pub enum ClickStackCreateAlertRequestInterval { + #[serde(rename = "1m")] #[default] - Basic, - IAM_ROLE, + _1m, + #[serde(rename = "5m")] + _5m, + #[serde(rename = "15m")] + _15m, + #[serde(rename = "30m")] + _30m, + #[serde(rename = "1h")] + _1h, + #[serde(rename = "6h")] + _6h, + #[serde(rename = "12h")] + _12h, + #[serde(rename = "1d")] + _1d, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMutateMySQLSourceAuthentication { +impl std::fmt::Display for ClickStackCreateAlertRequestInterval { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Basic => write!(f, "basic"), - Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::_1m => write!(f, "1m"), + Self::_5m => write!(f, "5m"), + Self::_15m => write!(f, "15m"), + Self::_30m => write!(f, "30m"), + Self::_1h => write!(f, "1h"), + Self::_6h => write!(f, "6h"), + Self::_12h => write!(f, "12h"), + Self::_1d => write!(f, "1d"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMutateMySQLSource.type`. +/// Inline enum for `ClickStackCreateAlertRequest.source`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMutateMySQLSourceType { - #[serde(rename = "mysql")] +pub enum ClickStackCreateAlertRequestSource { + #[serde(rename = "saved_search")] #[default] - Mysql, - #[serde(rename = "rdsmysql")] - Rdsmysql, - #[serde(rename = "auroramysql")] - Auroramysql, - #[serde(rename = "mariadb")] - Mariadb, - #[serde(rename = "rdsmariadb")] - Rdsmariadb, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickPipeMutateMySQLSourceType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Mysql => write!(f, "mysql"), - Self::Rdsmysql => write!(f, "rdsmysql"), - Self::Auroramysql => write!(f, "auroramysql"), - Self::Mariadb => write!(f, "mariadb"), - Self::Rdsmariadb => write!(f, "rdsmariadb"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickPipeMutatePostgresSource.authentication`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMutatePostgresSourceAuthentication { - #[serde(rename = "basic")] - #[default] - Basic, - IAM_ROLE, + Saved_search, + #[serde(rename = "tile")] + Tile, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMutatePostgresSourceAuthentication { +impl std::fmt::Display for ClickStackCreateAlertRequestSource { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Basic => write!(f, "basic"), - Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Saved_search => write!(f, "saved_search"), + Self::Tile => write!(f, "tile"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMutatePostgresSource.type`. +/// Inline enum for `ClickStackCreateAlertRequest.thresholdType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMutatePostgresSourceType { - #[serde(rename = "postgres")] +pub enum ClickStackCreateAlertRequestThresholdtype { + #[serde(rename = "above")] #[default] - Postgres, - #[serde(rename = "supabase")] - Supabase, - #[serde(rename = "neon")] - Neon, - #[serde(rename = "alloydb")] - Alloydb, - #[serde(rename = "planetscale")] - Planetscale, - #[serde(rename = "rdspostgres")] - Rdspostgres, - #[serde(rename = "aurorapostgres")] - Aurorapostgres, - #[serde(rename = "cloudsqlpostgres")] - Cloudsqlpostgres, - #[serde(rename = "azurepostgres")] - Azurepostgres, - #[serde(rename = "crunchybridge")] - Crunchybridge, - #[serde(rename = "tigerdata")] - Tigerdata, + Above, + #[serde(rename = "below")] + Below, + #[serde(rename = "above_exclusive")] + Above_exclusive, + #[serde(rename = "below_or_equal")] + Below_or_equal, + #[serde(rename = "equal")] + Equal, + #[serde(rename = "not_equal")] + Not_equal, + #[serde(rename = "between")] + Between, + #[serde(rename = "not_between")] + Not_between, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMutatePostgresSourceType { +impl std::fmt::Display for ClickStackCreateAlertRequestThresholdtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Postgres => write!(f, "postgres"), - Self::Supabase => write!(f, "supabase"), - Self::Neon => write!(f, "neon"), - Self::Alloydb => write!(f, "alloydb"), - Self::Planetscale => write!(f, "planetscale"), - Self::Rdspostgres => write!(f, "rdspostgres"), - Self::Aurorapostgres => write!(f, "aurorapostgres"), - Self::Cloudsqlpostgres => write!(f, "cloudsqlpostgres"), - Self::Azurepostgres => write!(f, "azurepostgres"), - Self::Crunchybridge => write!(f, "crunchybridge"), - Self::Tigerdata => write!(f, "tigerdata"), + Self::Above => write!(f, "above"), + Self::Below => write!(f, "below"), + Self::Above_exclusive => write!(f, "above_exclusive"), + Self::Below_or_equal => write!(f, "below_or_equal"), + Self::Equal => write!(f, "equal"), + Self::Not_equal => write!(f, "not_equal"), + Self::Between => write!(f, "between"), + Self::Not_between => write!(f, "not_between"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMySQLPipeSettings.replicationMechanism`. +/// Inline enum for `ClickStackCreateDashboardRequest.savedQueryLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMySQLPipeSettingsReplicationmechanism { +pub enum ClickStackCreateDashboardRequestSavedquerylanguage { + #[serde(rename = "sql")] #[default] - GTID, - FILE_POS, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMySQLPipeSettingsReplicationmechanism { +impl std::fmt::Display for ClickStackCreateDashboardRequestSavedquerylanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::GTID => write!(f, "GTID"), - Self::FILE_POS => write!(f, "FILE_POS"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMySQLPipeSettings.replicationMode`. +/// Inline enum for `ClickStackDashboardResponse.savedQueryLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMySQLPipeSettingsReplicationmode { - #[serde(rename = "cdc")] +pub enum ClickStackDashboardResponseSavedquerylanguage { + #[serde(rename = "sql")] #[default] - Cdc, - #[serde(rename = "snapshot")] - Snapshot, - #[serde(rename = "cdc_only")] - Cdc_only, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMySQLPipeSettingsReplicationmode { +impl std::fmt::Display for ClickStackDashboardResponseSavedquerylanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Cdc => write!(f, "cdc"), - Self::Snapshot => write!(f, "snapshot"), - Self::Cdc_only => write!(f, "cdc_only"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMySQLPipeTableMapping.tableEngine`. +/// Inline enum for `ClickStackEqualityColorCondition.operator`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMySQLPipeTableMappingTableengine { +pub enum ClickStackEqualityColorConditionOperator { + #[serde(rename = "eq")] #[default] - MergeTree, - ReplacingMergeTree, - Null, + Eq, + #[serde(rename = "neq")] + Neq, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMySQLPipeTableMappingTableengine { +impl std::fmt::Display for ClickStackEqualityColorConditionOperator { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::MergeTree => write!(f, "MergeTree"), - Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), - Self::Null => write!(f, "Null"), + Self::Eq => write!(f, "eq"), + Self::Neq => write!(f, "neq"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMySQLSource.authentication`. +/// Inline enum for `ClickStackEventPatternsChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMySQLSourceAuthentication { - #[serde(rename = "basic")] +pub enum ClickStackEventPatternsChartConfigDisplaytype { + #[serde(rename = "event_patterns")] #[default] - Basic, - IAM_ROLE, + Event_patterns, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMySQLSourceAuthentication { +impl std::fmt::Display for ClickStackEventPatternsChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Basic => write!(f, "basic"), - Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Event_patterns => write!(f, "event_patterns"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeMySQLSource.type`. +/// Inline enum for `ClickStackEventPatternsChartConfig.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeMySQLSourceType { - #[serde(rename = "mysql")] +pub enum ClickStackEventPatternsChartConfigWherelanguage { + #[serde(rename = "sql")] #[default] - Mysql, - #[serde(rename = "rdsmysql")] - Rdsmysql, - #[serde(rename = "auroramysql")] - Auroramysql, - #[serde(rename = "mariadb")] - Mariadb, - #[serde(rename = "rdsmariadb")] - Rdsmariadb, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeMySQLSourceType { +impl std::fmt::Display for ClickStackEventPatternsChartConfigWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Mysql => write!(f, "mysql"), - Self::Rdsmysql => write!(f, "rdsmysql"), - Self::Auroramysql => write!(f, "auroramysql"), - Self::Mariadb => write!(f, "mariadb"), - Self::Rdsmariadb => write!(f, "rdsmariadb"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeObjectStorageSource.authentication`. +/// Inline enum for `ClickStackFilter.sourceMetricType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeObjectStorageSourceAuthentication { +pub enum ClickStackFilterSourcemetrictype { + #[serde(rename = "sum")] #[default] - IAM_ROLE, - IAM_USER, - CONNECTION_STRING, - SERVICE_ACCOUNT, + Sum, + #[serde(rename = "gauge")] + Gauge, + #[serde(rename = "histogram")] + Histogram, + #[serde(rename = "summary")] + Summary, + #[serde(rename = "exponential histogram")] + Exponential_histogram, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeObjectStorageSourceAuthentication { +impl std::fmt::Display for ClickStackFilterSourcemetrictype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), - Self::CONNECTION_STRING => write!(f, "CONNECTION_STRING"), - Self::SERVICE_ACCOUNT => write!(f, "SERVICE_ACCOUNT"), + Self::Sum => write!(f, "sum"), + Self::Gauge => write!(f, "gauge"), + Self::Histogram => write!(f, "histogram"), + Self::Summary => write!(f, "summary"), + Self::Exponential_histogram => write!(f, "exponential histogram"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeObjectStorageSource.compression`. +/// Inline enum for `ClickStackFilter.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeObjectStorageSourceCompression { - #[serde(rename = "none")] +pub enum ClickStackFilterType { #[default] - None, - #[serde(rename = "gzip")] - Gzip, - #[serde(rename = "gz")] - Gz, - #[serde(rename = "brotli")] - Brotli, - #[serde(rename = "br")] - Br, - #[serde(rename = "xz")] - Xz, - LZMA, - #[serde(rename = "zstd")] - Zstd, - #[serde(rename = "auto")] - Auto, + QUERY_EXPRESSION, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeObjectStorageSourceCompression { +impl std::fmt::Display for ClickStackFilterType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::None => write!(f, "none"), - Self::Gzip => write!(f, "gzip"), - Self::Gz => write!(f, "gz"), - Self::Brotli => write!(f, "brotli"), - Self::Br => write!(f, "br"), - Self::Xz => write!(f, "xz"), - Self::LZMA => write!(f, "LZMA"), - Self::Zstd => write!(f, "zstd"), - Self::Auto => write!(f, "auto"), + Self::QUERY_EXPRESSION => write!(f, "QUERY_EXPRESSION"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeObjectStorageSource.format`. +/// Inline enum for `ClickStackFilter.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeObjectStorageSourceFormat { +pub enum ClickStackFilterWherelanguage { + #[serde(rename = "sql")] #[default] - JSONEachRow, - JSONAsObject, - CSV, - CSVWithNames, - TabSeparated, - TabSeparatedWithNames, - Parquet, - Avro, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeObjectStorageSourceFormat { +impl std::fmt::Display for ClickStackFilterWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::JSONEachRow => write!(f, "JSONEachRow"), - Self::JSONAsObject => write!(f, "JSONAsObject"), - Self::CSV => write!(f, "CSV"), - Self::CSVWithNames => write!(f, "CSVWithNames"), - Self::TabSeparated => write!(f, "TabSeparated"), - Self::TabSeparatedWithNames => write!(f, "TabSeparatedWithNames"), - Self::Parquet => write!(f, "Parquet"), - Self::Avro => write!(f, "Avro"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeObjectStorageSource.type`. +/// Inline enum for `ClickStackFilterInput.sourceMetricType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeObjectStorageSourceType { - #[serde(rename = "s3")] +pub enum ClickStackFilterInputSourcemetrictype { + #[serde(rename = "sum")] #[default] - S3, - #[serde(rename = "gcs")] - Gcs, - #[serde(rename = "dospaces")] - Dospaces, - #[serde(rename = "azureblobstorage")] - Azureblobstorage, - #[serde(rename = "cloudflarer2")] - Cloudflarer2, - #[serde(rename = "ovhobjectstorage")] - Ovhobjectstorage, + Sum, + #[serde(rename = "gauge")] + Gauge, + #[serde(rename = "histogram")] + Histogram, + #[serde(rename = "summary")] + Summary, + #[serde(rename = "exponential histogram")] + Exponential_histogram, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeObjectStorageSourceType { +impl std::fmt::Display for ClickStackFilterInputSourcemetrictype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::S3 => write!(f, "s3"), - Self::Gcs => write!(f, "gcs"), - Self::Dospaces => write!(f, "dospaces"), - Self::Azureblobstorage => write!(f, "azureblobstorage"), - Self::Cloudflarer2 => write!(f, "cloudflarer2"), - Self::Ovhobjectstorage => write!(f, "ovhobjectstorage"), + Self::Sum => write!(f, "sum"), + Self::Gauge => write!(f, "gauge"), + Self::Histogram => write!(f, "histogram"), + Self::Summary => write!(f, "summary"), + Self::Exponential_histogram => write!(f, "exponential histogram"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchKafkaSource.authentication`. +/// Inline enum for `ClickStackFilterInput.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchKafkaSourceAuthentication { +pub enum ClickStackFilterInputType { #[default] - PLAIN, - #[serde(rename = "SCRAM-SHA-256")] - SCRAM_SHA_256, - #[serde(rename = "SCRAM-SHA-512")] - SCRAM_SHA_512, - IAM_ROLE, - IAM_USER, - MUTUAL_TLS, + QUERY_EXPRESSION, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchKafkaSourceAuthentication { +impl std::fmt::Display for ClickStackFilterInputType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::PLAIN => write!(f, "PLAIN"), - Self::SCRAM_SHA_256 => write!(f, "SCRAM-SHA-256"), - Self::SCRAM_SHA_512 => write!(f, "SCRAM-SHA-512"), - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), - Self::MUTUAL_TLS => write!(f, "MUTUAL_TLS"), + Self::QUERY_EXPRESSION => write!(f, "QUERY_EXPRESSION"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchKinesisSource.authentication`. +/// Inline enum for `ClickStackFilterInput.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchKinesisSourceAuthentication { +pub enum ClickStackFilterInputWherelanguage { + #[serde(rename = "sql")] #[default] - IAM_ROLE, - IAM_USER, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchKinesisSourceAuthentication { +impl std::fmt::Display for ClickStackFilterInputWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchMongoDBPipeRemoveTableMapping.tableEngine`. +/// Inline enum for `ClickStackGenericWebhook.service`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchMongoDBPipeRemoveTableMappingTableengine { +pub enum ClickStackGenericWebhookService { + #[serde(rename = "generic")] #[default] - MergeTree, - ReplacingMergeTree, - Null, + Generic, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchMongoDBPipeRemoveTableMappingTableengine { +impl std::fmt::Display for ClickStackGenericWebhookService { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::MergeTree => write!(f, "MergeTree"), - Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), - Self::Null => write!(f, "Null"), + Self::Generic => write!(f, "generic"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchMongoDBSource.readPreference`. +/// Inline enum for `ClickStackHeatmapChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchMongoDBSourceReadpreference { - #[serde(rename = "primary")] +pub enum ClickStackHeatmapChartConfigDisplaytype { + #[serde(rename = "heatmap")] #[default] - Primary, - #[serde(rename = "primaryPreferred")] - PrimaryPreferred, - #[serde(rename = "secondary")] - Secondary, - #[serde(rename = "secondaryPreferred")] - SecondaryPreferred, - #[serde(rename = "nearest")] - Nearest, + Heatmap, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchMongoDBSourceReadpreference { +impl std::fmt::Display for ClickStackHeatmapChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Primary => write!(f, "primary"), - Self::PrimaryPreferred => write!(f, "primaryPreferred"), - Self::Secondary => write!(f, "secondary"), - Self::SecondaryPreferred => write!(f, "secondaryPreferred"), - Self::Nearest => write!(f, "nearest"), + Self::Heatmap => write!(f, "heatmap"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchMySQLPipeRemoveTableMapping.tableEngine`. +/// Inline enum for `ClickStackHeatmapChartConfig.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchMySQLPipeRemoveTableMappingTableengine { +pub enum ClickStackHeatmapChartConfigWherelanguage { + #[serde(rename = "sql")] #[default] - MergeTree, - ReplacingMergeTree, - Null, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchMySQLPipeRemoveTableMappingTableengine { +impl std::fmt::Display for ClickStackHeatmapChartConfigWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::MergeTree => write!(f, "MergeTree"), - Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), - Self::Null => write!(f, "Null"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchMySQLSource.authentication`. +/// Inline enum for `ClickStackHeatmapSelectItem.heatmapScaleType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchMySQLSourceAuthentication { - #[serde(rename = "basic")] +pub enum ClickStackHeatmapSelectItemHeatmapscaletype { + #[serde(rename = "log")] #[default] - Basic, - IAM_ROLE, + Log, + #[serde(rename = "linear")] + Linear, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchMySQLSourceAuthentication { +impl std::fmt::Display for ClickStackHeatmapSelectItemHeatmapscaletype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Basic => write!(f, "basic"), - Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Log => write!(f, "log"), + Self::Linear => write!(f, "linear"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchObjectStorageSource.authentication`. +/// Inline enum for `ClickStackIncidentIOWebhook.service`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchObjectStorageSourceAuthentication { +pub enum ClickStackIncidentIOWebhookService { + #[serde(rename = "incidentio")] #[default] - IAM_ROLE, - IAM_USER, - CONNECTION_STRING, - SERVICE_ACCOUNT, + Incidentio, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchObjectStorageSourceAuthentication { +impl std::fmt::Display for ClickStackIncidentIOWebhookService { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), - Self::CONNECTION_STRING => write!(f, "CONNECTION_STRING"), - Self::SERVICE_ACCOUNT => write!(f, "SERVICE_ACCOUNT"), + Self::Incidentio => write!(f, "incidentio"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchPostgresPipeRemoveTableMapping.tableEngine`. +/// Inline enum for `ClickStackLineBuilderChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchPostgresPipeRemoveTableMappingTableengine { +pub enum ClickStackLineBuilderChartConfigDisplaytype { + #[serde(rename = "line")] #[default] - MergeTree, - ReplacingMergeTree, - Null, + Line, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchPostgresPipeRemoveTableMappingTableengine { +impl std::fmt::Display for ClickStackLineBuilderChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::MergeTree => write!(f, "MergeTree"), - Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), - Self::Null => write!(f, "Null"), + Self::Line => write!(f, "line"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePatchPubSubSource.authentication`. +/// Inline enum for `ClickStackLineRawSqlChartConfig.configType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePatchPubSubSourceAuthentication { - #[serde(rename = "SERVICE_ACCOUNT")] +pub enum ClickStackLineRawSqlChartConfigConfigtype { + #[serde(rename = "sql")] #[default] - ServiceAccount, + Sql, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePatchPubSubSourceAuthentication { +impl std::fmt::Display for ClickStackLineRawSqlChartConfigConfigtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::ServiceAccount => write!(f, "SERVICE_ACCOUNT"), + Self::Sql => write!(f, "sql"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostKafkaSource.authentication`. +/// Inline enum for `ClickStackLineRawSqlChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostKafkaSourceAuthentication { +pub enum ClickStackLineRawSqlChartConfigDisplaytype { + #[serde(rename = "line")] #[default] - PLAIN, - #[serde(rename = "SCRAM-SHA-256")] - SCRAM_SHA_256, - #[serde(rename = "SCRAM-SHA-512")] - SCRAM_SHA_512, - IAM_ROLE, - IAM_USER, - MUTUAL_TLS, + Line, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostKafkaSourceAuthentication { +impl std::fmt::Display for ClickStackLineRawSqlChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::PLAIN => write!(f, "PLAIN"), - Self::SCRAM_SHA_256 => write!(f, "SCRAM-SHA-256"), - Self::SCRAM_SHA_512 => write!(f, "SCRAM-SHA-512"), - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), - Self::MUTUAL_TLS => write!(f, "MUTUAL_TLS"), + Self::Line => write!(f, "line"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostKafkaSource.format`. +/// Inline enum for `ClickStackLogSource.kind`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostKafkaSourceFormat { +pub enum ClickStackLogSourceKind { + #[serde(rename = "log")] #[default] - JSONEachRow, - Avro, - AvroConfluent, - Protobuf, + Log, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostKafkaSourceFormat { +impl std::fmt::Display for ClickStackLogSourceKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::JSONEachRow => write!(f, "JSONEachRow"), - Self::Avro => write!(f, "Avro"), - Self::AvroConfluent => write!(f, "AvroConfluent"), - Self::Protobuf => write!(f, "Protobuf"), + Self::Log => write!(f, "log"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostKafkaSource.type`. +/// Inline enum for `ClickStackLogSource.useTextIndexForImplicitColumn`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostKafkaSourceType { - #[serde(rename = "kafka")] +pub enum ClickStackLogSourceUsetextindexforimplicitcolumn { + #[serde(rename = "auto")] #[default] - Kafka, - #[serde(rename = "redpanda")] - Redpanda, - #[serde(rename = "msk")] - Msk, - #[serde(rename = "gcmk")] - Gcmk, - #[serde(rename = "confluent")] - Confluent, - #[serde(rename = "warpstream")] - Warpstream, - #[serde(rename = "azureeventhub")] - Azureeventhub, - #[serde(rename = "dokafka")] - Dokafka, + Auto, + #[serde(rename = "enabled")] + Enabled, + #[serde(rename = "disabled")] + Disabled, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostKafkaSourceType { +impl std::fmt::Display for ClickStackLogSourceUsetextindexforimplicitcolumn { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Kafka => write!(f, "kafka"), - Self::Redpanda => write!(f, "redpanda"), - Self::Msk => write!(f, "msk"), - Self::Gcmk => write!(f, "gcmk"), - Self::Confluent => write!(f, "confluent"), - Self::Warpstream => write!(f, "warpstream"), - Self::Azureeventhub => write!(f, "azureeventhub"), - Self::Dokafka => write!(f, "dokafka"), + Self::Auto => write!(f, "auto"), + Self::Enabled => write!(f, "enabled"), + Self::Disabled => write!(f, "disabled"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostKinesisSource.authentication`. +/// Inline enum for `ClickStackMarkdownChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostKinesisSourceAuthentication { +pub enum ClickStackMarkdownChartConfigDisplaytype { + #[serde(rename = "markdown")] #[default] - IAM_ROLE, - IAM_USER, + Markdown, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostKinesisSourceAuthentication { +impl std::fmt::Display for ClickStackMarkdownChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), + Self::Markdown => write!(f, "markdown"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostKinesisSource.format`. +/// Inline enum for `ClickStackMarkdownChartSeries.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostKinesisSourceFormat { +pub enum ClickStackMarkdownChartSeriesType { + #[serde(rename = "markdown")] #[default] - JSONEachRow, - Avro, - AvroConfluent, + Markdown, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostKinesisSourceFormat { +impl std::fmt::Display for ClickStackMarkdownChartSeriesType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::JSONEachRow => write!(f, "JSONEachRow"), - Self::Avro => write!(f, "Avro"), - Self::AvroConfluent => write!(f, "AvroConfluent"), + Self::Markdown => write!(f, "markdown"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostKinesisSource.iteratorType`. +/// Inline enum for `ClickStackMaterializedView.minGranularity`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostKinesisSourceIteratortype { +pub enum ClickStackMaterializedViewMingranularity { + #[serde(rename = "1s")] #[default] - TRIM_HORIZON, - LATEST, - AT_TIMESTAMP, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickPipePostKinesisSourceIteratortype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::TRIM_HORIZON => write!(f, "TRIM_HORIZON"), - Self::LATEST => write!(f, "LATEST"), - Self::AT_TIMESTAMP => write!(f, "AT_TIMESTAMP"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickPipePostObjectStorageSource.authentication`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostObjectStorageSourceAuthentication { - #[default] - IAM_ROLE, - IAM_USER, - CONNECTION_STRING, - SERVICE_ACCOUNT, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickPipePostObjectStorageSourceAuthentication { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::IAM_ROLE => write!(f, "IAM_ROLE"), - Self::IAM_USER => write!(f, "IAM_USER"), - Self::CONNECTION_STRING => write!(f, "CONNECTION_STRING"), - Self::SERVICE_ACCOUNT => write!(f, "SERVICE_ACCOUNT"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickPipePostObjectStorageSource.compression`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostObjectStorageSourceCompression { - #[serde(rename = "none")] - #[default] - None, - #[serde(rename = "gzip")] - Gzip, - #[serde(rename = "gz")] - Gz, - #[serde(rename = "brotli")] - Brotli, - #[serde(rename = "br")] - Br, - #[serde(rename = "xz")] - Xz, - LZMA, - #[serde(rename = "zstd")] - Zstd, - #[serde(rename = "auto")] - Auto, + _1s, + #[serde(rename = "15s")] + _15s, + #[serde(rename = "30s")] + _30s, + #[serde(rename = "1m")] + _1m, + #[serde(rename = "5m")] + _5m, + #[serde(rename = "15m")] + _15m, + #[serde(rename = "30m")] + _30m, + #[serde(rename = "1h")] + _1h, + #[serde(rename = "2h")] + _2h, + #[serde(rename = "6h")] + _6h, + #[serde(rename = "12h")] + _12h, + #[serde(rename = "1d")] + _1d, + #[serde(rename = "2d")] + _2d, + #[serde(rename = "7d")] + _7d, + #[serde(rename = "30d")] + _30d, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostObjectStorageSourceCompression { +impl std::fmt::Display for ClickStackMaterializedViewMingranularity { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::None => write!(f, "none"), - Self::Gzip => write!(f, "gzip"), - Self::Gz => write!(f, "gz"), - Self::Brotli => write!(f, "brotli"), - Self::Br => write!(f, "br"), - Self::Xz => write!(f, "xz"), - Self::LZMA => write!(f, "LZMA"), - Self::Zstd => write!(f, "zstd"), - Self::Auto => write!(f, "auto"), + Self::_1s => write!(f, "1s"), + Self::_15s => write!(f, "15s"), + Self::_30s => write!(f, "30s"), + Self::_1m => write!(f, "1m"), + Self::_5m => write!(f, "5m"), + Self::_15m => write!(f, "15m"), + Self::_30m => write!(f, "30m"), + Self::_1h => write!(f, "1h"), + Self::_2h => write!(f, "2h"), + Self::_6h => write!(f, "6h"), + Self::_12h => write!(f, "12h"), + Self::_1d => write!(f, "1d"), + Self::_2d => write!(f, "2d"), + Self::_7d => write!(f, "7d"), + Self::_30d => write!(f, "30d"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostObjectStorageSource.format`. +/// Inline enum for `ClickStackMetricSource.kind`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostObjectStorageSourceFormat { +pub enum ClickStackMetricSourceKind { + #[serde(rename = "metric")] #[default] - JSONEachRow, - JSONAsObject, - CSV, - CSVWithNames, - TabSeparated, - TabSeparatedWithNames, - Parquet, - Avro, + Metric, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostObjectStorageSourceFormat { +impl std::fmt::Display for ClickStackMetricSourceKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::JSONEachRow => write!(f, "JSONEachRow"), - Self::JSONAsObject => write!(f, "JSONAsObject"), - Self::CSV => write!(f, "CSV"), - Self::CSVWithNames => write!(f, "CSVWithNames"), - Self::TabSeparated => write!(f, "TabSeparated"), - Self::TabSeparatedWithNames => write!(f, "TabSeparatedWithNames"), - Self::Parquet => write!(f, "Parquet"), - Self::Avro => write!(f, "Avro"), + Self::Metric => write!(f, "metric"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostObjectStorageSource.type`. +/// Inline enum for `ClickStackNumberBuilderChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostObjectStorageSourceType { - #[serde(rename = "s3")] +pub enum ClickStackNumberBuilderChartConfigDisplaytype { + #[serde(rename = "number")] #[default] - S3, - #[serde(rename = "gcs")] - Gcs, - #[serde(rename = "dospaces")] - Dospaces, - #[serde(rename = "azureblobstorage")] - Azureblobstorage, - #[serde(rename = "cloudflarer2")] - Cloudflarer2, - #[serde(rename = "ovhobjectstorage")] - Ovhobjectstorage, + Number, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostObjectStorageSourceType { +impl std::fmt::Display for ClickStackNumberBuilderChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::S3 => write!(f, "s3"), - Self::Gcs => write!(f, "gcs"), - Self::Dospaces => write!(f, "dospaces"), - Self::Azureblobstorage => write!(f, "azureblobstorage"), - Self::Cloudflarer2 => write!(f, "cloudflarer2"), - Self::Ovhobjectstorage => write!(f, "ovhobjectstorage"), + Self::Number => write!(f, "number"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostPubSubSource.authentication`. +/// Inline enum for `ClickStackNumberChartSeries.aggFn`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostPubSubSourceAuthentication { - #[serde(rename = "SERVICE_ACCOUNT")] +pub enum ClickStackNumberChartSeriesAggfn { + #[serde(rename = "avg")] #[default] - ServiceAccount, + Avg, + #[serde(rename = "count")] + Count, + #[serde(rename = "count_distinct")] + Count_distinct, + #[serde(rename = "last_value")] + Last_value, + #[serde(rename = "max")] + Max, + #[serde(rename = "min")] + Min, + #[serde(rename = "quantile")] + Quantile, + #[serde(rename = "sum")] + Sum, + #[serde(rename = "any")] + Any, + #[serde(rename = "none")] + None, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostPubSubSourceAuthentication { +impl std::fmt::Display for ClickStackNumberChartSeriesAggfn { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::ServiceAccount => write!(f, "SERVICE_ACCOUNT"), + Self::Avg => write!(f, "avg"), + Self::Count => write!(f, "count"), + Self::Count_distinct => write!(f, "count_distinct"), + Self::Last_value => write!(f, "last_value"), + Self::Max => write!(f, "max"), + Self::Min => write!(f, "min"), + Self::Quantile => write!(f, "quantile"), + Self::Sum => write!(f, "sum"), + Self::Any => write!(f, "any"), + Self::None => write!(f, "none"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostPubSubSource.format`. +/// Inline enum for `ClickStackNumberChartSeries.metricDataType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostPubSubSourceFormat { +pub enum ClickStackNumberChartSeriesMetricdatatype { + #[serde(rename = "sum")] #[default] - JSONEachRow, - Avro, - Protobuf, + Sum, + #[serde(rename = "gauge")] + Gauge, + #[serde(rename = "histogram")] + Histogram, + #[serde(rename = "summary")] + Summary, + #[serde(rename = "exponential histogram")] + Exponential_histogram, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostPubSubSourceFormat { +impl std::fmt::Display for ClickStackNumberChartSeriesMetricdatatype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::JSONEachRow => write!(f, "JSONEachRow"), - Self::Avro => write!(f, "Avro"), - Self::Protobuf => write!(f, "Protobuf"), + Self::Sum => write!(f, "sum"), + Self::Gauge => write!(f, "gauge"), + Self::Histogram => write!(f, "histogram"), + Self::Summary => write!(f, "summary"), + Self::Exponential_histogram => write!(f, "exponential histogram"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostPubSubSource.seekType`. +/// Inline enum for `ClickStackNumberChartSeries.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostPubSubSourceSeektype { - #[serde(rename = "latest")] +pub enum ClickStackNumberChartSeriesType { + #[serde(rename = "number")] #[default] - Latest, - #[serde(rename = "earliest")] - Earliest, - #[serde(rename = "timestamp")] - Timestamp, + Number, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostPubSubSourceSeektype { +impl std::fmt::Display for ClickStackNumberChartSeriesType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Latest => write!(f, "latest"), - Self::Earliest => write!(f, "earliest"), - Self::Timestamp => write!(f, "timestamp"), + Self::Number => write!(f, "number"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostgresPipeSettings.replicationMode`. +/// Inline enum for `ClickStackNumberChartSeries.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostgresPipeSettingsReplicationmode { - #[serde(rename = "cdc")] +pub enum ClickStackNumberChartSeriesWherelanguage { + #[serde(rename = "sql")] #[default] - Cdc, - #[serde(rename = "snapshot")] - Snapshot, - #[serde(rename = "cdc_only")] - Cdc_only, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostgresPipeSettingsReplicationmode { +impl std::fmt::Display for ClickStackNumberChartSeriesWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Cdc => write!(f, "cdc"), - Self::Snapshot => write!(f, "snapshot"), - Self::Cdc_only => write!(f, "cdc_only"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostgresPipeTableMapping.tableEngine`. +/// Inline enum for `ClickStackNumberFormat.numericUnit`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostgresPipeTableMappingTableengine { +pub enum ClickStackNumberFormatNumericunit { + #[serde(rename = "bytes_iec")] #[default] - MergeTree, - ReplacingMergeTree, - Null, + Bytes_iec, + #[serde(rename = "bytes_si")] + Bytes_si, + #[serde(rename = "bits_iec")] + Bits_iec, + #[serde(rename = "bits_si")] + Bits_si, + #[serde(rename = "kibibytes")] + Kibibytes, + #[serde(rename = "kilobytes")] + Kilobytes, + #[serde(rename = "mebibytes")] + Mebibytes, + #[serde(rename = "megabytes")] + Megabytes, + #[serde(rename = "gibibytes")] + Gibibytes, + #[serde(rename = "gigabytes")] + Gigabytes, + #[serde(rename = "tebibytes")] + Tebibytes, + #[serde(rename = "terabytes")] + Terabytes, + #[serde(rename = "pebibytes")] + Pebibytes, + #[serde(rename = "petabytes")] + Petabytes, + #[serde(rename = "packets_sec")] + Packets_sec, + #[serde(rename = "bytes_sec_iec")] + Bytes_sec_iec, + #[serde(rename = "bytes_sec_si")] + Bytes_sec_si, + #[serde(rename = "bits_sec_iec")] + Bits_sec_iec, + #[serde(rename = "bits_sec_si")] + Bits_sec_si, + #[serde(rename = "kibibytes_sec")] + Kibibytes_sec, + #[serde(rename = "kibibits_sec")] + Kibibits_sec, + #[serde(rename = "kilobytes_sec")] + Kilobytes_sec, + #[serde(rename = "kilobits_sec")] + Kilobits_sec, + #[serde(rename = "mebibytes_sec")] + Mebibytes_sec, + #[serde(rename = "mebibits_sec")] + Mebibits_sec, + #[serde(rename = "megabytes_sec")] + Megabytes_sec, + #[serde(rename = "megabits_sec")] + Megabits_sec, + #[serde(rename = "gibibytes_sec")] + Gibibytes_sec, + #[serde(rename = "gibibits_sec")] + Gibibits_sec, + #[serde(rename = "gigabytes_sec")] + Gigabytes_sec, + #[serde(rename = "gigabits_sec")] + Gigabits_sec, + #[serde(rename = "tebibytes_sec")] + Tebibytes_sec, + #[serde(rename = "tebibits_sec")] + Tebibits_sec, + #[serde(rename = "terabytes_sec")] + Terabytes_sec, + #[serde(rename = "terabits_sec")] + Terabits_sec, + #[serde(rename = "pebibytes_sec")] + Pebibytes_sec, + #[serde(rename = "pebibits_sec")] + Pebibits_sec, + #[serde(rename = "petabytes_sec")] + Petabytes_sec, + #[serde(rename = "petabits_sec")] + Petabits_sec, + #[serde(rename = "cps")] + Cps, + #[serde(rename = "ops")] + Ops, + #[serde(rename = "rps")] + Rps, + #[serde(rename = "reads_sec")] + Reads_sec, + #[serde(rename = "wps")] + Wps, + #[serde(rename = "iops")] + Iops, + #[serde(rename = "cpm")] + Cpm, + #[serde(rename = "opm")] + Opm, + #[serde(rename = "rpm_reads")] + Rpm_reads, + #[serde(rename = "wpm")] + Wpm, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostgresPipeTableMappingTableengine { +impl std::fmt::Display for ClickStackNumberFormatNumericunit { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::MergeTree => write!(f, "MergeTree"), - Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), - Self::Null => write!(f, "Null"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickPipePostgresSource.authentication`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostgresSourceAuthentication { - #[serde(rename = "basic")] - #[default] - Basic, - IAM_ROLE, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickPipePostgresSourceAuthentication { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Basic => write!(f, "basic"), - Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Bytes_iec => write!(f, "bytes_iec"), + Self::Bytes_si => write!(f, "bytes_si"), + Self::Bits_iec => write!(f, "bits_iec"), + Self::Bits_si => write!(f, "bits_si"), + Self::Kibibytes => write!(f, "kibibytes"), + Self::Kilobytes => write!(f, "kilobytes"), + Self::Mebibytes => write!(f, "mebibytes"), + Self::Megabytes => write!(f, "megabytes"), + Self::Gibibytes => write!(f, "gibibytes"), + Self::Gigabytes => write!(f, "gigabytes"), + Self::Tebibytes => write!(f, "tebibytes"), + Self::Terabytes => write!(f, "terabytes"), + Self::Pebibytes => write!(f, "pebibytes"), + Self::Petabytes => write!(f, "petabytes"), + Self::Packets_sec => write!(f, "packets_sec"), + Self::Bytes_sec_iec => write!(f, "bytes_sec_iec"), + Self::Bytes_sec_si => write!(f, "bytes_sec_si"), + Self::Bits_sec_iec => write!(f, "bits_sec_iec"), + Self::Bits_sec_si => write!(f, "bits_sec_si"), + Self::Kibibytes_sec => write!(f, "kibibytes_sec"), + Self::Kibibits_sec => write!(f, "kibibits_sec"), + Self::Kilobytes_sec => write!(f, "kilobytes_sec"), + Self::Kilobits_sec => write!(f, "kilobits_sec"), + Self::Mebibytes_sec => write!(f, "mebibytes_sec"), + Self::Mebibits_sec => write!(f, "mebibits_sec"), + Self::Megabytes_sec => write!(f, "megabytes_sec"), + Self::Megabits_sec => write!(f, "megabits_sec"), + Self::Gibibytes_sec => write!(f, "gibibytes_sec"), + Self::Gibibits_sec => write!(f, "gibibits_sec"), + Self::Gigabytes_sec => write!(f, "gigabytes_sec"), + Self::Gigabits_sec => write!(f, "gigabits_sec"), + Self::Tebibytes_sec => write!(f, "tebibytes_sec"), + Self::Tebibits_sec => write!(f, "tebibits_sec"), + Self::Terabytes_sec => write!(f, "terabytes_sec"), + Self::Terabits_sec => write!(f, "terabits_sec"), + Self::Pebibytes_sec => write!(f, "pebibytes_sec"), + Self::Pebibits_sec => write!(f, "pebibits_sec"), + Self::Petabytes_sec => write!(f, "petabytes_sec"), + Self::Petabits_sec => write!(f, "petabits_sec"), + Self::Cps => write!(f, "cps"), + Self::Ops => write!(f, "ops"), + Self::Rps => write!(f, "rps"), + Self::Reads_sec => write!(f, "reads_sec"), + Self::Wps => write!(f, "wps"), + Self::Iops => write!(f, "iops"), + Self::Cpm => write!(f, "cpm"), + Self::Opm => write!(f, "opm"), + Self::Rpm_reads => write!(f, "rpm_reads"), + Self::Wpm => write!(f, "wpm"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePostgresSource.type`. +/// Inline enum for `ClickStackNumberFormat.output`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePostgresSourceType { - #[serde(rename = "postgres")] +pub enum ClickStackNumberFormatOutput { + #[serde(rename = "currency")] #[default] - Postgres, - #[serde(rename = "supabase")] - Supabase, - #[serde(rename = "neon")] - Neon, - #[serde(rename = "alloydb")] - Alloydb, - #[serde(rename = "planetscale")] - Planetscale, - #[serde(rename = "rdspostgres")] - Rdspostgres, - #[serde(rename = "aurorapostgres")] - Aurorapostgres, - #[serde(rename = "cloudsqlpostgres")] - Cloudsqlpostgres, - #[serde(rename = "azurepostgres")] - Azurepostgres, - #[serde(rename = "crunchybridge")] - Crunchybridge, - #[serde(rename = "tigerdata")] - Tigerdata, + Currency, + #[serde(rename = "percent")] + Percent, + #[serde(rename = "byte")] + Byte, + #[serde(rename = "time")] + Time, + #[serde(rename = "number")] + Number, + #[serde(rename = "data_rate")] + Data_rate, + #[serde(rename = "throughput")] + Throughput, + #[serde(rename = "duration")] + Duration, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePostgresSourceType { +impl std::fmt::Display for ClickStackNumberFormatOutput { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Postgres => write!(f, "postgres"), - Self::Supabase => write!(f, "supabase"), - Self::Neon => write!(f, "neon"), - Self::Alloydb => write!(f, "alloydb"), - Self::Planetscale => write!(f, "planetscale"), - Self::Rdspostgres => write!(f, "rdspostgres"), - Self::Aurorapostgres => write!(f, "aurorapostgres"), - Self::Cloudsqlpostgres => write!(f, "cloudsqlpostgres"), - Self::Azurepostgres => write!(f, "azurepostgres"), - Self::Crunchybridge => write!(f, "crunchybridge"), - Self::Tigerdata => write!(f, "tigerdata"), + Self::Currency => write!(f, "currency"), + Self::Percent => write!(f, "percent"), + Self::Byte => write!(f, "byte"), + Self::Time => write!(f, "time"), + Self::Number => write!(f, "number"), + Self::Data_rate => write!(f, "data_rate"), + Self::Throughput => write!(f, "throughput"), + Self::Duration => write!(f, "duration"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePubSubSource.authentication`. +/// Inline enum for `ClickStackNumberRawSqlChartConfig.configType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePubSubSourceAuthentication { - #[serde(rename = "SERVICE_ACCOUNT")] +pub enum ClickStackNumberRawSqlChartConfigConfigtype { + #[serde(rename = "sql")] #[default] - ServiceAccount, + Sql, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePubSubSourceAuthentication { +impl std::fmt::Display for ClickStackNumberRawSqlChartConfigConfigtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::ServiceAccount => write!(f, "SERVICE_ACCOUNT"), + Self::Sql => write!(f, "sql"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePubSubSource.format`. +/// Inline enum for `ClickStackNumberRawSqlChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePubSubSourceFormat { +pub enum ClickStackNumberRawSqlChartConfigDisplaytype { + #[serde(rename = "number")] #[default] - JSONEachRow, - Avro, - Protobuf, + Number, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePubSubSourceFormat { +impl std::fmt::Display for ClickStackNumberRawSqlChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::JSONEachRow => write!(f, "JSONEachRow"), - Self::Avro => write!(f, "Avro"), - Self::Protobuf => write!(f, "Protobuf"), + Self::Number => write!(f, "number"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipePubSubSource.seekType`. +/// Inline enum for `ClickStackNumericColorCondition.operator`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipePubSubSourceSeektype { - #[serde(rename = "latest")] +pub enum ClickStackNumericColorConditionOperator { + #[serde(rename = "gt")] #[default] - Latest, - #[serde(rename = "earliest")] - Earliest, - #[serde(rename = "timestamp")] - Timestamp, + Gt, + #[serde(rename = "gte")] + Gte, + #[serde(rename = "lt")] + Lt, + #[serde(rename = "lte")] + Lte, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipePubSubSourceSeektype { +impl std::fmt::Display for ClickStackNumericColorConditionOperator { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Latest => write!(f, "latest"), - Self::Earliest => write!(f, "earliest"), - Self::Timestamp => write!(f, "timestamp"), + Self::Gt => write!(f, "gt"), + Self::Gte => write!(f, "gte"), + Self::Lt => write!(f, "lt"), + Self::Lte => write!(f, "lte"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickPipeStatePatchRequest.command`. +/// Inline enum for `ClickStackOnClickDashboard.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickPipeStatePatchRequestCommand { - #[serde(rename = "start")] +pub enum ClickStackOnClickDashboardType { + #[serde(rename = "dashboard")] #[default] - Start, - #[serde(rename = "stop")] - Stop, - #[serde(rename = "resync")] - Resync, + Dashboard, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickPipeStatePatchRequestCommand { +impl std::fmt::Display for ClickStackOnClickDashboardType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Start => write!(f, "start"), - Self::Stop => write!(f, "stop"), - Self::Resync => write!(f, "resync"), + Self::Dashboard => write!(f, "dashboard"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackAlertChannelEmail.type`. -/// -/// The spec gives both alert-channel variants the same `enum: ["webhook", -/// "email"]`, so `#[default]` sits on `Email` rather than on the first value: -/// this field discriminates the `ClickStackAlertChannel` union, and defaulting -/// it to `webhook` would make `ClickStackAlertChannelEmail::default()` -/// deserialize back as the webhook variant. +/// Inline enum for `ClickStackOnClickDashboard.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackAlertChannelEmailType { - #[serde(rename = "webhook")] - Webhook, - #[serde(rename = "email")] +pub enum ClickStackOnClickDashboardWherelanguage { + #[serde(rename = "sql")] #[default] - Email, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackAlertChannelEmailType { +impl std::fmt::Display for ClickStackOnClickDashboardWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Webhook => write!(f, "webhook"), - Self::Email => write!(f, "email"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackAlertChannelWebhook.severity`. +/// Inline enum for `ClickStackOnClickExternal.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackAlertChannelWebhookSeverity { - #[serde(rename = "critical")] +pub enum ClickStackOnClickExternalType { + #[serde(rename = "external")] #[default] - Critical, - #[serde(rename = "error")] - Error, - #[serde(rename = "warning")] - Warning, - #[serde(rename = "info")] - Info, + External, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackAlertChannelWebhookSeverity { +impl std::fmt::Display for ClickStackOnClickExternalType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Critical => write!(f, "critical"), - Self::Error => write!(f, "error"), - Self::Warning => write!(f, "warning"), - Self::Info => write!(f, "info"), + Self::External => write!(f, "external"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackAlertChannelWebhook.type`. +/// Inline enum for `ClickStackOnClickFilterTemplate.kind`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackAlertChannelWebhookType { - #[serde(rename = "webhook")] +pub enum ClickStackOnClickFilterTemplateKind { + #[serde(rename = "expressionTemplate")] #[default] - Webhook, - #[serde(rename = "email")] - Email, + ExpressionTemplate, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackAlertChannelWebhookType { +impl std::fmt::Display for ClickStackOnClickFilterTemplateKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Webhook => write!(f, "webhook"), - Self::Email => write!(f, "email"), + Self::ExpressionTemplate => write!(f, "expressionTemplate"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackAlertExecutionError.type`. +/// Inline enum for `ClickStackOnClickSearch.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackAlertExecutionErrorType { +pub enum ClickStackOnClickSearchType { + #[serde(rename = "search")] #[default] - QUERY_ERROR, - WEBHOOK_ERROR, - INVALID_ALERT, - UNKNOWN, + Search, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackAlertExecutionErrorType { +impl std::fmt::Display for ClickStackOnClickSearchType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::QUERY_ERROR => write!(f, "QUERY_ERROR"), - Self::WEBHOOK_ERROR => write!(f, "WEBHOOK_ERROR"), - Self::INVALID_ALERT => write!(f, "INVALID_ALERT"), - Self::UNKNOWN => write!(f, "UNKNOWN"), + Self::Search => write!(f, "search"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackAlertResponse.interval`. +/// Inline enum for `ClickStackOnClickSearch.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackAlertResponseInterval { - #[serde(rename = "1m")] +pub enum ClickStackOnClickSearchWherelanguage { + #[serde(rename = "sql")] #[default] - _1m, - #[serde(rename = "5m")] - _5m, - #[serde(rename = "15m")] - _15m, - #[serde(rename = "30m")] - _30m, - #[serde(rename = "1h")] - _1h, - #[serde(rename = "6h")] - _6h, - #[serde(rename = "12h")] - _12h, - #[serde(rename = "1d")] - _1d, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackAlertResponseInterval { +impl std::fmt::Display for ClickStackOnClickSearchWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::_1m => write!(f, "1m"), - Self::_5m => write!(f, "5m"), - Self::_15m => write!(f, "15m"), - Self::_30m => write!(f, "30m"), - Self::_1h => write!(f, "1h"), - Self::_6h => write!(f, "6h"), - Self::_12h => write!(f, "12h"), - Self::_1d => write!(f, "1d"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackAlertResponse.source`. +/// Inline enum for `ClickStackOnClickTargetIdVariant.mode`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackAlertResponseSource { - #[serde(rename = "saved_search")] +pub enum ClickStackOnClickTargetIdVariantMode { + #[serde(rename = "id")] #[default] - Saved_search, - #[serde(rename = "tile")] - Tile, + Id, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackAlertResponseSource { +impl std::fmt::Display for ClickStackOnClickTargetIdVariantMode { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Saved_search => write!(f, "saved_search"), - Self::Tile => write!(f, "tile"), + Self::Id => write!(f, "id"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackAlertResponse.state`. +/// Inline enum for `ClickStackOnClickTargetTemplateVariant.mode`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackAlertResponseState { +pub enum ClickStackOnClickTargetTemplateVariantMode { + #[serde(rename = "template")] #[default] - ALERT, - OK, - INSUFFICIENT_DATA, - DISABLED, - PENDING, + Template, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackAlertResponseState { +impl std::fmt::Display for ClickStackOnClickTargetTemplateVariantMode { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::ALERT => write!(f, "ALERT"), - Self::OK => write!(f, "OK"), - Self::INSUFFICIENT_DATA => write!(f, "INSUFFICIENT_DATA"), - Self::DISABLED => write!(f, "DISABLED"), - Self::PENDING => write!(f, "PENDING"), + Self::Template => write!(f, "template"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackAlertResponse.thresholdType`. +/// Inline enum for `ClickStackPagerDutyAPIWebhook.service`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackAlertResponseThresholdtype { - #[serde(rename = "above")] +pub enum ClickStackPagerDutyAPIWebhookService { + #[serde(rename = "pagerduty_api")] #[default] - Above, - #[serde(rename = "below")] - Below, - #[serde(rename = "above_exclusive")] - Above_exclusive, - #[serde(rename = "below_or_equal")] - Below_or_equal, - #[serde(rename = "equal")] - Equal, - #[serde(rename = "not_equal")] - Not_equal, - #[serde(rename = "between")] - Between, - #[serde(rename = "not_between")] - Not_between, + Pagerduty_api, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackAlertResponseThresholdtype { +impl std::fmt::Display for ClickStackPagerDutyAPIWebhookService { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Above => write!(f, "above"), - Self::Below => write!(f, "below"), - Self::Above_exclusive => write!(f, "above_exclusive"), - Self::Below_or_equal => write!(f, "below_or_equal"), - Self::Equal => write!(f, "equal"), - Self::Not_equal => write!(f, "not_equal"), - Self::Between => write!(f, "between"), - Self::Not_between => write!(f, "not_between"), + Self::Pagerduty_api => write!(f, "pagerduty_api"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackBackgroundChart.type`. +/// Inline enum for `ClickStackPieBuilderChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackBackgroundChartType { - #[serde(rename = "line")] +pub enum ClickStackPieBuilderChartConfigDisplaytype { + #[serde(rename = "pie")] #[default] - Line, - #[serde(rename = "area")] - Area, + Pie, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackBackgroundChartType { +impl std::fmt::Display for ClickStackPieBuilderChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Line => write!(f, "line"), - Self::Area => write!(f, "area"), + Self::Pie => write!(f, "pie"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackBarBuilderChartConfig.displayType`. +/// Inline enum for `ClickStackPieRawSqlChartConfig.configType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackBarBuilderChartConfigDisplaytype { - #[serde(rename = "stacked_bar")] +pub enum ClickStackPieRawSqlChartConfigConfigtype { + #[serde(rename = "sql")] #[default] - Stacked_bar, + Sql, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackBarBuilderChartConfigDisplaytype { +impl std::fmt::Display for ClickStackPieRawSqlChartConfigConfigtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Stacked_bar => write!(f, "stacked_bar"), + Self::Sql => write!(f, "sql"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackBarRawSqlChartConfig.configType`. +/// Inline enum for `ClickStackPieRawSqlChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackBarRawSqlChartConfigConfigtype { - #[serde(rename = "sql")] +pub enum ClickStackPieRawSqlChartConfigDisplaytype { + #[serde(rename = "pie")] #[default] - Sql, + Pie, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackBarRawSqlChartConfigConfigtype { +impl std::fmt::Display for ClickStackPieRawSqlChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), + Self::Pie => write!(f, "pie"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackBarRawSqlChartConfig.displayType`. +/// Inline enum for `ClickStackPromqlSource.kind`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackBarRawSqlChartConfigDisplaytype { - #[serde(rename = "stacked_bar")] +pub enum ClickStackPromqlSourceKind { + #[serde(rename = "promql")] #[default] - Stacked_bar, + Promql, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackBarRawSqlChartConfigDisplaytype { +impl std::fmt::Display for ClickStackPromqlSourceKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Stacked_bar => write!(f, "stacked_bar"), + Self::Promql => write!(f, "promql"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackBetweenColorCondition.operator`. +/// Inline enum for `ClickStackSavedFilterValue.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackBetweenColorConditionOperator { - #[serde(rename = "between")] +pub enum ClickStackSavedFilterValueType { + #[serde(rename = "sql")] #[default] - Between, + Sql, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackBetweenColorConditionOperator { +impl std::fmt::Display for ClickStackSavedFilterValueType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Between => write!(f, "between"), + Self::Sql => write!(f, "sql"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackCategoricalBarBuilderChartConfig.displayType`. +/// Inline enum for `ClickStackSavedSearchFilter.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackCategoricalBarBuilderChartConfigDisplaytype { - #[serde(rename = "bar")] +pub enum ClickStackSavedSearchFilterType { + #[serde(rename = "sql")] #[default] - Bar, + Sql, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackCategoricalBarBuilderChartConfigDisplaytype { +impl std::fmt::Display for ClickStackSavedSearchFilterType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Bar => write!(f, "bar"), + Self::Sql => write!(f, "sql"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackCategoricalBarRawSqlChartConfig.configType`. +/// Inline enum for `ClickStackSavedSearchInput.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackCategoricalBarRawSqlChartConfigConfigtype { +pub enum ClickStackSavedSearchInputWherelanguage { #[serde(rename = "sql")] #[default] Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackCategoricalBarRawSqlChartConfigConfigtype { +impl std::fmt::Display for ClickStackSavedSearchInputWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackCategoricalBarRawSqlChartConfig.displayType`. +/// Inline enum for `ClickStackSavedSearch.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackCategoricalBarRawSqlChartConfigDisplaytype { - #[serde(rename = "bar")] +pub enum ClickStackSavedSearchWherelanguage { + #[serde(rename = "sql")] #[default] - Bar, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackCategoricalBarRawSqlChartConfigDisplaytype { +impl std::fmt::Display for ClickStackSavedSearchWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Bar => write!(f, "bar"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Palette-token colors shared by ClickStack chart tiles. -/// -/// Used by `ClickStackBackgroundChart`, `ClickStackNumericColorCondition`, -/// `ClickStackBetweenColorCondition`, `ClickStackEqualityColorCondition`, -/// `ClickStackNumberBuilderChartConfig`, and `ClickStackNumberRawSqlChartConfig`. +/// Inline enum for `ClickStackSearchChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackChartColor { - #[serde(rename = "chart-blue")] +pub enum ClickStackSearchChartConfigDisplaytype { + #[serde(rename = "search")] #[default] - Chart_blue, - #[serde(rename = "chart-orange")] - Chart_orange, - #[serde(rename = "chart-red")] - Chart_red, - #[serde(rename = "chart-cyan")] - Chart_cyan, - #[serde(rename = "chart-green")] - Chart_green, - #[serde(rename = "chart-pink")] - Chart_pink, - #[serde(rename = "chart-purple")] - Chart_purple, - #[serde(rename = "chart-light-blue")] - Chart_light_blue, - #[serde(rename = "chart-brown")] - Chart_brown, - #[serde(rename = "chart-gray")] - Chart_gray, - #[serde(rename = "chart-success")] - Chart_success, - #[serde(rename = "chart-warning")] - Chart_warning, - #[serde(rename = "chart-error")] - Chart_error, + Search, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackChartColor { +impl std::fmt::Display for ClickStackSearchChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Chart_blue => write!(f, "chart-blue"), - Self::Chart_orange => write!(f, "chart-orange"), - Self::Chart_red => write!(f, "chart-red"), - Self::Chart_cyan => write!(f, "chart-cyan"), - Self::Chart_green => write!(f, "chart-green"), - Self::Chart_pink => write!(f, "chart-pink"), - Self::Chart_purple => write!(f, "chart-purple"), - Self::Chart_light_blue => write!(f, "chart-light-blue"), - Self::Chart_brown => write!(f, "chart-brown"), - Self::Chart_gray => write!(f, "chart-gray"), - Self::Chart_success => write!(f, "chart-success"), - Self::Chart_warning => write!(f, "chart-warning"), - Self::Chart_error => write!(f, "chart-error"), + Self::Search => write!(f, "search"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackCreateAlertRequest.interval`. +/// Inline enum for `ClickStackSearchChartConfig.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackCreateAlertRequestInterval { - #[serde(rename = "1m")] +pub enum ClickStackSearchChartConfigWherelanguage { + #[serde(rename = "sql")] #[default] - _1m, - #[serde(rename = "5m")] - _5m, - #[serde(rename = "15m")] - _15m, - #[serde(rename = "30m")] - _30m, - #[serde(rename = "1h")] - _1h, - #[serde(rename = "6h")] - _6h, - #[serde(rename = "12h")] - _12h, - #[serde(rename = "1d")] - _1d, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackCreateAlertRequestInterval { +impl std::fmt::Display for ClickStackSearchChartConfigWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::_1m => write!(f, "1m"), - Self::_5m => write!(f, "5m"), - Self::_15m => write!(f, "15m"), - Self::_30m => write!(f, "30m"), - Self::_1h => write!(f, "1h"), - Self::_6h => write!(f, "6h"), - Self::_12h => write!(f, "12h"), - Self::_1d => write!(f, "1d"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackCreateAlertRequest.source`. +/// Inline enum for `ClickStackSearchChartSeries.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackCreateAlertRequestSource { - #[serde(rename = "saved_search")] +pub enum ClickStackSearchChartSeriesType { + #[serde(rename = "search")] #[default] - Saved_search, - #[serde(rename = "tile")] - Tile, + Search, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackCreateAlertRequestSource { +impl std::fmt::Display for ClickStackSearchChartSeriesType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Saved_search => write!(f, "saved_search"), - Self::Tile => write!(f, "tile"), + Self::Search => write!(f, "search"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackCreateAlertRequest.thresholdType`. +/// Inline enum for `ClickStackSearchChartSeries.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackCreateAlertRequestThresholdtype { - #[serde(rename = "above")] - #[default] - Above, - #[serde(rename = "below")] - Below, - #[serde(rename = "above_exclusive")] - Above_exclusive, - #[serde(rename = "below_or_equal")] - Below_or_equal, - #[serde(rename = "equal")] - Equal, - #[serde(rename = "not_equal")] - Not_equal, - #[serde(rename = "between")] - Between, - #[serde(rename = "not_between")] - Not_between, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackCreateAlertRequestThresholdtype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Above => write!(f, "above"), - Self::Below => write!(f, "below"), - Self::Above_exclusive => write!(f, "above_exclusive"), - Self::Below_or_equal => write!(f, "below_or_equal"), - Self::Equal => write!(f, "equal"), - Self::Not_equal => write!(f, "not_equal"), - Self::Between => write!(f, "between"), - Self::Not_between => write!(f, "not_between"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackCreateDashboardRequest.savedQueryLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackCreateDashboardRequestSavedquerylanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackCreateDashboardRequestSavedquerylanguage { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackDashboardResponse.savedQueryLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackDashboardResponseSavedquerylanguage { - #[serde(rename = "sql")] +pub enum ClickStackSearchChartSeriesWherelanguage { + #[serde(rename = "sql")] #[default] Sql, #[serde(rename = "lucene")] @@ -2495,7 +2252,7 @@ pub enum ClickStackDashboardResponseSavedquerylanguage { Unknown(String), } -impl std::fmt::Display for ClickStackDashboardResponseSavedquerylanguage { +impl std::fmt::Display for ClickStackSearchChartSeriesWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Sql => write!(f, "sql"), @@ -2505,75 +2262,85 @@ impl std::fmt::Display for ClickStackDashboardResponseSavedquerylanguage { } } -/// Inline enum for `ClickStackEqualityColorCondition.operator`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackEqualityColorConditionOperator { - #[serde(rename = "eq")] - #[default] - Eq, - #[serde(rename = "neq")] - Neq, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackEqualityColorConditionOperator { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Eq => write!(f, "eq"), - Self::Neq => write!(f, "neq"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackEventPatternsChartConfig.displayType`. +/// Inline enum for `ClickStackSelectItem.aggFn`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackEventPatternsChartConfigDisplaytype { - #[serde(rename = "event_patterns")] +pub enum ClickStackSelectItemAggfn { + #[serde(rename = "avg")] #[default] - Event_patterns, + Avg, + #[serde(rename = "count")] + Count, + #[serde(rename = "count_distinct")] + Count_distinct, + #[serde(rename = "last_value")] + Last_value, + #[serde(rename = "max")] + Max, + #[serde(rename = "min")] + Min, + #[serde(rename = "quantile")] + Quantile, + #[serde(rename = "sum")] + Sum, + #[serde(rename = "any")] + Any, + #[serde(rename = "none")] + None, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackEventPatternsChartConfigDisplaytype { +impl std::fmt::Display for ClickStackSelectItemAggfn { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Event_patterns => write!(f, "event_patterns"), + Self::Avg => write!(f, "avg"), + Self::Count => write!(f, "count"), + Self::Count_distinct => write!(f, "count_distinct"), + Self::Last_value => write!(f, "last_value"), + Self::Max => write!(f, "max"), + Self::Min => write!(f, "min"), + Self::Quantile => write!(f, "quantile"), + Self::Sum => write!(f, "sum"), + Self::Any => write!(f, "any"), + Self::None => write!(f, "none"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackEventPatternsChartConfig.whereLanguage`. +/// Inline enum for `ClickStackSelectItem.level`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackEventPatternsChartConfigWherelanguage { - #[serde(rename = "sql")] +pub enum ClickStackSelectItemLevel { + #[serde(rename = "0.5")] #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, + _0_5, + #[serde(rename = "0.9")] + _0_9, + #[serde(rename = "0.95")] + _0_95, + #[serde(rename = "0.99")] + _0_99, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackEventPatternsChartConfigWherelanguage { +impl std::fmt::Display for ClickStackSelectItemLevel { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::_0_5 => write!(f, "0.5"), + Self::_0_9 => write!(f, "0.9"), + Self::_0_95 => write!(f, "0.95"), + Self::_0_99 => write!(f, "0.99"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackFilter.sourceMetricType`. +/// Inline enum for `ClickStackSelectItem.metricType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackFilterSourcemetrictype { +pub enum ClickStackSelectItemMetrictype { #[serde(rename = "sum")] #[default] Sum, @@ -2590,7 +2357,7 @@ pub enum ClickStackFilterSourcemetrictype { Unknown(String), } -impl std::fmt::Display for ClickStackFilterSourcemetrictype { +impl std::fmt::Display for ClickStackSelectItemMetrictype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Sum => write!(f, "sum"), @@ -2603,28 +2370,29 @@ impl std::fmt::Display for ClickStackFilterSourcemetrictype { } } -/// Inline enum for `ClickStackFilter.type`. +/// Inline enum for `ClickStackSelectItem.periodAggFn`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackFilterType { +pub enum ClickStackSelectItemPeriodaggfn { + #[serde(rename = "delta")] #[default] - QUERY_EXPRESSION, + Delta, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackFilterType { +impl std::fmt::Display for ClickStackSelectItemPeriodaggfn { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::QUERY_EXPRESSION => write!(f, "QUERY_EXPRESSION"), + Self::Delta => write!(f, "delta"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackFilter.whereLanguage`. +/// Inline enum for `ClickStackSelectItem.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackFilterWherelanguage { +pub enum ClickStackSelectItemWherelanguage { #[serde(rename = "sql")] #[default] Sql, @@ -2635,7 +2403,7 @@ pub enum ClickStackFilterWherelanguage { Unknown(String), } -impl std::fmt::Display for ClickStackFilterWherelanguage { +impl std::fmt::Display for ClickStackSelectItemWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Sql => write!(f, "sql"), @@ -2645,209 +2413,234 @@ impl std::fmt::Display for ClickStackFilterWherelanguage { } } -/// Inline enum for `ClickStackFilterInput.sourceMetricType`. +/// Inline enum for `ClickStackSessionSource.kind`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackFilterInputSourcemetrictype { - #[serde(rename = "sum")] +pub enum ClickStackSessionSourceKind { + #[serde(rename = "session")] #[default] - Sum, - #[serde(rename = "gauge")] - Gauge, - #[serde(rename = "histogram")] - Histogram, - #[serde(rename = "summary")] - Summary, - #[serde(rename = "exponential histogram")] - Exponential_histogram, + Session, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackFilterInputSourcemetrictype { +impl std::fmt::Display for ClickStackSessionSourceKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sum => write!(f, "sum"), - Self::Gauge => write!(f, "gauge"), - Self::Histogram => write!(f, "histogram"), - Self::Summary => write!(f, "summary"), - Self::Exponential_histogram => write!(f, "exponential histogram"), + Self::Session => write!(f, "session"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackFilterInput.type`. +/// Inline enum for `ClickStackSlackAPIWebhook.service`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackFilterInputType { +pub enum ClickStackSlackAPIWebhookService { + #[serde(rename = "slack_api")] #[default] - QUERY_EXPRESSION, + Slack_api, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackFilterInputType { +impl std::fmt::Display for ClickStackSlackAPIWebhookService { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::QUERY_EXPRESSION => write!(f, "QUERY_EXPRESSION"), + Self::Slack_api => write!(f, "slack_api"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackFilterInput.whereLanguage`. +/// Inline enum for `ClickStackSlackWebhook.service`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackFilterInputWherelanguage { - #[serde(rename = "sql")] +pub enum ClickStackSlackWebhookService { + #[serde(rename = "slack")] #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, + Slack, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackFilterInputWherelanguage { +impl std::fmt::Display for ClickStackSlackWebhookService { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::Slack => write!(f, "slack"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackGenericWebhook.service`. +/// Inline enum for `ClickStackTableBuilderChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackGenericWebhookService { - #[serde(rename = "generic")] +pub enum ClickStackTableBuilderChartConfigDisplaytype { + #[serde(rename = "table")] #[default] - Generic, + Table, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackGenericWebhookService { +impl std::fmt::Display for ClickStackTableBuilderChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Generic => write!(f, "generic"), + Self::Table => write!(f, "table"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackHeatmapChartConfig.displayType`. +/// Inline enum for `ClickStackTableChartSeries.aggFn`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackHeatmapChartConfigDisplaytype { - #[serde(rename = "heatmap")] +pub enum ClickStackTableChartSeriesAggfn { + #[serde(rename = "avg")] #[default] - Heatmap, + Avg, + #[serde(rename = "count")] + Count, + #[serde(rename = "count_distinct")] + Count_distinct, + #[serde(rename = "last_value")] + Last_value, + #[serde(rename = "max")] + Max, + #[serde(rename = "min")] + Min, + #[serde(rename = "quantile")] + Quantile, + #[serde(rename = "sum")] + Sum, + #[serde(rename = "any")] + Any, + #[serde(rename = "none")] + None, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackHeatmapChartConfigDisplaytype { +impl std::fmt::Display for ClickStackTableChartSeriesAggfn { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Heatmap => write!(f, "heatmap"), + Self::Avg => write!(f, "avg"), + Self::Count => write!(f, "count"), + Self::Count_distinct => write!(f, "count_distinct"), + Self::Last_value => write!(f, "last_value"), + Self::Max => write!(f, "max"), + Self::Min => write!(f, "min"), + Self::Quantile => write!(f, "quantile"), + Self::Sum => write!(f, "sum"), + Self::Any => write!(f, "any"), + Self::None => write!(f, "none"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackHeatmapChartConfig.whereLanguage`. +/// Inline enum for `ClickStackTableChartSeries.metricDataType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackHeatmapChartConfigWherelanguage { - #[serde(rename = "sql")] +pub enum ClickStackTableChartSeriesMetricdatatype { + #[serde(rename = "sum")] #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, + Sum, + #[serde(rename = "gauge")] + Gauge, + #[serde(rename = "histogram")] + Histogram, + #[serde(rename = "summary")] + Summary, + #[serde(rename = "exponential histogram")] + Exponential_histogram, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackHeatmapChartConfigWherelanguage { +impl std::fmt::Display for ClickStackTableChartSeriesMetricdatatype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::Sum => write!(f, "sum"), + Self::Gauge => write!(f, "gauge"), + Self::Histogram => write!(f, "histogram"), + Self::Summary => write!(f, "summary"), + Self::Exponential_histogram => write!(f, "exponential histogram"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackHeatmapSelectItem.heatmapScaleType`. +/// Inline enum for `ClickStackTableChartSeries.sortOrder`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackHeatmapSelectItemHeatmapscaletype { - #[serde(rename = "log")] +pub enum ClickStackTableChartSeriesSortorder { + #[serde(rename = "desc")] #[default] - Log, - #[serde(rename = "linear")] - Linear, + Desc, + #[serde(rename = "asc")] + Asc, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackHeatmapSelectItemHeatmapscaletype { +impl std::fmt::Display for ClickStackTableChartSeriesSortorder { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Log => write!(f, "log"), - Self::Linear => write!(f, "linear"), + Self::Desc => write!(f, "desc"), + Self::Asc => write!(f, "asc"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackIncidentIOWebhook.service`. +/// Inline enum for `ClickStackTableChartSeries.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackIncidentIOWebhookService { - #[serde(rename = "incidentio")] +pub enum ClickStackTableChartSeriesType { + #[serde(rename = "table")] #[default] - Incidentio, + Table, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackIncidentIOWebhookService { +impl std::fmt::Display for ClickStackTableChartSeriesType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Incidentio => write!(f, "incidentio"), + Self::Table => write!(f, "table"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackLineBuilderChartConfig.displayType`. +/// Inline enum for `ClickStackTableChartSeries.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackLineBuilderChartConfigDisplaytype { - #[serde(rename = "line")] +pub enum ClickStackTableChartSeriesWherelanguage { + #[serde(rename = "sql")] #[default] - Line, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackLineBuilderChartConfigDisplaytype { +impl std::fmt::Display for ClickStackTableChartSeriesWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Line => write!(f, "line"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackLineRawSqlChartConfig.configType`. +/// Inline enum for `ClickStackTableRawSqlChartConfig.configType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackLineRawSqlChartConfigConfigtype { +pub enum ClickStackTableRawSqlChartConfigConfigtype { #[serde(rename = "sql")] #[default] Sql, @@ -2856,7 +2649,7 @@ pub enum ClickStackLineRawSqlChartConfigConfigtype { Unknown(String), } -impl std::fmt::Display for ClickStackLineRawSqlChartConfigConfigtype { +impl std::fmt::Display for ClickStackTableRawSqlChartConfigConfigtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Sql => write!(f, "sql"), @@ -2865,316 +2658,325 @@ impl std::fmt::Display for ClickStackLineRawSqlChartConfigConfigtype { } } -/// Inline enum for `ClickStackLineRawSqlChartConfig.displayType`. +/// Inline enum for `ClickStackTableRawSqlChartConfig.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackLineRawSqlChartConfigDisplaytype { - #[serde(rename = "line")] +pub enum ClickStackTableRawSqlChartConfigDisplaytype { + #[serde(rename = "table")] #[default] - Line, + Table, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackLineRawSqlChartConfigDisplaytype { +impl std::fmt::Display for ClickStackTableRawSqlChartConfigDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Line => write!(f, "line"), + Self::Table => write!(f, "table"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackLogSource.kind`. +/// Inline enum for `ClickStackTimeChartSeries.aggFn`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackLogSourceKind { - #[serde(rename = "log")] +pub enum ClickStackTimeChartSeriesAggfn { + #[serde(rename = "avg")] #[default] - Log, + Avg, + #[serde(rename = "count")] + Count, + #[serde(rename = "count_distinct")] + Count_distinct, + #[serde(rename = "last_value")] + Last_value, + #[serde(rename = "max")] + Max, + #[serde(rename = "min")] + Min, + #[serde(rename = "quantile")] + Quantile, + #[serde(rename = "sum")] + Sum, + #[serde(rename = "any")] + Any, + #[serde(rename = "none")] + None, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackLogSourceKind { +impl std::fmt::Display for ClickStackTimeChartSeriesAggfn { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Log => write!(f, "log"), + Self::Avg => write!(f, "avg"), + Self::Count => write!(f, "count"), + Self::Count_distinct => write!(f, "count_distinct"), + Self::Last_value => write!(f, "last_value"), + Self::Max => write!(f, "max"), + Self::Min => write!(f, "min"), + Self::Quantile => write!(f, "quantile"), + Self::Sum => write!(f, "sum"), + Self::Any => write!(f, "any"), + Self::None => write!(f, "none"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackLogSource.useTextIndexForImplicitColumn`. +/// Inline enum for `ClickStackTimeChartSeries.displayType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackLogSourceUsetextindexforimplicitcolumn { - #[serde(rename = "auto")] +pub enum ClickStackTimeChartSeriesDisplaytype { + #[serde(rename = "stacked_bar")] #[default] - Auto, - #[serde(rename = "enabled")] - Enabled, - #[serde(rename = "disabled")] - Disabled, + Stacked_bar, + #[serde(rename = "line")] + Line, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackLogSourceUsetextindexforimplicitcolumn { +impl std::fmt::Display for ClickStackTimeChartSeriesDisplaytype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Auto => write!(f, "auto"), - Self::Enabled => write!(f, "enabled"), - Self::Disabled => write!(f, "disabled"), + Self::Stacked_bar => write!(f, "stacked_bar"), + Self::Line => write!(f, "line"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackMarkdownChartConfig.displayType`. +/// Inline enum for `ClickStackTimeChartSeries.metricDataType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackMarkdownChartConfigDisplaytype { - #[serde(rename = "markdown")] +pub enum ClickStackTimeChartSeriesMetricdatatype { + #[serde(rename = "sum")] #[default] - Markdown, + Sum, + #[serde(rename = "gauge")] + Gauge, + #[serde(rename = "histogram")] + Histogram, + #[serde(rename = "summary")] + Summary, + #[serde(rename = "exponential histogram")] + Exponential_histogram, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackMarkdownChartConfigDisplaytype { +impl std::fmt::Display for ClickStackTimeChartSeriesMetricdatatype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Markdown => write!(f, "markdown"), + Self::Sum => write!(f, "sum"), + Self::Gauge => write!(f, "gauge"), + Self::Histogram => write!(f, "histogram"), + Self::Summary => write!(f, "summary"), + Self::Exponential_histogram => write!(f, "exponential histogram"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackMarkdownChartSeries.type`. +/// Inline enum for `ClickStackTimeChartSeries.type`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackMarkdownChartSeriesType { - #[serde(rename = "markdown")] +pub enum ClickStackTimeChartSeriesType { + #[serde(rename = "time")] #[default] - Markdown, + Time, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackMarkdownChartSeriesType { +impl std::fmt::Display for ClickStackTimeChartSeriesType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Markdown => write!(f, "markdown"), + Self::Time => write!(f, "time"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackMaterializedView.minGranularity`. +/// Inline enum for `ClickStackTimeChartSeries.whereLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackMaterializedViewMingranularity { - #[serde(rename = "1s")] +pub enum ClickStackTimeChartSeriesWherelanguage { + #[serde(rename = "sql")] #[default] - _1s, - #[serde(rename = "15s")] - _15s, - #[serde(rename = "30s")] - _30s, - #[serde(rename = "1m")] - _1m, - #[serde(rename = "5m")] - _5m, - #[serde(rename = "15m")] - _15m, - #[serde(rename = "30m")] - _30m, - #[serde(rename = "1h")] - _1h, - #[serde(rename = "2h")] - _2h, - #[serde(rename = "6h")] - _6h, - #[serde(rename = "12h")] - _12h, - #[serde(rename = "1d")] - _1d, - #[serde(rename = "2d")] - _2d, - #[serde(rename = "7d")] - _7d, - #[serde(rename = "30d")] - _30d, + Sql, + #[serde(rename = "lucene")] + Lucene, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackMaterializedViewMingranularity { +impl std::fmt::Display for ClickStackTimeChartSeriesWherelanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::_1s => write!(f, "1s"), - Self::_15s => write!(f, "15s"), - Self::_30s => write!(f, "30s"), - Self::_1m => write!(f, "1m"), - Self::_5m => write!(f, "5m"), - Self::_15m => write!(f, "15m"), - Self::_30m => write!(f, "30m"), - Self::_1h => write!(f, "1h"), - Self::_2h => write!(f, "2h"), - Self::_6h => write!(f, "6h"), - Self::_12h => write!(f, "12h"), - Self::_1d => write!(f, "1d"), - Self::_2d => write!(f, "2d"), - Self::_7d => write!(f, "7d"), - Self::_30d => write!(f, "30d"), + Self::Sql => write!(f, "sql"), + Self::Lucene => write!(f, "lucene"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackMetricSource.kind`. +/// Inline enum for `ClickStackTraceSource.kind`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackMetricSourceKind { - #[serde(rename = "metric")] +pub enum ClickStackTraceSourceKind { + #[serde(rename = "trace")] #[default] - Metric, + Trace, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackMetricSourceKind { +impl std::fmt::Display for ClickStackTraceSourceKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Metric => write!(f, "metric"), + Self::Trace => write!(f, "trace"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumberBuilderChartConfig.displayType`. +/// Inline enum for `ClickStackTraceSource.useTextIndexForImplicitColumn`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberBuilderChartConfigDisplaytype { - #[serde(rename = "number")] +pub enum ClickStackTraceSourceUsetextindexforimplicitcolumn { + #[serde(rename = "auto")] #[default] - Number, + Auto, + #[serde(rename = "enabled")] + Enabled, + #[serde(rename = "disabled")] + Disabled, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackNumberBuilderChartConfigDisplaytype { +impl std::fmt::Display for ClickStackTraceSourceUsetextindexforimplicitcolumn { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Number => write!(f, "number"), + Self::Auto => write!(f, "auto"), + Self::Enabled => write!(f, "enabled"), + Self::Disabled => write!(f, "disabled"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumberChartSeries.aggFn`. +/// Inline enum for `ClickStackUpdateAlertRequest.interval`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberChartSeriesAggfn { - #[serde(rename = "avg")] +pub enum ClickStackUpdateAlertRequestInterval { + #[serde(rename = "1m")] #[default] - Avg, - #[serde(rename = "count")] - Count, - #[serde(rename = "count_distinct")] - Count_distinct, - #[serde(rename = "last_value")] - Last_value, - #[serde(rename = "max")] - Max, - #[serde(rename = "min")] - Min, - #[serde(rename = "quantile")] - Quantile, - #[serde(rename = "sum")] - Sum, - #[serde(rename = "any")] - Any, - #[serde(rename = "none")] - None, + _1m, + #[serde(rename = "5m")] + _5m, + #[serde(rename = "15m")] + _15m, + #[serde(rename = "30m")] + _30m, + #[serde(rename = "1h")] + _1h, + #[serde(rename = "6h")] + _6h, + #[serde(rename = "12h")] + _12h, + #[serde(rename = "1d")] + _1d, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackNumberChartSeriesAggfn { +impl std::fmt::Display for ClickStackUpdateAlertRequestInterval { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Avg => write!(f, "avg"), - Self::Count => write!(f, "count"), - Self::Count_distinct => write!(f, "count_distinct"), - Self::Last_value => write!(f, "last_value"), - Self::Max => write!(f, "max"), - Self::Min => write!(f, "min"), - Self::Quantile => write!(f, "quantile"), - Self::Sum => write!(f, "sum"), - Self::Any => write!(f, "any"), - Self::None => write!(f, "none"), + Self::_1m => write!(f, "1m"), + Self::_5m => write!(f, "5m"), + Self::_15m => write!(f, "15m"), + Self::_30m => write!(f, "30m"), + Self::_1h => write!(f, "1h"), + Self::_6h => write!(f, "6h"), + Self::_12h => write!(f, "12h"), + Self::_1d => write!(f, "1d"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumberChartSeries.metricDataType`. +/// Inline enum for `ClickStackUpdateAlertRequest.source`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberChartSeriesMetricdatatype { - #[serde(rename = "sum")] +pub enum ClickStackUpdateAlertRequestSource { + #[serde(rename = "saved_search")] #[default] - Sum, - #[serde(rename = "gauge")] - Gauge, - #[serde(rename = "histogram")] - Histogram, - #[serde(rename = "summary")] - Summary, - #[serde(rename = "exponential histogram")] - Exponential_histogram, + Saved_search, + #[serde(rename = "tile")] + Tile, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackNumberChartSeriesMetricdatatype { +impl std::fmt::Display for ClickStackUpdateAlertRequestSource { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sum => write!(f, "sum"), - Self::Gauge => write!(f, "gauge"), - Self::Histogram => write!(f, "histogram"), - Self::Summary => write!(f, "summary"), - Self::Exponential_histogram => write!(f, "exponential histogram"), + Self::Saved_search => write!(f, "saved_search"), + Self::Tile => write!(f, "tile"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumberChartSeries.type`. +/// Inline enum for `ClickStackUpdateAlertRequest.thresholdType`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberChartSeriesType { - #[serde(rename = "number")] +pub enum ClickStackUpdateAlertRequestThresholdtype { + #[serde(rename = "above")] #[default] - Number, + Above, + #[serde(rename = "below")] + Below, + #[serde(rename = "above_exclusive")] + Above_exclusive, + #[serde(rename = "below_or_equal")] + Below_or_equal, + #[serde(rename = "equal")] + Equal, + #[serde(rename = "not_equal")] + Not_equal, + #[serde(rename = "between")] + Between, + #[serde(rename = "not_between")] + Not_between, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackNumberChartSeriesType { +impl std::fmt::Display for ClickStackUpdateAlertRequestThresholdtype { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Number => write!(f, "number"), + Self::Above => write!(f, "above"), + Self::Below => write!(f, "below"), + Self::Above_exclusive => write!(f, "above_exclusive"), + Self::Below_or_equal => write!(f, "below_or_equal"), + Self::Equal => write!(f, "equal"), + Self::Not_equal => write!(f, "not_equal"), + Self::Between => write!(f, "between"), + Self::Not_between => write!(f, "not_between"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumberChartSeries.whereLanguage`. +/// Inline enum for `ClickStackUpdateDashboardRequest.savedQueryLanguage`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberChartSeriesWherelanguage { +pub enum ClickStackUpdateDashboardRequestSavedquerylanguage { #[serde(rename = "sql")] #[default] Sql, @@ -3185,7 +2987,7 @@ pub enum ClickStackNumberChartSeriesWherelanguage { Unknown(String), } -impl std::fmt::Display for ClickStackNumberChartSeriesWherelanguage { +impl std::fmt::Display for ClickStackUpdateDashboardRequestSavedquerylanguage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Sql => write!(f, "sql"), @@ -3195,4489 +2997,1247 @@ impl std::fmt::Display for ClickStackNumberChartSeriesWherelanguage { } } -/// Inline enum for `ClickStackNumberFormat.numericUnit`. +/// Inline enum for `ClickStackWebhookInput.service`. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberFormatNumericunit { - #[serde(rename = "bytes_iec")] +pub enum ClickStackWebhookInputService { + #[serde(rename = "slack")] #[default] - Bytes_iec, - #[serde(rename = "bytes_si")] - Bytes_si, - #[serde(rename = "bits_iec")] - Bits_iec, - #[serde(rename = "bits_si")] - Bits_si, - #[serde(rename = "kibibytes")] - Kibibytes, - #[serde(rename = "kilobytes")] - Kilobytes, - #[serde(rename = "mebibytes")] - Mebibytes, - #[serde(rename = "megabytes")] - Megabytes, - #[serde(rename = "gibibytes")] - Gibibytes, - #[serde(rename = "gigabytes")] - Gigabytes, - #[serde(rename = "tebibytes")] - Tebibytes, - #[serde(rename = "terabytes")] - Terabytes, - #[serde(rename = "pebibytes")] - Pebibytes, - #[serde(rename = "petabytes")] - Petabytes, - #[serde(rename = "packets_sec")] - Packets_sec, - #[serde(rename = "bytes_sec_iec")] - Bytes_sec_iec, - #[serde(rename = "bytes_sec_si")] - Bytes_sec_si, - #[serde(rename = "bits_sec_iec")] - Bits_sec_iec, - #[serde(rename = "bits_sec_si")] - Bits_sec_si, - #[serde(rename = "kibibytes_sec")] - Kibibytes_sec, - #[serde(rename = "kibibits_sec")] - Kibibits_sec, - #[serde(rename = "kilobytes_sec")] - Kilobytes_sec, - #[serde(rename = "kilobits_sec")] - Kilobits_sec, - #[serde(rename = "mebibytes_sec")] - Mebibytes_sec, - #[serde(rename = "mebibits_sec")] - Mebibits_sec, - #[serde(rename = "megabytes_sec")] - Megabytes_sec, - #[serde(rename = "megabits_sec")] - Megabits_sec, - #[serde(rename = "gibibytes_sec")] - Gibibytes_sec, - #[serde(rename = "gibibits_sec")] - Gibibits_sec, - #[serde(rename = "gigabytes_sec")] - Gigabytes_sec, - #[serde(rename = "gigabits_sec")] - Gigabits_sec, - #[serde(rename = "tebibytes_sec")] - Tebibytes_sec, - #[serde(rename = "tebibits_sec")] - Tebibits_sec, - #[serde(rename = "terabytes_sec")] - Terabytes_sec, - #[serde(rename = "terabits_sec")] - Terabits_sec, - #[serde(rename = "pebibytes_sec")] - Pebibytes_sec, - #[serde(rename = "pebibits_sec")] - Pebibits_sec, - #[serde(rename = "petabytes_sec")] - Petabytes_sec, - #[serde(rename = "petabits_sec")] - Petabits_sec, - #[serde(rename = "cps")] - Cps, - #[serde(rename = "ops")] - Ops, - #[serde(rename = "rps")] - Rps, - #[serde(rename = "reads_sec")] - Reads_sec, - #[serde(rename = "wps")] - Wps, - #[serde(rename = "iops")] - Iops, - #[serde(rename = "cpm")] - Cpm, - #[serde(rename = "opm")] - Opm, - #[serde(rename = "rpm_reads")] - Rpm_reads, - #[serde(rename = "wpm")] - Wpm, + Slack, + #[serde(rename = "incidentio")] + Incidentio, + #[serde(rename = "generic")] + Generic, /// Catch-all for unknown or newly-added values. #[serde(untagged)] Unknown(String), } -impl std::fmt::Display for ClickStackNumberFormatNumericunit { +impl std::fmt::Display for ClickStackWebhookInputService { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Bytes_iec => write!(f, "bytes_iec"), - Self::Bytes_si => write!(f, "bytes_si"), - Self::Bits_iec => write!(f, "bits_iec"), - Self::Bits_si => write!(f, "bits_si"), - Self::Kibibytes => write!(f, "kibibytes"), - Self::Kilobytes => write!(f, "kilobytes"), - Self::Mebibytes => write!(f, "mebibytes"), - Self::Megabytes => write!(f, "megabytes"), - Self::Gibibytes => write!(f, "gibibytes"), - Self::Gigabytes => write!(f, "gigabytes"), - Self::Tebibytes => write!(f, "tebibytes"), - Self::Terabytes => write!(f, "terabytes"), - Self::Pebibytes => write!(f, "pebibytes"), - Self::Petabytes => write!(f, "petabytes"), - Self::Packets_sec => write!(f, "packets_sec"), - Self::Bytes_sec_iec => write!(f, "bytes_sec_iec"), - Self::Bytes_sec_si => write!(f, "bytes_sec_si"), - Self::Bits_sec_iec => write!(f, "bits_sec_iec"), - Self::Bits_sec_si => write!(f, "bits_sec_si"), - Self::Kibibytes_sec => write!(f, "kibibytes_sec"), - Self::Kibibits_sec => write!(f, "kibibits_sec"), - Self::Kilobytes_sec => write!(f, "kilobytes_sec"), - Self::Kilobits_sec => write!(f, "kilobits_sec"), - Self::Mebibytes_sec => write!(f, "mebibytes_sec"), - Self::Mebibits_sec => write!(f, "mebibits_sec"), - Self::Megabytes_sec => write!(f, "megabytes_sec"), - Self::Megabits_sec => write!(f, "megabits_sec"), - Self::Gibibytes_sec => write!(f, "gibibytes_sec"), - Self::Gibibits_sec => write!(f, "gibibits_sec"), - Self::Gigabytes_sec => write!(f, "gigabytes_sec"), - Self::Gigabits_sec => write!(f, "gigabits_sec"), - Self::Tebibytes_sec => write!(f, "tebibytes_sec"), - Self::Tebibits_sec => write!(f, "tebibits_sec"), - Self::Terabytes_sec => write!(f, "terabytes_sec"), - Self::Terabits_sec => write!(f, "terabits_sec"), - Self::Pebibytes_sec => write!(f, "pebibytes_sec"), - Self::Pebibits_sec => write!(f, "pebibits_sec"), - Self::Petabytes_sec => write!(f, "petabytes_sec"), - Self::Petabits_sec => write!(f, "petabits_sec"), - Self::Cps => write!(f, "cps"), - Self::Ops => write!(f, "ops"), - Self::Rps => write!(f, "rps"), - Self::Reads_sec => write!(f, "reads_sec"), - Self::Wps => write!(f, "wps"), - Self::Iops => write!(f, "iops"), - Self::Cpm => write!(f, "cpm"), - Self::Opm => write!(f, "opm"), - Self::Rpm_reads => write!(f, "rpm_reads"), - Self::Wpm => write!(f, "wpm"), + Self::Slack => write!(f, "slack"), + Self::Incidentio => write!(f, "incidentio"), + Self::Generic => write!(f, "generic"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumberFormat.output`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberFormatOutput { - #[serde(rename = "currency")] - #[default] - Currency, - #[serde(rename = "percent")] - Percent, - #[serde(rename = "byte")] - Byte, - #[serde(rename = "time")] - Time, - #[serde(rename = "number")] - Number, - #[serde(rename = "data_rate")] - Data_rate, - #[serde(rename = "throughput")] - Throughput, - #[serde(rename = "duration")] - Duration, +/// `ClickStackAlertChannel` - one of multiple variants. +/// +/// Dispatched on the `type` field; see the `discriminated_union!` +/// invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackAlertChannel { + ClickStackAlertChannelEmail(ClickStackAlertChannelEmail), + ClickStackAlertChannelWebhook(ClickStackAlertChannelWebhook), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackNumberFormatOutput { +discriminated_union! { + ClickStackAlertChannel, "type" { + "email" => ClickStackAlertChannelEmail, + "webhook" => ClickStackAlertChannelWebhook, + } +} + +impl std::fmt::Display for ClickStackAlertChannel { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Currency => write!(f, "currency"), - Self::Percent => write!(f, "percent"), - Self::Byte => write!(f, "byte"), - Self::Time => write!(f, "time"), - Self::Number => write!(f, "number"), - Self::Data_rate => write!(f, "data_rate"), - Self::Throughput => write!(f, "throughput"), - Self::Duration => write!(f, "duration"), + Self::ClickStackAlertChannelEmail(_) => write!(f, "ClickStackAlertChannelEmail"), + Self::ClickStackAlertChannelWebhook(_) => write!(f, "ClickStackAlertChannelWebhook"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumberRawSqlChartConfig.configType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberRawSqlChartConfigConfigtype { - #[serde(rename = "sql")] - #[default] - Sql, +/// `ClickStackAlertChannel` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackAlertChannel`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `type` field, exactly as the request union is: dispatch +/// reads the raw JSON rather than trying each variant's shape, so all-`Option` +/// arms — which would match any object under `untagged` matching — cannot +/// misroute a payload. A `type` this crate does not know, or a payload that +/// does not fit the variant its `type` selects, lands in `Unknown` with the +/// raw JSON intact. +/// +/// Deliberately has no `Default`: every arm's default would serialize to `{}`, +/// which carries no `type` and so would not deserialize back to the same +/// variant. Build a [`ClickStackAlertChannel`] instead when writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackAlertChannelResponse { + ClickStackAlertChannelEmail(ClickStackAlertChannelEmailResponse), + ClickStackAlertChannelWebhook(ClickStackAlertChannelWebhookResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackNumberRawSqlChartConfigConfigtype { +discriminated_union! { + ClickStackAlertChannelResponse, "type" { + "email" => ClickStackAlertChannelEmail, + "webhook" => ClickStackAlertChannelWebhook, + } +} + +impl std::fmt::Display for ClickStackAlertChannelResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), + Self::ClickStackAlertChannelEmail(_) => write!(f, "ClickStackAlertChannelEmail"), + Self::ClickStackAlertChannelWebhook(_) => write!(f, "ClickStackAlertChannelWebhook"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumberRawSqlChartConfig.displayType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumberRawSqlChartConfigDisplaytype { - #[serde(rename = "number")] - #[default] - Number, +/// `ClickStackBarChartConfig` - one of multiple variants. +/// +/// Dispatched on the `configType` field (absent or non-string dispatches to the +/// builder variant, unless the payload carries a raw-SQL-only key); see the +/// `discriminated_union!` invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackBarChartConfig { + ClickStackBarBuilderChartConfig(ClickStackBarBuilderChartConfig), + ClickStackBarRawSqlChartConfig(ClickStackBarRawSqlChartConfig), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackNumberRawSqlChartConfigDisplaytype { +discriminated_union! { + ClickStackBarChartConfig, "configType" { + "sql" => ClickStackBarRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackBarBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackBarChartConfig { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Number => write!(f, "number"), + Self::ClickStackBarBuilderChartConfig(_) => { + write!(f, "ClickStackBarBuilderChartConfig") + } + Self::ClickStackBarRawSqlChartConfig(_) => write!(f, "ClickStackBarRawSqlChartConfig"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackNumericColorCondition.operator`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackNumericColorConditionOperator { - #[serde(rename = "gt")] - #[default] - Gt, - #[serde(rename = "gte")] - Gte, - #[serde(rename = "lt")] - Lt, - #[serde(rename = "lte")] - Lte, +/// `ClickStackBarChartConfig` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackBarChartConfig`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `configType` field exactly as the request union is (absent +/// or non-string dispatches to the builder variant, unless the payload carries +/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each +/// variant's shape, so all-`Option` arms — which would match any object under +/// `untagged` matching — cannot misroute a payload, and the `unless` guard +/// keeps a raw-SQL payload with a dropped discriminator out of the total +/// builder arm. A payload that does not fit the variant its discriminator +/// selects lands in `Unknown` with the raw JSON intact. +/// +/// Deliberately has no `Default`: response values are produced by +/// deserialization, never constructed; build a [`ClickStackBarChartConfig`] instead when +/// writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackBarChartConfigResponse { + ClickStackBarRawSqlChartConfig(ClickStackBarRawSqlChartConfigResponse), + ClickStackBarBuilderChartConfig(ClickStackBarBuilderChartConfigResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackNumericColorConditionOperator { +discriminated_union! { + ClickStackBarChartConfigResponse, "configType" { + "sql" => ClickStackBarRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackBarBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackBarChartConfigResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Gt => write!(f, "gt"), - Self::Gte => write!(f, "gte"), - Self::Lt => write!(f, "lt"), - Self::Lte => write!(f, "lte"), + Self::ClickStackBarRawSqlChartConfig(_) => write!(f, "ClickStackBarRawSqlChartConfig"), + Self::ClickStackBarBuilderChartConfig(_) => { + write!(f, "ClickStackBarBuilderChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackOnClickDashboard.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackOnClickDashboardType { - #[serde(rename = "dashboard")] - #[default] - Dashboard, +/// `ClickStackCategoricalBarChartConfig` - one of multiple variants. +/// +/// Dispatched on the `configType` field (absent or non-string dispatches to the +/// builder variant, unless the payload carries a raw-SQL-only key); see the +/// `discriminated_union!` invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackCategoricalBarChartConfig { + ClickStackCategoricalBarBuilderChartConfig(ClickStackCategoricalBarBuilderChartConfig), + ClickStackCategoricalBarRawSqlChartConfig(ClickStackCategoricalBarRawSqlChartConfig), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackOnClickDashboardType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Dashboard => write!(f, "dashboard"), - Self::Unknown(s) => write!(f, "{s}"), - } +discriminated_union! { + ClickStackCategoricalBarChartConfig, "configType" { + "sql" => ClickStackCategoricalBarRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackCategoricalBarBuilderChartConfig, } } -/// Inline enum for `ClickStackOnClickDashboard.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackOnClickDashboardWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), +impl Default for ClickStackCategoricalBarChartConfig { + fn default() -> Self { + Self::ClickStackCategoricalBarBuilderChartConfig( + ClickStackCategoricalBarBuilderChartConfig::default(), + ) + } } -impl std::fmt::Display for ClickStackOnClickDashboardWherelanguage { +impl std::fmt::Display for ClickStackCategoricalBarChartConfig { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::ClickStackCategoricalBarBuilderChartConfig(_) => { + write!(f, "ClickStackCategoricalBarBuilderChartConfig") + } + Self::ClickStackCategoricalBarRawSqlChartConfig(_) => { + write!(f, "ClickStackCategoricalBarRawSqlChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackOnClickExternal.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackOnClickExternalType { - #[serde(rename = "external")] - #[default] - External, +/// `ClickStackCategoricalBarChartConfig` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackCategoricalBarChartConfig`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `configType` field exactly as the request union is (absent +/// or non-string dispatches to the builder variant, unless the payload carries +/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each +/// variant's shape, so all-`Option` arms — which would match any object under +/// `untagged` matching — cannot misroute a payload, and the `unless` guard +/// keeps a raw-SQL payload with a dropped discriminator out of the total +/// builder arm. A payload that does not fit the variant its discriminator +/// selects lands in `Unknown` with the raw JSON intact. +/// +/// Deliberately has no `Default`: response values are produced by +/// deserialization, never constructed; build a [`ClickStackCategoricalBarChartConfig`] instead when +/// writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackCategoricalBarChartConfigResponse { + ClickStackCategoricalBarRawSqlChartConfig(ClickStackCategoricalBarRawSqlChartConfigResponse), + ClickStackCategoricalBarBuilderChartConfig(ClickStackCategoricalBarBuilderChartConfigResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackOnClickExternalType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::External => write!(f, "external"), - Self::Unknown(s) => write!(f, "{s}"), - } +discriminated_union! { + ClickStackCategoricalBarChartConfigResponse, "configType" { + "sql" => ClickStackCategoricalBarRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackCategoricalBarBuilderChartConfig, } } -/// Inline enum for `ClickStackOnClickFilterTemplate.kind`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackOnClickFilterTemplateKind { - #[serde(rename = "expressionTemplate")] - #[default] - ExpressionTemplate, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackOnClickFilterTemplateKind { +impl std::fmt::Display for ClickStackCategoricalBarChartConfigResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::ExpressionTemplate => write!(f, "expressionTemplate"), + Self::ClickStackCategoricalBarRawSqlChartConfig(_) => { + write!(f, "ClickStackCategoricalBarRawSqlChartConfig") + } + Self::ClickStackCategoricalBarBuilderChartConfig(_) => { + write!(f, "ClickStackCategoricalBarBuilderChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackOnClickSearch.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackOnClickSearchType { - #[serde(rename = "search")] - #[default] - Search, +/// `ClickStackDashboardChartSeries` - one of multiple variants. +/// +/// Dispatched on the `type` field; see the `discriminated_union!` +/// invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackDashboardChartSeries { + ClickStackTimeChartSeries(ClickStackTimeChartSeries), + ClickStackTableChartSeries(ClickStackTableChartSeries), + ClickStackNumberChartSeries(ClickStackNumberChartSeries), + ClickStackSearchChartSeries(ClickStackSearchChartSeries), + ClickStackMarkdownChartSeries(ClickStackMarkdownChartSeries), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackOnClickSearchType { +discriminated_union! { + ClickStackDashboardChartSeries, "type" { + "time" => ClickStackTimeChartSeries, + "table" => ClickStackTableChartSeries, + "number" => ClickStackNumberChartSeries, + "search" => ClickStackSearchChartSeries, + "markdown" => ClickStackMarkdownChartSeries, + } +} + +impl std::fmt::Display for ClickStackDashboardChartSeries { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Search => write!(f, "search"), + Self::ClickStackTimeChartSeries(_) => write!(f, "ClickStackTimeChartSeries"), + Self::ClickStackTableChartSeries(_) => write!(f, "ClickStackTableChartSeries"), + Self::ClickStackNumberChartSeries(_) => write!(f, "ClickStackNumberChartSeries"), + Self::ClickStackSearchChartSeries(_) => write!(f, "ClickStackSearchChartSeries"), + Self::ClickStackMarkdownChartSeries(_) => write!(f, "ClickStackMarkdownChartSeries"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackOnClickSearch.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackOnClickSearchWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, +/// `ClickStackLineChartConfig` - one of multiple variants. +/// +/// Dispatched on the `configType` field (absent or non-string dispatches to the +/// builder variant, unless the payload carries a raw-SQL-only key); see the +/// `discriminated_union!` invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackLineChartConfig { + ClickStackLineBuilderChartConfig(ClickStackLineBuilderChartConfig), + ClickStackLineRawSqlChartConfig(ClickStackLineRawSqlChartConfig), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackOnClickSearchWherelanguage { +discriminated_union! { + ClickStackLineChartConfig, "configType" { + "sql" => ClickStackLineRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackLineBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackLineChartConfig { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::ClickStackLineBuilderChartConfig(_) => { + write!(f, "ClickStackLineBuilderChartConfig") + } + Self::ClickStackLineRawSqlChartConfig(_) => { + write!(f, "ClickStackLineRawSqlChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackOnClickTargetIdVariant.mode`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackOnClickTargetIdVariantMode { - #[serde(rename = "id")] - #[default] - Id, +/// `ClickStackLineChartConfig` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackLineChartConfig`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `configType` field exactly as the request union is (absent +/// or non-string dispatches to the builder variant, unless the payload carries +/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each +/// variant's shape, so all-`Option` arms — which would match any object under +/// `untagged` matching — cannot misroute a payload, and the `unless` guard +/// keeps a raw-SQL payload with a dropped discriminator out of the total +/// builder arm. A payload that does not fit the variant its discriminator +/// selects lands in `Unknown` with the raw JSON intact. +/// +/// Deliberately has no `Default`: response values are produced by +/// deserialization, never constructed; build a [`ClickStackLineChartConfig`] instead when +/// writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackLineChartConfigResponse { + ClickStackLineRawSqlChartConfig(ClickStackLineRawSqlChartConfigResponse), + ClickStackLineBuilderChartConfig(ClickStackLineBuilderChartConfigResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackOnClickTargetIdVariantMode { +discriminated_union! { + ClickStackLineChartConfigResponse, "configType" { + "sql" => ClickStackLineRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackLineBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackLineChartConfigResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Id => write!(f, "id"), + Self::ClickStackLineRawSqlChartConfig(_) => { + write!(f, "ClickStackLineRawSqlChartConfig") + } + Self::ClickStackLineBuilderChartConfig(_) => { + write!(f, "ClickStackLineBuilderChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackOnClickTargetTemplateVariant.mode`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackOnClickTargetTemplateVariantMode { - #[serde(rename = "template")] - #[default] - Template, +/// `ClickStackNumberChartConfig` - one of multiple variants. +/// +/// Dispatched on the `configType` field (absent or non-string dispatches to the +/// builder variant, unless the payload carries a raw-SQL-only key); see the +/// `discriminated_union!` invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackNumberChartConfig { + ClickStackNumberBuilderChartConfig(ClickStackNumberBuilderChartConfig), + ClickStackNumberRawSqlChartConfig(ClickStackNumberRawSqlChartConfig), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackOnClickTargetTemplateVariantMode { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Template => write!(f, "template"), - Self::Unknown(s) => write!(f, "{s}"), - } +discriminated_union! { + ClickStackNumberChartConfig, "configType" { + "sql" => ClickStackNumberRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackNumberBuilderChartConfig, } } -/// Inline enum for `ClickStackPagerDutyAPIWebhook.service`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackPagerDutyAPIWebhookService { - #[serde(rename = "pagerduty_api")] - #[default] - Pagerduty_api, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackPagerDutyAPIWebhookService { +impl std::fmt::Display for ClickStackNumberChartConfig { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Pagerduty_api => write!(f, "pagerduty_api"), + Self::ClickStackNumberBuilderChartConfig(_) => { + write!(f, "ClickStackNumberBuilderChartConfig") + } + Self::ClickStackNumberRawSqlChartConfig(_) => { + write!(f, "ClickStackNumberRawSqlChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackPieBuilderChartConfig.displayType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackPieBuilderChartConfigDisplaytype { - #[serde(rename = "pie")] - #[default] - Pie, +/// `ClickStackNumberChartConfig` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackNumberChartConfig`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `configType` field exactly as the request union is (absent +/// or non-string dispatches to the builder variant, unless the payload carries +/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each +/// variant's shape, so all-`Option` arms — which would match any object under +/// `untagged` matching — cannot misroute a payload, and the `unless` guard +/// keeps a raw-SQL payload with a dropped discriminator out of the total +/// builder arm. A payload that does not fit the variant its discriminator +/// selects lands in `Unknown` with the raw JSON intact. +/// +/// Deliberately has no `Default`: response values are produced by +/// deserialization, never constructed; build a [`ClickStackNumberChartConfig`] instead when +/// writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackNumberChartConfigResponse { + ClickStackNumberRawSqlChartConfig(ClickStackNumberRawSqlChartConfigResponse), + ClickStackNumberBuilderChartConfig(ClickStackNumberBuilderChartConfigResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackPieBuilderChartConfigDisplaytype { +discriminated_union! { + ClickStackNumberChartConfigResponse, "configType" { + "sql" => ClickStackNumberRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackNumberBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackNumberChartConfigResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Pie => write!(f, "pie"), + Self::ClickStackNumberRawSqlChartConfig(_) => { + write!(f, "ClickStackNumberRawSqlChartConfig") + } + Self::ClickStackNumberBuilderChartConfig(_) => { + write!(f, "ClickStackNumberBuilderChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackPieRawSqlChartConfig.configType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackPieRawSqlChartConfigConfigtype { - #[serde(rename = "sql")] - #[default] - Sql, +/// `ClickStackNumberTileColorCondition` - one of multiple variants. +/// +/// Dispatched on the `operator` field; see the `discriminated_union!` +/// invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackNumberTileColorCondition { + ClickStackNumericColorCondition(ClickStackNumericColorCondition), + ClickStackBetweenColorCondition(ClickStackBetweenColorCondition), + ClickStackEqualityColorCondition(ClickStackEqualityColorCondition), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackPieRawSqlChartConfigConfigtype { +discriminated_union! { + ClickStackNumberTileColorCondition, "operator" { + "gt" | "gte" | "lt" | "lte" => ClickStackNumericColorCondition, + "between" => ClickStackBetweenColorCondition, + "eq" | "neq" => ClickStackEqualityColorCondition, + } +} + +impl std::fmt::Display for ClickStackNumberTileColorCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), + Self::ClickStackNumericColorCondition(_) => { + write!(f, "ClickStackNumericColorCondition") + } + Self::ClickStackBetweenColorCondition(_) => { + write!(f, "ClickStackBetweenColorCondition") + } + Self::ClickStackEqualityColorCondition(_) => { + write!(f, "ClickStackEqualityColorCondition") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackPieRawSqlChartConfig.displayType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackPieRawSqlChartConfigDisplaytype { - #[serde(rename = "pie")] - #[default] - Pie, +/// `ClickStackNumberTileColorCondition` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackNumberTileColorCondition`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `operator` field, exactly as the request union is: dispatch +/// reads the raw JSON rather than trying each variant's shape, so all-`Option` +/// arms — which would match any object under `untagged` matching — cannot +/// misroute a payload. A `operator` this crate does not know, or a payload that +/// does not fit the variant its `operator` selects, lands in `Unknown` with the +/// raw JSON intact. +/// +/// Deliberately has no `Default`: every arm's default would serialize to `{}`, +/// which carries no `operator` and so would not deserialize back to the same +/// variant. Build a [`ClickStackNumberTileColorCondition`] instead when writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackNumberTileColorConditionResponse { + ClickStackNumericColorCondition(ClickStackNumericColorConditionResponse), + ClickStackBetweenColorCondition(ClickStackBetweenColorConditionResponse), + ClickStackEqualityColorCondition(ClickStackEqualityColorConditionResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackPieRawSqlChartConfigDisplaytype { +discriminated_union! { + ClickStackNumberTileColorConditionResponse, "operator" { + "gt" | "gte" | "lt" | "lte" => ClickStackNumericColorCondition, + "between" => ClickStackBetweenColorCondition, + "eq" | "neq" => ClickStackEqualityColorCondition, + } +} + +impl std::fmt::Display for ClickStackNumberTileColorConditionResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Pie => write!(f, "pie"), + Self::ClickStackNumericColorCondition(_) => { + write!(f, "ClickStackNumericColorCondition") + } + Self::ClickStackBetweenColorCondition(_) => { + write!(f, "ClickStackBetweenColorCondition") + } + Self::ClickStackEqualityColorCondition(_) => { + write!(f, "ClickStackEqualityColorCondition") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackPromqlSource.kind`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackPromqlSourceKind { - #[serde(rename = "promql")] - #[default] - Promql, +/// `ClickStackOnClick` - one of multiple variants. +/// +/// Dispatched on the `type` field; see the `discriminated_union!` +/// invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackOnClick { + ClickStackOnClickSearch(ClickStackOnClickSearch), + ClickStackOnClickDashboard(ClickStackOnClickDashboard), + ClickStackOnClickExternal(ClickStackOnClickExternal), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackPromqlSourceKind { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Promql => write!(f, "promql"), - Self::Unknown(s) => write!(f, "{s}"), - } +discriminated_union! { + ClickStackOnClick, "type" { + "search" => ClickStackOnClickSearch, + "dashboard" => ClickStackOnClickDashboard, + "external" => ClickStackOnClickExternal, } } -/// Inline enum for `ClickStackSavedFilterValue.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSavedFilterValueType { - #[serde(rename = "sql")] - #[default] - Sql, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), +impl Default for ClickStackOnClick { + fn default() -> Self { + Self::Unknown(serde_json::Value::Null) + } } -impl std::fmt::Display for ClickStackSavedFilterValueType { +impl std::fmt::Display for ClickStackOnClick { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), + Self::ClickStackOnClickSearch(_) => write!(f, "ClickStackOnClickSearch"), + Self::ClickStackOnClickDashboard(_) => write!(f, "ClickStackOnClickDashboard"), + Self::ClickStackOnClickExternal(_) => write!(f, "ClickStackOnClickExternal"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSavedSearchFilter.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSavedSearchFilterType { - #[serde(rename = "sql")] - #[default] - Sql, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), +/// `ClickStackOnClick` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackOnClick`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `type` field, exactly as the request union is: dispatch +/// reads the raw JSON rather than trying each variant's shape, so all-`Option` +/// arms — which would match any object under `untagged` matching — cannot +/// misroute a payload. A `type` this crate does not know, or a payload that +/// does not fit the variant its `type` selects, lands in `Unknown` with the +/// raw JSON intact. +/// +/// Deliberately has no `Default`: every arm's default would serialize to `{}`, +/// which carries no `type` and so would not deserialize back to the same +/// variant. Build a [`ClickStackOnClick`] instead when writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackOnClickResponse { + ClickStackOnClickSearch(ClickStackOnClickSearchResponse), + ClickStackOnClickDashboard(ClickStackOnClickDashboardResponse), + ClickStackOnClickExternal(ClickStackOnClickExternalResponse), + /// Catch-all for unknown or newly-added values. + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSavedSearchFilterType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Sql => write!(f, "sql"), - Self::Unknown(s) => write!(f, "{s}"), - } +discriminated_union! { + ClickStackOnClickResponse, "type" { + "search" => ClickStackOnClickSearch, + "dashboard" => ClickStackOnClickDashboard, + "external" => ClickStackOnClickExternal, } } -/// Inline enum for `ClickStackSavedSearchInput.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSavedSearchInputWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackSavedSearchInputWherelanguage { +impl std::fmt::Display for ClickStackOnClickResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::ClickStackOnClickSearch(_) => write!(f, "ClickStackOnClickSearch"), + Self::ClickStackOnClickDashboard(_) => write!(f, "ClickStackOnClickDashboard"), + Self::ClickStackOnClickExternal(_) => write!(f, "ClickStackOnClickExternal"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSavedSearch.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSavedSearchWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, +/// `ClickStackOnClickTarget` - one of multiple variants. +/// +/// Dispatched on the `mode` field; see the `discriminated_union!` +/// invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackOnClickTarget { + ClickStackOnClickTargetIdVariant(ClickStackOnClickTargetIdVariant), + ClickStackOnClickTargetTemplateVariant(ClickStackOnClickTargetTemplateVariant), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSavedSearchWherelanguage { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), - Self::Unknown(s) => write!(f, "{s}"), - } +discriminated_union! { + ClickStackOnClickTarget, "mode" { + "id" => ClickStackOnClickTargetIdVariant, + "template" => ClickStackOnClickTargetTemplateVariant, } } -/// Inline enum for `ClickStackSearchChartConfig.displayType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSearchChartConfigDisplaytype { - #[serde(rename = "search")] - #[default] - Search, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), +impl Default for ClickStackOnClickTarget { + fn default() -> Self { + Self::Unknown(serde_json::Value::Null) + } } -impl std::fmt::Display for ClickStackSearchChartConfigDisplaytype { +impl std::fmt::Display for ClickStackOnClickTarget { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Search => write!(f, "search"), + Self::ClickStackOnClickTargetIdVariant(_) => { + write!(f, "ClickStackOnClickTargetIdVariant") + } + Self::ClickStackOnClickTargetTemplateVariant(_) => { + write!(f, "ClickStackOnClickTargetTemplateVariant") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSearchChartConfig.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSearchChartConfigWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, +/// `ClickStackOnClickTarget` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackOnClickTarget`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `mode` field, exactly as the request union is: dispatch +/// reads the raw JSON rather than trying each variant's shape, so all-`Option` +/// arms — which would match any object under `untagged` matching — cannot +/// misroute a payload. A `mode` this crate does not know, or a payload that +/// does not fit the variant its `mode` selects, lands in `Unknown` with the +/// raw JSON intact. +/// +/// Deliberately has no `Default`: every arm's default would serialize to `{}`, +/// which carries no `mode` and so would not deserialize back to the same +/// variant. Build a [`ClickStackOnClickTarget`] instead when writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackOnClickTargetResponse { + ClickStackOnClickTargetIdVariant(ClickStackOnClickTargetIdVariantResponse), + ClickStackOnClickTargetTemplateVariant(ClickStackOnClickTargetTemplateVariantResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSearchChartConfigWherelanguage { +discriminated_union! { + ClickStackOnClickTargetResponse, "mode" { + "id" => ClickStackOnClickTargetIdVariant, + "template" => ClickStackOnClickTargetTemplateVariant, + } +} + +impl std::fmt::Display for ClickStackOnClickTargetResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::ClickStackOnClickTargetIdVariant(_) => { + write!(f, "ClickStackOnClickTargetIdVariant") + } + Self::ClickStackOnClickTargetTemplateVariant(_) => { + write!(f, "ClickStackOnClickTargetTemplateVariant") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSearchChartSeries.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSearchChartSeriesType { - #[serde(rename = "search")] - #[default] - Search, +/// `ClickStackPieChartConfig` - one of multiple variants. +/// +/// Dispatched on the `configType` field (absent or non-string dispatches to the +/// builder variant, unless the payload carries a raw-SQL-only key); see the +/// `discriminated_union!` invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackPieChartConfig { + ClickStackPieBuilderChartConfig(ClickStackPieBuilderChartConfig), + ClickStackPieRawSqlChartConfig(ClickStackPieRawSqlChartConfig), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSearchChartSeriesType { +discriminated_union! { + ClickStackPieChartConfig, "configType" { + "sql" => ClickStackPieRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackPieBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackPieChartConfig { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Search => write!(f, "search"), + Self::ClickStackPieBuilderChartConfig(_) => { + write!(f, "ClickStackPieBuilderChartConfig") + } + Self::ClickStackPieRawSqlChartConfig(_) => write!(f, "ClickStackPieRawSqlChartConfig"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSearchChartSeries.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSearchChartSeriesWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, +/// `ClickStackPieChartConfig` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackPieChartConfig`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `configType` field exactly as the request union is (absent +/// or non-string dispatches to the builder variant, unless the payload carries +/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each +/// variant's shape, so all-`Option` arms — which would match any object under +/// `untagged` matching — cannot misroute a payload, and the `unless` guard +/// keeps a raw-SQL payload with a dropped discriminator out of the total +/// builder arm. A payload that does not fit the variant its discriminator +/// selects lands in `Unknown` with the raw JSON intact. +/// +/// Deliberately has no `Default`: response values are produced by +/// deserialization, never constructed; build a [`ClickStackPieChartConfig`] instead when +/// writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackPieChartConfigResponse { + ClickStackPieRawSqlChartConfig(ClickStackPieRawSqlChartConfigResponse), + ClickStackPieBuilderChartConfig(ClickStackPieBuilderChartConfigResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSearchChartSeriesWherelanguage { +discriminated_union! { + ClickStackPieChartConfigResponse, "configType" { + "sql" => ClickStackPieRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackPieBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackPieChartConfigResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::ClickStackPieRawSqlChartConfig(_) => write!(f, "ClickStackPieRawSqlChartConfig"), + Self::ClickStackPieBuilderChartConfig(_) => { + write!(f, "ClickStackPieBuilderChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSelectItem.aggFn`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSelectItemAggfn { - #[serde(rename = "avg")] - #[default] - Avg, - #[serde(rename = "count")] - Count, - #[serde(rename = "count_distinct")] - Count_distinct, - #[serde(rename = "last_value")] - Last_value, - #[serde(rename = "max")] - Max, - #[serde(rename = "min")] - Min, - #[serde(rename = "quantile")] - Quantile, - #[serde(rename = "sum")] - Sum, - #[serde(rename = "any")] - Any, - #[serde(rename = "none")] - None, +/// `ClickStackSource` - one of multiple variants. +/// +/// Dispatched on the `kind` field; see the `discriminated_union!` +/// invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackSource { + ClickStackLogSource(ClickStackLogSource), + ClickStackTraceSource(ClickStackTraceSource), + ClickStackMetricSource(ClickStackMetricSource), + ClickStackSessionSource(ClickStackSessionSource), + ClickStackPromqlSource(ClickStackPromqlSource), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSelectItemAggfn { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Avg => write!(f, "avg"), - Self::Count => write!(f, "count"), - Self::Count_distinct => write!(f, "count_distinct"), - Self::Last_value => write!(f, "last_value"), - Self::Max => write!(f, "max"), - Self::Min => write!(f, "min"), - Self::Quantile => write!(f, "quantile"), - Self::Sum => write!(f, "sum"), - Self::Any => write!(f, "any"), - Self::None => write!(f, "none"), - Self::Unknown(s) => write!(f, "{s}"), - } +discriminated_union! { + ClickStackSource, "kind" { + "log" => ClickStackLogSource, + "trace" => ClickStackTraceSource, + "metric" => ClickStackMetricSource, + "session" => ClickStackSessionSource, + "promql" => ClickStackPromqlSource, } } -/// Inline enum for `ClickStackSelectItem.level`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSelectItemLevel { - #[serde(rename = "0.5")] - #[default] - _0_5, - #[serde(rename = "0.9")] - _0_9, - #[serde(rename = "0.95")] - _0_95, - #[serde(rename = "0.99")] - _0_99, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackSelectItemLevel { +impl std::fmt::Display for ClickStackSource { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::_0_5 => write!(f, "0.5"), - Self::_0_9 => write!(f, "0.9"), - Self::_0_95 => write!(f, "0.95"), - Self::_0_99 => write!(f, "0.99"), + Self::ClickStackLogSource(_) => write!(f, "ClickStackLogSource"), + Self::ClickStackTraceSource(_) => write!(f, "ClickStackTraceSource"), + Self::ClickStackMetricSource(_) => write!(f, "ClickStackMetricSource"), + Self::ClickStackSessionSource(_) => write!(f, "ClickStackSessionSource"), + Self::ClickStackPromqlSource(_) => write!(f, "ClickStackPromqlSource"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSelectItem.metricType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSelectItemMetrictype { - #[serde(rename = "sum")] - #[default] - Sum, - #[serde(rename = "gauge")] - Gauge, - #[serde(rename = "histogram")] - Histogram, - #[serde(rename = "summary")] - Summary, - #[serde(rename = "exponential histogram")] - Exponential_histogram, +/// `ClickStackSource` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackSource`]: each arm is the all-`Option` +/// response variant of its request struct, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `kind` field, exactly as the request union is: dispatch +/// reads the raw JSON rather than trying each variant's shape, so all-`Option` +/// arms — which would match any object under `untagged` matching — cannot +/// misroute a payload. A `kind` this crate does not know, or a payload that does +/// not fit the variant its `kind` selects, lands in `Unknown` with the raw JSON +/// intact. +/// +/// Deliberately has no `Default`: every arm's default would serialize to `{}`, +/// which carries no `kind` and so would not deserialize back to the same +/// variant. Build a [`ClickStackSource`] instead when writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackSourceResponse { + ClickStackLogSource(ClickStackLogSourceResponse), + ClickStackTraceSource(ClickStackTraceSourceResponse), + ClickStackMetricSource(ClickStackMetricSourceResponse), + ClickStackSessionSource(ClickStackSessionSourceResponse), + ClickStackPromqlSource(ClickStackPromqlSourceResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSelectItemMetrictype { +discriminated_union! { + ClickStackSourceResponse, "kind" { + "log" => ClickStackLogSource, + "trace" => ClickStackTraceSource, + "metric" => ClickStackMetricSource, + "session" => ClickStackSessionSource, + "promql" => ClickStackPromqlSource, + } +} + +impl std::fmt::Display for ClickStackSourceResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sum => write!(f, "sum"), - Self::Gauge => write!(f, "gauge"), - Self::Histogram => write!(f, "histogram"), - Self::Summary => write!(f, "summary"), - Self::Exponential_histogram => write!(f, "exponential histogram"), + Self::ClickStackLogSource(_) => write!(f, "ClickStackLogSource"), + Self::ClickStackTraceSource(_) => write!(f, "ClickStackTraceSource"), + Self::ClickStackMetricSource(_) => write!(f, "ClickStackMetricSource"), + Self::ClickStackSessionSource(_) => write!(f, "ClickStackSessionSource"), + Self::ClickStackPromqlSource(_) => write!(f, "ClickStackPromqlSource"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSelectItem.periodAggFn`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSelectItemPeriodaggfn { - #[serde(rename = "delta")] - #[default] - Delta, +/// `ClickStackTableChartConfig` - one of multiple variants. +/// +/// Dispatched on the `configType` field (absent or non-string dispatches to the +/// builder variant, unless the payload carries a raw-SQL-only key); see the +/// `discriminated_union!` invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackTableChartConfig { + ClickStackTableBuilderChartConfig(ClickStackTableBuilderChartConfig), + ClickStackTableRawSqlChartConfig(ClickStackTableRawSqlChartConfig), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSelectItemPeriodaggfn { +discriminated_union! { + ClickStackTableChartConfig, "configType" { + "sql" => ClickStackTableRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackTableBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackTableChartConfig { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Delta => write!(f, "delta"), + Self::ClickStackTableBuilderChartConfig(_) => { + write!(f, "ClickStackTableBuilderChartConfig") + } + Self::ClickStackTableRawSqlChartConfig(_) => { + write!(f, "ClickStackTableRawSqlChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSelectItem.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSelectItemWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, +/// `ClickStackTableChartConfig` - one of multiple variants, in response position. +/// +/// Response variant of [`ClickStackTableChartConfig`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `configType` field exactly as the request union is (absent +/// or non-string dispatches to the builder variant, unless the payload carries +/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each +/// variant's shape, so all-`Option` arms — which would match any object under +/// `untagged` matching — cannot misroute a payload, and the `unless` guard +/// keeps a raw-SQL payload with a dropped discriminator out of the total +/// builder arm. A payload that does not fit the variant its discriminator +/// selects lands in `Unknown` with the raw JSON intact. +/// +/// Deliberately has no `Default`: response values are produced by +/// deserialization, never constructed; build a [`ClickStackTableChartConfig`] instead when +/// writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackTableChartConfigResponse { + ClickStackTableRawSqlChartConfig(ClickStackTableRawSqlChartConfigResponse), + ClickStackTableBuilderChartConfig(ClickStackTableBuilderChartConfigResponse), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackSelectItemWherelanguage { +discriminated_union! { + ClickStackTableChartConfigResponse, "configType" { + "sql" => ClickStackTableRawSqlChartConfig, + none unless "connectionId" | "sqlTemplate" => ClickStackTableBuilderChartConfig, + } +} + +impl std::fmt::Display for ClickStackTableChartConfigResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::ClickStackTableRawSqlChartConfig(_) => { + write!(f, "ClickStackTableRawSqlChartConfig") + } + Self::ClickStackTableBuilderChartConfig(_) => { + write!(f, "ClickStackTableBuilderChartConfig") + } Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackSessionSource.kind`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSessionSourceKind { - #[serde(rename = "session")] - #[default] - Session, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackSessionSourceKind { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Session => write!(f, "session"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackSlackAPIWebhook.service`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSlackAPIWebhookService { - #[serde(rename = "slack_api")] - #[default] - Slack_api, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackSlackAPIWebhookService { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Slack_api => write!(f, "slack_api"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackSlackWebhook.service`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackSlackWebhookService { - #[serde(rename = "slack")] - #[default] - Slack, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackSlackWebhookService { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Slack => write!(f, "slack"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTableBuilderChartConfig.displayType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTableBuilderChartConfigDisplaytype { - #[serde(rename = "table")] - #[default] - Table, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTableBuilderChartConfigDisplaytype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Table => write!(f, "table"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTableChartSeries.aggFn`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTableChartSeriesAggfn { - #[serde(rename = "avg")] - #[default] - Avg, - #[serde(rename = "count")] - Count, - #[serde(rename = "count_distinct")] - Count_distinct, - #[serde(rename = "last_value")] - Last_value, - #[serde(rename = "max")] - Max, - #[serde(rename = "min")] - Min, - #[serde(rename = "quantile")] - Quantile, - #[serde(rename = "sum")] - Sum, - #[serde(rename = "any")] - Any, - #[serde(rename = "none")] - None, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTableChartSeriesAggfn { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Avg => write!(f, "avg"), - Self::Count => write!(f, "count"), - Self::Count_distinct => write!(f, "count_distinct"), - Self::Last_value => write!(f, "last_value"), - Self::Max => write!(f, "max"), - Self::Min => write!(f, "min"), - Self::Quantile => write!(f, "quantile"), - Self::Sum => write!(f, "sum"), - Self::Any => write!(f, "any"), - Self::None => write!(f, "none"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTableChartSeries.metricDataType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTableChartSeriesMetricdatatype { - #[serde(rename = "sum")] - #[default] - Sum, - #[serde(rename = "gauge")] - Gauge, - #[serde(rename = "histogram")] - Histogram, - #[serde(rename = "summary")] - Summary, - #[serde(rename = "exponential histogram")] - Exponential_histogram, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTableChartSeriesMetricdatatype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Sum => write!(f, "sum"), - Self::Gauge => write!(f, "gauge"), - Self::Histogram => write!(f, "histogram"), - Self::Summary => write!(f, "summary"), - Self::Exponential_histogram => write!(f, "exponential histogram"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTableChartSeries.sortOrder`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTableChartSeriesSortorder { - #[serde(rename = "desc")] - #[default] - Desc, - #[serde(rename = "asc")] - Asc, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTableChartSeriesSortorder { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Desc => write!(f, "desc"), - Self::Asc => write!(f, "asc"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTableChartSeries.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTableChartSeriesType { - #[serde(rename = "table")] - #[default] - Table, +/// `ClickStackTileConfig` - one of multiple variants. +/// +/// Dispatched on the `displayType` field; see the `discriminated_union!` +/// invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackTileConfig { + ClickStackCategoricalBarChartConfig(ClickStackCategoricalBarChartConfig), + ClickStackLineChartConfig(ClickStackLineChartConfig), + ClickStackBarChartConfig(ClickStackBarChartConfig), + ClickStackTableChartConfig(ClickStackTableChartConfig), + ClickStackNumberChartConfig(ClickStackNumberChartConfig), + ClickStackPieChartConfig(ClickStackPieChartConfig), + ClickStackHeatmapChartConfig(ClickStackHeatmapChartConfig), + ClickStackSearchChartConfig(ClickStackSearchChartConfig), + ClickStackEventPatternsChartConfig(ClickStackEventPatternsChartConfig), + ClickStackMarkdownChartConfig(ClickStackMarkdownChartConfig), /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -impl std::fmt::Display for ClickStackTableChartSeriesType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Table => write!(f, "table"), - Self::Unknown(s) => write!(f, "{s}"), - } +discriminated_union! { + ClickStackTileConfig, "displayType" { + "line" => ClickStackLineChartConfig, + "stacked_bar" => ClickStackBarChartConfig, + "bar" => ClickStackCategoricalBarChartConfig, + "table" => ClickStackTableChartConfig, + "number" => ClickStackNumberChartConfig, + "pie" => ClickStackPieChartConfig, + "heatmap" => ClickStackHeatmapChartConfig, + "search" => ClickStackSearchChartConfig, + "event_patterns" => ClickStackEventPatternsChartConfig, + "markdown" => ClickStackMarkdownChartConfig, } } -/// Inline enum for `ClickStackTableChartSeries.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTableChartSeriesWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTableChartSeriesWherelanguage { +impl std::fmt::Display for ClickStackTileConfig { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), + Self::ClickStackCategoricalBarChartConfig(_) => { + write!(f, "ClickStackCategoricalBarChartConfig") + } + Self::ClickStackLineChartConfig(_) => write!(f, "ClickStackLineChartConfig"), + Self::ClickStackBarChartConfig(_) => write!(f, "ClickStackBarChartConfig"), + Self::ClickStackTableChartConfig(_) => write!(f, "ClickStackTableChartConfig"), + Self::ClickStackNumberChartConfig(_) => write!(f, "ClickStackNumberChartConfig"), + Self::ClickStackPieChartConfig(_) => write!(f, "ClickStackPieChartConfig"), + Self::ClickStackHeatmapChartConfig(_) => write!(f, "ClickStackHeatmapChartConfig"), + Self::ClickStackSearchChartConfig(_) => write!(f, "ClickStackSearchChartConfig"), + Self::ClickStackEventPatternsChartConfig(_) => { + write!(f, "ClickStackEventPatternsChartConfig") + } + Self::ClickStackMarkdownChartConfig(_) => write!(f, "ClickStackMarkdownChartConfig"), Self::Unknown(s) => write!(f, "{s}"), } } } -/// Inline enum for `ClickStackTableRawSqlChartConfig.configType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTableRawSqlChartConfigConfigtype { - #[serde(rename = "sql")] - #[default] - Sql, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTableRawSqlChartConfigConfigtype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Sql => write!(f, "sql"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTableRawSqlChartConfig.displayType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTableRawSqlChartConfigDisplaytype { - #[serde(rename = "table")] - #[default] - Table, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTableRawSqlChartConfigDisplaytype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Table => write!(f, "table"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTimeChartSeries.aggFn`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTimeChartSeriesAggfn { - #[serde(rename = "avg")] - #[default] - Avg, - #[serde(rename = "count")] - Count, - #[serde(rename = "count_distinct")] - Count_distinct, - #[serde(rename = "last_value")] - Last_value, - #[serde(rename = "max")] - Max, - #[serde(rename = "min")] - Min, - #[serde(rename = "quantile")] - Quantile, - #[serde(rename = "sum")] - Sum, - #[serde(rename = "any")] - Any, - #[serde(rename = "none")] - None, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTimeChartSeriesAggfn { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Avg => write!(f, "avg"), - Self::Count => write!(f, "count"), - Self::Count_distinct => write!(f, "count_distinct"), - Self::Last_value => write!(f, "last_value"), - Self::Max => write!(f, "max"), - Self::Min => write!(f, "min"), - Self::Quantile => write!(f, "quantile"), - Self::Sum => write!(f, "sum"), - Self::Any => write!(f, "any"), - Self::None => write!(f, "none"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTimeChartSeries.displayType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTimeChartSeriesDisplaytype { - #[serde(rename = "stacked_bar")] - #[default] - Stacked_bar, - #[serde(rename = "line")] - Line, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTimeChartSeriesDisplaytype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Stacked_bar => write!(f, "stacked_bar"), - Self::Line => write!(f, "line"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTimeChartSeries.metricDataType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTimeChartSeriesMetricdatatype { - #[serde(rename = "sum")] - #[default] - Sum, - #[serde(rename = "gauge")] - Gauge, - #[serde(rename = "histogram")] - Histogram, - #[serde(rename = "summary")] - Summary, - #[serde(rename = "exponential histogram")] - Exponential_histogram, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTimeChartSeriesMetricdatatype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Sum => write!(f, "sum"), - Self::Gauge => write!(f, "gauge"), - Self::Histogram => write!(f, "histogram"), - Self::Summary => write!(f, "summary"), - Self::Exponential_histogram => write!(f, "exponential histogram"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTimeChartSeries.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTimeChartSeriesType { - #[serde(rename = "time")] - #[default] - Time, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTimeChartSeriesType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Time => write!(f, "time"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTimeChartSeries.whereLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTimeChartSeriesWherelanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTimeChartSeriesWherelanguage { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTraceSource.kind`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTraceSourceKind { - #[serde(rename = "trace")] - #[default] - Trace, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTraceSourceKind { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Trace => write!(f, "trace"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackTraceSource.useTextIndexForImplicitColumn`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackTraceSourceUsetextindexforimplicitcolumn { - #[serde(rename = "auto")] - #[default] - Auto, - #[serde(rename = "enabled")] - Enabled, - #[serde(rename = "disabled")] - Disabled, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackTraceSourceUsetextindexforimplicitcolumn { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Auto => write!(f, "auto"), - Self::Enabled => write!(f, "enabled"), - Self::Disabled => write!(f, "disabled"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackUpdateAlertRequest.interval`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackUpdateAlertRequestInterval { - #[serde(rename = "1m")] - #[default] - _1m, - #[serde(rename = "5m")] - _5m, - #[serde(rename = "15m")] - _15m, - #[serde(rename = "30m")] - _30m, - #[serde(rename = "1h")] - _1h, - #[serde(rename = "6h")] - _6h, - #[serde(rename = "12h")] - _12h, - #[serde(rename = "1d")] - _1d, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackUpdateAlertRequestInterval { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::_1m => write!(f, "1m"), - Self::_5m => write!(f, "5m"), - Self::_15m => write!(f, "15m"), - Self::_30m => write!(f, "30m"), - Self::_1h => write!(f, "1h"), - Self::_6h => write!(f, "6h"), - Self::_12h => write!(f, "12h"), - Self::_1d => write!(f, "1d"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackUpdateAlertRequest.source`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackUpdateAlertRequestSource { - #[serde(rename = "saved_search")] - #[default] - Saved_search, - #[serde(rename = "tile")] - Tile, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackUpdateAlertRequestSource { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Saved_search => write!(f, "saved_search"), - Self::Tile => write!(f, "tile"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackUpdateAlertRequest.thresholdType`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackUpdateAlertRequestThresholdtype { - #[serde(rename = "above")] - #[default] - Above, - #[serde(rename = "below")] - Below, - #[serde(rename = "above_exclusive")] - Above_exclusive, - #[serde(rename = "below_or_equal")] - Below_or_equal, - #[serde(rename = "equal")] - Equal, - #[serde(rename = "not_equal")] - Not_equal, - #[serde(rename = "between")] - Between, - #[serde(rename = "not_between")] - Not_between, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackUpdateAlertRequestThresholdtype { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Above => write!(f, "above"), - Self::Below => write!(f, "below"), - Self::Above_exclusive => write!(f, "above_exclusive"), - Self::Below_or_equal => write!(f, "below_or_equal"), - Self::Equal => write!(f, "equal"), - Self::Not_equal => write!(f, "not_equal"), - Self::Between => write!(f, "between"), - Self::Not_between => write!(f, "not_between"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackUpdateDashboardRequest.savedQueryLanguage`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackUpdateDashboardRequestSavedquerylanguage { - #[serde(rename = "sql")] - #[default] - Sql, - #[serde(rename = "lucene")] - Lucene, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackUpdateDashboardRequestSavedquerylanguage { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Sql => write!(f, "sql"), - Self::Lucene => write!(f, "lucene"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ClickStackWebhookInput.service`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ClickStackWebhookInputService { - #[serde(rename = "slack")] - #[default] - Slack, - #[serde(rename = "incidentio")] - Incidentio, - #[serde(rename = "generic")] - Generic, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ClickStackWebhookInputService { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Slack => write!(f, "slack"), - Self::Incidentio => write!(f, "incidentio"), - Self::Generic => write!(f, "generic"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `CreateReversePrivateEndpoint.mskAuthentication`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum CreateReversePrivateEndpointMskauthentication { - #[default] - SASL_IAM, - SASL_SCRAM, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for CreateReversePrivateEndpointMskauthentication { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::SASL_IAM => write!(f, "SASL_IAM"), - Self::SASL_SCRAM => write!(f, "SASL_SCRAM"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `CreateReversePrivateEndpoint.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum CreateReversePrivateEndpointType { - #[default] - VPC_ENDPOINT_SERVICE, - VPC_RESOURCE, - MSK_MULTI_VPC, - GCP_PSC_SERVICE_ATTACHMENT, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for CreateReversePrivateEndpointType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::VPC_ENDPOINT_SERVICE => write!(f, "VPC_ENDPOINT_SERVICE"), - Self::VPC_RESOURCE => write!(f, "VPC_RESOURCE"), - Self::MSK_MULTI_VPC => write!(f, "MSK_MULTI_VPC"), - Self::GCP_PSC_SERVICE_ATTACHMENT => write!(f, "GCP_PSC_SERVICE_ATTACHMENT"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ReversePrivateEndpoint.mskAuthentication`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ReversePrivateEndpointMskauthentication { - #[default] - SASL_IAM, - SASL_SCRAM, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ReversePrivateEndpointMskauthentication { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::SASL_IAM => write!(f, "SASL_IAM"), - Self::SASL_SCRAM => write!(f, "SASL_SCRAM"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ReversePrivateEndpoint.status`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ReversePrivateEndpointStatus { - #[default] - Unknown, - Provisioning, - Deleting, - Ready, - Failed, - PendingAcceptance, - Rejected, - Expired, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Other(String), -} - -impl std::fmt::Display for ReversePrivateEndpointStatus { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Unknown => write!(f, "Unknown"), - Self::Provisioning => write!(f, "Provisioning"), - Self::Deleting => write!(f, "Deleting"), - Self::Ready => write!(f, "Ready"), - Self::Failed => write!(f, "Failed"), - Self::PendingAcceptance => write!(f, "PendingAcceptance"), - Self::Rejected => write!(f, "Rejected"), - Self::Expired => write!(f, "Expired"), - Self::Other(s) => write!(f, "{s}"), - } - } -} - -/// Inline enum for `ReversePrivateEndpoint.type`. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub enum ReversePrivateEndpointType { - #[default] - VPC_ENDPOINT_SERVICE, - VPC_RESOURCE, - MSK_MULTI_VPC, - GCP_PSC_SERVICE_ATTACHMENT, - /// Catch-all for unknown or newly-added values. - #[serde(untagged)] - Unknown(String), -} - -impl std::fmt::Display for ReversePrivateEndpointType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::VPC_ENDPOINT_SERVICE => write!(f, "VPC_ENDPOINT_SERVICE"), - Self::VPC_RESOURCE => write!(f, "VPC_RESOURCE"), - Self::MSK_MULTI_VPC => write!(f, "MSK_MULTI_VPC"), - Self::GCP_PSC_SERVICE_ATTACHMENT => write!(f, "GCP_PSC_SERVICE_ATTACHMENT"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackAlertChannel` - one of multiple variants. -/// -/// Dispatched on the `type` field; see the `discriminated_union!` -/// invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackAlertChannel { - ClickStackAlertChannelEmail(ClickStackAlertChannelEmail), - ClickStackAlertChannelWebhook(ClickStackAlertChannelWebhook), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackAlertChannel, "type" { - "email" => ClickStackAlertChannelEmail, - "webhook" => ClickStackAlertChannelWebhook, - } -} - -impl std::fmt::Display for ClickStackAlertChannel { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackAlertChannelEmail(_) => write!(f, "ClickStackAlertChannelEmail"), - Self::ClickStackAlertChannelWebhook(_) => write!(f, "ClickStackAlertChannelWebhook"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackAlertChannel` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackAlertChannel`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `type` field, exactly as the request union is: dispatch -/// reads the raw JSON rather than trying each variant's shape, so all-`Option` -/// arms — which would match any object under `untagged` matching — cannot -/// misroute a payload. A `type` this crate does not know, or a payload that -/// does not fit the variant its `type` selects, lands in `Unknown` with the -/// raw JSON intact. -/// -/// Deliberately has no `Default`: every arm's default would serialize to `{}`, -/// which carries no `type` and so would not deserialize back to the same -/// variant. Build a [`ClickStackAlertChannel`] instead when writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackAlertChannelResponse { - ClickStackAlertChannelEmail(ClickStackAlertChannelEmailResponse), - ClickStackAlertChannelWebhook(ClickStackAlertChannelWebhookResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackAlertChannelResponse, "type" { - "email" => ClickStackAlertChannelEmail, - "webhook" => ClickStackAlertChannelWebhook, - } -} - -impl std::fmt::Display for ClickStackAlertChannelResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackAlertChannelEmail(_) => write!(f, "ClickStackAlertChannelEmail"), - Self::ClickStackAlertChannelWebhook(_) => write!(f, "ClickStackAlertChannelWebhook"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackBarChartConfig` - one of multiple variants. -/// -/// Dispatched on the `configType` field (absent or non-string dispatches to the -/// builder variant, unless the payload carries a raw-SQL-only key); see the -/// `discriminated_union!` invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackBarChartConfig { - ClickStackBarBuilderChartConfig(ClickStackBarBuilderChartConfig), - ClickStackBarRawSqlChartConfig(ClickStackBarRawSqlChartConfig), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackBarChartConfig, "configType" { - "sql" => ClickStackBarRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackBarBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackBarChartConfig { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackBarBuilderChartConfig(_) => { - write!(f, "ClickStackBarBuilderChartConfig") - } - Self::ClickStackBarRawSqlChartConfig(_) => write!(f, "ClickStackBarRawSqlChartConfig"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackBarChartConfig` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackBarChartConfig`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `configType` field exactly as the request union is (absent -/// or non-string dispatches to the builder variant, unless the payload carries -/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each -/// variant's shape, so all-`Option` arms — which would match any object under -/// `untagged` matching — cannot misroute a payload, and the `unless` guard -/// keeps a raw-SQL payload with a dropped discriminator out of the total -/// builder arm. A payload that does not fit the variant its discriminator -/// selects lands in `Unknown` with the raw JSON intact. -/// -/// Deliberately has no `Default`: response values are produced by -/// deserialization, never constructed; build a [`ClickStackBarChartConfig`] instead when -/// writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackBarChartConfigResponse { - ClickStackBarRawSqlChartConfig(ClickStackBarRawSqlChartConfigResponse), - ClickStackBarBuilderChartConfig(ClickStackBarBuilderChartConfigResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackBarChartConfigResponse, "configType" { - "sql" => ClickStackBarRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackBarBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackBarChartConfigResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackBarRawSqlChartConfig(_) => write!(f, "ClickStackBarRawSqlChartConfig"), - Self::ClickStackBarBuilderChartConfig(_) => { - write!(f, "ClickStackBarBuilderChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackCategoricalBarChartConfig` - one of multiple variants. -/// -/// Dispatched on the `configType` field (absent or non-string dispatches to the -/// builder variant, unless the payload carries a raw-SQL-only key); see the -/// `discriminated_union!` invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackCategoricalBarChartConfig { - ClickStackCategoricalBarBuilderChartConfig(ClickStackCategoricalBarBuilderChartConfig), - ClickStackCategoricalBarRawSqlChartConfig(ClickStackCategoricalBarRawSqlChartConfig), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackCategoricalBarChartConfig, "configType" { - "sql" => ClickStackCategoricalBarRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackCategoricalBarBuilderChartConfig, - } -} - -impl Default for ClickStackCategoricalBarChartConfig { - fn default() -> Self { - Self::ClickStackCategoricalBarBuilderChartConfig( - ClickStackCategoricalBarBuilderChartConfig::default(), - ) - } -} - -impl std::fmt::Display for ClickStackCategoricalBarChartConfig { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackCategoricalBarBuilderChartConfig(_) => { - write!(f, "ClickStackCategoricalBarBuilderChartConfig") - } - Self::ClickStackCategoricalBarRawSqlChartConfig(_) => { - write!(f, "ClickStackCategoricalBarRawSqlChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackCategoricalBarChartConfig` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackCategoricalBarChartConfig`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `configType` field exactly as the request union is (absent -/// or non-string dispatches to the builder variant, unless the payload carries -/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each -/// variant's shape, so all-`Option` arms — which would match any object under -/// `untagged` matching — cannot misroute a payload, and the `unless` guard -/// keeps a raw-SQL payload with a dropped discriminator out of the total -/// builder arm. A payload that does not fit the variant its discriminator -/// selects lands in `Unknown` with the raw JSON intact. -/// -/// Deliberately has no `Default`: response values are produced by -/// deserialization, never constructed; build a [`ClickStackCategoricalBarChartConfig`] instead when -/// writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackCategoricalBarChartConfigResponse { - ClickStackCategoricalBarRawSqlChartConfig(ClickStackCategoricalBarRawSqlChartConfigResponse), - ClickStackCategoricalBarBuilderChartConfig(ClickStackCategoricalBarBuilderChartConfigResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackCategoricalBarChartConfigResponse, "configType" { - "sql" => ClickStackCategoricalBarRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackCategoricalBarBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackCategoricalBarChartConfigResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackCategoricalBarRawSqlChartConfig(_) => { - write!(f, "ClickStackCategoricalBarRawSqlChartConfig") - } - Self::ClickStackCategoricalBarBuilderChartConfig(_) => { - write!(f, "ClickStackCategoricalBarBuilderChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackDashboardChartSeries` - one of multiple variants. -/// -/// Dispatched on the `type` field; see the `discriminated_union!` -/// invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackDashboardChartSeries { - ClickStackTimeChartSeries(ClickStackTimeChartSeries), - ClickStackTableChartSeries(ClickStackTableChartSeries), - ClickStackNumberChartSeries(ClickStackNumberChartSeries), - ClickStackSearchChartSeries(ClickStackSearchChartSeries), - ClickStackMarkdownChartSeries(ClickStackMarkdownChartSeries), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackDashboardChartSeries, "type" { - "time" => ClickStackTimeChartSeries, - "table" => ClickStackTableChartSeries, - "number" => ClickStackNumberChartSeries, - "search" => ClickStackSearchChartSeries, - "markdown" => ClickStackMarkdownChartSeries, - } -} - -impl std::fmt::Display for ClickStackDashboardChartSeries { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackTimeChartSeries(_) => write!(f, "ClickStackTimeChartSeries"), - Self::ClickStackTableChartSeries(_) => write!(f, "ClickStackTableChartSeries"), - Self::ClickStackNumberChartSeries(_) => write!(f, "ClickStackNumberChartSeries"), - Self::ClickStackSearchChartSeries(_) => write!(f, "ClickStackSearchChartSeries"), - Self::ClickStackMarkdownChartSeries(_) => write!(f, "ClickStackMarkdownChartSeries"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackLineChartConfig` - one of multiple variants. -/// -/// Dispatched on the `configType` field (absent or non-string dispatches to the -/// builder variant, unless the payload carries a raw-SQL-only key); see the -/// `discriminated_union!` invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackLineChartConfig { - ClickStackLineBuilderChartConfig(ClickStackLineBuilderChartConfig), - ClickStackLineRawSqlChartConfig(ClickStackLineRawSqlChartConfig), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackLineChartConfig, "configType" { - "sql" => ClickStackLineRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackLineBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackLineChartConfig { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackLineBuilderChartConfig(_) => { - write!(f, "ClickStackLineBuilderChartConfig") - } - Self::ClickStackLineRawSqlChartConfig(_) => { - write!(f, "ClickStackLineRawSqlChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackLineChartConfig` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackLineChartConfig`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `configType` field exactly as the request union is (absent -/// or non-string dispatches to the builder variant, unless the payload carries -/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each -/// variant's shape, so all-`Option` arms — which would match any object under -/// `untagged` matching — cannot misroute a payload, and the `unless` guard -/// keeps a raw-SQL payload with a dropped discriminator out of the total -/// builder arm. A payload that does not fit the variant its discriminator -/// selects lands in `Unknown` with the raw JSON intact. -/// -/// Deliberately has no `Default`: response values are produced by -/// deserialization, never constructed; build a [`ClickStackLineChartConfig`] instead when -/// writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackLineChartConfigResponse { - ClickStackLineRawSqlChartConfig(ClickStackLineRawSqlChartConfigResponse), - ClickStackLineBuilderChartConfig(ClickStackLineBuilderChartConfigResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackLineChartConfigResponse, "configType" { - "sql" => ClickStackLineRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackLineBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackLineChartConfigResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackLineRawSqlChartConfig(_) => { - write!(f, "ClickStackLineRawSqlChartConfig") - } - Self::ClickStackLineBuilderChartConfig(_) => { - write!(f, "ClickStackLineBuilderChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackNumberChartConfig` - one of multiple variants. -/// -/// Dispatched on the `configType` field (absent or non-string dispatches to the -/// builder variant, unless the payload carries a raw-SQL-only key); see the -/// `discriminated_union!` invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackNumberChartConfig { - ClickStackNumberBuilderChartConfig(ClickStackNumberBuilderChartConfig), - ClickStackNumberRawSqlChartConfig(ClickStackNumberRawSqlChartConfig), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackNumberChartConfig, "configType" { - "sql" => ClickStackNumberRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackNumberBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackNumberChartConfig { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackNumberBuilderChartConfig(_) => { - write!(f, "ClickStackNumberBuilderChartConfig") - } - Self::ClickStackNumberRawSqlChartConfig(_) => { - write!(f, "ClickStackNumberRawSqlChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackNumberChartConfig` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackNumberChartConfig`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `configType` field exactly as the request union is (absent -/// or non-string dispatches to the builder variant, unless the payload carries -/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each -/// variant's shape, so all-`Option` arms — which would match any object under -/// `untagged` matching — cannot misroute a payload, and the `unless` guard -/// keeps a raw-SQL payload with a dropped discriminator out of the total -/// builder arm. A payload that does not fit the variant its discriminator -/// selects lands in `Unknown` with the raw JSON intact. -/// -/// Deliberately has no `Default`: response values are produced by -/// deserialization, never constructed; build a [`ClickStackNumberChartConfig`] instead when -/// writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackNumberChartConfigResponse { - ClickStackNumberRawSqlChartConfig(ClickStackNumberRawSqlChartConfigResponse), - ClickStackNumberBuilderChartConfig(ClickStackNumberBuilderChartConfigResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackNumberChartConfigResponse, "configType" { - "sql" => ClickStackNumberRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackNumberBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackNumberChartConfigResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackNumberRawSqlChartConfig(_) => { - write!(f, "ClickStackNumberRawSqlChartConfig") - } - Self::ClickStackNumberBuilderChartConfig(_) => { - write!(f, "ClickStackNumberBuilderChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackNumberTileColorCondition` - one of multiple variants. -/// -/// Dispatched on the `operator` field; see the `discriminated_union!` -/// invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackNumberTileColorCondition { - ClickStackNumericColorCondition(ClickStackNumericColorCondition), - ClickStackBetweenColorCondition(ClickStackBetweenColorCondition), - ClickStackEqualityColorCondition(ClickStackEqualityColorCondition), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackNumberTileColorCondition, "operator" { - "gt" | "gte" | "lt" | "lte" => ClickStackNumericColorCondition, - "between" => ClickStackBetweenColorCondition, - "eq" | "neq" => ClickStackEqualityColorCondition, - } -} - -impl std::fmt::Display for ClickStackNumberTileColorCondition { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackNumericColorCondition(_) => { - write!(f, "ClickStackNumericColorCondition") - } - Self::ClickStackBetweenColorCondition(_) => { - write!(f, "ClickStackBetweenColorCondition") - } - Self::ClickStackEqualityColorCondition(_) => { - write!(f, "ClickStackEqualityColorCondition") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackNumberTileColorCondition` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackNumberTileColorCondition`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `operator` field, exactly as the request union is: dispatch -/// reads the raw JSON rather than trying each variant's shape, so all-`Option` -/// arms — which would match any object under `untagged` matching — cannot -/// misroute a payload. A `operator` this crate does not know, or a payload that -/// does not fit the variant its `operator` selects, lands in `Unknown` with the -/// raw JSON intact. -/// -/// Deliberately has no `Default`: every arm's default would serialize to `{}`, -/// which carries no `operator` and so would not deserialize back to the same -/// variant. Build a [`ClickStackNumberTileColorCondition`] instead when writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackNumberTileColorConditionResponse { - ClickStackNumericColorCondition(ClickStackNumericColorConditionResponse), - ClickStackBetweenColorCondition(ClickStackBetweenColorConditionResponse), - ClickStackEqualityColorCondition(ClickStackEqualityColorConditionResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackNumberTileColorConditionResponse, "operator" { - "gt" | "gte" | "lt" | "lte" => ClickStackNumericColorCondition, - "between" => ClickStackBetweenColorCondition, - "eq" | "neq" => ClickStackEqualityColorCondition, - } -} - -impl std::fmt::Display for ClickStackNumberTileColorConditionResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackNumericColorCondition(_) => { - write!(f, "ClickStackNumericColorCondition") - } - Self::ClickStackBetweenColorCondition(_) => { - write!(f, "ClickStackBetweenColorCondition") - } - Self::ClickStackEqualityColorCondition(_) => { - write!(f, "ClickStackEqualityColorCondition") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackOnClick` - one of multiple variants. -/// -/// Dispatched on the `type` field; see the `discriminated_union!` -/// invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackOnClick { - ClickStackOnClickSearch(ClickStackOnClickSearch), - ClickStackOnClickDashboard(ClickStackOnClickDashboard), - ClickStackOnClickExternal(ClickStackOnClickExternal), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackOnClick, "type" { - "search" => ClickStackOnClickSearch, - "dashboard" => ClickStackOnClickDashboard, - "external" => ClickStackOnClickExternal, - } -} - -impl Default for ClickStackOnClick { - fn default() -> Self { - Self::Unknown(serde_json::Value::Null) - } -} - -impl std::fmt::Display for ClickStackOnClick { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackOnClickSearch(_) => write!(f, "ClickStackOnClickSearch"), - Self::ClickStackOnClickDashboard(_) => write!(f, "ClickStackOnClickDashboard"), - Self::ClickStackOnClickExternal(_) => write!(f, "ClickStackOnClickExternal"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackOnClick` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackOnClick`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `type` field, exactly as the request union is: dispatch -/// reads the raw JSON rather than trying each variant's shape, so all-`Option` -/// arms — which would match any object under `untagged` matching — cannot -/// misroute a payload. A `type` this crate does not know, or a payload that -/// does not fit the variant its `type` selects, lands in `Unknown` with the -/// raw JSON intact. -/// -/// Deliberately has no `Default`: every arm's default would serialize to `{}`, -/// which carries no `type` and so would not deserialize back to the same -/// variant. Build a [`ClickStackOnClick`] instead when writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackOnClickResponse { - ClickStackOnClickSearch(ClickStackOnClickSearchResponse), - ClickStackOnClickDashboard(ClickStackOnClickDashboardResponse), - ClickStackOnClickExternal(ClickStackOnClickExternalResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackOnClickResponse, "type" { - "search" => ClickStackOnClickSearch, - "dashboard" => ClickStackOnClickDashboard, - "external" => ClickStackOnClickExternal, - } -} - -impl std::fmt::Display for ClickStackOnClickResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackOnClickSearch(_) => write!(f, "ClickStackOnClickSearch"), - Self::ClickStackOnClickDashboard(_) => write!(f, "ClickStackOnClickDashboard"), - Self::ClickStackOnClickExternal(_) => write!(f, "ClickStackOnClickExternal"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackOnClickTarget` - one of multiple variants. -/// -/// Dispatched on the `mode` field; see the `discriminated_union!` -/// invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackOnClickTarget { - ClickStackOnClickTargetIdVariant(ClickStackOnClickTargetIdVariant), - ClickStackOnClickTargetTemplateVariant(ClickStackOnClickTargetTemplateVariant), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackOnClickTarget, "mode" { - "id" => ClickStackOnClickTargetIdVariant, - "template" => ClickStackOnClickTargetTemplateVariant, - } -} - -impl Default for ClickStackOnClickTarget { - fn default() -> Self { - Self::Unknown(serde_json::Value::Null) - } -} - -impl std::fmt::Display for ClickStackOnClickTarget { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackOnClickTargetIdVariant(_) => { - write!(f, "ClickStackOnClickTargetIdVariant") - } - Self::ClickStackOnClickTargetTemplateVariant(_) => { - write!(f, "ClickStackOnClickTargetTemplateVariant") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackOnClickTarget` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackOnClickTarget`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `mode` field, exactly as the request union is: dispatch -/// reads the raw JSON rather than trying each variant's shape, so all-`Option` -/// arms — which would match any object under `untagged` matching — cannot -/// misroute a payload. A `mode` this crate does not know, or a payload that -/// does not fit the variant its `mode` selects, lands in `Unknown` with the -/// raw JSON intact. -/// -/// Deliberately has no `Default`: every arm's default would serialize to `{}`, -/// which carries no `mode` and so would not deserialize back to the same -/// variant. Build a [`ClickStackOnClickTarget`] instead when writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackOnClickTargetResponse { - ClickStackOnClickTargetIdVariant(ClickStackOnClickTargetIdVariantResponse), - ClickStackOnClickTargetTemplateVariant(ClickStackOnClickTargetTemplateVariantResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackOnClickTargetResponse, "mode" { - "id" => ClickStackOnClickTargetIdVariant, - "template" => ClickStackOnClickTargetTemplateVariant, - } -} - -impl std::fmt::Display for ClickStackOnClickTargetResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackOnClickTargetIdVariant(_) => { - write!(f, "ClickStackOnClickTargetIdVariant") - } - Self::ClickStackOnClickTargetTemplateVariant(_) => { - write!(f, "ClickStackOnClickTargetTemplateVariant") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackPieChartConfig` - one of multiple variants. -/// -/// Dispatched on the `configType` field (absent or non-string dispatches to the -/// builder variant, unless the payload carries a raw-SQL-only key); see the -/// `discriminated_union!` invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackPieChartConfig { - ClickStackPieBuilderChartConfig(ClickStackPieBuilderChartConfig), - ClickStackPieRawSqlChartConfig(ClickStackPieRawSqlChartConfig), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackPieChartConfig, "configType" { - "sql" => ClickStackPieRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackPieBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackPieChartConfig { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackPieBuilderChartConfig(_) => { - write!(f, "ClickStackPieBuilderChartConfig") - } - Self::ClickStackPieRawSqlChartConfig(_) => write!(f, "ClickStackPieRawSqlChartConfig"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackPieChartConfig` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackPieChartConfig`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `configType` field exactly as the request union is (absent -/// or non-string dispatches to the builder variant, unless the payload carries -/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each -/// variant's shape, so all-`Option` arms — which would match any object under -/// `untagged` matching — cannot misroute a payload, and the `unless` guard -/// keeps a raw-SQL payload with a dropped discriminator out of the total -/// builder arm. A payload that does not fit the variant its discriminator -/// selects lands in `Unknown` with the raw JSON intact. -/// -/// Deliberately has no `Default`: response values are produced by -/// deserialization, never constructed; build a [`ClickStackPieChartConfig`] instead when -/// writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackPieChartConfigResponse { - ClickStackPieRawSqlChartConfig(ClickStackPieRawSqlChartConfigResponse), - ClickStackPieBuilderChartConfig(ClickStackPieBuilderChartConfigResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackPieChartConfigResponse, "configType" { - "sql" => ClickStackPieRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackPieBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackPieChartConfigResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackPieRawSqlChartConfig(_) => write!(f, "ClickStackPieRawSqlChartConfig"), - Self::ClickStackPieBuilderChartConfig(_) => { - write!(f, "ClickStackPieBuilderChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackSource` - one of multiple variants. -/// -/// Dispatched on the `kind` field; see the `discriminated_union!` -/// invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackSource { - ClickStackLogSource(ClickStackLogSource), - ClickStackTraceSource(ClickStackTraceSource), - ClickStackMetricSource(ClickStackMetricSource), - ClickStackSessionSource(ClickStackSessionSource), - ClickStackPromqlSource(ClickStackPromqlSource), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackSource, "kind" { - "log" => ClickStackLogSource, - "trace" => ClickStackTraceSource, - "metric" => ClickStackMetricSource, - "session" => ClickStackSessionSource, - "promql" => ClickStackPromqlSource, - } -} - -impl std::fmt::Display for ClickStackSource { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackLogSource(_) => write!(f, "ClickStackLogSource"), - Self::ClickStackTraceSource(_) => write!(f, "ClickStackTraceSource"), - Self::ClickStackMetricSource(_) => write!(f, "ClickStackMetricSource"), - Self::ClickStackSessionSource(_) => write!(f, "ClickStackSessionSource"), - Self::ClickStackPromqlSource(_) => write!(f, "ClickStackPromqlSource"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackSource` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackSource`]: each arm is the all-`Option` -/// response variant of its request struct, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `kind` field, exactly as the request union is: dispatch -/// reads the raw JSON rather than trying each variant's shape, so all-`Option` -/// arms — which would match any object under `untagged` matching — cannot -/// misroute a payload. A `kind` this crate does not know, or a payload that does -/// not fit the variant its `kind` selects, lands in `Unknown` with the raw JSON -/// intact. -/// -/// Deliberately has no `Default`: every arm's default would serialize to `{}`, -/// which carries no `kind` and so would not deserialize back to the same -/// variant. Build a [`ClickStackSource`] instead when writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackSourceResponse { - ClickStackLogSource(ClickStackLogSourceResponse), - ClickStackTraceSource(ClickStackTraceSourceResponse), - ClickStackMetricSource(ClickStackMetricSourceResponse), - ClickStackSessionSource(ClickStackSessionSourceResponse), - ClickStackPromqlSource(ClickStackPromqlSourceResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackSourceResponse, "kind" { - "log" => ClickStackLogSource, - "trace" => ClickStackTraceSource, - "metric" => ClickStackMetricSource, - "session" => ClickStackSessionSource, - "promql" => ClickStackPromqlSource, - } -} - -impl std::fmt::Display for ClickStackSourceResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackLogSource(_) => write!(f, "ClickStackLogSource"), - Self::ClickStackTraceSource(_) => write!(f, "ClickStackTraceSource"), - Self::ClickStackMetricSource(_) => write!(f, "ClickStackMetricSource"), - Self::ClickStackSessionSource(_) => write!(f, "ClickStackSessionSource"), - Self::ClickStackPromqlSource(_) => write!(f, "ClickStackPromqlSource"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackTableChartConfig` - one of multiple variants. -/// -/// Dispatched on the `configType` field (absent or non-string dispatches to the -/// builder variant, unless the payload carries a raw-SQL-only key); see the -/// `discriminated_union!` invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackTableChartConfig { - ClickStackTableBuilderChartConfig(ClickStackTableBuilderChartConfig), - ClickStackTableRawSqlChartConfig(ClickStackTableRawSqlChartConfig), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackTableChartConfig, "configType" { - "sql" => ClickStackTableRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackTableBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackTableChartConfig { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackTableBuilderChartConfig(_) => { - write!(f, "ClickStackTableBuilderChartConfig") - } - Self::ClickStackTableRawSqlChartConfig(_) => { - write!(f, "ClickStackTableRawSqlChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackTableChartConfig` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackTableChartConfig`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `configType` field exactly as the request union is (absent -/// or non-string dispatches to the builder variant, unless the payload carries -/// a raw-SQL-only key): dispatch reads the raw JSON rather than trying each -/// variant's shape, so all-`Option` arms — which would match any object under -/// `untagged` matching — cannot misroute a payload, and the `unless` guard -/// keeps a raw-SQL payload with a dropped discriminator out of the total -/// builder arm. A payload that does not fit the variant its discriminator -/// selects lands in `Unknown` with the raw JSON intact. -/// -/// Deliberately has no `Default`: response values are produced by -/// deserialization, never constructed; build a [`ClickStackTableChartConfig`] instead when -/// writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackTableChartConfigResponse { - ClickStackTableRawSqlChartConfig(ClickStackTableRawSqlChartConfigResponse), - ClickStackTableBuilderChartConfig(ClickStackTableBuilderChartConfigResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackTableChartConfigResponse, "configType" { - "sql" => ClickStackTableRawSqlChartConfig, - none unless "connectionId" | "sqlTemplate" => ClickStackTableBuilderChartConfig, - } -} - -impl std::fmt::Display for ClickStackTableChartConfigResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackTableRawSqlChartConfig(_) => { - write!(f, "ClickStackTableRawSqlChartConfig") - } - Self::ClickStackTableBuilderChartConfig(_) => { - write!(f, "ClickStackTableBuilderChartConfig") - } - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackTileConfig` - one of multiple variants. -/// -/// Dispatched on the `displayType` field; see the `discriminated_union!` -/// invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackTileConfig { - ClickStackCategoricalBarChartConfig(ClickStackCategoricalBarChartConfig), - ClickStackLineChartConfig(ClickStackLineChartConfig), - ClickStackBarChartConfig(ClickStackBarChartConfig), - ClickStackTableChartConfig(ClickStackTableChartConfig), - ClickStackNumberChartConfig(ClickStackNumberChartConfig), - ClickStackPieChartConfig(ClickStackPieChartConfig), - ClickStackHeatmapChartConfig(ClickStackHeatmapChartConfig), - ClickStackSearchChartConfig(ClickStackSearchChartConfig), - ClickStackEventPatternsChartConfig(ClickStackEventPatternsChartConfig), - ClickStackMarkdownChartConfig(ClickStackMarkdownChartConfig), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackTileConfig, "displayType" { - "line" => ClickStackLineChartConfig, - "stacked_bar" => ClickStackBarChartConfig, - "bar" => ClickStackCategoricalBarChartConfig, - "table" => ClickStackTableChartConfig, - "number" => ClickStackNumberChartConfig, - "pie" => ClickStackPieChartConfig, - "heatmap" => ClickStackHeatmapChartConfig, - "search" => ClickStackSearchChartConfig, - "event_patterns" => ClickStackEventPatternsChartConfig, - "markdown" => ClickStackMarkdownChartConfig, - } -} - -impl std::fmt::Display for ClickStackTileConfig { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackCategoricalBarChartConfig(_) => { - write!(f, "ClickStackCategoricalBarChartConfig") - } - Self::ClickStackLineChartConfig(_) => write!(f, "ClickStackLineChartConfig"), - Self::ClickStackBarChartConfig(_) => write!(f, "ClickStackBarChartConfig"), - Self::ClickStackTableChartConfig(_) => write!(f, "ClickStackTableChartConfig"), - Self::ClickStackNumberChartConfig(_) => write!(f, "ClickStackNumberChartConfig"), - Self::ClickStackPieChartConfig(_) => write!(f, "ClickStackPieChartConfig"), - Self::ClickStackHeatmapChartConfig(_) => write!(f, "ClickStackHeatmapChartConfig"), - Self::ClickStackSearchChartConfig(_) => write!(f, "ClickStackSearchChartConfig"), - Self::ClickStackEventPatternsChartConfig(_) => { - write!(f, "ClickStackEventPatternsChartConfig") - } - Self::ClickStackMarkdownChartConfig(_) => write!(f, "ClickStackMarkdownChartConfig"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackTileConfig` - one of multiple variants, in response position. -/// -/// Response variant of [`ClickStackTileConfig`]: each arm is the all-`Option` -/// response variant of its request type, so a field the API drops or sends as -/// `null` deserializes to `None` instead of failing. -/// -/// Dispatched on the `displayType` field, exactly as the request union is: dispatch -/// reads the raw JSON rather than trying each variant's shape, so all-`Option` -/// arms — which would match any object under `untagged` matching — cannot -/// misroute a payload. A `displayType` this crate does not know, or a payload that -/// does not fit the variant its `displayType` selects, lands in `Unknown` with the -/// raw JSON intact. -/// -/// Deliberately has no `Default`: every arm's default would serialize to `{}`, -/// which carries no `displayType` and so would not deserialize back to the same -/// variant. Build a [`ClickStackTileConfig`] instead when writing. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackTileConfigResponse { - ClickStackLineChartConfig(ClickStackLineChartConfigResponse), - ClickStackBarChartConfig(ClickStackBarChartConfigResponse), - ClickStackCategoricalBarChartConfig(ClickStackCategoricalBarChartConfigResponse), - ClickStackTableChartConfig(ClickStackTableChartConfigResponse), - ClickStackNumberChartConfig(ClickStackNumberChartConfigResponse), - ClickStackPieChartConfig(ClickStackPieChartConfigResponse), - ClickStackHeatmapChartConfig(ClickStackHeatmapChartConfigResponse), - ClickStackSearchChartConfig(ClickStackSearchChartConfigResponse), - ClickStackEventPatternsChartConfig(ClickStackEventPatternsChartConfigResponse), - ClickStackMarkdownChartConfig(ClickStackMarkdownChartConfigResponse), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackTileConfigResponse, "displayType" { - "line" => ClickStackLineChartConfig, - "stacked_bar" => ClickStackBarChartConfig, - "bar" => ClickStackCategoricalBarChartConfig, - "table" => ClickStackTableChartConfig, - "number" => ClickStackNumberChartConfig, - "pie" => ClickStackPieChartConfig, - "heatmap" => ClickStackHeatmapChartConfig, - "search" => ClickStackSearchChartConfig, - "event_patterns" => ClickStackEventPatternsChartConfig, - "markdown" => ClickStackMarkdownChartConfig, - } -} - -impl std::fmt::Display for ClickStackTileConfigResponse { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackLineChartConfig(_) => write!(f, "ClickStackLineChartConfig"), - Self::ClickStackBarChartConfig(_) => write!(f, "ClickStackBarChartConfig"), - Self::ClickStackCategoricalBarChartConfig(_) => { - write!(f, "ClickStackCategoricalBarChartConfig") - } - Self::ClickStackTableChartConfig(_) => write!(f, "ClickStackTableChartConfig"), - Self::ClickStackNumberChartConfig(_) => write!(f, "ClickStackNumberChartConfig"), - Self::ClickStackPieChartConfig(_) => write!(f, "ClickStackPieChartConfig"), - Self::ClickStackHeatmapChartConfig(_) => write!(f, "ClickStackHeatmapChartConfig"), - Self::ClickStackSearchChartConfig(_) => write!(f, "ClickStackSearchChartConfig"), - Self::ClickStackEventPatternsChartConfig(_) => { - write!(f, "ClickStackEventPatternsChartConfig") - } - Self::ClickStackMarkdownChartConfig(_) => write!(f, "ClickStackMarkdownChartConfig"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// `ClickStackWebhook` - one of multiple variants. -/// -/// Dispatched on the `service` field; see the `discriminated_union!` -/// invocation below for the wire values. -#[derive(Debug, Clone, PartialEq, Serialize)] -#[serde(untagged)] -pub enum ClickStackWebhook { - ClickStackSlackWebhook(ClickStackSlackWebhook), - ClickStackIncidentIOWebhook(ClickStackIncidentIOWebhook), - ClickStackGenericWebhook(ClickStackGenericWebhook), - ClickStackSlackAPIWebhook(ClickStackSlackAPIWebhook), - ClickStackPagerDutyAPIWebhook(ClickStackPagerDutyAPIWebhook), - /// Catch-all for unknown or newly-added values. - /// - /// Holds the raw payload as `serde_json::Value` so it round-trips - /// losslessly; its `Display` emits the payload as compact JSON. - Unknown(serde_json::Value), -} - -discriminated_union! { - ClickStackWebhook, "service" { - "slack" => ClickStackSlackWebhook, - "incidentio" => ClickStackIncidentIOWebhook, - "generic" => ClickStackGenericWebhook, - "slack_api" => ClickStackSlackAPIWebhook, - "pagerduty_api" => ClickStackPagerDutyAPIWebhook, - } -} - -impl std::fmt::Display for ClickStackWebhook { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::ClickStackSlackWebhook(_) => write!(f, "ClickStackSlackWebhook"), - Self::ClickStackIncidentIOWebhook(_) => write!(f, "ClickStackIncidentIOWebhook"), - Self::ClickStackGenericWebhook(_) => write!(f, "ClickStackGenericWebhook"), - Self::ClickStackSlackAPIWebhook(_) => write!(f, "ClickStackSlackAPIWebhook"), - Self::ClickStackPagerDutyAPIWebhook(_) => write!(f, "ClickStackPagerDutyAPIWebhook"), - Self::Unknown(s) => write!(f, "{s}"), - } - } -} - -/// Type alias for `ClickStackCASLPermissionConditions`. -pub type ClickStackCASLPermissionConditions = serde_json::Value; - -/// Type alias for `ClickStackValidateDashboardResponseNormalized`. -pub type ClickStackValidateDashboardResponseNormalized = serde_json::Value; - -/// Type alias for `ClickStackWebhookInputHeaders`. -pub type ClickStackWebhookInputHeaders = std::collections::BTreeMap; - -/// Type alias for `ClickStackWebhookInputQueryParams`. -pub type ClickStackWebhookInputQueryParams = std::collections::BTreeMap; - -/// `AzureEventHub` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct AzureEventHub { - #[serde(rename = "connectionString")] - pub connection_string: String, -} - -/// `ClickPipe` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipe { - #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")] - pub created_at: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub destination: Option, - #[serde(rename = "fieldMappings", skip_serializing_if = "Option::is_none")] - pub field_mappings: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub scaling: Option, - #[serde(rename = "serviceId", skip_serializing_if = "Option::is_none")] - pub service_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub source: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")] - pub updated_at: Option>, -} - -/// `ClickPipeBigQueryPipeSettings` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeBigQueryPipeSettings { - #[serde(rename = "allowNullableColumns")] - pub allow_nullable_columns: bool, - #[serde(rename = "initialLoadParallelism")] - pub initial_load_parallelism: f64, - #[serde(rename = "replicationMode")] - pub replication_mode: ClickPipeBigQueryPipeSettingsReplicationmode, - #[serde(rename = "snapshotNumRowsPerPartition")] - pub snapshot_num_rows_per_partition: f64, - #[serde(rename = "snapshotNumberOfParallelTables")] - pub snapshot_number_of_parallel_tables: f64, -} - -/// `ClickPipeBigQueryPipeSettings` from the ClickHouse Cloud API, in response -/// position. -/// -/// Response variant of [`ClickPipeBigQueryPipeSettings`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeBigQueryPipeSettingsResponse { - #[serde( - rename = "allowNullableColumns", - skip_serializing_if = "Option::is_none" - )] - pub allow_nullable_columns: Option, - #[serde( - rename = "initialLoadParallelism", - skip_serializing_if = "Option::is_none" - )] - pub initial_load_parallelism: Option, - #[serde(rename = "replicationMode", skip_serializing_if = "Option::is_none")] - pub replication_mode: Option, - #[serde( - rename = "snapshotNumRowsPerPartition", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_num_rows_per_partition: Option, - #[serde( - rename = "snapshotNumberOfParallelTables", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_number_of_parallel_tables: Option, -} - -/// `ClickPipeBigQueryPipeTableMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeBigQueryPipeTableMapping { - #[serde(rename = "excludedColumns")] - pub excluded_columns: Vec, - #[serde(rename = "sortingKeys")] - pub sorting_keys: Vec, - #[serde(rename = "sourceDatasetName")] - pub source_dataset_name: String, - #[serde(rename = "sourceTable")] - pub source_table: String, - #[serde(rename = "tableEngine")] - pub table_engine: ClickPipeBigQueryPipeTableMappingTableengine, - #[serde(rename = "targetTable")] - pub target_table: String, - #[serde(rename = "useCustomSortingKey")] - pub use_custom_sorting_key: bool, -} - -/// `ClickPipeBigQueryPipeTableMapping` from the ClickHouse Cloud API, in -/// response position. -/// -/// Response variant of [`ClickPipeBigQueryPipeTableMapping`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeBigQueryPipeTableMappingResponse { - #[serde(rename = "excludedColumns", skip_serializing_if = "Option::is_none")] - pub excluded_columns: Option>, - #[serde(rename = "sortingKeys", skip_serializing_if = "Option::is_none")] - pub sorting_keys: Option>, - #[serde(rename = "sourceDatasetName", skip_serializing_if = "Option::is_none")] - pub source_dataset_name: Option, - #[serde(rename = "sourceTable", skip_serializing_if = "Option::is_none")] - pub source_table: Option, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] - pub target_table: Option, - #[serde( - rename = "useCustomSortingKey", - skip_serializing_if = "Option::is_none" - )] - pub use_custom_sorting_key: Option, -} - -/// `ClickPipeBigQuerySource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeBigQuerySource { - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - #[serde( - rename = "snapshotStagingPath", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_staging_path: Option, - #[serde(rename = "tableMappings", skip_serializing_if = "Option::is_none")] - pub table_mappings: Option>, -} - -/// `ClickPipeDestination` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeDestination { - #[serde(skip_serializing_if = "Option::is_none")] - pub columns: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub database: Option, - #[serde(rename = "managedTable", skip_serializing_if = "Option::is_none")] - pub managed_table: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub table: Option, - #[serde(rename = "tableDefinition", skip_serializing_if = "Option::is_none")] - pub table_definition: Option, -} - -/// `ClickPipeDestinationColumn` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeDestinationColumn { - pub name: String, - pub r#type: String, -} - -/// `ClickPipeDestinationColumn` from the ClickHouse Cloud API, in response -/// position. -/// -/// Response variant of [`ClickPipeDestinationColumn`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeDestinationColumnResponse { - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, -} - -/// `ClickPipeDestinationTableDefinition` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeDestinationTableDefinition { - pub engine: ClickPipeDestinationTableEngine, - // API rejects empty strings / empty arrays for these keys. Spec has no - // `required` array so the description-heuristic treats them as required; - // skip at serialize time when unset instead of modeling as Option. - #[serde(rename = "partitionBy", skip_serializing_if = "String::is_empty")] - pub partition_by: String, - #[serde(rename = "primaryKey", skip_serializing_if = "String::is_empty")] - pub primary_key: String, - #[serde(rename = "sortingKey", skip_serializing_if = "Vec::is_empty")] - pub sorting_key: Vec, -} - -/// `ClickPipeDestinationTableDefinition` from the ClickHouse Cloud API, in -/// response position. -/// -/// Response variant of [`ClickPipeDestinationTableDefinition`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeDestinationTableDefinitionResponse { - #[serde(skip_serializing_if = "Option::is_none")] - pub engine: Option, - #[serde(rename = "partitionBy", skip_serializing_if = "Option::is_none")] - pub partition_by: Option, - #[serde(rename = "primaryKey", skip_serializing_if = "Option::is_none")] - pub primary_key: Option, - #[serde(rename = "sortingKey", skip_serializing_if = "Option::is_none")] - pub sorting_key: Option>, -} - -/// `ClickPipeDestinationTableEngine` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeDestinationTableEngine { - // columnIds only valid for SummingMergeTree. Skip when empty to avoid API - // rejection for MergeTree/ReplacingMergeTree/Null engines. Spec has no - // `required` array so the heuristic treats this as required; API rejects - // empty values despite that. - #[serde(rename = "columnIds", skip_serializing_if = "Vec::is_empty")] - pub column_ids: Vec, - pub r#type: ClickPipeDestinationTableEngineType, - #[serde(rename = "versionColumnId", skip_serializing_if = "Option::is_none")] - pub version_column_id: Option, -} - -/// `ClickPipeDestinationTableEngine` from the ClickHouse Cloud API, in response -/// position. -/// -/// Response variant of [`ClickPipeDestinationTableEngine`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeDestinationTableEngineResponse { - #[serde(rename = "columnIds", skip_serializing_if = "Option::is_none")] - pub column_ids: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "versionColumnId", skip_serializing_if = "Option::is_none")] - pub version_column_id: Option, -} - -/// `ClickPipeFieldMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeFieldMapping { - #[serde(rename = "destinationField")] - pub destination_field: String, - #[serde(rename = "sourceField")] - pub source_field: String, -} - -/// `ClickPipeFieldMapping` from the ClickHouse Cloud API, in response position. -/// -/// Response variant of [`ClickPipeFieldMapping`]: every field is `Option`, -/// so a field the API drops or sends as `null` deserializes to `None` instead -/// of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeFieldMappingResponse { - #[serde(rename = "destinationField", skip_serializing_if = "Option::is_none")] - pub destination_field: Option, - #[serde(rename = "sourceField", skip_serializing_if = "Option::is_none")] - pub source_field: Option, -} - -/// `ClickPipeKafkaOffset` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeKafkaOffset { - pub strategy: ClickPipeKafkaOffsetStrategy, - #[serde(skip_serializing_if = "Option::is_none")] - pub timestamp: Option, -} - -/// `ClickPipeKafkaOffset` from the ClickHouse Cloud API, in response position. -/// -/// Response variant of [`ClickPipeKafkaOffset`]: every field is `Option`, so -/// a field the API drops or sends as `null` deserializes to `None` instead of -/// failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeKafkaOffsetResponse { - #[serde(skip_serializing_if = "Option::is_none")] - pub strategy: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub timestamp: Option, -} - -/// `ClickPipeKafkaSchemaRegistry` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeKafkaSchemaRegistry { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -/// `ClickPipeKafkaSchemaRegistryCredentials` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeKafkaSchemaRegistryCredentials { - pub password: String, - pub username: String, -} - -/// `ClickPipeKafkaSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeKafkaSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub brokers: Option, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(rename = "consumerGroup", skip_serializing_if = "Option::is_none")] - pub consumer_group: Option, - #[serde(rename = "exactlyOnce", skip_serializing_if = "Option::is_none")] - pub exactly_once: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub format: Option, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub offset: Option, - #[serde( - rename = "reversePrivateEndpointIds", - skip_serializing_if = "Option::is_none" - )] - pub reverse_private_endpoint_ids: Option>, - #[serde(rename = "schemaRegistry", skip_serializing_if = "Option::is_none")] - pub schema_registry: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub topics: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, -} - -/// `ClickPipeKinesisSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeKinesisSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub format: Option, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(rename = "iteratorType", skip_serializing_if = "Option::is_none")] - pub iterator_type: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub region: Option, - #[serde(rename = "streamName", skip_serializing_if = "Option::is_none")] - pub stream_name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub timestamp: Option, - #[serde(rename = "useEnhancedFanOut", skip_serializing_if = "Option::is_none")] - pub use_enhanced_fan_out: Option, -} - -/// `ClickPipeMongoDBPipeSettings` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMongoDBPipeSettings { - #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] - pub delete_on_merge: Option, - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde(rename = "replicationMode")] - pub replication_mode: ClickPipeMongoDBPipeSettingsReplicationmode, - #[serde( - rename = "snapshotNumRowsPerPartition", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_num_rows_per_partition: Option, - #[serde( - rename = "snapshotNumberOfParallelTables", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_number_of_parallel_tables: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, - #[serde( - rename = "useJsonNativeFormat", - skip_serializing_if = "Option::is_none" - )] - pub use_json_native_format: Option, -} - -/// `ClickPipeMongoDBPipeSettings` from the ClickHouse Cloud API, in response -/// position. -/// -/// Response variant of [`ClickPipeMongoDBPipeSettings`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMongoDBPipeSettingsResponse { - #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] - pub delete_on_merge: Option, - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde(rename = "replicationMode", skip_serializing_if = "Option::is_none")] - pub replication_mode: Option, - #[serde( - rename = "snapshotNumRowsPerPartition", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_num_rows_per_partition: Option, - #[serde( - rename = "snapshotNumberOfParallelTables", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_number_of_parallel_tables: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, - #[serde( - rename = "useJsonNativeFormat", - skip_serializing_if = "Option::is_none" - )] - pub use_json_native_format: Option, -} - -/// `ClickPipeMongoDBPipeTableMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMongoDBPipeTableMapping { - #[serde(rename = "sourceCollection")] - pub source_collection: String, - #[serde(rename = "sourceDatabaseName")] - pub source_database_name: String, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable")] - pub target_table: String, -} - -/// `ClickPipeMongoDBPipeTableMapping` from the ClickHouse Cloud API, in -/// response position. -/// -/// Response variant of [`ClickPipeMongoDBPipeTableMapping`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMongoDBPipeTableMappingResponse { - #[serde(rename = "sourceCollection", skip_serializing_if = "Option::is_none")] - pub source_collection: Option, - #[serde(rename = "sourceDatabaseName", skip_serializing_if = "Option::is_none")] - pub source_database_name: Option, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] - pub target_table: Option, -} - -/// `ClickPipeMongoDBSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMongoDBSource { - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] - pub disable_tls: Option, - #[serde(rename = "readPreference", skip_serializing_if = "Option::is_none")] - pub read_preference: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - #[serde( - rename = "skipCertVerification", - skip_serializing_if = "Option::is_none" - )] - pub skip_cert_verification: Option, - #[serde(rename = "tableMappings", skip_serializing_if = "Option::is_none")] - pub table_mappings: Option>, - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub uri: Option, -} - -/// `ClickPipeMutateBigQuerySource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMutateBigQuerySource { - pub credentials: ServiceAccount, - pub settings: ClickPipeBigQueryPipeSettings, - #[serde(rename = "snapshotStagingPath")] - pub snapshot_staging_path: String, - #[serde(rename = "tableMappings")] - pub table_mappings: Vec, -} - -/// `ClickPipeMutateDestination` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMutateDestination { - // The spec describes `columns`, `managedTable`, `table`, and - // `tableDefinition` as "Required field for all pipe types except database - // pipes (Postgres, MySQL, BigQuery)" — all four must be omitted entirely - // for database pipes. Modeled with skip-when-empty / Option so callers can - // build a single destination type and database pipes serialize cleanly. - #[serde(skip_serializing_if = "Vec::is_empty")] - pub columns: Vec, - pub database: String, - #[serde(rename = "managedTable", skip_serializing_if = "Option::is_none")] - pub managed_table: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub roles: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub table: Option, - #[serde(rename = "tableDefinition", skip_serializing_if = "Option::is_none")] - pub table_definition: Option, -} - -/// `ClickPipeMutateKafkaSchemaRegistry` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMutateKafkaSchemaRegistry { - pub authentication: ClickPipeMutateKafkaSchemaRegistryAuthentication, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - pub credentials: ClickPipeKafkaSchemaRegistryCredentials, - pub url: String, -} - -/// `ClickPipeMutateMongoDBSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMutateMongoDBSource { - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub credentials: Option, - #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] - pub disable_tls: Option, - #[serde(rename = "readPreference")] - pub read_preference: ClickPipeMutateMongoDBSourceReadpreference, - pub settings: ClickPipeMongoDBPipeSettings, - #[serde( - rename = "skipCertVerification", - skip_serializing_if = "Option::is_none" - )] - pub skip_cert_verification: Option, - #[serde(rename = "tableMappings")] - pub table_mappings: Vec, - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, - pub uri: String, -} - -/// `ClickPipeMutateMySQLSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMutateMySQLSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub credentials: Option, - #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] - pub disable_tls: Option, - pub host: String, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - pub port: i64, - #[serde(rename = "serverId", skip_serializing_if = "Option::is_none")] - pub server_id: Option, - pub settings: ClickPipeMySQLPipeSettings, - #[serde( - rename = "skipCertVerification", - skip_serializing_if = "Option::is_none" - )] - pub skip_cert_verification: Option, - #[serde(rename = "tableMappings")] - pub table_mappings: Vec, - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, -} - -/// `ClickPipeMutatePostgresSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMutatePostgresSource { - pub authentication: ClickPipeMutatePostgresSourceAuthentication, - // caCertificate is `undefinedOr(isValidPEMCertificate)` server-side — sending - // `""` (the bare-String default) fails PEM validation. Modeled as - // `Option` so callers can omit it. - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - pub credentials: PLAIN, - pub database: String, - #[serde(rename = "disableTls")] - pub disable_tls: bool, - pub host: String, - // iamRole only applies to RDS-style Postgres + IAM_ROLE auth. Spec marks - // it required but the server rejects "" for Basic-auth Postgres. Modeled - // as Option so callers can omit it; same pattern as ca_certificate. - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - pub port: i64, - pub settings: ClickPipePostgresPipeSettings, - #[serde(rename = "skipCertVerification")] - pub skip_cert_verification: bool, - #[serde(rename = "tableMappings")] - pub table_mappings: Vec, - // tlsHost is only set when the broker cert SAN doesn't match `host`. - // Optional in practice; server rejects "" with PEM-style validation. - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, -} - -/// `ClickPipeMySQLPipeSettings` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMySQLPipeSettings { - #[serde( - rename = "allowNullableColumns", - skip_serializing_if = "Option::is_none" - )] - pub allow_nullable_columns: Option, - #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] - pub delete_on_merge: Option, - #[serde( - rename = "initialLoadParallelism", - skip_serializing_if = "Option::is_none" - )] - pub initial_load_parallelism: Option, - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde( - rename = "replicationMechanism", - skip_serializing_if = "Option::is_none" - )] - pub replication_mechanism: Option, - #[serde(rename = "replicationMode")] - pub replication_mode: ClickPipeMySQLPipeSettingsReplicationmode, - #[serde( - rename = "snapshotNumRowsPerPartition", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_num_rows_per_partition: Option, - #[serde( - rename = "snapshotNumberOfParallelTables", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_number_of_parallel_tables: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, - #[serde(rename = "useCompression", skip_serializing_if = "Option::is_none")] - pub use_compression: Option, -} - -/// `ClickPipeMySQLPipeSettings` from the ClickHouse Cloud API, in response -/// position. -/// -/// Response variant of [`ClickPipeMySQLPipeSettings`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMySQLPipeSettingsResponse { - #[serde( - rename = "allowNullableColumns", - skip_serializing_if = "Option::is_none" - )] - pub allow_nullable_columns: Option, - #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] - pub delete_on_merge: Option, - #[serde( - rename = "initialLoadParallelism", - skip_serializing_if = "Option::is_none" - )] - pub initial_load_parallelism: Option, - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde( - rename = "replicationMechanism", - skip_serializing_if = "Option::is_none" - )] - pub replication_mechanism: Option, - #[serde(rename = "replicationMode", skip_serializing_if = "Option::is_none")] - pub replication_mode: Option, - #[serde( - rename = "snapshotNumRowsPerPartition", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_num_rows_per_partition: Option, - #[serde( - rename = "snapshotNumberOfParallelTables", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_number_of_parallel_tables: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, - #[serde(rename = "useCompression", skip_serializing_if = "Option::is_none")] - pub use_compression: Option, -} - -/// `ClickPipeMySQLPipeTableMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMySQLPipeTableMapping { - #[serde(rename = "excludedColumns", skip_serializing_if = "Option::is_none")] - pub excluded_columns: Option>, - #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] - pub partition_key: Option, - #[serde(rename = "sortingKeys", skip_serializing_if = "Option::is_none")] - pub sorting_keys: Option>, - #[serde(rename = "sourceSchemaName")] - pub source_schema_name: String, - #[serde(rename = "sourceTable")] - pub source_table: String, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable")] - pub target_table: String, - #[serde( - rename = "useCustomSortingKey", - skip_serializing_if = "Option::is_none" - )] - pub use_custom_sorting_key: Option, -} - -/// `ClickPipeMySQLPipeTableMapping` from the ClickHouse Cloud API, in response -/// position. -/// -/// Response variant of [`ClickPipeMySQLPipeTableMapping`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMySQLPipeTableMappingResponse { - #[serde(rename = "excludedColumns", skip_serializing_if = "Option::is_none")] - pub excluded_columns: Option>, - #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] - pub partition_key: Option, - #[serde(rename = "sortingKeys", skip_serializing_if = "Option::is_none")] - pub sorting_keys: Option>, - #[serde(rename = "sourceSchemaName", skip_serializing_if = "Option::is_none")] - pub source_schema_name: Option, - #[serde(rename = "sourceTable", skip_serializing_if = "Option::is_none")] - pub source_table: Option, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] - pub target_table: Option, - #[serde( - rename = "useCustomSortingKey", - skip_serializing_if = "Option::is_none" - )] - pub use_custom_sorting_key: Option, -} - -/// `ClickPipeMySQLSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeMySQLSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] - pub disable_tls: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub host: Option, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(rename = "serverId", skip_serializing_if = "Option::is_none")] - pub server_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - #[serde( - rename = "skipCertVerification", - skip_serializing_if = "Option::is_none" - )] - pub skip_cert_verification: Option, - #[serde(rename = "tableMappings", skip_serializing_if = "Option::is_none")] - pub table_mappings: Option>, - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, -} - -/// `ClickPipeObjectStorageSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeObjectStorageSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "azureContainerName", skip_serializing_if = "Option::is_none")] - pub azure_container_name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub compression: Option, - #[serde(rename = "connectionString", skip_serializing_if = "Option::is_none")] - pub connection_string: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub delimiter: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub format: Option, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(rename = "isContinuous", skip_serializing_if = "Option::is_none")] - pub is_continuous: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(rename = "queueUrl", skip_serializing_if = "Option::is_none")] - pub queue_url: Option, - #[serde(rename = "skipInitialLoad", skip_serializing_if = "Option::is_none")] - pub skip_initial_load: Option, - #[serde(rename = "startAfter", skip_serializing_if = "Option::is_none")] - pub start_after: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -/// `ClickPipePatchDestination` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchDestination { - pub columns: Vec, -} - -/// `ClickPipePatchKafkaSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchKafkaSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - pub credentials: serde_json::Value, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(rename = "reversePrivateEndpointIds")] - pub reverse_private_endpoint_ids: Vec, -} - -/// `ClickPipePatchKinesisSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchKinesisSource { - #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")] - pub access_key: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, -} - -/// `ClickPipePatchMongoDBPipeRemoveTableMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchMongoDBPipeRemoveTableMapping { - #[serde(rename = "sourceCollection")] - pub source_collection: Option, - #[serde(rename = "sourceDatabaseName")] - pub source_database_name: Option, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable")] - pub target_table: Option, -} - -/// `ClickPipePatchMongoDBPipeSettings` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchMongoDBPipeSettings { - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, -} - -/// `ClickPipePatchMongoDBSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchMongoDBSource { - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub credentials: Option, - #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] - pub disable_tls: Option, - #[serde(rename = "readPreference", skip_serializing_if = "Option::is_none")] - pub read_preference: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - #[serde( - rename = "skipCertVerification", - skip_serializing_if = "Option::is_none" - )] - pub skip_cert_verification: Option, - #[serde(rename = "tableMappingsToAdd", skip_serializing_if = "Option::is_none")] - pub table_mappings_to_add: Option>, - #[serde( - rename = "tableMappingsToRemove", - skip_serializing_if = "Option::is_none" - )] - pub table_mappings_to_remove: Option>, - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, - pub uri: Option, -} - -/// `ClickPipePatchMySQLPipeRemoveTableMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchMySQLPipeRemoveTableMapping { - #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] - pub partition_key: Option, - #[serde(rename = "sourceSchemaName")] - pub source_schema_name: Option, - #[serde(rename = "sourceTable")] - pub source_table: Option, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable")] - pub target_table: Option, -} - -/// `ClickPipePatchMySQLPipeSettings` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchMySQLPipeSettings { - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, - #[serde(rename = "useCompression", skip_serializing_if = "Option::is_none")] - pub use_compression: Option, -} - -/// `ClickPipePatchMySQLSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchMySQLSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub credentials: Option, - #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] - pub disable_tls: Option, - pub host: Option, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - pub port: Option, - #[serde(rename = "serverId", skip_serializing_if = "Option::is_none")] - pub server_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - #[serde( - rename = "skipCertVerification", - skip_serializing_if = "Option::is_none" - )] - pub skip_cert_verification: Option, - #[serde(rename = "tableMappingsToAdd", skip_serializing_if = "Option::is_none")] - pub table_mappings_to_add: Option>, - #[serde( - rename = "tableMappingsToRemove", - skip_serializing_if = "Option::is_none" - )] - pub table_mappings_to_remove: Option>, - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, -} - -/// `ClickPipePatchObjectStorageSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchObjectStorageSource { - #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")] - pub access_key: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "azureContainerName", skip_serializing_if = "Option::is_none")] - pub azure_container_name: Option, - #[serde(rename = "connectionString", skip_serializing_if = "Option::is_none")] - pub connection_string: Option, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(rename = "serviceAccountKey", skip_serializing_if = "Option::is_none")] - pub service_account_key: Option, - #[serde(rename = "skipInitialLoad", skip_serializing_if = "Option::is_none")] - pub skip_initial_load: Option, - #[serde(rename = "startAfter", skip_serializing_if = "Option::is_none")] - pub start_after: Option, -} - -/// `ClickPipePatchPostgresPipeRemoveTableMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchPostgresPipeRemoveTableMapping { - #[serde(rename = "partitionByExpr", skip_serializing_if = "Option::is_none")] - pub partition_by_expr: Option, - #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] - pub partition_key: Option, - #[serde(rename = "sourceSchemaName", skip_serializing_if = "Option::is_none")] - pub source_schema_name: Option, - #[serde(rename = "sourceTable", skip_serializing_if = "Option::is_none")] - pub source_table: Option, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] - pub target_table: Option, -} - -/// `ClickPipePatchPostgresPipeSettings` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchPostgresPipeSettings { - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, -} - -/// `ClickPipePatchPostgresSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchPostgresSource { - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - pub credentials: PLAIN, - #[serde(skip_serializing_if = "Option::is_none")] - pub database: Option, - #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] - pub disable_tls: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub host: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub port: Option, - pub settings: ClickPipePatchPostgresPipeSettings, - #[serde( - rename = "skipCertVerification", - skip_serializing_if = "Option::is_none" - )] - pub skip_cert_verification: Option, - #[serde(rename = "tableMappingsToAdd")] - pub table_mappings_to_add: Vec, - #[serde(rename = "tableMappingsToRemove")] - pub table_mappings_to_remove: Vec, - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, -} - -/// `ClickPipePatchPubSubSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchPubSubSource { - #[serde(rename = "ackDeadline", skip_serializing_if = "Option::is_none")] - pub ack_deadline: Option, - pub authentication: Option, - #[serde(rename = "serviceAccountKey")] - pub service_account_key: Option, -} - -/// `ClickPipePatchRequest` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchRequest { - #[serde(skip_serializing_if = "Option::is_none")] - pub destination: Option, - #[serde(rename = "fieldMappings", skip_serializing_if = "Option::is_none")] - pub field_mappings: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub source: Option, -} - -/// `ClickPipePatchSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePatchSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub kafka: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub kinesis: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub mongodb: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub mysql: Option, - #[serde(rename = "objectStorage", skip_serializing_if = "Option::is_none")] - pub object_storage: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub postgres: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub pubsub: Option, - #[serde(rename = "validateSamples")] - pub validate_samples: bool, -} - -/// `ClickPipePostKafkaSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostKafkaSource { - pub authentication: ClickPipePostKafkaSourceAuthentication, - pub brokers: String, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(rename = "consumerGroup", skip_serializing_if = "Option::is_none")] - pub consumer_group: Option, - pub credentials: serde_json::Value, - #[serde(rename = "exactlyOnce", skip_serializing_if = "Option::is_none")] - pub exactly_once: Option, - pub format: ClickPipePostKafkaSourceFormat, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub offset: Option, - #[serde(rename = "reversePrivateEndpointIds")] - pub reverse_private_endpoint_ids: Vec, - #[serde(rename = "schemaRegistry", skip_serializing_if = "Option::is_none")] - pub schema_registry: Option, - pub topics: String, - pub r#type: ClickPipePostKafkaSourceType, -} - -/// `ClickPipePostKinesisSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostKinesisSource { - #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")] - pub access_key: Option, - pub authentication: ClickPipePostKinesisSourceAuthentication, - pub format: ClickPipePostKinesisSourceFormat, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(rename = "iteratorType")] - pub iterator_type: ClickPipePostKinesisSourceIteratortype, - pub region: String, - #[serde(rename = "streamName")] - pub stream_name: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub timestamp: Option, - #[serde(rename = "useEnhancedFanOut", skip_serializing_if = "Option::is_none")] - pub use_enhanced_fan_out: Option, -} - -/// `ClickPipeSchemaDiscoveryField` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeSchemaDiscoveryField { - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub optional: Option, -} - -/// `ClickPipeSchemaDiscoveryRequest` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeSchemaDiscoveryRequest { - pub source: ClickPipeSchemaDiscoverySource, -} - -/// `ClickPipeSchemaDiscoveryResponse` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeSchemaDiscoveryResponse { - #[serde(skip_serializing_if = "Option::is_none")] - pub fields: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub meta: Option, -} - -/// `ClickPipeSchemaDiscoveryMeta` from the ClickHouse Cloud API. -pub type ClickPipeSchemaDiscoveryMeta = std::collections::BTreeMap; - -/// `ClickPipeSchemaDiscoverySource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeSchemaDiscoverySource { - #[serde(skip_serializing_if = "Option::is_none")] - pub kafka: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub kinesis: Option, -} - -/// `ClickPipePostObjectStorageSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostObjectStorageSource { - #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")] - pub access_key: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "azureContainerName", skip_serializing_if = "Option::is_none")] - pub azure_container_name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub compression: Option, - #[serde(rename = "connectionString", skip_serializing_if = "Option::is_none")] - pub connection_string: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub delimiter: Option, - pub format: ClickPipePostObjectStorageSourceFormat, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(rename = "isContinuous", skip_serializing_if = "Option::is_none")] - pub is_continuous: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(rename = "queueUrl", skip_serializing_if = "Option::is_none")] - pub queue_url: Option, - #[serde(rename = "serviceAccountKey", skip_serializing_if = "Option::is_none")] - pub service_account_key: Option, - #[serde(rename = "skipInitialLoad", skip_serializing_if = "Option::is_none")] - pub skip_initial_load: Option, - #[serde(rename = "startAfter", skip_serializing_if = "Option::is_none")] - pub start_after: Option, - pub r#type: ClickPipePostObjectStorageSourceType, - pub url: String, -} - -/// `ClickPipePostPubSubSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostPubSubSource { - #[serde(rename = "ackDeadline", skip_serializing_if = "Option::is_none")] - pub ack_deadline: Option, - pub authentication: ClickPipePostPubSubSourceAuthentication, - #[serde(rename = "enableOrdering", skip_serializing_if = "Option::is_none")] - pub enable_ordering: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub filter: Option, - pub format: ClickPipePostPubSubSourceFormat, - #[serde(rename = "projectId")] - pub project_id: String, - #[serde(rename = "seekTimestamp", skip_serializing_if = "Option::is_none")] - pub seek_timestamp: Option>, - #[serde(rename = "seekType")] - pub seek_type: ClickPipePostPubSubSourceSeektype, - #[serde(rename = "serviceAccountKey")] - pub service_account_key: ServiceAccount, - pub topic: String, -} - -/// `ClickPipePostRequest` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostRequest { - pub destination: ClickPipeMutateDestination, - // Empty arrays rejected by some API paths and never useful on create — - // skip when empty. Non-Option to match the spec description heuristic. - #[serde(rename = "fieldMappings", skip_serializing_if = "Vec::is_empty")] - pub field_mappings: Vec, - pub name: String, - // scaling block default-serializes as {replicas: 0, ...} which the API - // rejects ("replicas: Not between 1 and 40"). Modeled as Option so the - // whole block is omitted when the caller doesn't set it. - #[serde(skip_serializing_if = "Option::is_none")] - pub scaling: Option, - // settings default-serializes as `{}` which the API also rejects. - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - pub source: ClickPipePostSource, -} - -/// `ClickPipePostSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub bigquery: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub kafka: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub kinesis: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub mongodb: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub mysql: Option, - #[serde(rename = "objectStorage", skip_serializing_if = "Option::is_none")] - pub object_storage: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub postgres: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub pubsub: Option, - #[serde(rename = "validateSamples")] - pub validate_samples: bool, -} - -/// `ClickPipePostgresPipeSettings` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostgresPipeSettings { - #[serde(rename = "allowNullableColumns")] - pub allow_nullable_columns: bool, - #[serde(rename = "deleteOnMerge")] - pub delete_on_merge: bool, - #[serde(rename = "enableFailoverSlots")] - pub enable_failover_slots: bool, - #[serde( - rename = "initialLoadParallelism", - skip_serializing_if = "Option::is_none" - )] - pub initial_load_parallelism: Option, - #[serde(rename = "publicationName", skip_serializing_if = "Option::is_none")] - pub publication_name: Option, - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde(rename = "replicationMode")] - pub replication_mode: ClickPipePostgresPipeSettingsReplicationmode, - #[serde( - rename = "replicationSlotName", - skip_serializing_if = "Option::is_none" - )] - pub replication_slot_name: Option, - #[serde( - rename = "snapshotNumRowsPerPartition", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_num_rows_per_partition: Option, - #[serde( - rename = "snapshotNumberOfParallelTables", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_number_of_parallel_tables: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, -} - -/// `ClickPipePostgresPipeSettings` from the ClickHouse Cloud API, in response -/// position. -/// -/// Response variant of [`ClickPipePostgresPipeSettings`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostgresPipeSettingsResponse { - #[serde( - rename = "allowNullableColumns", - skip_serializing_if = "Option::is_none" - )] - pub allow_nullable_columns: Option, - #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] - pub delete_on_merge: Option, - #[serde( - rename = "enableFailoverSlots", - skip_serializing_if = "Option::is_none" - )] - pub enable_failover_slots: Option, - #[serde( - rename = "initialLoadParallelism", - skip_serializing_if = "Option::is_none" - )] - pub initial_load_parallelism: Option, - #[serde(rename = "publicationName", skip_serializing_if = "Option::is_none")] - pub publication_name: Option, - #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] - pub pull_batch_size: Option, - #[serde(rename = "replicationMode", skip_serializing_if = "Option::is_none")] - pub replication_mode: Option, - #[serde( - rename = "replicationSlotName", - skip_serializing_if = "Option::is_none" - )] - pub replication_slot_name: Option, - #[serde( - rename = "snapshotNumRowsPerPartition", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_num_rows_per_partition: Option, - #[serde( - rename = "snapshotNumberOfParallelTables", - skip_serializing_if = "Option::is_none" - )] - pub snapshot_number_of_parallel_tables: Option, - #[serde( - rename = "syncIntervalSeconds", - skip_serializing_if = "Option::is_none" - )] - pub sync_interval_seconds: Option, -} - -/// `ClickPipePostgresPipeTableMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostgresPipeTableMapping { - #[serde(rename = "excludedColumns")] - pub excluded_columns: Vec, - #[serde(rename = "partitionByExpr")] - pub partition_by_expr: String, - #[serde(rename = "partitionKey")] - pub partition_key: String, - #[serde(rename = "sortingKeys")] - pub sorting_keys: Vec, - #[serde(rename = "sourceSchemaName")] - pub source_schema_name: String, - #[serde(rename = "sourceTable")] - pub source_table: String, - #[serde(rename = "tableEngine")] - pub table_engine: ClickPipePostgresPipeTableMappingTableengine, - #[serde(rename = "targetTable")] - pub target_table: String, - #[serde(rename = "useCustomSortingKey")] - pub use_custom_sorting_key: bool, -} - -/// `ClickPipePostgresPipeTableMapping` from the ClickHouse Cloud API, in -/// response position. -/// -/// Response variant of [`ClickPipePostgresPipeTableMapping`]: every field is -/// `Option`, so a field the API drops or sends as `null` deserializes to -/// `None` instead of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostgresPipeTableMappingResponse { - #[serde(rename = "excludedColumns", skip_serializing_if = "Option::is_none")] - pub excluded_columns: Option>, - #[serde(rename = "partitionByExpr", skip_serializing_if = "Option::is_none")] - pub partition_by_expr: Option, - #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] - pub partition_key: Option, - #[serde(rename = "sortingKeys", skip_serializing_if = "Option::is_none")] - pub sorting_keys: Option>, - #[serde(rename = "sourceSchemaName", skip_serializing_if = "Option::is_none")] - pub source_schema_name: Option, - #[serde(rename = "sourceTable", skip_serializing_if = "Option::is_none")] - pub source_table: Option, - #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] - pub table_engine: Option, - #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] - pub target_table: Option, - #[serde( - rename = "useCustomSortingKey", - skip_serializing_if = "Option::is_none" - )] - pub use_custom_sorting_key: Option, -} - -/// `ClickPipePostgresSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePostgresSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] - pub ca_certificate: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub database: Option, - #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] - pub disable_tls: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub host: Option, - #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] - pub iam_role: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub settings: Option, - #[serde( - rename = "skipCertVerification", - skip_serializing_if = "Option::is_none" - )] - pub skip_cert_verification: Option, - #[serde(rename = "tableMappings", skip_serializing_if = "Option::is_none")] - pub table_mappings: Option>, - #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] - pub tls_host: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, -} - -/// `ClickPipePubSubSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipePubSubSource { - #[serde(rename = "ackDeadline", skip_serializing_if = "Option::is_none")] - pub ack_deadline: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub authentication: Option, - #[serde(rename = "enableOrdering", skip_serializing_if = "Option::is_none")] - pub enable_ordering: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub filter: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub format: Option, - #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] - pub project_id: Option, - #[serde(rename = "seekTimestamp", skip_serializing_if = "Option::is_none")] - pub seek_timestamp: Option>, - #[serde(rename = "seekType", skip_serializing_if = "Option::is_none")] - pub seek_type: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub topic: Option, -} - -/// `ClickPipeScaling` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeScaling { - #[cfg(feature = "deprecated-fields")] - pub concurrency: i64, - #[serde(rename = "replicaCpuMillicores")] - pub replica_cpu_millicores: i64, - #[serde(rename = "replicaMemoryGb")] - pub replica_memory_gb: f64, - pub replicas: i64, -} - -/// `ClickPipeScaling` from the ClickHouse Cloud API, in response position. +/// `ClickStackTileConfig` - one of multiple variants, in response position. /// -/// Response variant of [`ClickPipeScaling`]: every field is `Option`, so a -/// field the API drops or sends as `null` deserializes to `None` instead of -/// failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeScalingResponse { - #[cfg(feature = "deprecated-fields")] - #[serde(skip_serializing_if = "Option::is_none")] - pub concurrency: Option, - #[serde( - rename = "replicaCpuMillicores", - skip_serializing_if = "Option::is_none" - )] - pub replica_cpu_millicores: Option, - #[serde(rename = "replicaMemoryGb", skip_serializing_if = "Option::is_none")] - pub replica_memory_gb: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub replicas: Option, +/// Response variant of [`ClickStackTileConfig`]: each arm is the all-`Option` +/// response variant of its request type, so a field the API drops or sends as +/// `null` deserializes to `None` instead of failing. +/// +/// Dispatched on the `displayType` field, exactly as the request union is: dispatch +/// reads the raw JSON rather than trying each variant's shape, so all-`Option` +/// arms — which would match any object under `untagged` matching — cannot +/// misroute a payload. A `displayType` this crate does not know, or a payload that +/// does not fit the variant its `displayType` selects, lands in `Unknown` with the +/// raw JSON intact. +/// +/// Deliberately has no `Default`: every arm's default would serialize to `{}`, +/// which carries no `displayType` and so would not deserialize back to the same +/// variant. Build a [`ClickStackTileConfig`] instead when writing. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackTileConfigResponse { + ClickStackLineChartConfig(ClickStackLineChartConfigResponse), + ClickStackBarChartConfig(ClickStackBarChartConfigResponse), + ClickStackCategoricalBarChartConfig(ClickStackCategoricalBarChartConfigResponse), + ClickStackTableChartConfig(ClickStackTableChartConfigResponse), + ClickStackNumberChartConfig(ClickStackNumberChartConfigResponse), + ClickStackPieChartConfig(ClickStackPieChartConfigResponse), + ClickStackHeatmapChartConfig(ClickStackHeatmapChartConfigResponse), + ClickStackSearchChartConfig(ClickStackSearchChartConfigResponse), + ClickStackEventPatternsChartConfig(ClickStackEventPatternsChartConfigResponse), + ClickStackMarkdownChartConfig(ClickStackMarkdownChartConfigResponse), + /// Catch-all for unknown or newly-added values. + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -/// `ClickPipeScalingPatchRequest` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeScalingPatchRequest { - #[cfg(feature = "deprecated-fields")] - #[serde(skip_serializing_if = "Option::is_none")] - pub concurrency: Option, - #[serde( - rename = "replicaCpuMillicores", - skip_serializing_if = "Option::is_none" - )] - pub replica_cpu_millicores: Option, - #[serde(rename = "replicaMemoryGb", skip_serializing_if = "Option::is_none")] - pub replica_memory_gb: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub replicas: Option, +discriminated_union! { + ClickStackTileConfigResponse, "displayType" { + "line" => ClickStackLineChartConfig, + "stacked_bar" => ClickStackBarChartConfig, + "bar" => ClickStackCategoricalBarChartConfig, + "table" => ClickStackTableChartConfig, + "number" => ClickStackNumberChartConfig, + "pie" => ClickStackPieChartConfig, + "heatmap" => ClickStackHeatmapChartConfig, + "search" => ClickStackSearchChartConfig, + "event_patterns" => ClickStackEventPatternsChartConfig, + "markdown" => ClickStackMarkdownChartConfig, + } } -/// `ClickPipeSettings` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeSettings { - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_download_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_insert_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_min_insert_block_size_bytes: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_parallel_distributed_insert_select: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_parallel_view_processing: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_concurrency: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_max_file_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_max_insert_bytes: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_polling_interval_ms: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_use_cluster_function: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub streaming_max_insert_wait_ms: Option, +impl std::fmt::Display for ClickStackTileConfigResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::ClickStackLineChartConfig(_) => write!(f, "ClickStackLineChartConfig"), + Self::ClickStackBarChartConfig(_) => write!(f, "ClickStackBarChartConfig"), + Self::ClickStackCategoricalBarChartConfig(_) => { + write!(f, "ClickStackCategoricalBarChartConfig") + } + Self::ClickStackTableChartConfig(_) => write!(f, "ClickStackTableChartConfig"), + Self::ClickStackNumberChartConfig(_) => write!(f, "ClickStackNumberChartConfig"), + Self::ClickStackPieChartConfig(_) => write!(f, "ClickStackPieChartConfig"), + Self::ClickStackHeatmapChartConfig(_) => write!(f, "ClickStackHeatmapChartConfig"), + Self::ClickStackSearchChartConfig(_) => write!(f, "ClickStackSearchChartConfig"), + Self::ClickStackEventPatternsChartConfig(_) => { + write!(f, "ClickStackEventPatternsChartConfig") + } + Self::ClickStackMarkdownChartConfig(_) => write!(f, "ClickStackMarkdownChartConfig"), + Self::Unknown(s) => write!(f, "{s}"), + } + } } -/// `ClickPipeSettings` from the ClickHouse Cloud API, in response position. +/// `ClickStackWebhook` - one of multiple variants. /// -/// Response variant of [`ClickPipeSettings`]: every field is `Option`, so a -/// field the API drops or sends as `null` deserializes to `None` instead of -/// failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeSettingsResponse { - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_download_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_insert_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_min_insert_block_size_bytes: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_parallel_distributed_insert_select: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_parallel_view_processing: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_concurrency: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_max_file_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_max_insert_bytes: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_polling_interval_ms: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_use_cluster_function: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub streaming_max_insert_wait_ms: Option, +/// Dispatched on the `service` field; see the `discriminated_union!` +/// invocation below for the wire values. +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ClickStackWebhook { + ClickStackSlackWebhook(ClickStackSlackWebhook), + ClickStackIncidentIOWebhook(ClickStackIncidentIOWebhook), + ClickStackGenericWebhook(ClickStackGenericWebhook), + ClickStackSlackAPIWebhook(ClickStackSlackAPIWebhook), + ClickStackPagerDutyAPIWebhook(ClickStackPagerDutyAPIWebhook), + /// Catch-all for unknown or newly-added values. + /// + /// Holds the raw payload as `serde_json::Value` so it round-trips + /// losslessly; its `Display` emits the payload as compact JSON. + Unknown(serde_json::Value), } -/// `ClickPipeSettingsPutRequest` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeSettingsPutRequest { - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_download_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_insert_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_max_threads: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_min_insert_block_size_bytes: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_parallel_distributed_insert_select: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub clickhouse_parallel_view_processing: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_concurrency: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_max_file_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_max_insert_bytes: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_polling_interval_ms: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub object_storage_use_cluster_function: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub streaming_max_insert_wait_ms: Option, +discriminated_union! { + ClickStackWebhook, "service" { + "slack" => ClickStackSlackWebhook, + "incidentio" => ClickStackIncidentIOWebhook, + "generic" => ClickStackGenericWebhook, + "slack_api" => ClickStackSlackAPIWebhook, + "pagerduty_api" => ClickStackPagerDutyAPIWebhook, + } } -/// `ClickPipeSource` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeSource { - #[serde(skip_serializing_if = "Option::is_none")] - pub bigquery: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub kafka: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub kinesis: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub mongodb: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub mysql: Option, - #[serde(rename = "objectStorage", skip_serializing_if = "Option::is_none")] - pub object_storage: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub postgres: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub pubsub: Option, +impl std::fmt::Display for ClickStackWebhook { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::ClickStackSlackWebhook(_) => write!(f, "ClickStackSlackWebhook"), + Self::ClickStackIncidentIOWebhook(_) => write!(f, "ClickStackIncidentIOWebhook"), + Self::ClickStackGenericWebhook(_) => write!(f, "ClickStackGenericWebhook"), + Self::ClickStackSlackAPIWebhook(_) => write!(f, "ClickStackSlackAPIWebhook"), + Self::ClickStackPagerDutyAPIWebhook(_) => write!(f, "ClickStackPagerDutyAPIWebhook"), + Self::Unknown(s) => write!(f, "{s}"), + } + } } -/// `ClickPipeStatePatchRequest` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipeStatePatchRequest { - #[serde(skip_serializing_if = "Option::is_none")] - pub command: Option, -} +/// Type alias for `ClickStackCASLPermissionConditions`. +pub type ClickStackCASLPermissionConditions = serde_json::Value; -/// `ClickPipesCdcScaling` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipesCdcScaling { - #[serde( - rename = "replicaCpuMillicores", - skip_serializing_if = "Option::is_none" - )] - pub replica_cpu_millicores: Option, - #[serde(rename = "replicaMemoryGb", skip_serializing_if = "Option::is_none")] - pub replica_memory_gb: Option, -} +/// Type alias for `ClickStackValidateDashboardResponseNormalized`. +pub type ClickStackValidateDashboardResponseNormalized = serde_json::Value; -/// `ClickPipesCdcScalingPatchRequest` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ClickPipesCdcScalingPatchRequest { - #[serde( - rename = "replicaCpuMillicores", - skip_serializing_if = "Option::is_none" - )] - pub replica_cpu_millicores: Option, - #[serde(rename = "replicaMemoryGb", skip_serializing_if = "Option::is_none")] - pub replica_memory_gb: Option, -} +/// Type alias for `ClickStackWebhookInputHeaders`. +pub type ClickStackWebhookInputHeaders = std::collections::BTreeMap; + +/// Type alias for `ClickStackWebhookInputQueryParams`. +pub type ClickStackWebhookInputQueryParams = std::collections::BTreeMap; /// `ClickStackAggregatedColumn` from the ClickHouse Cloud API. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] @@ -10592,152 +7152,6 @@ pub struct ClickStackWebhookInput { pub url: String, } -/// `CreateReversePrivateEndpoint` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct CreateReversePrivateEndpoint { - #[serde( - rename = "customPrivateDnsMappings", - skip_serializing_if = "Option::is_none" - )] - pub custom_private_dns_mappings: Option>, - pub description: String, - #[serde( - rename = "gcpServiceAttachment", - skip_serializing_if = "Option::is_none" - )] - pub gcp_service_attachment: Option, - #[serde(rename = "mskAuthentication", skip_serializing_if = "Option::is_none")] - pub msk_authentication: Option, - #[serde(rename = "mskClusterArn", skip_serializing_if = "Option::is_none")] - pub msk_cluster_arn: Option, - pub r#type: CreateReversePrivateEndpointType, - #[serde( - rename = "vpcEndpointServiceName", - skip_serializing_if = "Option::is_none" - )] - pub vpc_endpoint_service_name: Option, - #[serde( - rename = "vpcResourceConfigurationId", - skip_serializing_if = "Option::is_none" - )] - pub vpc_resource_configuration_id: Option, - #[serde( - rename = "vpcResourceShareArn", - skip_serializing_if = "Option::is_none" - )] - pub vpc_resource_share_arn: Option, -} - -/// `CustomPrivateDnsMapping` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct CustomPrivateDnsMapping { - #[serde(rename = "privateDnsName", skip_serializing_if = "Option::is_none")] - pub private_dns_name: Option, -} - -/// `CustomPrivateDnsMapping` from the ClickHouse Cloud API, in response -/// position. -/// -/// Response variant of [`CustomPrivateDnsMapping`]: every field is `Option`, -/// so a field the API drops or sends as `null` deserializes to `None` instead -/// of failing. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct CustomPrivateDnsMappingResponse { - #[serde(rename = "privateDnsName", skip_serializing_if = "Option::is_none")] - pub private_dns_name: Option, -} - -/// `MskIamUser` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct MskIamUser { - #[serde(rename = "accessKeyId")] - pub access_key_id: String, - #[serde(rename = "secretKey")] - pub secret_key: String, -} - -/// `MutualTLS` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct MutualTLS { - pub certificate: String, - #[serde(rename = "privateKey")] - pub private_key: String, -} - -/// `PLAIN` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct PLAIN { - pub password: String, - pub username: String, -} - -/// `ReversePrivateEndpoint` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ReversePrivateEndpoint { - #[serde( - rename = "customPrivateDnsMappings", - skip_serializing_if = "Option::is_none" - )] - pub custom_private_dns_mappings: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "dnsNames", skip_serializing_if = "Option::is_none")] - pub dns_names: Option>, - #[serde(rename = "endpointId", skip_serializing_if = "Option::is_none")] - pub endpoint_id: Option, - #[serde( - rename = "gcpServiceAttachment", - skip_serializing_if = "Option::is_none" - )] - pub gcp_service_attachment: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "mskAuthentication", skip_serializing_if = "Option::is_none")] - pub msk_authentication: Option, - #[serde(rename = "mskClusterArn", skip_serializing_if = "Option::is_none")] - pub msk_cluster_arn: Option, - #[serde(rename = "privateDnsNames", skip_serializing_if = "Option::is_none")] - pub private_dns_names: Option>, - #[serde(rename = "serviceId", skip_serializing_if = "Option::is_none")] - pub service_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub status: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde( - rename = "vpcEndpointServiceName", - skip_serializing_if = "Option::is_none" - )] - pub vpc_endpoint_service_name: Option, - #[serde( - rename = "vpcResourceConfigurationId", - skip_serializing_if = "Option::is_none" - )] - pub vpc_resource_configuration_id: Option, - #[serde( - rename = "vpcResourceShareArn", - skip_serializing_if = "Option::is_none" - )] - pub vpc_resource_share_arn: Option, -} - -/// `ServiceAccount` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct ServiceAccount { - #[serde(rename = "serviceAccountFile")] - pub service_account_file: String, -} - -/// `UpdateReversePrivateEndpoint` from the ClickHouse Cloud API. -#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] -pub struct UpdateReversePrivateEndpoint { - #[serde( - rename = "customPrivateDnsMappings", - skip_serializing_if = "Option::is_none" - )] - pub custom_private_dns_mappings: Option>, -} - impl Default for ClickStackAlertChannel { fn default() -> Self { Self::ClickStackAlertChannelEmail(ClickStackAlertChannelEmail::default()) diff --git a/crates/clickhouse-cloud-api/src/models/clickpipes.rs b/crates/clickhouse-cloud-api/src/models/clickpipes.rs new file mode 100644 index 0000000..a3d7c19 --- /dev/null +++ b/crates/clickhouse-cloud-api/src/models/clickpipes.rs @@ -0,0 +1,3590 @@ +use serde::{Deserialize, Serialize}; + +/// Inline enum for `ClickPipe.state`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeState { + #[default] + Unknown, + Provisioning, + Running, + Stopping, + Stopped, + Failed, + Completed, + InternalError, + Setup, + Snapshot, + Paused, + Pausing, + Modifying, + Resync, + Degraded, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Other(String), +} + +impl std::fmt::Display for ClickPipeState { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Unknown => write!(f, "Unknown"), + Self::Provisioning => write!(f, "Provisioning"), + Self::Running => write!(f, "Running"), + Self::Stopping => write!(f, "Stopping"), + Self::Stopped => write!(f, "Stopped"), + Self::Failed => write!(f, "Failed"), + Self::Completed => write!(f, "Completed"), + Self::InternalError => write!(f, "InternalError"), + Self::Setup => write!(f, "Setup"), + Self::Snapshot => write!(f, "Snapshot"), + Self::Paused => write!(f, "Paused"), + Self::Pausing => write!(f, "Pausing"), + Self::Modifying => write!(f, "Modifying"), + Self::Resync => write!(f, "Resync"), + Self::Degraded => write!(f, "Degraded"), + Self::Other(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeBigQueryPipeSettings.replicationMode`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeBigQueryPipeSettingsReplicationmode { + #[serde(rename = "snapshot")] + #[default] + Snapshot, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeBigQueryPipeSettingsReplicationmode { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Snapshot => write!(f, "snapshot"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeBigQueryPipeTableMapping.tableEngine`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeBigQueryPipeTableMappingTableengine { + #[default] + MergeTree, + ReplacingMergeTree, + Null, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeBigQueryPipeTableMappingTableengine { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::MergeTree => write!(f, "MergeTree"), + Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), + Self::Null => write!(f, "Null"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeDestinationTableEngine.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeDestinationTableEngineType { + #[default] + MergeTree, + ReplacingMergeTree, + SummingMergeTree, + Null, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeDestinationTableEngineType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::MergeTree => write!(f, "MergeTree"), + Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), + Self::SummingMergeTree => write!(f, "SummingMergeTree"), + Self::Null => write!(f, "Null"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeKafkaOffset.strategy`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeKafkaOffsetStrategy { + #[serde(rename = "from_beginning")] + #[default] + From_beginning, + #[serde(rename = "from_latest")] + From_latest, + #[serde(rename = "from_timestamp")] + From_timestamp, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeKafkaOffsetStrategy { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::From_beginning => write!(f, "from_beginning"), + Self::From_latest => write!(f, "from_latest"), + Self::From_timestamp => write!(f, "from_timestamp"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeKafkaSchemaRegistry.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeKafkaSchemaRegistryAuthentication { + #[default] + PLAIN, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeKafkaSchemaRegistryAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::PLAIN => write!(f, "PLAIN"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeKafkaSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeKafkaSourceAuthentication { + #[default] + PLAIN, + #[serde(rename = "SCRAM-SHA-256")] + SCRAM_SHA_256, + #[serde(rename = "SCRAM-SHA-512")] + SCRAM_SHA_512, + IAM_ROLE, + IAM_USER, + MUTUAL_TLS, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeKafkaSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::PLAIN => write!(f, "PLAIN"), + Self::SCRAM_SHA_256 => write!(f, "SCRAM-SHA-256"), + Self::SCRAM_SHA_512 => write!(f, "SCRAM-SHA-512"), + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::MUTUAL_TLS => write!(f, "MUTUAL_TLS"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeKafkaSource.format`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeKafkaSourceFormat { + #[default] + JSONEachRow, + Avro, + AvroConfluent, + Protobuf, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeKafkaSourceFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::JSONEachRow => write!(f, "JSONEachRow"), + Self::Avro => write!(f, "Avro"), + Self::AvroConfluent => write!(f, "AvroConfluent"), + Self::Protobuf => write!(f, "Protobuf"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeKafkaSource.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeKafkaSourceType { + #[serde(rename = "kafka")] + #[default] + Kafka, + #[serde(rename = "redpanda")] + Redpanda, + #[serde(rename = "msk")] + Msk, + #[serde(rename = "gcmk")] + Gcmk, + #[serde(rename = "confluent")] + Confluent, + #[serde(rename = "warpstream")] + Warpstream, + #[serde(rename = "azureeventhub")] + Azureeventhub, + #[serde(rename = "dokafka")] + Dokafka, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeKafkaSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Kafka => write!(f, "kafka"), + Self::Redpanda => write!(f, "redpanda"), + Self::Msk => write!(f, "msk"), + Self::Gcmk => write!(f, "gcmk"), + Self::Confluent => write!(f, "confluent"), + Self::Warpstream => write!(f, "warpstream"), + Self::Azureeventhub => write!(f, "azureeventhub"), + Self::Dokafka => write!(f, "dokafka"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeKinesisSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeKinesisSourceAuthentication { + #[default] + IAM_ROLE, + IAM_USER, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeKinesisSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeKinesisSource.format`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeKinesisSourceFormat { + #[default] + JSONEachRow, + Avro, + AvroConfluent, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeKinesisSourceFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::JSONEachRow => write!(f, "JSONEachRow"), + Self::Avro => write!(f, "Avro"), + Self::AvroConfluent => write!(f, "AvroConfluent"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeKinesisSource.iteratorType`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeKinesisSourceIteratortype { + #[default] + TRIM_HORIZON, + LATEST, + AT_TIMESTAMP, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeKinesisSourceIteratortype { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::TRIM_HORIZON => write!(f, "TRIM_HORIZON"), + Self::LATEST => write!(f, "LATEST"), + Self::AT_TIMESTAMP => write!(f, "AT_TIMESTAMP"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMongoDBPipeSettings.replicationMode`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMongoDBPipeSettingsReplicationmode { + #[serde(rename = "cdc")] + #[default] + Cdc, + #[serde(rename = "snapshot")] + Snapshot, + #[serde(rename = "cdc_only")] + Cdc_only, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMongoDBPipeSettingsReplicationmode { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Cdc => write!(f, "cdc"), + Self::Snapshot => write!(f, "snapshot"), + Self::Cdc_only => write!(f, "cdc_only"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMongoDBPipeTableMapping.tableEngine`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMongoDBPipeTableMappingTableengine { + #[default] + MergeTree, + ReplacingMergeTree, + Null, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMongoDBPipeTableMappingTableengine { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::MergeTree => write!(f, "MergeTree"), + Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), + Self::Null => write!(f, "Null"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMongoDBSource.readPreference`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMongoDBSourceReadpreference { + #[serde(rename = "primary")] + #[default] + Primary, + #[serde(rename = "primaryPreferred")] + PrimaryPreferred, + #[serde(rename = "secondary")] + Secondary, + #[serde(rename = "secondaryPreferred")] + SecondaryPreferred, + #[serde(rename = "nearest")] + Nearest, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMongoDBSourceReadpreference { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Primary => write!(f, "primary"), + Self::PrimaryPreferred => write!(f, "primaryPreferred"), + Self::Secondary => write!(f, "secondary"), + Self::SecondaryPreferred => write!(f, "secondaryPreferred"), + Self::Nearest => write!(f, "nearest"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMutateKafkaSchemaRegistry.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMutateKafkaSchemaRegistryAuthentication { + #[default] + PLAIN, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMutateKafkaSchemaRegistryAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::PLAIN => write!(f, "PLAIN"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMutateMongoDBSource.readPreference`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMutateMongoDBSourceReadpreference { + #[serde(rename = "primary")] + #[default] + Primary, + #[serde(rename = "primaryPreferred")] + PrimaryPreferred, + #[serde(rename = "secondary")] + Secondary, + #[serde(rename = "secondaryPreferred")] + SecondaryPreferred, + #[serde(rename = "nearest")] + Nearest, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMutateMongoDBSourceReadpreference { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Primary => write!(f, "primary"), + Self::PrimaryPreferred => write!(f, "primaryPreferred"), + Self::Secondary => write!(f, "secondary"), + Self::SecondaryPreferred => write!(f, "secondaryPreferred"), + Self::Nearest => write!(f, "nearest"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMutateMySQLSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMutateMySQLSourceAuthentication { + #[serde(rename = "basic")] + #[default] + Basic, + IAM_ROLE, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMutateMySQLSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Basic => write!(f, "basic"), + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMutateMySQLSource.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMutateMySQLSourceType { + #[serde(rename = "mysql")] + #[default] + Mysql, + #[serde(rename = "rdsmysql")] + Rdsmysql, + #[serde(rename = "auroramysql")] + Auroramysql, + #[serde(rename = "mariadb")] + Mariadb, + #[serde(rename = "rdsmariadb")] + Rdsmariadb, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMutateMySQLSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Mysql => write!(f, "mysql"), + Self::Rdsmysql => write!(f, "rdsmysql"), + Self::Auroramysql => write!(f, "auroramysql"), + Self::Mariadb => write!(f, "mariadb"), + Self::Rdsmariadb => write!(f, "rdsmariadb"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMutatePostgresSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMutatePostgresSourceAuthentication { + #[serde(rename = "basic")] + #[default] + Basic, + IAM_ROLE, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMutatePostgresSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Basic => write!(f, "basic"), + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMutatePostgresSource.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMutatePostgresSourceType { + #[serde(rename = "postgres")] + #[default] + Postgres, + #[serde(rename = "supabase")] + Supabase, + #[serde(rename = "neon")] + Neon, + #[serde(rename = "alloydb")] + Alloydb, + #[serde(rename = "planetscale")] + Planetscale, + #[serde(rename = "rdspostgres")] + Rdspostgres, + #[serde(rename = "aurorapostgres")] + Aurorapostgres, + #[serde(rename = "cloudsqlpostgres")] + Cloudsqlpostgres, + #[serde(rename = "azurepostgres")] + Azurepostgres, + #[serde(rename = "crunchybridge")] + Crunchybridge, + #[serde(rename = "tigerdata")] + Tigerdata, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMutatePostgresSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Postgres => write!(f, "postgres"), + Self::Supabase => write!(f, "supabase"), + Self::Neon => write!(f, "neon"), + Self::Alloydb => write!(f, "alloydb"), + Self::Planetscale => write!(f, "planetscale"), + Self::Rdspostgres => write!(f, "rdspostgres"), + Self::Aurorapostgres => write!(f, "aurorapostgres"), + Self::Cloudsqlpostgres => write!(f, "cloudsqlpostgres"), + Self::Azurepostgres => write!(f, "azurepostgres"), + Self::Crunchybridge => write!(f, "crunchybridge"), + Self::Tigerdata => write!(f, "tigerdata"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMySQLPipeSettings.replicationMechanism`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMySQLPipeSettingsReplicationmechanism { + #[default] + GTID, + FILE_POS, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMySQLPipeSettingsReplicationmechanism { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::GTID => write!(f, "GTID"), + Self::FILE_POS => write!(f, "FILE_POS"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMySQLPipeSettings.replicationMode`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMySQLPipeSettingsReplicationmode { + #[serde(rename = "cdc")] + #[default] + Cdc, + #[serde(rename = "snapshot")] + Snapshot, + #[serde(rename = "cdc_only")] + Cdc_only, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMySQLPipeSettingsReplicationmode { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Cdc => write!(f, "cdc"), + Self::Snapshot => write!(f, "snapshot"), + Self::Cdc_only => write!(f, "cdc_only"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMySQLPipeTableMapping.tableEngine`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMySQLPipeTableMappingTableengine { + #[default] + MergeTree, + ReplacingMergeTree, + Null, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMySQLPipeTableMappingTableengine { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::MergeTree => write!(f, "MergeTree"), + Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), + Self::Null => write!(f, "Null"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMySQLSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMySQLSourceAuthentication { + #[serde(rename = "basic")] + #[default] + Basic, + IAM_ROLE, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMySQLSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Basic => write!(f, "basic"), + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeMySQLSource.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeMySQLSourceType { + #[serde(rename = "mysql")] + #[default] + Mysql, + #[serde(rename = "rdsmysql")] + Rdsmysql, + #[serde(rename = "auroramysql")] + Auroramysql, + #[serde(rename = "mariadb")] + Mariadb, + #[serde(rename = "rdsmariadb")] + Rdsmariadb, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeMySQLSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Mysql => write!(f, "mysql"), + Self::Rdsmysql => write!(f, "rdsmysql"), + Self::Auroramysql => write!(f, "auroramysql"), + Self::Mariadb => write!(f, "mariadb"), + Self::Rdsmariadb => write!(f, "rdsmariadb"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeObjectStorageSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeObjectStorageSourceAuthentication { + #[default] + IAM_ROLE, + IAM_USER, + CONNECTION_STRING, + SERVICE_ACCOUNT, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeObjectStorageSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::CONNECTION_STRING => write!(f, "CONNECTION_STRING"), + Self::SERVICE_ACCOUNT => write!(f, "SERVICE_ACCOUNT"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeObjectStorageSource.compression`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeObjectStorageSourceCompression { + #[serde(rename = "none")] + #[default] + None, + #[serde(rename = "gzip")] + Gzip, + #[serde(rename = "gz")] + Gz, + #[serde(rename = "brotli")] + Brotli, + #[serde(rename = "br")] + Br, + #[serde(rename = "xz")] + Xz, + LZMA, + #[serde(rename = "zstd")] + Zstd, + #[serde(rename = "auto")] + Auto, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeObjectStorageSourceCompression { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::None => write!(f, "none"), + Self::Gzip => write!(f, "gzip"), + Self::Gz => write!(f, "gz"), + Self::Brotli => write!(f, "brotli"), + Self::Br => write!(f, "br"), + Self::Xz => write!(f, "xz"), + Self::LZMA => write!(f, "LZMA"), + Self::Zstd => write!(f, "zstd"), + Self::Auto => write!(f, "auto"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeObjectStorageSource.format`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeObjectStorageSourceFormat { + #[default] + JSONEachRow, + JSONAsObject, + CSV, + CSVWithNames, + TabSeparated, + TabSeparatedWithNames, + Parquet, + Avro, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeObjectStorageSourceFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::JSONEachRow => write!(f, "JSONEachRow"), + Self::JSONAsObject => write!(f, "JSONAsObject"), + Self::CSV => write!(f, "CSV"), + Self::CSVWithNames => write!(f, "CSVWithNames"), + Self::TabSeparated => write!(f, "TabSeparated"), + Self::TabSeparatedWithNames => write!(f, "TabSeparatedWithNames"), + Self::Parquet => write!(f, "Parquet"), + Self::Avro => write!(f, "Avro"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeObjectStorageSource.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeObjectStorageSourceType { + #[serde(rename = "s3")] + #[default] + S3, + #[serde(rename = "gcs")] + Gcs, + #[serde(rename = "dospaces")] + Dospaces, + #[serde(rename = "azureblobstorage")] + Azureblobstorage, + #[serde(rename = "cloudflarer2")] + Cloudflarer2, + #[serde(rename = "ovhobjectstorage")] + Ovhobjectstorage, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeObjectStorageSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::S3 => write!(f, "s3"), + Self::Gcs => write!(f, "gcs"), + Self::Dospaces => write!(f, "dospaces"), + Self::Azureblobstorage => write!(f, "azureblobstorage"), + Self::Cloudflarer2 => write!(f, "cloudflarer2"), + Self::Ovhobjectstorage => write!(f, "ovhobjectstorage"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchKafkaSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchKafkaSourceAuthentication { + #[default] + PLAIN, + #[serde(rename = "SCRAM-SHA-256")] + SCRAM_SHA_256, + #[serde(rename = "SCRAM-SHA-512")] + SCRAM_SHA_512, + IAM_ROLE, + IAM_USER, + MUTUAL_TLS, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchKafkaSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::PLAIN => write!(f, "PLAIN"), + Self::SCRAM_SHA_256 => write!(f, "SCRAM-SHA-256"), + Self::SCRAM_SHA_512 => write!(f, "SCRAM-SHA-512"), + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::MUTUAL_TLS => write!(f, "MUTUAL_TLS"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchKinesisSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchKinesisSourceAuthentication { + #[default] + IAM_ROLE, + IAM_USER, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchKinesisSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchMongoDBPipeRemoveTableMapping.tableEngine`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchMongoDBPipeRemoveTableMappingTableengine { + #[default] + MergeTree, + ReplacingMergeTree, + Null, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchMongoDBPipeRemoveTableMappingTableengine { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::MergeTree => write!(f, "MergeTree"), + Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), + Self::Null => write!(f, "Null"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchMongoDBSource.readPreference`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchMongoDBSourceReadpreference { + #[serde(rename = "primary")] + #[default] + Primary, + #[serde(rename = "primaryPreferred")] + PrimaryPreferred, + #[serde(rename = "secondary")] + Secondary, + #[serde(rename = "secondaryPreferred")] + SecondaryPreferred, + #[serde(rename = "nearest")] + Nearest, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchMongoDBSourceReadpreference { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Primary => write!(f, "primary"), + Self::PrimaryPreferred => write!(f, "primaryPreferred"), + Self::Secondary => write!(f, "secondary"), + Self::SecondaryPreferred => write!(f, "secondaryPreferred"), + Self::Nearest => write!(f, "nearest"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchMySQLPipeRemoveTableMapping.tableEngine`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchMySQLPipeRemoveTableMappingTableengine { + #[default] + MergeTree, + ReplacingMergeTree, + Null, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchMySQLPipeRemoveTableMappingTableengine { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::MergeTree => write!(f, "MergeTree"), + Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), + Self::Null => write!(f, "Null"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchMySQLSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchMySQLSourceAuthentication { + #[serde(rename = "basic")] + #[default] + Basic, + IAM_ROLE, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchMySQLSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Basic => write!(f, "basic"), + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchObjectStorageSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchObjectStorageSourceAuthentication { + #[default] + IAM_ROLE, + IAM_USER, + CONNECTION_STRING, + SERVICE_ACCOUNT, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchObjectStorageSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::CONNECTION_STRING => write!(f, "CONNECTION_STRING"), + Self::SERVICE_ACCOUNT => write!(f, "SERVICE_ACCOUNT"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchPostgresPipeRemoveTableMapping.tableEngine`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchPostgresPipeRemoveTableMappingTableengine { + #[default] + MergeTree, + ReplacingMergeTree, + Null, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchPostgresPipeRemoveTableMappingTableengine { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::MergeTree => write!(f, "MergeTree"), + Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), + Self::Null => write!(f, "Null"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePatchPubSubSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePatchPubSubSourceAuthentication { + #[serde(rename = "SERVICE_ACCOUNT")] + #[default] + ServiceAccount, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePatchPubSubSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::ServiceAccount => write!(f, "SERVICE_ACCOUNT"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostKafkaSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostKafkaSourceAuthentication { + #[default] + PLAIN, + #[serde(rename = "SCRAM-SHA-256")] + SCRAM_SHA_256, + #[serde(rename = "SCRAM-SHA-512")] + SCRAM_SHA_512, + IAM_ROLE, + IAM_USER, + MUTUAL_TLS, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostKafkaSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::PLAIN => write!(f, "PLAIN"), + Self::SCRAM_SHA_256 => write!(f, "SCRAM-SHA-256"), + Self::SCRAM_SHA_512 => write!(f, "SCRAM-SHA-512"), + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::MUTUAL_TLS => write!(f, "MUTUAL_TLS"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostKafkaSource.format`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostKafkaSourceFormat { + #[default] + JSONEachRow, + Avro, + AvroConfluent, + Protobuf, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostKafkaSourceFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::JSONEachRow => write!(f, "JSONEachRow"), + Self::Avro => write!(f, "Avro"), + Self::AvroConfluent => write!(f, "AvroConfluent"), + Self::Protobuf => write!(f, "Protobuf"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostKafkaSource.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostKafkaSourceType { + #[serde(rename = "kafka")] + #[default] + Kafka, + #[serde(rename = "redpanda")] + Redpanda, + #[serde(rename = "msk")] + Msk, + #[serde(rename = "gcmk")] + Gcmk, + #[serde(rename = "confluent")] + Confluent, + #[serde(rename = "warpstream")] + Warpstream, + #[serde(rename = "azureeventhub")] + Azureeventhub, + #[serde(rename = "dokafka")] + Dokafka, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostKafkaSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Kafka => write!(f, "kafka"), + Self::Redpanda => write!(f, "redpanda"), + Self::Msk => write!(f, "msk"), + Self::Gcmk => write!(f, "gcmk"), + Self::Confluent => write!(f, "confluent"), + Self::Warpstream => write!(f, "warpstream"), + Self::Azureeventhub => write!(f, "azureeventhub"), + Self::Dokafka => write!(f, "dokafka"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostKinesisSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostKinesisSourceAuthentication { + #[default] + IAM_ROLE, + IAM_USER, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostKinesisSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostKinesisSource.format`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostKinesisSourceFormat { + #[default] + JSONEachRow, + Avro, + AvroConfluent, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostKinesisSourceFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::JSONEachRow => write!(f, "JSONEachRow"), + Self::Avro => write!(f, "Avro"), + Self::AvroConfluent => write!(f, "AvroConfluent"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostKinesisSource.iteratorType`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostKinesisSourceIteratortype { + #[default] + TRIM_HORIZON, + LATEST, + AT_TIMESTAMP, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostKinesisSourceIteratortype { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::TRIM_HORIZON => write!(f, "TRIM_HORIZON"), + Self::LATEST => write!(f, "LATEST"), + Self::AT_TIMESTAMP => write!(f, "AT_TIMESTAMP"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostObjectStorageSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostObjectStorageSourceAuthentication { + #[default] + IAM_ROLE, + IAM_USER, + CONNECTION_STRING, + SERVICE_ACCOUNT, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostObjectStorageSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::IAM_USER => write!(f, "IAM_USER"), + Self::CONNECTION_STRING => write!(f, "CONNECTION_STRING"), + Self::SERVICE_ACCOUNT => write!(f, "SERVICE_ACCOUNT"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostObjectStorageSource.compression`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostObjectStorageSourceCompression { + #[serde(rename = "none")] + #[default] + None, + #[serde(rename = "gzip")] + Gzip, + #[serde(rename = "gz")] + Gz, + #[serde(rename = "brotli")] + Brotli, + #[serde(rename = "br")] + Br, + #[serde(rename = "xz")] + Xz, + LZMA, + #[serde(rename = "zstd")] + Zstd, + #[serde(rename = "auto")] + Auto, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostObjectStorageSourceCompression { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::None => write!(f, "none"), + Self::Gzip => write!(f, "gzip"), + Self::Gz => write!(f, "gz"), + Self::Brotli => write!(f, "brotli"), + Self::Br => write!(f, "br"), + Self::Xz => write!(f, "xz"), + Self::LZMA => write!(f, "LZMA"), + Self::Zstd => write!(f, "zstd"), + Self::Auto => write!(f, "auto"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostObjectStorageSource.format`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostObjectStorageSourceFormat { + #[default] + JSONEachRow, + JSONAsObject, + CSV, + CSVWithNames, + TabSeparated, + TabSeparatedWithNames, + Parquet, + Avro, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostObjectStorageSourceFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::JSONEachRow => write!(f, "JSONEachRow"), + Self::JSONAsObject => write!(f, "JSONAsObject"), + Self::CSV => write!(f, "CSV"), + Self::CSVWithNames => write!(f, "CSVWithNames"), + Self::TabSeparated => write!(f, "TabSeparated"), + Self::TabSeparatedWithNames => write!(f, "TabSeparatedWithNames"), + Self::Parquet => write!(f, "Parquet"), + Self::Avro => write!(f, "Avro"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostObjectStorageSource.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostObjectStorageSourceType { + #[serde(rename = "s3")] + #[default] + S3, + #[serde(rename = "gcs")] + Gcs, + #[serde(rename = "dospaces")] + Dospaces, + #[serde(rename = "azureblobstorage")] + Azureblobstorage, + #[serde(rename = "cloudflarer2")] + Cloudflarer2, + #[serde(rename = "ovhobjectstorage")] + Ovhobjectstorage, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostObjectStorageSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::S3 => write!(f, "s3"), + Self::Gcs => write!(f, "gcs"), + Self::Dospaces => write!(f, "dospaces"), + Self::Azureblobstorage => write!(f, "azureblobstorage"), + Self::Cloudflarer2 => write!(f, "cloudflarer2"), + Self::Ovhobjectstorage => write!(f, "ovhobjectstorage"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostPubSubSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostPubSubSourceAuthentication { + #[serde(rename = "SERVICE_ACCOUNT")] + #[default] + ServiceAccount, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostPubSubSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::ServiceAccount => write!(f, "SERVICE_ACCOUNT"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostPubSubSource.format`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostPubSubSourceFormat { + #[default] + JSONEachRow, + Avro, + Protobuf, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostPubSubSourceFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::JSONEachRow => write!(f, "JSONEachRow"), + Self::Avro => write!(f, "Avro"), + Self::Protobuf => write!(f, "Protobuf"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostPubSubSource.seekType`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostPubSubSourceSeektype { + #[serde(rename = "latest")] + #[default] + Latest, + #[serde(rename = "earliest")] + Earliest, + #[serde(rename = "timestamp")] + Timestamp, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostPubSubSourceSeektype { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Latest => write!(f, "latest"), + Self::Earliest => write!(f, "earliest"), + Self::Timestamp => write!(f, "timestamp"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostgresPipeSettings.replicationMode`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostgresPipeSettingsReplicationmode { + #[serde(rename = "cdc")] + #[default] + Cdc, + #[serde(rename = "snapshot")] + Snapshot, + #[serde(rename = "cdc_only")] + Cdc_only, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostgresPipeSettingsReplicationmode { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Cdc => write!(f, "cdc"), + Self::Snapshot => write!(f, "snapshot"), + Self::Cdc_only => write!(f, "cdc_only"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostgresPipeTableMapping.tableEngine`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostgresPipeTableMappingTableengine { + #[default] + MergeTree, + ReplacingMergeTree, + Null, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostgresPipeTableMappingTableengine { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::MergeTree => write!(f, "MergeTree"), + Self::ReplacingMergeTree => write!(f, "ReplacingMergeTree"), + Self::Null => write!(f, "Null"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostgresSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostgresSourceAuthentication { + #[serde(rename = "basic")] + #[default] + Basic, + IAM_ROLE, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostgresSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Basic => write!(f, "basic"), + Self::IAM_ROLE => write!(f, "IAM_ROLE"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePostgresSource.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePostgresSourceType { + #[serde(rename = "postgres")] + #[default] + Postgres, + #[serde(rename = "supabase")] + Supabase, + #[serde(rename = "neon")] + Neon, + #[serde(rename = "alloydb")] + Alloydb, + #[serde(rename = "planetscale")] + Planetscale, + #[serde(rename = "rdspostgres")] + Rdspostgres, + #[serde(rename = "aurorapostgres")] + Aurorapostgres, + #[serde(rename = "cloudsqlpostgres")] + Cloudsqlpostgres, + #[serde(rename = "azurepostgres")] + Azurepostgres, + #[serde(rename = "crunchybridge")] + Crunchybridge, + #[serde(rename = "tigerdata")] + Tigerdata, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePostgresSourceType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Postgres => write!(f, "postgres"), + Self::Supabase => write!(f, "supabase"), + Self::Neon => write!(f, "neon"), + Self::Alloydb => write!(f, "alloydb"), + Self::Planetscale => write!(f, "planetscale"), + Self::Rdspostgres => write!(f, "rdspostgres"), + Self::Aurorapostgres => write!(f, "aurorapostgres"), + Self::Cloudsqlpostgres => write!(f, "cloudsqlpostgres"), + Self::Azurepostgres => write!(f, "azurepostgres"), + Self::Crunchybridge => write!(f, "crunchybridge"), + Self::Tigerdata => write!(f, "tigerdata"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePubSubSource.authentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePubSubSourceAuthentication { + #[serde(rename = "SERVICE_ACCOUNT")] + #[default] + ServiceAccount, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePubSubSourceAuthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::ServiceAccount => write!(f, "SERVICE_ACCOUNT"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePubSubSource.format`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePubSubSourceFormat { + #[default] + JSONEachRow, + Avro, + Protobuf, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePubSubSourceFormat { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::JSONEachRow => write!(f, "JSONEachRow"), + Self::Avro => write!(f, "Avro"), + Self::Protobuf => write!(f, "Protobuf"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipePubSubSource.seekType`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipePubSubSourceSeektype { + #[serde(rename = "latest")] + #[default] + Latest, + #[serde(rename = "earliest")] + Earliest, + #[serde(rename = "timestamp")] + Timestamp, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipePubSubSourceSeektype { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Latest => write!(f, "latest"), + Self::Earliest => write!(f, "earliest"), + Self::Timestamp => write!(f, "timestamp"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ClickPipeStatePatchRequest.command`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ClickPipeStatePatchRequestCommand { + #[serde(rename = "start")] + #[default] + Start, + #[serde(rename = "stop")] + Stop, + #[serde(rename = "resync")] + Resync, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ClickPipeStatePatchRequestCommand { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Start => write!(f, "start"), + Self::Stop => write!(f, "stop"), + Self::Resync => write!(f, "resync"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `CreateReversePrivateEndpoint.mskAuthentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum CreateReversePrivateEndpointMskauthentication { + #[default] + SASL_IAM, + SASL_SCRAM, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for CreateReversePrivateEndpointMskauthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::SASL_IAM => write!(f, "SASL_IAM"), + Self::SASL_SCRAM => write!(f, "SASL_SCRAM"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `CreateReversePrivateEndpoint.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum CreateReversePrivateEndpointType { + #[default] + VPC_ENDPOINT_SERVICE, + VPC_RESOURCE, + MSK_MULTI_VPC, + GCP_PSC_SERVICE_ATTACHMENT, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for CreateReversePrivateEndpointType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::VPC_ENDPOINT_SERVICE => write!(f, "VPC_ENDPOINT_SERVICE"), + Self::VPC_RESOURCE => write!(f, "VPC_RESOURCE"), + Self::MSK_MULTI_VPC => write!(f, "MSK_MULTI_VPC"), + Self::GCP_PSC_SERVICE_ATTACHMENT => write!(f, "GCP_PSC_SERVICE_ATTACHMENT"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ReversePrivateEndpoint.mskAuthentication`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ReversePrivateEndpointMskauthentication { + #[default] + SASL_IAM, + SASL_SCRAM, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ReversePrivateEndpointMskauthentication { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::SASL_IAM => write!(f, "SASL_IAM"), + Self::SASL_SCRAM => write!(f, "SASL_SCRAM"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ReversePrivateEndpoint.status`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ReversePrivateEndpointStatus { + #[default] + Unknown, + Provisioning, + Deleting, + Ready, + Failed, + PendingAcceptance, + Rejected, + Expired, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Other(String), +} + +impl std::fmt::Display for ReversePrivateEndpointStatus { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Unknown => write!(f, "Unknown"), + Self::Provisioning => write!(f, "Provisioning"), + Self::Deleting => write!(f, "Deleting"), + Self::Ready => write!(f, "Ready"), + Self::Failed => write!(f, "Failed"), + Self::PendingAcceptance => write!(f, "PendingAcceptance"), + Self::Rejected => write!(f, "Rejected"), + Self::Expired => write!(f, "Expired"), + Self::Other(s) => write!(f, "{s}"), + } + } +} + +/// Inline enum for `ReversePrivateEndpoint.type`. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub enum ReversePrivateEndpointType { + #[default] + VPC_ENDPOINT_SERVICE, + VPC_RESOURCE, + MSK_MULTI_VPC, + GCP_PSC_SERVICE_ATTACHMENT, + /// Catch-all for unknown or newly-added values. + #[serde(untagged)] + Unknown(String), +} + +impl std::fmt::Display for ReversePrivateEndpointType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::VPC_ENDPOINT_SERVICE => write!(f, "VPC_ENDPOINT_SERVICE"), + Self::VPC_RESOURCE => write!(f, "VPC_RESOURCE"), + Self::MSK_MULTI_VPC => write!(f, "MSK_MULTI_VPC"), + Self::GCP_PSC_SERVICE_ATTACHMENT => write!(f, "GCP_PSC_SERVICE_ATTACHMENT"), + Self::Unknown(s) => write!(f, "{s}"), + } + } +} + +/// `AzureEventHub` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct AzureEventHub { + #[serde(rename = "connectionString")] + pub connection_string: String, +} + +/// `ClickPipe` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipe { + #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")] + pub created_at: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub destination: Option, + #[serde(rename = "fieldMappings", skip_serializing_if = "Option::is_none")] + pub field_mappings: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub scaling: Option, + #[serde(rename = "serviceId", skip_serializing_if = "Option::is_none")] + pub service_id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")] + pub updated_at: Option>, +} + +/// `ClickPipeBigQueryPipeSettings` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeBigQueryPipeSettings { + #[serde(rename = "allowNullableColumns")] + pub allow_nullable_columns: bool, + #[serde(rename = "initialLoadParallelism")] + pub initial_load_parallelism: f64, + #[serde(rename = "replicationMode")] + pub replication_mode: ClickPipeBigQueryPipeSettingsReplicationmode, + #[serde(rename = "snapshotNumRowsPerPartition")] + pub snapshot_num_rows_per_partition: f64, + #[serde(rename = "snapshotNumberOfParallelTables")] + pub snapshot_number_of_parallel_tables: f64, +} + +/// `ClickPipeBigQueryPipeSettings` from the ClickHouse Cloud API, in response +/// position. +/// +/// Response variant of [`ClickPipeBigQueryPipeSettings`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeBigQueryPipeSettingsResponse { + #[serde( + rename = "allowNullableColumns", + skip_serializing_if = "Option::is_none" + )] + pub allow_nullable_columns: Option, + #[serde( + rename = "initialLoadParallelism", + skip_serializing_if = "Option::is_none" + )] + pub initial_load_parallelism: Option, + #[serde(rename = "replicationMode", skip_serializing_if = "Option::is_none")] + pub replication_mode: Option, + #[serde( + rename = "snapshotNumRowsPerPartition", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_num_rows_per_partition: Option, + #[serde( + rename = "snapshotNumberOfParallelTables", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_number_of_parallel_tables: Option, +} + +/// `ClickPipeBigQueryPipeTableMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeBigQueryPipeTableMapping { + #[serde(rename = "excludedColumns")] + pub excluded_columns: Vec, + #[serde(rename = "sortingKeys")] + pub sorting_keys: Vec, + #[serde(rename = "sourceDatasetName")] + pub source_dataset_name: String, + #[serde(rename = "sourceTable")] + pub source_table: String, + #[serde(rename = "tableEngine")] + pub table_engine: ClickPipeBigQueryPipeTableMappingTableengine, + #[serde(rename = "targetTable")] + pub target_table: String, + #[serde(rename = "useCustomSortingKey")] + pub use_custom_sorting_key: bool, +} + +/// `ClickPipeBigQueryPipeTableMapping` from the ClickHouse Cloud API, in +/// response position. +/// +/// Response variant of [`ClickPipeBigQueryPipeTableMapping`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeBigQueryPipeTableMappingResponse { + #[serde(rename = "excludedColumns", skip_serializing_if = "Option::is_none")] + pub excluded_columns: Option>, + #[serde(rename = "sortingKeys", skip_serializing_if = "Option::is_none")] + pub sorting_keys: Option>, + #[serde(rename = "sourceDatasetName", skip_serializing_if = "Option::is_none")] + pub source_dataset_name: Option, + #[serde(rename = "sourceTable", skip_serializing_if = "Option::is_none")] + pub source_table: Option, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] + pub target_table: Option, + #[serde( + rename = "useCustomSortingKey", + skip_serializing_if = "Option::is_none" + )] + pub use_custom_sorting_key: Option, +} + +/// `ClickPipeBigQuerySource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeBigQuerySource { + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + #[serde( + rename = "snapshotStagingPath", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_staging_path: Option, + #[serde(rename = "tableMappings", skip_serializing_if = "Option::is_none")] + pub table_mappings: Option>, +} + +/// `ClickPipeDestination` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeDestination { + #[serde(skip_serializing_if = "Option::is_none")] + pub columns: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub database: Option, + #[serde(rename = "managedTable", skip_serializing_if = "Option::is_none")] + pub managed_table: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub table: Option, + #[serde(rename = "tableDefinition", skip_serializing_if = "Option::is_none")] + pub table_definition: Option, +} + +/// `ClickPipeDestinationColumn` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeDestinationColumn { + pub name: String, + pub r#type: String, +} + +/// `ClickPipeDestinationColumn` from the ClickHouse Cloud API, in response +/// position. +/// +/// Response variant of [`ClickPipeDestinationColumn`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeDestinationColumnResponse { + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, +} + +/// `ClickPipeDestinationTableDefinition` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeDestinationTableDefinition { + pub engine: ClickPipeDestinationTableEngine, + // API rejects empty strings / empty arrays for these keys. Spec has no + // `required` array so the description-heuristic treats them as required; + // skip at serialize time when unset instead of modeling as Option. + #[serde(rename = "partitionBy", skip_serializing_if = "String::is_empty")] + pub partition_by: String, + #[serde(rename = "primaryKey", skip_serializing_if = "String::is_empty")] + pub primary_key: String, + #[serde(rename = "sortingKey", skip_serializing_if = "Vec::is_empty")] + pub sorting_key: Vec, +} + +/// `ClickPipeDestinationTableDefinition` from the ClickHouse Cloud API, in +/// response position. +/// +/// Response variant of [`ClickPipeDestinationTableDefinition`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeDestinationTableDefinitionResponse { + #[serde(skip_serializing_if = "Option::is_none")] + pub engine: Option, + #[serde(rename = "partitionBy", skip_serializing_if = "Option::is_none")] + pub partition_by: Option, + #[serde(rename = "primaryKey", skip_serializing_if = "Option::is_none")] + pub primary_key: Option, + #[serde(rename = "sortingKey", skip_serializing_if = "Option::is_none")] + pub sorting_key: Option>, +} + +/// `ClickPipeDestinationTableEngine` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeDestinationTableEngine { + // columnIds only valid for SummingMergeTree. Skip when empty to avoid API + // rejection for MergeTree/ReplacingMergeTree/Null engines. Spec has no + // `required` array so the heuristic treats this as required; API rejects + // empty values despite that. + #[serde(rename = "columnIds", skip_serializing_if = "Vec::is_empty")] + pub column_ids: Vec, + pub r#type: ClickPipeDestinationTableEngineType, + #[serde(rename = "versionColumnId", skip_serializing_if = "Option::is_none")] + pub version_column_id: Option, +} + +/// `ClickPipeDestinationTableEngine` from the ClickHouse Cloud API, in response +/// position. +/// +/// Response variant of [`ClickPipeDestinationTableEngine`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeDestinationTableEngineResponse { + #[serde(rename = "columnIds", skip_serializing_if = "Option::is_none")] + pub column_ids: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "versionColumnId", skip_serializing_if = "Option::is_none")] + pub version_column_id: Option, +} + +/// `ClickPipeFieldMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeFieldMapping { + #[serde(rename = "destinationField")] + pub destination_field: String, + #[serde(rename = "sourceField")] + pub source_field: String, +} + +/// `ClickPipeFieldMapping` from the ClickHouse Cloud API, in response position. +/// +/// Response variant of [`ClickPipeFieldMapping`]: every field is `Option`, +/// so a field the API drops or sends as `null` deserializes to `None` instead +/// of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeFieldMappingResponse { + #[serde(rename = "destinationField", skip_serializing_if = "Option::is_none")] + pub destination_field: Option, + #[serde(rename = "sourceField", skip_serializing_if = "Option::is_none")] + pub source_field: Option, +} + +/// `ClickPipeKafkaOffset` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeKafkaOffset { + pub strategy: ClickPipeKafkaOffsetStrategy, + #[serde(skip_serializing_if = "Option::is_none")] + pub timestamp: Option, +} + +/// `ClickPipeKafkaOffset` from the ClickHouse Cloud API, in response position. +/// +/// Response variant of [`ClickPipeKafkaOffset`]: every field is `Option`, so +/// a field the API drops or sends as `null` deserializes to `None` instead of +/// failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeKafkaOffsetResponse { + #[serde(skip_serializing_if = "Option::is_none")] + pub strategy: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub timestamp: Option, +} + +/// `ClickPipeKafkaSchemaRegistry` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeKafkaSchemaRegistry { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +/// `ClickPipeKafkaSchemaRegistryCredentials` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeKafkaSchemaRegistryCredentials { + pub password: String, + pub username: String, +} + +/// `ClickPipeKafkaSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeKafkaSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub brokers: Option, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(rename = "consumerGroup", skip_serializing_if = "Option::is_none")] + pub consumer_group: Option, + #[serde(rename = "exactlyOnce", skip_serializing_if = "Option::is_none")] + pub exactly_once: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub format: Option, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub offset: Option, + #[serde( + rename = "reversePrivateEndpointIds", + skip_serializing_if = "Option::is_none" + )] + pub reverse_private_endpoint_ids: Option>, + #[serde(rename = "schemaRegistry", skip_serializing_if = "Option::is_none")] + pub schema_registry: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub topics: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, +} + +/// `ClickPipeKinesisSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeKinesisSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub format: Option, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(rename = "iteratorType", skip_serializing_if = "Option::is_none")] + pub iterator_type: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub region: Option, + #[serde(rename = "streamName", skip_serializing_if = "Option::is_none")] + pub stream_name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub timestamp: Option, + #[serde(rename = "useEnhancedFanOut", skip_serializing_if = "Option::is_none")] + pub use_enhanced_fan_out: Option, +} + +/// `ClickPipeMongoDBPipeSettings` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMongoDBPipeSettings { + #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] + pub delete_on_merge: Option, + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde(rename = "replicationMode")] + pub replication_mode: ClickPipeMongoDBPipeSettingsReplicationmode, + #[serde( + rename = "snapshotNumRowsPerPartition", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_num_rows_per_partition: Option, + #[serde( + rename = "snapshotNumberOfParallelTables", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_number_of_parallel_tables: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, + #[serde( + rename = "useJsonNativeFormat", + skip_serializing_if = "Option::is_none" + )] + pub use_json_native_format: Option, +} + +/// `ClickPipeMongoDBPipeSettings` from the ClickHouse Cloud API, in response +/// position. +/// +/// Response variant of [`ClickPipeMongoDBPipeSettings`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMongoDBPipeSettingsResponse { + #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] + pub delete_on_merge: Option, + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde(rename = "replicationMode", skip_serializing_if = "Option::is_none")] + pub replication_mode: Option, + #[serde( + rename = "snapshotNumRowsPerPartition", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_num_rows_per_partition: Option, + #[serde( + rename = "snapshotNumberOfParallelTables", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_number_of_parallel_tables: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, + #[serde( + rename = "useJsonNativeFormat", + skip_serializing_if = "Option::is_none" + )] + pub use_json_native_format: Option, +} + +/// `ClickPipeMongoDBPipeTableMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMongoDBPipeTableMapping { + #[serde(rename = "sourceCollection")] + pub source_collection: String, + #[serde(rename = "sourceDatabaseName")] + pub source_database_name: String, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable")] + pub target_table: String, +} + +/// `ClickPipeMongoDBPipeTableMapping` from the ClickHouse Cloud API, in +/// response position. +/// +/// Response variant of [`ClickPipeMongoDBPipeTableMapping`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMongoDBPipeTableMappingResponse { + #[serde(rename = "sourceCollection", skip_serializing_if = "Option::is_none")] + pub source_collection: Option, + #[serde(rename = "sourceDatabaseName", skip_serializing_if = "Option::is_none")] + pub source_database_name: Option, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] + pub target_table: Option, +} + +/// `ClickPipeMongoDBSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMongoDBSource { + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] + pub disable_tls: Option, + #[serde(rename = "readPreference", skip_serializing_if = "Option::is_none")] + pub read_preference: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + #[serde( + rename = "skipCertVerification", + skip_serializing_if = "Option::is_none" + )] + pub skip_cert_verification: Option, + #[serde(rename = "tableMappings", skip_serializing_if = "Option::is_none")] + pub table_mappings: Option>, + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub uri: Option, +} + +/// `ClickPipeMutateBigQuerySource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMutateBigQuerySource { + pub credentials: ServiceAccount, + pub settings: ClickPipeBigQueryPipeSettings, + #[serde(rename = "snapshotStagingPath")] + pub snapshot_staging_path: String, + #[serde(rename = "tableMappings")] + pub table_mappings: Vec, +} + +/// `ClickPipeMutateDestination` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMutateDestination { + // The spec describes `columns`, `managedTable`, `table`, and + // `tableDefinition` as "Required field for all pipe types except database + // pipes (Postgres, MySQL, BigQuery)" — all four must be omitted entirely + // for database pipes. Modeled with skip-when-empty / Option so callers can + // build a single destination type and database pipes serialize cleanly. + #[serde(skip_serializing_if = "Vec::is_empty")] + pub columns: Vec, + pub database: String, + #[serde(rename = "managedTable", skip_serializing_if = "Option::is_none")] + pub managed_table: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub roles: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub table: Option, + #[serde(rename = "tableDefinition", skip_serializing_if = "Option::is_none")] + pub table_definition: Option, +} + +/// `ClickPipeMutateKafkaSchemaRegistry` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMutateKafkaSchemaRegistry { + pub authentication: ClickPipeMutateKafkaSchemaRegistryAuthentication, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + pub credentials: ClickPipeKafkaSchemaRegistryCredentials, + pub url: String, +} + +/// `ClickPipeMutateMongoDBSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMutateMongoDBSource { + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub credentials: Option, + #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] + pub disable_tls: Option, + #[serde(rename = "readPreference")] + pub read_preference: ClickPipeMutateMongoDBSourceReadpreference, + pub settings: ClickPipeMongoDBPipeSettings, + #[serde( + rename = "skipCertVerification", + skip_serializing_if = "Option::is_none" + )] + pub skip_cert_verification: Option, + #[serde(rename = "tableMappings")] + pub table_mappings: Vec, + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, + pub uri: String, +} + +/// `ClickPipeMutateMySQLSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMutateMySQLSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub credentials: Option, + #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] + pub disable_tls: Option, + pub host: String, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + pub port: i64, + #[serde(rename = "serverId", skip_serializing_if = "Option::is_none")] + pub server_id: Option, + pub settings: ClickPipeMySQLPipeSettings, + #[serde( + rename = "skipCertVerification", + skip_serializing_if = "Option::is_none" + )] + pub skip_cert_verification: Option, + #[serde(rename = "tableMappings")] + pub table_mappings: Vec, + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, +} + +/// `ClickPipeMutatePostgresSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMutatePostgresSource { + pub authentication: ClickPipeMutatePostgresSourceAuthentication, + // caCertificate is `undefinedOr(isValidPEMCertificate)` server-side — sending + // `""` (the bare-String default) fails PEM validation. Modeled as + // `Option` so callers can omit it. + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + pub credentials: PLAIN, + pub database: String, + #[serde(rename = "disableTls")] + pub disable_tls: bool, + pub host: String, + // iamRole only applies to RDS-style Postgres + IAM_ROLE auth. Spec marks + // it required but the server rejects "" for Basic-auth Postgres. Modeled + // as Option so callers can omit it; same pattern as ca_certificate. + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + pub port: i64, + pub settings: ClickPipePostgresPipeSettings, + #[serde(rename = "skipCertVerification")] + pub skip_cert_verification: bool, + #[serde(rename = "tableMappings")] + pub table_mappings: Vec, + // tlsHost is only set when the broker cert SAN doesn't match `host`. + // Optional in practice; server rejects "" with PEM-style validation. + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, +} + +/// `ClickPipeMySQLPipeSettings` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMySQLPipeSettings { + #[serde( + rename = "allowNullableColumns", + skip_serializing_if = "Option::is_none" + )] + pub allow_nullable_columns: Option, + #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] + pub delete_on_merge: Option, + #[serde( + rename = "initialLoadParallelism", + skip_serializing_if = "Option::is_none" + )] + pub initial_load_parallelism: Option, + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde( + rename = "replicationMechanism", + skip_serializing_if = "Option::is_none" + )] + pub replication_mechanism: Option, + #[serde(rename = "replicationMode")] + pub replication_mode: ClickPipeMySQLPipeSettingsReplicationmode, + #[serde( + rename = "snapshotNumRowsPerPartition", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_num_rows_per_partition: Option, + #[serde( + rename = "snapshotNumberOfParallelTables", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_number_of_parallel_tables: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, + #[serde(rename = "useCompression", skip_serializing_if = "Option::is_none")] + pub use_compression: Option, +} + +/// `ClickPipeMySQLPipeSettings` from the ClickHouse Cloud API, in response +/// position. +/// +/// Response variant of [`ClickPipeMySQLPipeSettings`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMySQLPipeSettingsResponse { + #[serde( + rename = "allowNullableColumns", + skip_serializing_if = "Option::is_none" + )] + pub allow_nullable_columns: Option, + #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] + pub delete_on_merge: Option, + #[serde( + rename = "initialLoadParallelism", + skip_serializing_if = "Option::is_none" + )] + pub initial_load_parallelism: Option, + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde( + rename = "replicationMechanism", + skip_serializing_if = "Option::is_none" + )] + pub replication_mechanism: Option, + #[serde(rename = "replicationMode", skip_serializing_if = "Option::is_none")] + pub replication_mode: Option, + #[serde( + rename = "snapshotNumRowsPerPartition", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_num_rows_per_partition: Option, + #[serde( + rename = "snapshotNumberOfParallelTables", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_number_of_parallel_tables: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, + #[serde(rename = "useCompression", skip_serializing_if = "Option::is_none")] + pub use_compression: Option, +} + +/// `ClickPipeMySQLPipeTableMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMySQLPipeTableMapping { + #[serde(rename = "excludedColumns", skip_serializing_if = "Option::is_none")] + pub excluded_columns: Option>, + #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] + pub partition_key: Option, + #[serde(rename = "sortingKeys", skip_serializing_if = "Option::is_none")] + pub sorting_keys: Option>, + #[serde(rename = "sourceSchemaName")] + pub source_schema_name: String, + #[serde(rename = "sourceTable")] + pub source_table: String, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable")] + pub target_table: String, + #[serde( + rename = "useCustomSortingKey", + skip_serializing_if = "Option::is_none" + )] + pub use_custom_sorting_key: Option, +} + +/// `ClickPipeMySQLPipeTableMapping` from the ClickHouse Cloud API, in response +/// position. +/// +/// Response variant of [`ClickPipeMySQLPipeTableMapping`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMySQLPipeTableMappingResponse { + #[serde(rename = "excludedColumns", skip_serializing_if = "Option::is_none")] + pub excluded_columns: Option>, + #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] + pub partition_key: Option, + #[serde(rename = "sortingKeys", skip_serializing_if = "Option::is_none")] + pub sorting_keys: Option>, + #[serde(rename = "sourceSchemaName", skip_serializing_if = "Option::is_none")] + pub source_schema_name: Option, + #[serde(rename = "sourceTable", skip_serializing_if = "Option::is_none")] + pub source_table: Option, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] + pub target_table: Option, + #[serde( + rename = "useCustomSortingKey", + skip_serializing_if = "Option::is_none" + )] + pub use_custom_sorting_key: Option, +} + +/// `ClickPipeMySQLSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeMySQLSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] + pub disable_tls: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub host: Option, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(rename = "serverId", skip_serializing_if = "Option::is_none")] + pub server_id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + #[serde( + rename = "skipCertVerification", + skip_serializing_if = "Option::is_none" + )] + pub skip_cert_verification: Option, + #[serde(rename = "tableMappings", skip_serializing_if = "Option::is_none")] + pub table_mappings: Option>, + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, +} + +/// `ClickPipeObjectStorageSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeObjectStorageSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "azureContainerName", skip_serializing_if = "Option::is_none")] + pub azure_container_name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub compression: Option, + #[serde(rename = "connectionString", skip_serializing_if = "Option::is_none")] + pub connection_string: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub delimiter: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub format: Option, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(rename = "isContinuous", skip_serializing_if = "Option::is_none")] + pub is_continuous: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub path: Option, + #[serde(rename = "queueUrl", skip_serializing_if = "Option::is_none")] + pub queue_url: Option, + #[serde(rename = "skipInitialLoad", skip_serializing_if = "Option::is_none")] + pub skip_initial_load: Option, + #[serde(rename = "startAfter", skip_serializing_if = "Option::is_none")] + pub start_after: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +/// `ClickPipePatchDestination` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchDestination { + pub columns: Vec, +} + +/// `ClickPipePatchKafkaSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchKafkaSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + pub credentials: serde_json::Value, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(rename = "reversePrivateEndpointIds")] + pub reverse_private_endpoint_ids: Vec, +} + +/// `ClickPipePatchKinesisSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchKinesisSource { + #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")] + pub access_key: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, +} + +/// `ClickPipePatchMongoDBPipeRemoveTableMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchMongoDBPipeRemoveTableMapping { + #[serde(rename = "sourceCollection")] + pub source_collection: Option, + #[serde(rename = "sourceDatabaseName")] + pub source_database_name: Option, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable")] + pub target_table: Option, +} + +/// `ClickPipePatchMongoDBPipeSettings` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchMongoDBPipeSettings { + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, +} + +/// `ClickPipePatchMongoDBSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchMongoDBSource { + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub credentials: Option, + #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] + pub disable_tls: Option, + #[serde(rename = "readPreference", skip_serializing_if = "Option::is_none")] + pub read_preference: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + #[serde( + rename = "skipCertVerification", + skip_serializing_if = "Option::is_none" + )] + pub skip_cert_verification: Option, + #[serde(rename = "tableMappingsToAdd", skip_serializing_if = "Option::is_none")] + pub table_mappings_to_add: Option>, + #[serde( + rename = "tableMappingsToRemove", + skip_serializing_if = "Option::is_none" + )] + pub table_mappings_to_remove: Option>, + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, + pub uri: Option, +} + +/// `ClickPipePatchMySQLPipeRemoveTableMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchMySQLPipeRemoveTableMapping { + #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] + pub partition_key: Option, + #[serde(rename = "sourceSchemaName")] + pub source_schema_name: Option, + #[serde(rename = "sourceTable")] + pub source_table: Option, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable")] + pub target_table: Option, +} + +/// `ClickPipePatchMySQLPipeSettings` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchMySQLPipeSettings { + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, + #[serde(rename = "useCompression", skip_serializing_if = "Option::is_none")] + pub use_compression: Option, +} + +/// `ClickPipePatchMySQLSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchMySQLSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub credentials: Option, + #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] + pub disable_tls: Option, + pub host: Option, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + pub port: Option, + #[serde(rename = "serverId", skip_serializing_if = "Option::is_none")] + pub server_id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + #[serde( + rename = "skipCertVerification", + skip_serializing_if = "Option::is_none" + )] + pub skip_cert_verification: Option, + #[serde(rename = "tableMappingsToAdd", skip_serializing_if = "Option::is_none")] + pub table_mappings_to_add: Option>, + #[serde( + rename = "tableMappingsToRemove", + skip_serializing_if = "Option::is_none" + )] + pub table_mappings_to_remove: Option>, + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, +} + +/// `ClickPipePatchObjectStorageSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchObjectStorageSource { + #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")] + pub access_key: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "azureContainerName", skip_serializing_if = "Option::is_none")] + pub azure_container_name: Option, + #[serde(rename = "connectionString", skip_serializing_if = "Option::is_none")] + pub connection_string: Option, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub path: Option, + #[serde(rename = "serviceAccountKey", skip_serializing_if = "Option::is_none")] + pub service_account_key: Option, + #[serde(rename = "skipInitialLoad", skip_serializing_if = "Option::is_none")] + pub skip_initial_load: Option, + #[serde(rename = "startAfter", skip_serializing_if = "Option::is_none")] + pub start_after: Option, +} + +/// `ClickPipePatchPostgresPipeRemoveTableMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchPostgresPipeRemoveTableMapping { + #[serde(rename = "partitionByExpr", skip_serializing_if = "Option::is_none")] + pub partition_by_expr: Option, + #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] + pub partition_key: Option, + #[serde(rename = "sourceSchemaName", skip_serializing_if = "Option::is_none")] + pub source_schema_name: Option, + #[serde(rename = "sourceTable", skip_serializing_if = "Option::is_none")] + pub source_table: Option, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] + pub target_table: Option, +} + +/// `ClickPipePatchPostgresPipeSettings` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchPostgresPipeSettings { + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, +} + +/// `ClickPipePatchPostgresSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchPostgresSource { + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + pub credentials: PLAIN, + #[serde(skip_serializing_if = "Option::is_none")] + pub database: Option, + #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] + pub disable_tls: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub host: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub port: Option, + pub settings: ClickPipePatchPostgresPipeSettings, + #[serde( + rename = "skipCertVerification", + skip_serializing_if = "Option::is_none" + )] + pub skip_cert_verification: Option, + #[serde(rename = "tableMappingsToAdd")] + pub table_mappings_to_add: Vec, + #[serde(rename = "tableMappingsToRemove")] + pub table_mappings_to_remove: Vec, + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, +} + +/// `ClickPipePatchPubSubSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchPubSubSource { + #[serde(rename = "ackDeadline", skip_serializing_if = "Option::is_none")] + pub ack_deadline: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "serviceAccountKey", skip_serializing_if = "Option::is_none")] + pub service_account_key: Option, +} + +/// `ClickPipePatchRequest` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchRequest { + #[serde(skip_serializing_if = "Option::is_none")] + pub destination: Option, + #[serde(rename = "fieldMappings", skip_serializing_if = "Option::is_none")] + pub field_mappings: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub source: Option, +} + +/// `ClickPipePatchSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePatchSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub kafka: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub kinesis: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mongodb: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mysql: Option, + #[serde(rename = "objectStorage", skip_serializing_if = "Option::is_none")] + pub object_storage: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub postgres: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub pubsub: Option, + #[serde(rename = "validateSamples")] + pub validate_samples: bool, +} + +/// `ClickPipePostKafkaSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostKafkaSource { + pub authentication: ClickPipePostKafkaSourceAuthentication, + pub brokers: String, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(rename = "consumerGroup", skip_serializing_if = "Option::is_none")] + pub consumer_group: Option, + pub credentials: serde_json::Value, + #[serde(rename = "exactlyOnce", skip_serializing_if = "Option::is_none")] + pub exactly_once: Option, + pub format: ClickPipePostKafkaSourceFormat, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub offset: Option, + #[serde(rename = "reversePrivateEndpointIds")] + pub reverse_private_endpoint_ids: Vec, + #[serde(rename = "schemaRegistry", skip_serializing_if = "Option::is_none")] + pub schema_registry: Option, + pub topics: String, + pub r#type: ClickPipePostKafkaSourceType, +} + +/// `ClickPipePostKinesisSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostKinesisSource { + #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")] + pub access_key: Option, + pub authentication: ClickPipePostKinesisSourceAuthentication, + pub format: ClickPipePostKinesisSourceFormat, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(rename = "iteratorType")] + pub iterator_type: ClickPipePostKinesisSourceIteratortype, + pub region: String, + #[serde(rename = "streamName")] + pub stream_name: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub timestamp: Option, + #[serde(rename = "useEnhancedFanOut", skip_serializing_if = "Option::is_none")] + pub use_enhanced_fan_out: Option, +} + +/// `ClickPipeSchemaDiscoveryField` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeSchemaDiscoveryField { + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub optional: Option, +} + +/// `ClickPipeSchemaDiscoveryRequest` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeSchemaDiscoveryRequest { + pub source: ClickPipeSchemaDiscoverySource, +} + +/// `ClickPipeSchemaDiscoveryResponse` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeSchemaDiscoveryResponse { + #[serde(skip_serializing_if = "Option::is_none")] + pub fields: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub meta: Option, +} + +/// `ClickPipeSchemaDiscoveryMeta` from the ClickHouse Cloud API. +pub type ClickPipeSchemaDiscoveryMeta = std::collections::BTreeMap; + +/// `ClickPipeSchemaDiscoverySource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeSchemaDiscoverySource { + #[serde(skip_serializing_if = "Option::is_none")] + pub kafka: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub kinesis: Option, +} + +/// `ClickPipePostObjectStorageSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostObjectStorageSource { + #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")] + pub access_key: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "azureContainerName", skip_serializing_if = "Option::is_none")] + pub azure_container_name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub compression: Option, + #[serde(rename = "connectionString", skip_serializing_if = "Option::is_none")] + pub connection_string: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub delimiter: Option, + pub format: ClickPipePostObjectStorageSourceFormat, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(rename = "isContinuous", skip_serializing_if = "Option::is_none")] + pub is_continuous: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub path: Option, + #[serde(rename = "queueUrl", skip_serializing_if = "Option::is_none")] + pub queue_url: Option, + #[serde(rename = "serviceAccountKey", skip_serializing_if = "Option::is_none")] + pub service_account_key: Option, + #[serde(rename = "skipInitialLoad", skip_serializing_if = "Option::is_none")] + pub skip_initial_load: Option, + #[serde(rename = "startAfter", skip_serializing_if = "Option::is_none")] + pub start_after: Option, + pub r#type: ClickPipePostObjectStorageSourceType, + pub url: String, +} + +/// `ClickPipePostPubSubSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostPubSubSource { + #[serde(rename = "ackDeadline", skip_serializing_if = "Option::is_none")] + pub ack_deadline: Option, + pub authentication: ClickPipePostPubSubSourceAuthentication, + #[serde(rename = "enableOrdering", skip_serializing_if = "Option::is_none")] + pub enable_ordering: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub filter: Option, + pub format: ClickPipePostPubSubSourceFormat, + #[serde(rename = "projectId")] + pub project_id: String, + #[serde(rename = "seekTimestamp", skip_serializing_if = "Option::is_none")] + pub seek_timestamp: Option>, + #[serde(rename = "seekType")] + pub seek_type: ClickPipePostPubSubSourceSeektype, + #[serde(rename = "serviceAccountKey")] + pub service_account_key: ServiceAccount, + pub topic: String, +} + +/// `ClickPipePostRequest` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostRequest { + pub destination: ClickPipeMutateDestination, + // Empty arrays rejected by some API paths and never useful on create — + // skip when empty. Non-Option to match the spec description heuristic. + #[serde(rename = "fieldMappings", skip_serializing_if = "Vec::is_empty")] + pub field_mappings: Vec, + pub name: String, + // scaling block default-serializes as {replicas: 0, ...} which the API + // rejects ("replicas: Not between 1 and 40"). Modeled as Option so the + // whole block is omitted when the caller doesn't set it. + #[serde(skip_serializing_if = "Option::is_none")] + pub scaling: Option, + // settings default-serializes as `{}` which the API also rejects. + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + pub source: ClickPipePostSource, +} + +/// `ClickPipePostSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub bigquery: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub kafka: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub kinesis: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mongodb: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mysql: Option, + #[serde(rename = "objectStorage", skip_serializing_if = "Option::is_none")] + pub object_storage: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub postgres: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub pubsub: Option, + #[serde(rename = "validateSamples")] + pub validate_samples: bool, +} + +/// `ClickPipePostgresPipeSettings` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostgresPipeSettings { + #[serde(rename = "allowNullableColumns")] + pub allow_nullable_columns: bool, + #[serde(rename = "deleteOnMerge")] + pub delete_on_merge: bool, + #[serde(rename = "enableFailoverSlots")] + pub enable_failover_slots: bool, + #[serde( + rename = "initialLoadParallelism", + skip_serializing_if = "Option::is_none" + )] + pub initial_load_parallelism: Option, + #[serde(rename = "publicationName", skip_serializing_if = "Option::is_none")] + pub publication_name: Option, + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde(rename = "replicationMode")] + pub replication_mode: ClickPipePostgresPipeSettingsReplicationmode, + #[serde( + rename = "replicationSlotName", + skip_serializing_if = "Option::is_none" + )] + pub replication_slot_name: Option, + #[serde( + rename = "snapshotNumRowsPerPartition", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_num_rows_per_partition: Option, + #[serde( + rename = "snapshotNumberOfParallelTables", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_number_of_parallel_tables: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, +} + +/// `ClickPipePostgresPipeSettings` from the ClickHouse Cloud API, in response +/// position. +/// +/// Response variant of [`ClickPipePostgresPipeSettings`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostgresPipeSettingsResponse { + #[serde( + rename = "allowNullableColumns", + skip_serializing_if = "Option::is_none" + )] + pub allow_nullable_columns: Option, + #[serde(rename = "deleteOnMerge", skip_serializing_if = "Option::is_none")] + pub delete_on_merge: Option, + #[serde( + rename = "enableFailoverSlots", + skip_serializing_if = "Option::is_none" + )] + pub enable_failover_slots: Option, + #[serde( + rename = "initialLoadParallelism", + skip_serializing_if = "Option::is_none" + )] + pub initial_load_parallelism: Option, + #[serde(rename = "publicationName", skip_serializing_if = "Option::is_none")] + pub publication_name: Option, + #[serde(rename = "pullBatchSize", skip_serializing_if = "Option::is_none")] + pub pull_batch_size: Option, + #[serde(rename = "replicationMode", skip_serializing_if = "Option::is_none")] + pub replication_mode: Option, + #[serde( + rename = "replicationSlotName", + skip_serializing_if = "Option::is_none" + )] + pub replication_slot_name: Option, + #[serde( + rename = "snapshotNumRowsPerPartition", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_num_rows_per_partition: Option, + #[serde( + rename = "snapshotNumberOfParallelTables", + skip_serializing_if = "Option::is_none" + )] + pub snapshot_number_of_parallel_tables: Option, + #[serde( + rename = "syncIntervalSeconds", + skip_serializing_if = "Option::is_none" + )] + pub sync_interval_seconds: Option, +} + +/// `ClickPipePostgresPipeTableMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostgresPipeTableMapping { + #[serde(rename = "excludedColumns")] + pub excluded_columns: Vec, + #[serde(rename = "partitionByExpr")] + pub partition_by_expr: String, + #[serde(rename = "partitionKey")] + pub partition_key: String, + #[serde(rename = "sortingKeys")] + pub sorting_keys: Vec, + #[serde(rename = "sourceSchemaName")] + pub source_schema_name: String, + #[serde(rename = "sourceTable")] + pub source_table: String, + #[serde(rename = "tableEngine")] + pub table_engine: ClickPipePostgresPipeTableMappingTableengine, + #[serde(rename = "targetTable")] + pub target_table: String, + #[serde(rename = "useCustomSortingKey")] + pub use_custom_sorting_key: bool, +} + +/// `ClickPipePostgresPipeTableMapping` from the ClickHouse Cloud API, in +/// response position. +/// +/// Response variant of [`ClickPipePostgresPipeTableMapping`]: every field is +/// `Option`, so a field the API drops or sends as `null` deserializes to +/// `None` instead of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostgresPipeTableMappingResponse { + #[serde(rename = "excludedColumns", skip_serializing_if = "Option::is_none")] + pub excluded_columns: Option>, + #[serde(rename = "partitionByExpr", skip_serializing_if = "Option::is_none")] + pub partition_by_expr: Option, + #[serde(rename = "partitionKey", skip_serializing_if = "Option::is_none")] + pub partition_key: Option, + #[serde(rename = "sortingKeys", skip_serializing_if = "Option::is_none")] + pub sorting_keys: Option>, + #[serde(rename = "sourceSchemaName", skip_serializing_if = "Option::is_none")] + pub source_schema_name: Option, + #[serde(rename = "sourceTable", skip_serializing_if = "Option::is_none")] + pub source_table: Option, + #[serde(rename = "tableEngine", skip_serializing_if = "Option::is_none")] + pub table_engine: Option, + #[serde(rename = "targetTable", skip_serializing_if = "Option::is_none")] + pub target_table: Option, + #[serde( + rename = "useCustomSortingKey", + skip_serializing_if = "Option::is_none" + )] + pub use_custom_sorting_key: Option, +} + +/// `ClickPipePostgresSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePostgresSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "caCertificate", skip_serializing_if = "Option::is_none")] + pub ca_certificate: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub database: Option, + #[serde(rename = "disableTls", skip_serializing_if = "Option::is_none")] + pub disable_tls: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub host: Option, + #[serde(rename = "iamRole", skip_serializing_if = "Option::is_none")] + pub iam_role: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub settings: Option, + #[serde( + rename = "skipCertVerification", + skip_serializing_if = "Option::is_none" + )] + pub skip_cert_verification: Option, + #[serde(rename = "tableMappings", skip_serializing_if = "Option::is_none")] + pub table_mappings: Option>, + #[serde(rename = "tlsHost", skip_serializing_if = "Option::is_none")] + pub tls_host: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, +} + +/// `ClickPipePubSubSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipePubSubSource { + #[serde(rename = "ackDeadline", skip_serializing_if = "Option::is_none")] + pub ack_deadline: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub authentication: Option, + #[serde(rename = "enableOrdering", skip_serializing_if = "Option::is_none")] + pub enable_ordering: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub filter: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub format: Option, + #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] + pub project_id: Option, + #[serde(rename = "seekTimestamp", skip_serializing_if = "Option::is_none")] + pub seek_timestamp: Option>, + #[serde(rename = "seekType", skip_serializing_if = "Option::is_none")] + pub seek_type: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub topic: Option, +} + +/// `ClickPipeScaling` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeScaling { + #[cfg(feature = "deprecated-fields")] + pub concurrency: i64, + #[serde(rename = "replicaCpuMillicores")] + pub replica_cpu_millicores: i64, + #[serde(rename = "replicaMemoryGb")] + pub replica_memory_gb: f64, + pub replicas: i64, +} + +/// `ClickPipeScaling` from the ClickHouse Cloud API, in response position. +/// +/// Response variant of [`ClickPipeScaling`]: every field is `Option`, so a +/// field the API drops or sends as `null` deserializes to `None` instead of +/// failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeScalingResponse { + #[cfg(feature = "deprecated-fields")] + #[serde(skip_serializing_if = "Option::is_none")] + pub concurrency: Option, + #[serde( + rename = "replicaCpuMillicores", + skip_serializing_if = "Option::is_none" + )] + pub replica_cpu_millicores: Option, + #[serde(rename = "replicaMemoryGb", skip_serializing_if = "Option::is_none")] + pub replica_memory_gb: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub replicas: Option, +} + +/// `ClickPipeScalingPatchRequest` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeScalingPatchRequest { + #[cfg(feature = "deprecated-fields")] + #[serde(skip_serializing_if = "Option::is_none")] + pub concurrency: Option, + #[serde( + rename = "replicaCpuMillicores", + skip_serializing_if = "Option::is_none" + )] + pub replica_cpu_millicores: Option, + #[serde(rename = "replicaMemoryGb", skip_serializing_if = "Option::is_none")] + pub replica_memory_gb: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub replicas: Option, +} + +/// `ClickPipeSettings` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeSettings { + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_download_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_insert_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_min_insert_block_size_bytes: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_parallel_distributed_insert_select: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_parallel_view_processing: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_concurrency: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_max_file_count: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_max_insert_bytes: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_polling_interval_ms: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_use_cluster_function: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub streaming_max_insert_wait_ms: Option, +} + +/// `ClickPipeSettings` from the ClickHouse Cloud API, in response position. +/// +/// Response variant of [`ClickPipeSettings`]: every field is `Option`, so a +/// field the API drops or sends as `null` deserializes to `None` instead of +/// failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeSettingsResponse { + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_download_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_insert_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_min_insert_block_size_bytes: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_parallel_distributed_insert_select: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_parallel_view_processing: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_concurrency: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_max_file_count: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_max_insert_bytes: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_polling_interval_ms: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_use_cluster_function: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub streaming_max_insert_wait_ms: Option, +} + +/// `ClickPipeSettingsPutRequest` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeSettingsPutRequest { + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_download_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_insert_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_max_threads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_min_insert_block_size_bytes: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_parallel_distributed_insert_select: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub clickhouse_parallel_view_processing: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_concurrency: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_max_file_count: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_max_insert_bytes: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_polling_interval_ms: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub object_storage_use_cluster_function: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub streaming_max_insert_wait_ms: Option, +} + +/// `ClickPipeSource` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeSource { + #[serde(skip_serializing_if = "Option::is_none")] + pub bigquery: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub kafka: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub kinesis: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mongodb: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub mysql: Option, + #[serde(rename = "objectStorage", skip_serializing_if = "Option::is_none")] + pub object_storage: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub postgres: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub pubsub: Option, +} + +/// `ClickPipeStatePatchRequest` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipeStatePatchRequest { + #[serde(skip_serializing_if = "Option::is_none")] + pub command: Option, +} + +/// `ClickPipesCdcScaling` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipesCdcScaling { + #[serde( + rename = "replicaCpuMillicores", + skip_serializing_if = "Option::is_none" + )] + pub replica_cpu_millicores: Option, + #[serde(rename = "replicaMemoryGb", skip_serializing_if = "Option::is_none")] + pub replica_memory_gb: Option, +} + +/// `ClickPipesCdcScalingPatchRequest` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ClickPipesCdcScalingPatchRequest { + #[serde( + rename = "replicaCpuMillicores", + skip_serializing_if = "Option::is_none" + )] + pub replica_cpu_millicores: Option, + #[serde(rename = "replicaMemoryGb", skip_serializing_if = "Option::is_none")] + pub replica_memory_gb: Option, +} + +/// `CreateReversePrivateEndpoint` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct CreateReversePrivateEndpoint { + #[serde( + rename = "customPrivateDnsMappings", + skip_serializing_if = "Option::is_none" + )] + pub custom_private_dns_mappings: Option>, + pub description: String, + #[serde( + rename = "gcpServiceAttachment", + skip_serializing_if = "Option::is_none" + )] + pub gcp_service_attachment: Option, + #[serde(rename = "mskAuthentication", skip_serializing_if = "Option::is_none")] + pub msk_authentication: Option, + #[serde(rename = "mskClusterArn", skip_serializing_if = "Option::is_none")] + pub msk_cluster_arn: Option, + pub r#type: CreateReversePrivateEndpointType, + #[serde( + rename = "vpcEndpointServiceName", + skip_serializing_if = "Option::is_none" + )] + pub vpc_endpoint_service_name: Option, + #[serde( + rename = "vpcResourceConfigurationId", + skip_serializing_if = "Option::is_none" + )] + pub vpc_resource_configuration_id: Option, + #[serde( + rename = "vpcResourceShareArn", + skip_serializing_if = "Option::is_none" + )] + pub vpc_resource_share_arn: Option, +} + +/// `CustomPrivateDnsMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct CustomPrivateDnsMapping { + #[serde(rename = "privateDnsName", skip_serializing_if = "Option::is_none")] + pub private_dns_name: Option, +} + +/// `CustomPrivateDnsMapping` from the ClickHouse Cloud API, in response +/// position. +/// +/// Response variant of [`CustomPrivateDnsMapping`]: every field is `Option`, +/// so a field the API drops or sends as `null` deserializes to `None` instead +/// of failing. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct CustomPrivateDnsMappingResponse { + #[serde(rename = "privateDnsName", skip_serializing_if = "Option::is_none")] + pub private_dns_name: Option, +} + +/// `MskIamUser` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct MskIamUser { + #[serde(rename = "accessKeyId")] + pub access_key_id: String, + #[serde(rename = "secretKey")] + pub secret_key: String, +} + +/// `MutualTLS` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct MutualTLS { + pub certificate: String, + #[serde(rename = "privateKey")] + pub private_key: String, +} + +/// `PLAIN` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct PLAIN { + pub password: String, + pub username: String, +} + +/// `ReversePrivateEndpoint` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ReversePrivateEndpoint { + #[serde( + rename = "customPrivateDnsMappings", + skip_serializing_if = "Option::is_none" + )] + pub custom_private_dns_mappings: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "dnsNames", skip_serializing_if = "Option::is_none")] + pub dns_names: Option>, + #[serde(rename = "endpointId", skip_serializing_if = "Option::is_none")] + pub endpoint_id: Option, + #[serde( + rename = "gcpServiceAttachment", + skip_serializing_if = "Option::is_none" + )] + pub gcp_service_attachment: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "mskAuthentication", skip_serializing_if = "Option::is_none")] + pub msk_authentication: Option, + #[serde(rename = "mskClusterArn", skip_serializing_if = "Option::is_none")] + pub msk_cluster_arn: Option, + #[serde(rename = "privateDnsNames", skip_serializing_if = "Option::is_none")] + pub private_dns_names: Option>, + #[serde(rename = "serviceId", skip_serializing_if = "Option::is_none")] + pub service_id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde( + rename = "vpcEndpointServiceName", + skip_serializing_if = "Option::is_none" + )] + pub vpc_endpoint_service_name: Option, + #[serde( + rename = "vpcResourceConfigurationId", + skip_serializing_if = "Option::is_none" + )] + pub vpc_resource_configuration_id: Option, + #[serde( + rename = "vpcResourceShareArn", + skip_serializing_if = "Option::is_none" + )] + pub vpc_resource_share_arn: Option, +} + +/// `ServiceAccount` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct ServiceAccount { + #[serde(rename = "serviceAccountFile")] + pub service_account_file: String, +} + +/// `UpdateReversePrivateEndpoint` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct UpdateReversePrivateEndpoint { + #[serde( + rename = "customPrivateDnsMappings", + skip_serializing_if = "Option::is_none" + )] + pub custom_private_dns_mappings: Option>, +} diff --git a/crates/clickhouse-cloud-api/tests/model_facade_test.rs b/crates/clickhouse-cloud-api/tests/model_facade_test.rs index 3236357..f1c636d 100644 --- a/crates/clickhouse-cloud-api/tests/model_facade_test.rs +++ b/crates/clickhouse-cloud-api/tests/model_facade_test.rs @@ -14,6 +14,12 @@ fn extracted_models_keep_root_and_models_paths() { api::ByocConfig::default(), api::models::ByocConfig::default(), ); + assert_same_type(api::ClickPipe::default(), api::models::ClickPipe::default()); + assert_same_type( + api::ReversePrivateEndpoint::default(), + api::models::ReversePrivateEndpoint::default(), + ); + assert_same_type(api::PLAIN::default(), api::models::PLAIN::default()); assert_same_type( api::Invitation::default(), api::models::Invitation::default(), diff --git a/crates/clickhouse-cloud-api/tests/models_test.rs b/crates/clickhouse-cloud-api/tests/models_test.rs index b050d64..09086e7 100644 --- a/crates/clickhouse-cloud-api/tests/models_test.rs +++ b/crates/clickhouse-cloud-api/tests/models_test.rs @@ -2123,6 +2123,19 @@ fn deserialize_clickpipe_post_pubsub_source_required_fields() { ); } +#[test] +fn serialize_clickpipe_patch_pubsub_source_omits_absent_credentials() { + let empty = serde_json::to_value(ClickPipePatchPubSubSource::default()).unwrap(); + assert_eq!(empty, serde_json::json!({})); + + let ack_deadline_only = serde_json::to_value(ClickPipePatchPubSubSource { + ack_deadline: Some(30), + ..Default::default() + }) + .unwrap(); + assert_eq!(ack_deadline_only, serde_json::json!({"ackDeadline": 30})); +} + #[test] fn deserialize_clickpipe_source_with_pubsub() { let json = r#"{