From ecfe6d81e4beda219d26b3f3b26e586a6005ff7a Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 16 Jan 2025 14:29:05 +0100 Subject: [PATCH] Replace OpenAPI generator with openapi-codegen for model generation --- ChangeLog.md | 6 + regen_openapi.sh | 5 - rust/Cargo.toml | 2 +- rust/src/lib.rs | 1 - rust/src/models/aggregate_event_types_out.rs | 37 +- rust/src/models/app_portal_access_in.rs | 45 +- rust/src/models/app_portal_access_out.rs | 23 +- rust/src/models/app_usage_stats_in.rs | 33 +- rust/src/models/app_usage_stats_out.rs | 43 +- rust/src/models/application_in.rs | 33 +- rust/src/models/application_out.rs | 36 +- rust/src/models/application_patch.rs | 51 +- rust/src/models/application_stats.rs | 36 -- .../src/models/application_token_expire_in.rs | 24 +- rust/src/models/attempt_statistics_data.rs | 31 - .../src/models/attempt_statistics_response.rs | 42 -- rust/src/models/auth_token_out.rs | 44 -- rust/src/models/azure_blob_storage_config.rs | 34 - rust/src/models/background_task_out.rs | 39 +- rust/src/models/big_query_config.rs | 45 -- rust/src/models/border_radius_config.rs | 34 - rust/src/models/border_radius_enum.rs | 47 -- .../src/models/client_secret_jwt_params_in.rs | 45 -- rust/src/models/completion_choice.rs | 38 -- rust/src/models/completion_message.rs | 28 - rust/src/models/count_out.rs | 35 - rust/src/models/create_stream_in.rs | 31 - rust/src/models/create_token_in.rs | 30 - rust/src/models/custom_color_palette.rs | 55 -- rust/src/models/custom_strings_override.rs | 34 - rust/src/models/custom_theme_override.rs | 31 - rust/src/models/dashboard_access_out.rs | 23 +- rust/src/models/duration.rs | 28 - rust/src/models/endpoint_created_event.rs | 45 -- .../src/models/endpoint_created_event_data.rs | 44 -- rust/src/models/endpoint_deleted_event.rs | 45 -- .../src/models/endpoint_deleted_event_data.rs | 44 -- rust/src/models/endpoint_disabled_event.rs | 47 -- .../models/endpoint_disabled_event_data.rs | 52 -- rust/src/models/endpoint_headers_in.rs | 21 +- rust/src/models/endpoint_headers_out.rs | 35 +- rust/src/models/endpoint_headers_patch_in.rs | 21 +- rust/src/models/endpoint_in.rs | 64 +- rust/src/models/endpoint_message_out.rs | 54 +- rust/src/models/endpoint_mtls_config_in.rs | 35 - rust/src/models/endpoint_oauth_config_in.rs | 66 -- rust/src/models/endpoint_out.rs | 52 +- rust/src/models/endpoint_patch.rs | 109 ++-- rust/src/models/endpoint_secret_out.rs | 29 +- rust/src/models/endpoint_secret_rotate_in.rs | 30 +- rust/src/models/endpoint_stats.rs | 35 +- rust/src/models/endpoint_transformation_in.rs | 25 +- .../src/models/endpoint_transformation_out.rs | 25 +- .../endpoint_transformation_simulate_in.rs | 42 -- .../endpoint_transformation_simulate_out.rs | 34 - rust/src/models/endpoint_update.rs | 53 +- rust/src/models/endpoint_updated_event.rs | 45 -- .../src/models/endpoint_updated_event_data.rs | 44 -- rust/src/models/environment_in.rs | 41 +- rust/src/models/environment_out.rs | 41 +- rust/src/models/environment_settings_out.rs | 94 --- rust/src/models/event_example_in.rs | 30 +- rust/src/models/event_in.rs | 32 - rust/src/models/event_out.rs | 35 - rust/src/models/event_stream_out.rs | 34 - rust/src/models/event_type_example_out.rs | 26 - rust/src/models/event_type_from_open_api.rs | 36 +- .../models/event_type_import_open_api_in.rs | 45 +- .../models/event_type_import_open_api_out.rs | 27 +- .../event_type_import_open_api_out_data.rs | 28 +- rust/src/models/event_type_in.rs | 40 +- rust/src/models/event_type_out.rs | 41 +- rust/src/models/event_type_patch.rs | 67 +- rust/src/models/event_type_schema_in.rs | 26 - rust/src/models/event_type_update.rs | 38 +- rust/src/models/export_event_type_out.rs | 34 - rust/src/models/font_size_config.rs | 26 - rust/src/models/generate_in.rs | 26 - rust/src/models/generate_out.rs | 46 -- .../src/models/google_cloud_storage_config.rs | 37 -- rust/src/models/hubspot_oauth_config_in.rs | 26 - rust/src/models/inbound_path_params.rs | 32 - .../models/incoming_webhook_payload_out.rs | 34 - rust/src/models/integration_in.rs | 21 +- rust/src/models/integration_key_out.rs | 21 +- rust/src/models/integration_out.rs | 25 +- rust/src/models/integration_update.rs | 21 +- .../models/kafka_security_protocol_type.rs | 41 -- .../models/list_response_application_out.rs | 28 + .../models/list_response_application_out_.rs | 41 -- .../list_response_application_stats_.rs | 41 -- ...s => list_response_background_task_out.rs} | 20 +- .../list_response_endpoint_message_out.rs | 28 + .../list_response_endpoint_message_out_.rs | 41 -- rust/src/models/list_response_endpoint_out.rs | 28 + .../src/models/list_response_endpoint_out_.rs | 41 -- .../models/list_response_event_type_out.rs | 28 + .../models/list_response_event_type_out_.rs | 41 -- .../models/list_response_integration_out.rs | 28 + .../models/list_response_integration_out_.rs | 41 -- ...t_response_message_attempt_endpoint_out.rs | 28 + ..._response_message_attempt_endpoint_out_.rs | 41 -- .../list_response_message_attempt_out.rs | 28 + .../list_response_message_attempt_out_.rs | 41 -- .../list_response_message_endpoint_out.rs | 28 + .../list_response_message_endpoint_out_.rs | 41 -- rust/src/models/list_response_message_out.rs | 28 + rust/src/models/list_response_message_out_.rs | 41 -- ...ponse_operational_webhook_endpoint_out.rs} | 20 +- rust/src/models/list_response_sink_out_.rs | 41 -- .../list_response_stream_event_type_out_.rs | 41 -- rust/src/models/list_response_stream_out_.rs | 41 -- .../models/list_response_stream_sink_out_.rs | 41 -- .../src/models/list_response_template_out_.rs | 41 -- .../models/message_attempt_endpoint_out.rs | 60 +- .../models/message_attempt_exhausted_event.rs | 50 -- .../message_attempt_exhausted_event_data.rs | 60 -- .../src/models/message_attempt_failed_data.rs | 39 -- .../models/message_attempt_failing_event.rs | 52 -- .../message_attempt_failing_event_data.rs | 60 -- .../src/models/message_attempt_headers_out.rs | 37 -- rust/src/models/message_attempt_out.rs | 60 +- .../models/message_attempt_recovered_event.rs | 50 -- .../message_attempt_recovered_event_data.rs | 60 -- rust/src/models/message_broadcast_in.rs | 56 -- rust/src/models/message_broadcast_out.rs | 34 - rust/src/models/message_endpoint_out.rs | 62 +- rust/src/models/message_in.rs | 73 +-- rust/src/models/message_out.rs | 36 +- rust/src/models/message_raw_payload_out.rs | 26 - .../message_subscriber_auth_token_out.rs | 31 - rust/src/models/mod.rs | 598 +++--------------- rust/src/models/o_auth_payload_in.rs | 28 - rust/src/models/o_auth_payload_out.rs | 34 - rust/src/models/oauth2_auth_method_in.rs | 60 -- rust/src/models/oauth2_grant_type_in.rs | 38 -- .../src/models/oauth_jws_signing_algorithm.rs | 35 - rust/src/models/one_time_token_in.rs | 26 - rust/src/models/one_time_token_out.rs | 26 - rust/src/models/recover_in.rs | 24 +- rust/src/models/recover_out.rs | 37 +- rust/src/models/redshift_config.rs | 60 -- rust/src/models/replay_in.rs | 24 +- rust/src/models/replay_out.rs | 37 +- rust/src/models/retry_schedule_in_out.rs | 28 - rust/src/models/rotate_poller_token_in.rs | 36 -- rust/src/models/rotated_url_out.rs | 26 - rust/src/models/s3_config.rs | 42 -- rust/src/models/sink_http_config.rs | 34 - rust/src/models/sink_in.rs | 50 -- rust/src/models/sink_in_one_of.rs | 46 -- rust/src/models/sink_in_one_of_1.rs | 58 -- rust/src/models/sink_in_one_of_2.rs | 72 --- rust/src/models/sink_in_one_of_3.rs | 40 -- rust/src/models/sink_in_one_of_4.rs | 38 -- rust/src/models/sink_otel_v1_config.rs | 26 - rust/src/models/sink_out.rs | 50 -- rust/src/models/sink_payload_format.rs | 35 - rust/src/models/sink_status.rs | 41 -- rust/src/models/sink_status_in.rs | 38 -- rust/src/models/sink_transform_in.rs | 31 - rust/src/models/sink_transformation_out.rs | 31 - rust/src/models/snowflake_config.rs | 57 -- rust/src/models/statistics_period.rs | 39 -- rust/src/models/stream_event_type_in.rs | 32 - rust/src/models/stream_event_type_out.rs | 38 -- rust/src/models/stream_event_type_patch.rs | 37 -- rust/src/models/stream_in.rs | 31 - rust/src/models/stream_out.rs | 40 -- rust/src/models/stream_patch.rs | 31 - rust/src/models/stream_sink_in.rs | 59 -- rust/src/models/stream_sink_in_one_of.rs | 43 -- rust/src/models/stream_sink_in_one_of_1.rs | 43 -- rust/src/models/stream_sink_in_one_of_2.rs | 43 -- rust/src/models/stream_sink_in_one_of_3.rs | 43 -- rust/src/models/stream_sink_in_one_of_4.rs | 43 -- rust/src/models/stream_sink_in_one_of_5.rs | 43 -- rust/src/models/stream_sink_in_one_of_6.rs | 43 -- rust/src/models/stream_sink_in_one_of_7.rs | 43 -- rust/src/models/stream_sink_out.rs | 59 -- rust/src/models/stream_sink_patch.rs | 59 -- rust/src/models/template_in.rs | 50 +- rust/src/models/template_out.rs | 54 +- rust/src/models/template_patch.rs | 67 -- rust/src/models/template_update.rs | 52 -- rust/src/models/transformation_http_method.rs | 41 -- rust/src/models/transformation_simulate_in.rs | 42 -- .../src/models/transformation_simulate_out.rs | 34 - rust/templates/model.mustache | 203 ------ rust/templates/model_mod.mustache | 7 - rust/tests/kitchen_sink.rs | 5 +- svix-cli/Cargo.lock | 126 +--- 192 files changed, 1133 insertions(+), 7112 deletions(-) delete mode 100644 rust/src/models/application_stats.rs delete mode 100644 rust/src/models/attempt_statistics_data.rs delete mode 100644 rust/src/models/attempt_statistics_response.rs delete mode 100644 rust/src/models/auth_token_out.rs delete mode 100644 rust/src/models/azure_blob_storage_config.rs delete mode 100644 rust/src/models/big_query_config.rs delete mode 100644 rust/src/models/border_radius_config.rs delete mode 100644 rust/src/models/border_radius_enum.rs delete mode 100644 rust/src/models/client_secret_jwt_params_in.rs delete mode 100644 rust/src/models/completion_choice.rs delete mode 100644 rust/src/models/completion_message.rs delete mode 100644 rust/src/models/count_out.rs delete mode 100644 rust/src/models/create_stream_in.rs delete mode 100644 rust/src/models/create_token_in.rs delete mode 100644 rust/src/models/custom_color_palette.rs delete mode 100644 rust/src/models/custom_strings_override.rs delete mode 100644 rust/src/models/custom_theme_override.rs delete mode 100644 rust/src/models/duration.rs delete mode 100644 rust/src/models/endpoint_created_event.rs delete mode 100644 rust/src/models/endpoint_created_event_data.rs delete mode 100644 rust/src/models/endpoint_deleted_event.rs delete mode 100644 rust/src/models/endpoint_deleted_event_data.rs delete mode 100644 rust/src/models/endpoint_disabled_event.rs delete mode 100644 rust/src/models/endpoint_disabled_event_data.rs delete mode 100644 rust/src/models/endpoint_mtls_config_in.rs delete mode 100644 rust/src/models/endpoint_oauth_config_in.rs delete mode 100644 rust/src/models/endpoint_transformation_simulate_in.rs delete mode 100644 rust/src/models/endpoint_transformation_simulate_out.rs delete mode 100644 rust/src/models/endpoint_updated_event.rs delete mode 100644 rust/src/models/endpoint_updated_event_data.rs delete mode 100644 rust/src/models/environment_settings_out.rs delete mode 100644 rust/src/models/event_in.rs delete mode 100644 rust/src/models/event_out.rs delete mode 100644 rust/src/models/event_stream_out.rs delete mode 100644 rust/src/models/event_type_example_out.rs delete mode 100644 rust/src/models/event_type_schema_in.rs delete mode 100644 rust/src/models/export_event_type_out.rs delete mode 100644 rust/src/models/font_size_config.rs delete mode 100644 rust/src/models/generate_in.rs delete mode 100644 rust/src/models/generate_out.rs delete mode 100644 rust/src/models/google_cloud_storage_config.rs delete mode 100644 rust/src/models/hubspot_oauth_config_in.rs delete mode 100644 rust/src/models/inbound_path_params.rs delete mode 100644 rust/src/models/incoming_webhook_payload_out.rs delete mode 100644 rust/src/models/kafka_security_protocol_type.rs create mode 100644 rust/src/models/list_response_application_out.rs delete mode 100644 rust/src/models/list_response_application_out_.rs delete mode 100644 rust/src/models/list_response_application_stats_.rs rename rust/src/models/{list_response_background_task_out_.rs => list_response_background_task_out.rs} (53%) create mode 100644 rust/src/models/list_response_endpoint_message_out.rs delete mode 100644 rust/src/models/list_response_endpoint_message_out_.rs create mode 100644 rust/src/models/list_response_endpoint_out.rs delete mode 100644 rust/src/models/list_response_endpoint_out_.rs create mode 100644 rust/src/models/list_response_event_type_out.rs delete mode 100644 rust/src/models/list_response_event_type_out_.rs create mode 100644 rust/src/models/list_response_integration_out.rs delete mode 100644 rust/src/models/list_response_integration_out_.rs create mode 100644 rust/src/models/list_response_message_attempt_endpoint_out.rs delete mode 100644 rust/src/models/list_response_message_attempt_endpoint_out_.rs create mode 100644 rust/src/models/list_response_message_attempt_out.rs delete mode 100644 rust/src/models/list_response_message_attempt_out_.rs create mode 100644 rust/src/models/list_response_message_endpoint_out.rs delete mode 100644 rust/src/models/list_response_message_endpoint_out_.rs create mode 100644 rust/src/models/list_response_message_out.rs delete mode 100644 rust/src/models/list_response_message_out_.rs rename rust/src/models/{list_response_operational_webhook_endpoint_out_.rs => list_response_operational_webhook_endpoint_out.rs} (54%) delete mode 100644 rust/src/models/list_response_sink_out_.rs delete mode 100644 rust/src/models/list_response_stream_event_type_out_.rs delete mode 100644 rust/src/models/list_response_stream_out_.rs delete mode 100644 rust/src/models/list_response_stream_sink_out_.rs delete mode 100644 rust/src/models/list_response_template_out_.rs delete mode 100644 rust/src/models/message_attempt_exhausted_event.rs delete mode 100644 rust/src/models/message_attempt_exhausted_event_data.rs delete mode 100644 rust/src/models/message_attempt_failed_data.rs delete mode 100644 rust/src/models/message_attempt_failing_event.rs delete mode 100644 rust/src/models/message_attempt_failing_event_data.rs delete mode 100644 rust/src/models/message_attempt_headers_out.rs delete mode 100644 rust/src/models/message_attempt_recovered_event.rs delete mode 100644 rust/src/models/message_attempt_recovered_event_data.rs delete mode 100644 rust/src/models/message_broadcast_in.rs delete mode 100644 rust/src/models/message_broadcast_out.rs delete mode 100644 rust/src/models/message_raw_payload_out.rs delete mode 100644 rust/src/models/message_subscriber_auth_token_out.rs delete mode 100644 rust/src/models/o_auth_payload_in.rs delete mode 100644 rust/src/models/o_auth_payload_out.rs delete mode 100644 rust/src/models/oauth2_auth_method_in.rs delete mode 100644 rust/src/models/oauth2_grant_type_in.rs delete mode 100644 rust/src/models/oauth_jws_signing_algorithm.rs delete mode 100644 rust/src/models/one_time_token_in.rs delete mode 100644 rust/src/models/one_time_token_out.rs delete mode 100644 rust/src/models/redshift_config.rs delete mode 100644 rust/src/models/retry_schedule_in_out.rs delete mode 100644 rust/src/models/rotate_poller_token_in.rs delete mode 100644 rust/src/models/rotated_url_out.rs delete mode 100644 rust/src/models/s3_config.rs delete mode 100644 rust/src/models/sink_http_config.rs delete mode 100644 rust/src/models/sink_in.rs delete mode 100644 rust/src/models/sink_in_one_of.rs delete mode 100644 rust/src/models/sink_in_one_of_1.rs delete mode 100644 rust/src/models/sink_in_one_of_2.rs delete mode 100644 rust/src/models/sink_in_one_of_3.rs delete mode 100644 rust/src/models/sink_in_one_of_4.rs delete mode 100644 rust/src/models/sink_otel_v1_config.rs delete mode 100644 rust/src/models/sink_out.rs delete mode 100644 rust/src/models/sink_payload_format.rs delete mode 100644 rust/src/models/sink_status.rs delete mode 100644 rust/src/models/sink_status_in.rs delete mode 100644 rust/src/models/sink_transform_in.rs delete mode 100644 rust/src/models/sink_transformation_out.rs delete mode 100644 rust/src/models/snowflake_config.rs delete mode 100644 rust/src/models/statistics_period.rs delete mode 100644 rust/src/models/stream_event_type_in.rs delete mode 100644 rust/src/models/stream_event_type_out.rs delete mode 100644 rust/src/models/stream_event_type_patch.rs delete mode 100644 rust/src/models/stream_in.rs delete mode 100644 rust/src/models/stream_out.rs delete mode 100644 rust/src/models/stream_patch.rs delete mode 100644 rust/src/models/stream_sink_in.rs delete mode 100644 rust/src/models/stream_sink_in_one_of.rs delete mode 100644 rust/src/models/stream_sink_in_one_of_1.rs delete mode 100644 rust/src/models/stream_sink_in_one_of_2.rs delete mode 100644 rust/src/models/stream_sink_in_one_of_3.rs delete mode 100644 rust/src/models/stream_sink_in_one_of_4.rs delete mode 100644 rust/src/models/stream_sink_in_one_of_5.rs delete mode 100644 rust/src/models/stream_sink_in_one_of_6.rs delete mode 100644 rust/src/models/stream_sink_in_one_of_7.rs delete mode 100644 rust/src/models/stream_sink_out.rs delete mode 100644 rust/src/models/stream_sink_patch.rs delete mode 100644 rust/src/models/template_patch.rs delete mode 100644 rust/src/models/template_update.rs delete mode 100644 rust/src/models/transformation_http_method.rs delete mode 100644 rust/src/models/transformation_simulate_in.rs delete mode 100644 rust/src/models/transformation_simulate_out.rs delete mode 100644 rust/templates/model.mustache delete mode 100644 rust/templates/model_mod.mustache diff --git a/ChangeLog.md b/ChangeLog.md index 980575ff5..8189e66ff 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -14,6 +14,12 @@ * Libs/Rust **(Breaking)**: Add optional `EventTypeDeleteOptions` parameter to `EventType::delete` * Libs/Rust **(Breaking)**: Add optional `PostOptions` parameter to `Endpoint::recover`, `Endpoint::rotate_secret`, `Integration::rotate_key` and `MessageAttempt::resend` +* Libs/Rust **(Breaking)**: Remove model files that were not referenced by any operations available + through the `Svix` object +* Libs/Rust **(Breaking)**: Switch `Patch` struct fields from `Option>` to + `js_option::JsOption` +* Libs/Rust **(Breaking)**: Change `rate_limit` from `i32` to `u16` in several places +* Libs/Rust **(Breaking)**: Remove `settings` parameter from `EnvironmentIn::new` * Libs/Go **(Breaking)**: Rename `Statistics.AggregateAppStats` to `AggregateAppStatsWithOptions`; the old name is used for a version of the method without the `PostOptions`, like elsewhere * Libs/Go: Add `Authentication.ExpireAll` (and `ExpireAllWithOptions`) diff --git a/regen_openapi.sh b/regen_openapi.sh index 3f30e370d..a081995a0 100755 --- a/regen_openapi.sh +++ b/regen_openapi.sh @@ -53,10 +53,5 @@ yarn openapi-generator-cli generate -i .codegen-tmp/openapi.json -g ruby -o ruby yarn openapi-generator-cli generate -i .codegen-tmp/openapi.json -g csharp -o csharp/ -c csharp/openapi-generator-config.json --global-property apis,models,supportingFiles,apiTests=false,apiDocs=false,modelTests=false,modelDocs=false -# Cleanup previous codegen, allowing us to spot removals. -# If the removals are expected, stage them eg. `git add -u`, then commit them. -rm -rf rust/src/models -yarn openapi-generator-cli generate -i .codegen-tmp/openapi-less-null.json -g rust -o rust/ -c rust/openapi-generator-config.json -t rust/templates - rm -rf .codegen-tmp echo Note: Python generation is not executed automatically. diff --git a/rust/Cargo.toml b/rust/Cargo.toml index f40f775e3..956d86ca4 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -40,8 +40,8 @@ thiserror = "1.0.30" time = "0.3" url = "2.2" tokio = { version = "1.41.0", features = ["time"] } -serde_with = { version = "^3.8", default-features = false, features = ["base64", "std", "macros"] } itertools = "0.14.0" +js_option = "0.1.1" [dev-dependencies] tokio = { version = "1.41.0", features = ["macros"] } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 8bb493cd4..38b84bf84 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -16,7 +16,6 @@ use hyper_util::client::legacy::{connect::HttpConnector, Client as HyperClient}; pub mod api; pub mod error; mod model_ext; -#[allow(clippy::all)] mod models; mod request; pub mod webhooks; diff --git a/rust/src/models/aggregate_event_types_out.rs b/rust/src/models/aggregate_event_types_out.rs index 3b32e4c68..c7669b76e 100644 --- a/rust/src/models/aggregate_event_types_out.rs +++ b/rust/src/models/aggregate_event_types_out.rs @@ -1,34 +1,21 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{ + background_task_status::BackgroundTaskStatus, background_task_type::BackgroundTaskType, +}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct AggregateEventTypesOut { - #[serde(rename = "id")] pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, + + pub status: BackgroundTaskStatus, + + pub task: BackgroundTaskType, } impl AggregateEventTypesOut { - pub fn new( - id: String, - status: models::BackgroundTaskStatus, - task: models::BackgroundTaskType, - ) -> AggregateEventTypesOut { - AggregateEventTypesOut { id, status, task } + pub fn new(id: String, status: BackgroundTaskStatus, task: BackgroundTaskType) -> Self { + Self { id, status, task } } } diff --git a/rust/src/models/app_portal_access_in.rs b/rust/src/models/app_portal_access_in.rs index 2fdf42ebe..a64cd1184 100644 --- a/rust/src/models/app_portal_access_in.rs +++ b/rust/src/models/app_portal_access_in.rs @@ -1,37 +1,36 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::application_in::ApplicationIn; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct AppPortalAccessIn { - #[serde(rename = "application", skip_serializing_if = "Option::is_none")] - pub application: Option>, - /// How long the token will be valid for, in seconds. Valid values are - /// between 1 hour and 7 days. The default is 7 days. - #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")] + /// Optionally creates a new application while generating the access link. + /// If the application id or uid that is used in the path already exists, + /// this argument is ignored. + #[serde(skip_serializing_if = "Option::is_none")] + pub application: Option, + + /// How long the token will be valid for, in seconds. + /// + /// Valid values are between 1 hour and 7 days. The default is 7 days. + #[serde(skip_serializing_if = "Option::is_none")] pub expiry: Option, + /// The set of feature flags the created token will have access to. - #[serde(rename = "featureFlags", skip_serializing_if = "Option::is_none")] + #[serde(rename = "featureFlags")] + #[serde(skip_serializing_if = "Option::is_none")] pub feature_flags: Option>, + /// Whether the app portal should be in read-only mode. - #[serde(rename = "readOnly", skip_serializing_if = "Option::is_none")] + #[serde(rename = "readOnly")] + #[serde(skip_serializing_if = "Option::is_none")] pub read_only: Option, } impl AppPortalAccessIn { - pub fn new() -> AppPortalAccessIn { - AppPortalAccessIn { + pub fn new() -> Self { + Self { application: None, expiry: None, feature_flags: None, diff --git a/rust/src/models/app_portal_access_out.rs b/rust/src/models/app_portal_access_out.rs index d3224ec6a..f25625aeb 100644 --- a/rust/src/models/app_portal_access_out.rs +++ b/rust/src/models/app_portal_access_out.rs @@ -1,28 +1,15 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct AppPortalAccessOut { - #[serde(rename = "token")] pub token: String, - #[serde(rename = "url")] + pub url: String, } impl AppPortalAccessOut { - pub fn new(token: String, url: String) -> AppPortalAccessOut { - AppPortalAccessOut { token, url } + pub fn new(token: String, url: String) -> Self { + Self { token, url } } } diff --git a/rust/src/models/app_usage_stats_in.rs b/rust/src/models/app_usage_stats_in.rs index 5f47f0119..6d6c35f98 100644 --- a/rust/src/models/app_usage_stats_in.rs +++ b/rust/src/models/app_usage_stats_in.rs @@ -1,33 +1,24 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct AppUsageStatsIn { - /// Specific app IDs or UIDs to aggregate stats for. Note that if none of - /// the given IDs or UIDs are resolved, a 422 response will be given. - #[serde(rename = "appIds", skip_serializing_if = "Option::is_none")] + /// Specific app IDs or UIDs to aggregate stats for. + /// + /// Note that if none of the given IDs or UIDs are resolved, a 422 response + /// will be given. + #[serde(rename = "appIds")] + #[serde(skip_serializing_if = "Option::is_none")] pub app_ids: Option>, - #[serde(rename = "since")] + pub since: String, - #[serde(rename = "until")] + pub until: String, } impl AppUsageStatsIn { - pub fn new(since: String, until: String) -> AppUsageStatsIn { - AppUsageStatsIn { + pub fn new(since: String, until: String) -> Self { + Self { app_ids: None, since, until, diff --git a/rust/src/models/app_usage_stats_out.rs b/rust/src/models/app_usage_stats_out.rs index bd21a22e0..98a627c6a 100644 --- a/rust/src/models/app_usage_stats_out.rs +++ b/rust/src/models/app_usage_stats_out.rs @@ -1,28 +1,21 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{ + background_task_status::BackgroundTaskStatus, background_task_type::BackgroundTaskType, +}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct AppUsageStatsOut { - #[serde(rename = "id")] pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, - /// Any app IDs or UIDs received in the request that weren't found. Stats - /// will be produced for all the others. + + pub status: BackgroundTaskStatus, + + pub task: BackgroundTaskType, + + /// Any app IDs or UIDs received in the request that weren't found. + /// + /// Stats will be produced for all the others. #[serde(rename = "unresolvedAppIds")] pub unresolved_app_ids: Vec, } @@ -30,11 +23,11 @@ pub struct AppUsageStatsOut { impl AppUsageStatsOut { pub fn new( id: String, - status: models::BackgroundTaskStatus, - task: models::BackgroundTaskType, + status: BackgroundTaskStatus, + task: BackgroundTaskType, unresolved_app_ids: Vec, - ) -> AppUsageStatsOut { - AppUsageStatsOut { + ) -> Self { + Self { id, status, task, diff --git a/rust/src/models/application_in.rs b/rust/src/models/application_in.rs index cc8bc2092..365475a92 100644 --- a/rust/src/models/application_in.rs +++ b/rust/src/models/application_in.rs @@ -1,34 +1,25 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct ApplicationIn { - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option>, - #[serde(rename = "name")] + pub name: String, - #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")] - pub rate_limit: Option, + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + /// Optional unique identifier for the application. - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub uid: Option, } impl ApplicationIn { - pub fn new(name: String) -> ApplicationIn { - ApplicationIn { + pub fn new(name: String) -> Self { + Self { metadata: None, name, rate_limit: None, diff --git a/rust/src/models/application_out.rs b/rust/src/models/application_out.rs index dbd09e0c1..cd5934418 100644 --- a/rust/src/models/application_out.rs +++ b/rust/src/models/application_out.rs @@ -1,34 +1,26 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct ApplicationOut { #[serde(rename = "createdAt")] pub created_at: String, + /// The app's ID - #[serde(rename = "id")] pub id: String, - #[serde(rename = "metadata")] + pub metadata: std::collections::HashMap, - #[serde(rename = "name")] + pub name: String, - #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")] - pub rate_limit: Option, + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + /// The app's UID - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub uid: Option, + #[serde(rename = "updatedAt")] pub updated_at: String, } @@ -40,8 +32,8 @@ impl ApplicationOut { metadata: std::collections::HashMap, name: String, updated_at: String, - ) -> ApplicationOut { - ApplicationOut { + ) -> Self { + Self { created_at, id, metadata, diff --git a/rust/src/models/application_patch.rs b/rust/src/models/application_patch.rs index 57cbab89f..4e420832b 100644 --- a/rust/src/models/application_patch.rs +++ b/rust/src/models/application_patch.rs @@ -1,48 +1,31 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated +use js_option::JsOption; use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct ApplicationPatch { - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option>, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, - #[serde( - rename = "rateLimit", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub rate_limit: Option>, + + #[serde(rename = "rateLimit")] + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub rate_limit: JsOption, + /// The app's UID - #[serde( - rename = "uid", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub uid: Option>, + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub uid: JsOption, } impl ApplicationPatch { - pub fn new() -> ApplicationPatch { - ApplicationPatch { + pub fn new() -> Self { + Self { metadata: None, name: None, - rate_limit: None, - uid: None, + rate_limit: JsOption::Undefined, + uid: JsOption::Undefined, } } } diff --git a/rust/src/models/application_stats.rs b/rust/src/models/application_stats.rs deleted file mode 100644 index 742ed0b8c..000000000 --- a/rust/src/models/application_stats.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApplicationStats { - /// The app's ID - #[serde(rename = "appId")] - pub app_id: String, - /// The app's UID - #[serde(rename = "appUid", skip_serializing_if = "Option::is_none")] - pub app_uid: Option, - #[serde(rename = "messageDestinations")] - pub message_destinations: i32, -} - -impl ApplicationStats { - pub fn new(app_id: String, message_destinations: i32) -> ApplicationStats { - ApplicationStats { - app_id, - app_uid: None, - message_destinations, - } - } -} diff --git a/rust/src/models/application_token_expire_in.rs b/rust/src/models/application_token_expire_in.rs index f90ac6b63..07b49c3af 100644 --- a/rust/src/models/application_token_expire_in.rs +++ b/rust/src/models/application_token_expire_in.rs @@ -1,27 +1,15 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct ApplicationTokenExpireIn { /// How many seconds until the old key is expired. - #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")] - pub expiry: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub expiry: Option, } impl ApplicationTokenExpireIn { - pub fn new() -> ApplicationTokenExpireIn { - ApplicationTokenExpireIn { expiry: None } + pub fn new() -> Self { + Self { expiry: None } } } diff --git a/rust/src/models/attempt_statistics_data.rs b/rust/src/models/attempt_statistics_data.rs deleted file mode 100644 index 058146632..000000000 --- a/rust/src/models/attempt_statistics_data.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AttemptStatisticsData { - #[serde(rename = "failureCount", skip_serializing_if = "Option::is_none")] - pub failure_count: Option>, - #[serde(rename = "successCount", skip_serializing_if = "Option::is_none")] - pub success_count: Option>, -} - -impl AttemptStatisticsData { - pub fn new() -> AttemptStatisticsData { - AttemptStatisticsData { - failure_count: None, - success_count: None, - } - } -} diff --git a/rust/src/models/attempt_statistics_response.rs b/rust/src/models/attempt_statistics_response.rs deleted file mode 100644 index 21f50b1f6..000000000 --- a/rust/src/models/attempt_statistics_response.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AttemptStatisticsResponse { - #[serde(rename = "data")] - pub data: Box, - #[serde(rename = "endDate")] - pub end_date: String, - #[serde(rename = "period")] - pub period: models::StatisticsPeriod, - #[serde(rename = "startDate")] - pub start_date: String, -} - -impl AttemptStatisticsResponse { - pub fn new( - data: models::AttemptStatisticsData, - end_date: String, - period: models::StatisticsPeriod, - start_date: String, - ) -> AttemptStatisticsResponse { - AttemptStatisticsResponse { - data: Box::new(data), - end_date, - period, - start_date, - } - } -} diff --git a/rust/src/models/auth_token_out.rs b/rust/src/models/auth_token_out.rs deleted file mode 100644 index 01492a239..000000000 --- a/rust/src/models/auth_token_out.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AuthTokenOut { - #[serde(rename = "createdAt")] - pub created_at: String, - #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")] - pub expires_at: Option, - /// The key's ID - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")] - pub scopes: Option>, - #[serde(rename = "token")] - pub token: String, -} - -impl AuthTokenOut { - pub fn new(created_at: String, id: String, token: String) -> AuthTokenOut { - AuthTokenOut { - created_at, - expires_at: None, - id, - name: None, - scopes: None, - token, - } - } -} diff --git a/rust/src/models/azure_blob_storage_config.rs b/rust/src/models/azure_blob_storage_config.rs deleted file mode 100644 index 9912d0d68..000000000 --- a/rust/src/models/azure_blob_storage_config.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AzureBlobStorageConfig { - #[serde(rename = "accessKey")] - pub access_key: String, - #[serde(rename = "account")] - pub account: String, - #[serde(rename = "container")] - pub container: String, -} - -impl AzureBlobStorageConfig { - pub fn new(access_key: String, account: String, container: String) -> AzureBlobStorageConfig { - AzureBlobStorageConfig { - access_key, - account, - container, - } - } -} diff --git a/rust/src/models/background_task_out.rs b/rust/src/models/background_task_out.rs index 71146d6a2..02afb9fcb 100644 --- a/rust/src/models/background_task_out.rs +++ b/rust/src/models/background_task_out.rs @@ -1,38 +1,29 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated (with minor manual edits) use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{ + background_task_status::BackgroundTaskStatus, background_task_type::BackgroundTaskType, +}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct BackgroundTaskOut { - #[serde(rename = "data")] pub data: serde_json::Value, - #[serde(rename = "id")] + pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, + + pub status: BackgroundTaskStatus, + + pub task: BackgroundTaskType, } impl BackgroundTaskOut { pub fn new( data: serde_json::Value, id: String, - status: models::BackgroundTaskStatus, - task: models::BackgroundTaskType, - ) -> BackgroundTaskOut { - BackgroundTaskOut { + status: BackgroundTaskStatus, + task: BackgroundTaskType, + ) -> Self { + Self { data, id, status, diff --git a/rust/src/models/big_query_config.rs b/rust/src/models/big_query_config.rs deleted file mode 100644 index 993e5bbd7..000000000 --- a/rust/src/models/big_query_config.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// BigQueryConfig : Configuration for a Google Cloud BigQuery sink. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BigQueryConfig { - /// Google Cloud Credentials JSON Object as a string. - #[serde(rename = "credentials")] - pub credentials: String, - #[serde(rename = "datasetId")] - pub dataset_id: String, - #[serde(rename = "projectId")] - pub project_id: String, - #[serde(rename = "tableId")] - pub table_id: String, -} - -impl BigQueryConfig { - /// Configuration for a Google Cloud BigQuery sink. - pub fn new( - credentials: String, - dataset_id: String, - project_id: String, - table_id: String, - ) -> BigQueryConfig { - BigQueryConfig { - credentials, - dataset_id, - project_id, - table_id, - } - } -} diff --git a/rust/src/models/border_radius_config.rs b/rust/src/models/border_radius_config.rs deleted file mode 100644 index bc75a87b5..000000000 --- a/rust/src/models/border_radius_config.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BorderRadiusConfig { - #[serde(rename = "button", skip_serializing_if = "Option::is_none")] - pub button: Option, - #[serde(rename = "card", skip_serializing_if = "Option::is_none")] - pub card: Option, - #[serde(rename = "input", skip_serializing_if = "Option::is_none")] - pub input: Option, -} - -impl BorderRadiusConfig { - pub fn new() -> BorderRadiusConfig { - BorderRadiusConfig { - button: None, - card: None, - input: None, - } - } -} diff --git a/rust/src/models/border_radius_enum.rs b/rust/src/models/border_radius_enum.rs deleted file mode 100644 index c36191d02..000000000 --- a/rust/src/models/border_radius_enum.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum BorderRadiusEnum { - #[serde(rename = "none")] - None, - #[serde(rename = "lg")] - Lg, - #[serde(rename = "md")] - Md, - #[serde(rename = "sm")] - Sm, - #[serde(rename = "full")] - Full, -} - -impl std::fmt::Display for BorderRadiusEnum { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::None => write!(f, "none"), - Self::Lg => write!(f, "lg"), - Self::Md => write!(f, "md"), - Self::Sm => write!(f, "sm"), - Self::Full => write!(f, "full"), - } - } -} - -impl Default for BorderRadiusEnum { - fn default() -> BorderRadiusEnum { - Self::None - } -} diff --git a/rust/src/models/client_secret_jwt_params_in.rs b/rust/src/models/client_secret_jwt_params_in.rs deleted file mode 100644 index 32397e7df..000000000 --- a/rust/src/models/client_secret_jwt_params_in.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ClientSecretJwtParamsIn { - /// The base64-encoded secret used for signing the JWT. - #[serde(rename = "secretBase64")] - pub secret_base64: String, - /// Optional secret identifier. If supplied, this will be populated in the - /// JWT header in the `kid` field. - #[serde(rename = "secretId", skip_serializing_if = "Option::is_none")] - pub secret_id: Option, - #[serde(rename = "signingAlgorithm")] - pub signing_algorithm: models::OauthJwsSigningAlgorithm, - /// Optional number of seconds after which the JWT should expire. Defaults - /// to 300 seconds. - #[serde(rename = "tokenExpirySecs", skip_serializing_if = "Option::is_none")] - pub token_expiry_secs: Option, -} - -impl ClientSecretJwtParamsIn { - pub fn new( - secret_base64: String, - signing_algorithm: models::OauthJwsSigningAlgorithm, - ) -> ClientSecretJwtParamsIn { - ClientSecretJwtParamsIn { - secret_base64, - secret_id: None, - signing_algorithm, - token_expiry_secs: None, - } - } -} diff --git a/rust/src/models/completion_choice.rs b/rust/src/models/completion_choice.rs deleted file mode 100644 index 16849f5f0..000000000 --- a/rust/src/models/completion_choice.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CompletionChoice { - #[serde(rename = "finish_reason")] - pub finish_reason: String, - #[serde(rename = "index")] - pub index: i64, - #[serde(rename = "message")] - pub message: Box, -} - -impl CompletionChoice { - pub fn new( - finish_reason: String, - index: i64, - message: models::CompletionMessage, - ) -> CompletionChoice { - CompletionChoice { - finish_reason, - index, - message: Box::new(message), - } - } -} diff --git a/rust/src/models/completion_message.rs b/rust/src/models/completion_message.rs deleted file mode 100644 index 22e890497..000000000 --- a/rust/src/models/completion_message.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CompletionMessage { - #[serde(rename = "content")] - pub content: String, - #[serde(rename = "role")] - pub role: String, -} - -impl CompletionMessage { - pub fn new(content: String, role: String) -> CompletionMessage { - CompletionMessage { content, role } - } -} diff --git a/rust/src/models/count_out.rs b/rust/src/models/count_out.rs deleted file mode 100644 index 577ec794b..000000000 --- a/rust/src/models/count_out.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CountOut { - /// There's a ceiling to how many attempts we count. When the limit is - /// reached, this will be `true` to indicate the actual count is higher than - /// given. - #[serde(rename = "approximated")] - pub approximated: bool, - /// The count of attempts matching the query. - #[serde(rename = "count")] - pub count: i32, -} - -impl CountOut { - pub fn new(approximated: bool, count: i32) -> CountOut { - CountOut { - approximated, - count, - } - } -} diff --git a/rust/src/models/create_stream_in.rs b/rust/src/models/create_stream_in.rs deleted file mode 100644 index e810387c6..000000000 --- a/rust/src/models/create_stream_in.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateStreamIn { - #[serde(rename = "messages")] - pub messages: Vec, - #[serde(rename = "stream", skip_serializing_if = "Option::is_none")] - pub stream: Option>, -} - -impl CreateStreamIn { - pub fn new(messages: Vec) -> CreateStreamIn { - CreateStreamIn { - messages, - stream: None, - } - } -} diff --git a/rust/src/models/create_token_in.rs b/rust/src/models/create_token_in.rs deleted file mode 100644 index a318598db..000000000 --- a/rust/src/models/create_token_in.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateTokenIn { - /// How long the token will be valid for, in seconds. - #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")] - pub expiry: Option, - /// The name of the token. - #[serde(rename = "name")] - pub name: String, -} - -impl CreateTokenIn { - pub fn new(name: String) -> CreateTokenIn { - CreateTokenIn { expiry: None, name } - } -} diff --git a/rust/src/models/custom_color_palette.rs b/rust/src/models/custom_color_palette.rs deleted file mode 100644 index 75f5f4af8..000000000 --- a/rust/src/models/custom_color_palette.rs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CustomColorPalette { - #[serde(rename = "backgroundHover", skip_serializing_if = "Option::is_none")] - pub background_hover: Option, - #[serde(rename = "backgroundPrimary", skip_serializing_if = "Option::is_none")] - pub background_primary: Option, - #[serde( - rename = "backgroundSecondary", - skip_serializing_if = "Option::is_none" - )] - pub background_secondary: Option, - #[serde(rename = "buttonPrimary", skip_serializing_if = "Option::is_none")] - pub button_primary: Option, - #[serde(rename = "interactiveAccent", skip_serializing_if = "Option::is_none")] - pub interactive_accent: Option, - #[serde(rename = "navigationAccent", skip_serializing_if = "Option::is_none")] - pub navigation_accent: Option, - #[serde(rename = "primary", skip_serializing_if = "Option::is_none")] - pub primary: Option, - #[serde(rename = "textDanger", skip_serializing_if = "Option::is_none")] - pub text_danger: Option, - #[serde(rename = "textPrimary", skip_serializing_if = "Option::is_none")] - pub text_primary: Option, -} - -impl CustomColorPalette { - pub fn new() -> CustomColorPalette { - CustomColorPalette { - background_hover: None, - background_primary: None, - background_secondary: None, - button_primary: None, - interactive_accent: None, - navigation_accent: None, - primary: None, - text_danger: None, - text_primary: None, - } - } -} diff --git a/rust/src/models/custom_strings_override.rs b/rust/src/models/custom_strings_override.rs deleted file mode 100644 index 3b449c1a4..000000000 --- a/rust/src/models/custom_strings_override.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CustomStringsOverride { - #[serde(rename = "channelsHelp", skip_serializing_if = "Option::is_none")] - pub channels_help: Option, - #[serde(rename = "channelsMany", skip_serializing_if = "Option::is_none")] - pub channels_many: Option, - #[serde(rename = "channelsOne", skip_serializing_if = "Option::is_none")] - pub channels_one: Option, -} - -impl CustomStringsOverride { - pub fn new() -> CustomStringsOverride { - CustomStringsOverride { - channels_help: None, - channels_many: None, - channels_one: None, - } - } -} diff --git a/rust/src/models/custom_theme_override.rs b/rust/src/models/custom_theme_override.rs deleted file mode 100644 index a7c15d275..000000000 --- a/rust/src/models/custom_theme_override.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CustomThemeOverride { - #[serde(rename = "borderRadius", skip_serializing_if = "Option::is_none")] - pub border_radius: Option>, - #[serde(rename = "fontSize", skip_serializing_if = "Option::is_none")] - pub font_size: Option>, -} - -impl CustomThemeOverride { - pub fn new() -> CustomThemeOverride { - CustomThemeOverride { - border_radius: None, - font_size: None, - } - } -} diff --git a/rust/src/models/dashboard_access_out.rs b/rust/src/models/dashboard_access_out.rs index d37e28a88..8d04b8eb1 100644 --- a/rust/src/models/dashboard_access_out.rs +++ b/rust/src/models/dashboard_access_out.rs @@ -1,28 +1,15 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct DashboardAccessOut { - #[serde(rename = "token")] pub token: String, - #[serde(rename = "url")] + pub url: String, } impl DashboardAccessOut { - pub fn new(token: String, url: String) -> DashboardAccessOut { - DashboardAccessOut { token, url } + pub fn new(token: String, url: String) -> Self { + Self { token, url } } } diff --git a/rust/src/models/duration.rs b/rust/src/models/duration.rs deleted file mode 100644 index a28a430d2..000000000 --- a/rust/src/models/duration.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Duration { - #[serde(rename = "nanos")] - pub nanos: i32, - #[serde(rename = "secs")] - pub secs: i32, -} - -impl Duration { - pub fn new(nanos: i32, secs: i32) -> Duration { - Duration { nanos, secs } - } -} diff --git a/rust/src/models/endpoint_created_event.rs b/rust/src/models/endpoint_created_event.rs deleted file mode 100644 index 2c5d9bcd5..000000000 --- a/rust/src/models/endpoint_created_event.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// EndpointCreatedEvent : Sent when an endpoint is created. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointCreatedEvent { - #[serde(rename = "data")] - pub data: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl EndpointCreatedEvent { - /// Sent when an endpoint is created. - pub fn new(data: models::EndpointCreatedEventData, r#type: Type) -> EndpointCreatedEvent { - EndpointCreatedEvent { - data: Box::new(data), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "endpoint.created")] - EndpointPeriodCreated, -} - -impl Default for Type { - fn default() -> Type { - Self::EndpointPeriodCreated - } -} diff --git a/rust/src/models/endpoint_created_event_data.rs b/rust/src/models/endpoint_created_event_data.rs deleted file mode 100644 index 750e021b6..000000000 --- a/rust/src/models/endpoint_created_event_data.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// EndpointCreatedEventData : Sent when an endpoint is created, updated, or -/// deleted -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointCreatedEventData { - /// The app's ID - #[serde(rename = "appId")] - pub app_id: String, - /// The app's UID - #[serde(rename = "appUid", skip_serializing_if = "Option::is_none")] - pub app_uid: Option, - /// The ep's ID - #[serde(rename = "endpointId")] - pub endpoint_id: String, - /// The ep's UID - #[serde(rename = "endpointUid", skip_serializing_if = "Option::is_none")] - pub endpoint_uid: Option, -} - -impl EndpointCreatedEventData { - /// Sent when an endpoint is created, updated, or deleted - pub fn new(app_id: String, endpoint_id: String) -> EndpointCreatedEventData { - EndpointCreatedEventData { - app_id, - app_uid: None, - endpoint_id, - endpoint_uid: None, - } - } -} diff --git a/rust/src/models/endpoint_deleted_event.rs b/rust/src/models/endpoint_deleted_event.rs deleted file mode 100644 index 89dd96f9a..000000000 --- a/rust/src/models/endpoint_deleted_event.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// EndpointDeletedEvent : Sent when an endpoint is deleted. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointDeletedEvent { - #[serde(rename = "data")] - pub data: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl EndpointDeletedEvent { - /// Sent when an endpoint is deleted. - pub fn new(data: models::EndpointDeletedEventData, r#type: Type) -> EndpointDeletedEvent { - EndpointDeletedEvent { - data: Box::new(data), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "endpoint.deleted")] - EndpointPeriodDeleted, -} - -impl Default for Type { - fn default() -> Type { - Self::EndpointPeriodDeleted - } -} diff --git a/rust/src/models/endpoint_deleted_event_data.rs b/rust/src/models/endpoint_deleted_event_data.rs deleted file mode 100644 index 2289491ff..000000000 --- a/rust/src/models/endpoint_deleted_event_data.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// EndpointDeletedEventData : Sent when an endpoint is created, updated, or -/// deleted -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointDeletedEventData { - /// The app's ID - #[serde(rename = "appId")] - pub app_id: String, - /// The app's UID - #[serde(rename = "appUid", skip_serializing_if = "Option::is_none")] - pub app_uid: Option, - /// The ep's ID - #[serde(rename = "endpointId")] - pub endpoint_id: String, - /// The ep's UID - #[serde(rename = "endpointUid", skip_serializing_if = "Option::is_none")] - pub endpoint_uid: Option, -} - -impl EndpointDeletedEventData { - /// Sent when an endpoint is created, updated, or deleted - pub fn new(app_id: String, endpoint_id: String) -> EndpointDeletedEventData { - EndpointDeletedEventData { - app_id, - app_uid: None, - endpoint_id, - endpoint_uid: None, - } - } -} diff --git a/rust/src/models/endpoint_disabled_event.rs b/rust/src/models/endpoint_disabled_event.rs deleted file mode 100644 index 5b6d5fd28..000000000 --- a/rust/src/models/endpoint_disabled_event.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// EndpointDisabledEvent : Sent when an endpoint has been automatically -/// disabled after continuous failures. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointDisabledEvent { - #[serde(rename = "data")] - pub data: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl EndpointDisabledEvent { - /// Sent when an endpoint has been automatically disabled after continuous - /// failures. - pub fn new(data: models::EndpointDisabledEventData, r#type: Type) -> EndpointDisabledEvent { - EndpointDisabledEvent { - data: Box::new(data), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "endpoint.disabled")] - EndpointPeriodDisabled, -} - -impl Default for Type { - fn default() -> Type { - Self::EndpointPeriodDisabled - } -} diff --git a/rust/src/models/endpoint_disabled_event_data.rs b/rust/src/models/endpoint_disabled_event_data.rs deleted file mode 100644 index 252bafe2e..000000000 --- a/rust/src/models/endpoint_disabled_event_data.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// EndpointDisabledEventData : Sent when an endpoint has been automatically -/// disabled after continuous failures. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointDisabledEventData { - /// The app's ID - #[serde(rename = "appId")] - pub app_id: String, - /// The app's UID - #[serde(rename = "appUid", skip_serializing_if = "Option::is_none")] - pub app_uid: Option, - /// The ep's ID - #[serde(rename = "endpointId")] - pub endpoint_id: String, - /// The ep's UID - #[serde(rename = "endpointUid", skip_serializing_if = "Option::is_none")] - pub endpoint_uid: Option, - #[serde(rename = "failSince")] - pub fail_since: String, -} - -impl EndpointDisabledEventData { - /// Sent when an endpoint has been automatically disabled after continuous - /// failures. - pub fn new( - app_id: String, - endpoint_id: String, - fail_since: String, - ) -> EndpointDisabledEventData { - EndpointDisabledEventData { - app_id, - app_uid: None, - endpoint_id, - endpoint_uid: None, - fail_since, - } - } -} diff --git a/rust/src/models/endpoint_headers_in.rs b/rust/src/models/endpoint_headers_in.rs index e9f3ab60f..ca7c0fc33 100644 --- a/rust/src/models/endpoint_headers_in.rs +++ b/rust/src/models/endpoint_headers_in.rs @@ -1,26 +1,13 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointHeadersIn { - #[serde(rename = "headers")] pub headers: std::collections::HashMap, } impl EndpointHeadersIn { - pub fn new(headers: std::collections::HashMap) -> EndpointHeadersIn { - EndpointHeadersIn { headers } + pub fn new(headers: std::collections::HashMap) -> Self { + Self { headers } } } diff --git a/rust/src/models/endpoint_headers_out.rs b/rust/src/models/endpoint_headers_out.rs index 3013766f8..6f8f09e5a 100644 --- a/rust/src/models/endpoint_headers_out.rs +++ b/rust/src/models/endpoint_headers_out.rs @@ -1,36 +1,19 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -/// EndpointHeadersOut : The value of the headers is returned in the `headers` -/// field. Sensitive headers that have been redacted are returned in the -/// sensitive field. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +/// The value of the headers is returned in the `headers` field. +/// +/// Sensitive headers that have been redacted are returned in the sensitive +/// field. +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointHeadersOut { - #[serde(rename = "headers")] pub headers: std::collections::HashMap, - #[serde(rename = "sensitive")] + pub sensitive: Vec, } impl EndpointHeadersOut { - /// The value of the headers is returned in the `headers` field. Sensitive - /// headers that have been redacted are returned in the sensitive field. - pub fn new( - headers: std::collections::HashMap, - sensitive: Vec, - ) -> EndpointHeadersOut { - EndpointHeadersOut { headers, sensitive } + pub fn new(headers: std::collections::HashMap, sensitive: Vec) -> Self { + Self { headers, sensitive } } } diff --git a/rust/src/models/endpoint_headers_patch_in.rs b/rust/src/models/endpoint_headers_patch_in.rs index c2b7f5703..463825854 100644 --- a/rust/src/models/endpoint_headers_patch_in.rs +++ b/rust/src/models/endpoint_headers_patch_in.rs @@ -1,26 +1,13 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointHeadersPatchIn { - #[serde(rename = "headers")] pub headers: std::collections::HashMap, } impl EndpointHeadersPatchIn { - pub fn new(headers: std::collections::HashMap) -> EndpointHeadersPatchIn { - EndpointHeadersPatchIn { headers } + pub fn new(headers: std::collections::HashMap) -> Self { + Self { headers } } } diff --git a/rust/src/models/endpoint_in.rs b/rust/src/models/endpoint_in.rs index 1c0932043..1bc4adb09 100644 --- a/rust/src/models/endpoint_in.rs +++ b/rust/src/models/endpoint_in.rs @@ -1,50 +1,52 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointIn { /// List of message channels this endpoint listens to (omit for all). - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub channels: Option>, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub disabled: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "filterTypes")] + #[serde(skip_serializing_if = "Option::is_none")] pub filter_types: Option>, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option>, - #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")] - pub rate_limit: Option, - /// The endpoint's verification secret. Format: `base64` encoded random - /// bytes optionally prefixed with `whsec_`. It is recommended to not set - /// this and let the server generate the secret. - #[serde(rename = "secret", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + + /// The endpoint's verification secret. + /// + /// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + /// It is recommended to not set this and let the server generate the + /// secret. + #[serde(skip_serializing_if = "Option::is_none")] pub secret: Option, + /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub uid: Option, - #[serde(rename = "url")] + pub url: String, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, + + #[deprecated] + #[serde(skip_serializing_if = "Option::is_none")] + pub version: Option, } impl EndpointIn { - pub fn new(url: String) -> EndpointIn { - EndpointIn { + pub fn new(url: String) -> Self { + #[allow(deprecated)] + Self { channels: None, description: None, disabled: None, diff --git a/rust/src/models/endpoint_message_out.rs b/rust/src/models/endpoint_message_out.rs index d52f74b0e..3d36e7eed 100644 --- a/rust/src/models/endpoint_message_out.rs +++ b/rust/src/models/endpoint_message_out.rs @@ -1,57 +1,51 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -/// EndpointMessageOut : A model containing information on a given message plus -/// additional fields on the last attempt for that message. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::message_status::MessageStatus; + +/// A model containing information on a given message plus additional fields on +/// the last attempt for that message. +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointMessageOut { /// List of free-form identifiers that endpoints can filter by - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub channels: Option>, + /// Optional unique identifier for the message - #[serde(rename = "eventId", skip_serializing_if = "Option::is_none")] + #[serde(rename = "eventId")] + #[serde(skip_serializing_if = "Option::is_none")] pub event_id: Option, + /// The event type's name #[serde(rename = "eventType")] pub event_type: String, + /// The msg's ID - #[serde(rename = "id")] pub id: String, - #[serde(rename = "nextAttempt", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "nextAttempt")] + #[serde(skip_serializing_if = "Option::is_none")] pub next_attempt: Option, - #[serde(rename = "payload")] + pub payload: serde_json::Value, - #[serde(rename = "status")] - pub status: models::MessageStatus, - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + + pub status: MessageStatus, + + #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option>, - #[serde(rename = "timestamp")] + pub timestamp: String, } impl EndpointMessageOut { - /// A model containing information on a given message plus additional fields - /// on the last attempt for that message. pub fn new( event_type: String, id: String, payload: serde_json::Value, - status: models::MessageStatus, + status: MessageStatus, timestamp: String, - ) -> EndpointMessageOut { - EndpointMessageOut { + ) -> Self { + Self { channels: None, event_id: None, event_type, diff --git a/rust/src/models/endpoint_mtls_config_in.rs b/rust/src/models/endpoint_mtls_config_in.rs deleted file mode 100644 index 0ced00775..000000000 --- a/rust/src/models/endpoint_mtls_config_in.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointMtlsConfigIn { - /// A PEM encoded private key and X509 certificate to identify the webhook - /// sender. - #[serde(rename = "identity")] - pub identity: String, - /// A PEM encoded X509 certificate used to verify the webhook receiver's - /// certificate. - #[serde(rename = "serverCaCert", skip_serializing_if = "Option::is_none")] - pub server_ca_cert: Option, -} - -impl EndpointMtlsConfigIn { - pub fn new(identity: String) -> EndpointMtlsConfigIn { - EndpointMtlsConfigIn { - identity, - server_ca_cert: None, - } - } -} diff --git a/rust/src/models/endpoint_oauth_config_in.rs b/rust/src/models/endpoint_oauth_config_in.rs deleted file mode 100644 index 515a309ea..000000000 --- a/rust/src/models/endpoint_oauth_config_in.rs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointOauthConfigIn { - #[serde(rename = "authMethod")] - pub auth_method: models::Oauth2AuthMethodIn, - /// The client ID. Required for all authentication types. - #[serde(rename = "clientId")] - pub client_id: String, - /// Optional client secret. This is only used for `clientSecretBasic` and - /// `clientSecretPost`. For `clientSecretBasic`, the secret will be - /// appended to the `Authorization` header. For `clientSecretPost`, this - /// will be added to the body in a `client_secret` parameter. - #[serde(rename = "clientSecret", skip_serializing_if = "Option::is_none")] - pub client_secret: Option, - /// Extra parameters added to the request body as key-value pairs. - #[serde(rename = "extraParams", skip_serializing_if = "Option::is_none")] - pub extra_params: Option>, - #[serde(rename = "grantType")] - pub grant_type: models::Oauth2GrantTypeIn, - #[serde(rename = "jwtParams", skip_serializing_if = "Option::is_none")] - pub jwt_params: Option>, - /// For `refreshToken` grant type. - #[serde(rename = "refreshToken", skip_serializing_if = "Option::is_none")] - pub refresh_token: Option, - /// Optional OAuth scopes added to the request body. - #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")] - pub scopes: Option>, - /// The URL of the authorization server. - #[serde(rename = "tokenUrl")] - pub token_url: String, -} - -impl EndpointOauthConfigIn { - pub fn new( - auth_method: models::Oauth2AuthMethodIn, - client_id: String, - grant_type: models::Oauth2GrantTypeIn, - token_url: String, - ) -> EndpointOauthConfigIn { - EndpointOauthConfigIn { - auth_method, - client_id, - client_secret: None, - extra_params: None, - grant_type, - jwt_params: None, - refresh_token: None, - scopes: None, - token_url, - } - } -} diff --git a/rust/src/models/endpoint_out.rs b/rust/src/models/endpoint_out.rs index 4c665ef7f..c21763459 100644 --- a/rust/src/models/endpoint_out.rs +++ b/rust/src/models/endpoint_out.rs @@ -1,47 +1,44 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointOut { /// List of message channels this endpoint listens to (omit for all). - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub channels: Option>, + #[serde(rename = "createdAt")] pub created_at: String, + /// An example endpoint name. - #[serde(rename = "description")] pub description: String, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub disabled: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "filterTypes")] + #[serde(skip_serializing_if = "Option::is_none")] pub filter_types: Option>, + /// The ep's ID - #[serde(rename = "id")] pub id: String, - #[serde(rename = "metadata")] + pub metadata: std::collections::HashMap, - #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")] - pub rate_limit: Option, + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub uid: Option, + #[serde(rename = "updatedAt")] pub updated_at: String, - #[serde(rename = "url")] + pub url: String, - #[serde(rename = "version")] + + #[deprecated] pub version: i32, } @@ -54,8 +51,9 @@ impl EndpointOut { updated_at: String, url: String, version: i32, - ) -> EndpointOut { - EndpointOut { + ) -> Self { + #[allow(deprecated)] + Self { channels: None, created_at, description, diff --git a/rust/src/models/endpoint_patch.rs b/rust/src/models/endpoint_patch.rs index fe19dff76..e7b4bf875 100644 --- a/rust/src/models/endpoint_patch.rs +++ b/rust/src/models/endpoint_patch.rs @@ -1,82 +1,61 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated +use js_option::JsOption; use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointPatch { - #[serde( - rename = "channels", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub channels: Option>>, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub channels: JsOption>, + + #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub disabled: Option, - #[serde( - rename = "filterTypes", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub filter_types: Option>>, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "filterTypes")] + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub filter_types: JsOption>, + + #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option>, - #[serde( - rename = "rateLimit", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub rate_limit: Option>, - /// The endpoint's verification secret. Format: `base64` encoded random - /// bytes optionally prefixed with `whsec_`. It is recommended to not set - /// this and let the server generate the secret. - #[serde( - rename = "secret", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub secret: Option>, + + #[serde(rename = "rateLimit")] + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub rate_limit: JsOption, + + /// The endpoint's verification secret. + /// + /// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + /// It is recommended to not set this and let the server generate the + /// secret. + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub secret: JsOption, + /// The ep's UID - #[serde( - rename = "uid", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub uid: Option>, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub uid: JsOption, + + #[serde(skip_serializing_if = "Option::is_none")] pub url: Option, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, + + #[deprecated] + #[serde(skip_serializing_if = "Option::is_none")] + pub version: Option, } impl EndpointPatch { - pub fn new() -> EndpointPatch { - EndpointPatch { - channels: None, + pub fn new() -> Self { + #[allow(deprecated)] + Self { + channels: JsOption::Undefined, description: None, disabled: None, - filter_types: None, + filter_types: JsOption::Undefined, metadata: None, - rate_limit: None, - secret: None, - uid: None, + rate_limit: JsOption::Undefined, + secret: JsOption::Undefined, + uid: JsOption::Undefined, url: None, version: None, } diff --git a/rust/src/models/endpoint_secret_out.rs b/rust/src/models/endpoint_secret_out.rs index 11b3ee052..856bad8dd 100644 --- a/rust/src/models/endpoint_secret_out.rs +++ b/rust/src/models/endpoint_secret_out.rs @@ -1,29 +1,18 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointSecretOut { - /// The endpoint's verification secret. Format: `base64` encoded random - /// bytes optionally prefixed with `whsec_`. It is recommended to not set - /// this and let the server generate the secret. - #[serde(rename = "key")] + /// The endpoint's verification secret. + /// + /// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + /// It is recommended to not set this and let the server generate the + /// secret. pub key: String, } impl EndpointSecretOut { - pub fn new(key: String) -> EndpointSecretOut { - EndpointSecretOut { key } + pub fn new(key: String) -> Self { + Self { key } } } diff --git a/rust/src/models/endpoint_secret_rotate_in.rs b/rust/src/models/endpoint_secret_rotate_in.rs index 70c98096d..564fad1fa 100644 --- a/rust/src/models/endpoint_secret_rotate_in.rs +++ b/rust/src/models/endpoint_secret_rotate_in.rs @@ -1,29 +1,19 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointSecretRotateIn { - /// The endpoint's verification secret. Format: `base64` encoded random - /// bytes optionally prefixed with `whsec_`. It is recommended to not set - /// this and let the server generate the secret. - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] + /// The endpoint's verification secret. + /// + /// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. + /// It is recommended to not set this and let the server generate the + /// secret. + #[serde(skip_serializing_if = "Option::is_none")] pub key: Option, } impl EndpointSecretRotateIn { - pub fn new() -> EndpointSecretRotateIn { - EndpointSecretRotateIn { key: None } + pub fn new() -> Self { + Self { key: None } } } diff --git a/rust/src/models/endpoint_stats.rs b/rust/src/models/endpoint_stats.rs index d248185c7..1178f45f0 100644 --- a/rust/src/models/endpoint_stats.rs +++ b/rust/src/models/endpoint_stats.rs @@ -1,33 +1,20 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointStats { - #[serde(rename = "fail")] - pub fail: i64, - #[serde(rename = "pending")] - pub pending: i64, - #[serde(rename = "sending")] - pub sending: i64, - #[serde(rename = "success")] - pub success: i64, + pub fail: i32, + + pub pending: i32, + + pub sending: i32, + + pub success: i32, } impl EndpointStats { - pub fn new(fail: i64, pending: i64, sending: i64, success: i64) -> EndpointStats { - EndpointStats { + pub fn new(fail: i32, pending: i32, sending: i32, success: i32) -> Self { + Self { fail, pending, sending, diff --git a/rust/src/models/endpoint_transformation_in.rs b/rust/src/models/endpoint_transformation_in.rs index c7ddb59e1..fb697ebe7 100644 --- a/rust/src/models/endpoint_transformation_in.rs +++ b/rust/src/models/endpoint_transformation_in.rs @@ -1,29 +1,18 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointTransformationIn { - #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub code: Option, - #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub enabled: Option, } impl EndpointTransformationIn { - pub fn new() -> EndpointTransformationIn { - EndpointTransformationIn { + pub fn new() -> Self { + Self { code: None, enabled: None, } diff --git a/rust/src/models/endpoint_transformation_out.rs b/rust/src/models/endpoint_transformation_out.rs index 9882926fd..bc725cf41 100644 --- a/rust/src/models/endpoint_transformation_out.rs +++ b/rust/src/models/endpoint_transformation_out.rs @@ -1,29 +1,18 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointTransformationOut { - #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub code: Option, - #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub enabled: Option, } impl EndpointTransformationOut { - pub fn new() -> EndpointTransformationOut { - EndpointTransformationOut { + pub fn new() -> Self { + Self { code: None, enabled: None, } diff --git a/rust/src/models/endpoint_transformation_simulate_in.rs b/rust/src/models/endpoint_transformation_simulate_in.rs deleted file mode 100644 index e9ecb5494..000000000 --- a/rust/src/models/endpoint_transformation_simulate_in.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointTransformationSimulateIn { - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] - pub channels: Option>, - #[serde(rename = "code")] - pub code: String, - /// The event type's name - #[serde(rename = "eventType")] - pub event_type: String, - #[serde(rename = "payload")] - pub payload: serde_json::Value, -} - -impl EndpointTransformationSimulateIn { - pub fn new( - code: String, - event_type: String, - payload: serde_json::Value, - ) -> EndpointTransformationSimulateIn { - EndpointTransformationSimulateIn { - channels: None, - code, - event_type, - payload, - } - } -} diff --git a/rust/src/models/endpoint_transformation_simulate_out.rs b/rust/src/models/endpoint_transformation_simulate_out.rs deleted file mode 100644 index ff3522de8..000000000 --- a/rust/src/models/endpoint_transformation_simulate_out.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointTransformationSimulateOut { - #[serde(rename = "method", skip_serializing_if = "Option::is_none")] - pub method: Option, - #[serde(rename = "payload")] - pub payload: String, - #[serde(rename = "url")] - pub url: String, -} - -impl EndpointTransformationSimulateOut { - pub fn new(payload: String, url: String) -> EndpointTransformationSimulateOut { - EndpointTransformationSimulateOut { - method: None, - payload, - url, - } - } -} diff --git a/rust/src/models/endpoint_update.rs b/rust/src/models/endpoint_update.rs index 51abcf825..f2a47d189 100644 --- a/rust/src/models/endpoint_update.rs +++ b/rust/src/models/endpoint_update.rs @@ -1,45 +1,44 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EndpointUpdate { /// List of message channels this endpoint listens to (omit for all). - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub channels: Option>, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub disabled: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "filterTypes")] + #[serde(skip_serializing_if = "Option::is_none")] pub filter_types: Option>, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub metadata: Option>, - #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")] - pub rate_limit: Option, + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub uid: Option, - #[serde(rename = "url")] + pub url: String, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, + + #[deprecated] + #[serde(skip_serializing_if = "Option::is_none")] + pub version: Option, } impl EndpointUpdate { - pub fn new(url: String) -> EndpointUpdate { - EndpointUpdate { + pub fn new(url: String) -> Self { + #[allow(deprecated)] + Self { channels: None, description: None, disabled: None, diff --git a/rust/src/models/endpoint_updated_event.rs b/rust/src/models/endpoint_updated_event.rs deleted file mode 100644 index ec39ea608..000000000 --- a/rust/src/models/endpoint_updated_event.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// EndpointUpdatedEvent : Sent when an endpoint is updated. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointUpdatedEvent { - #[serde(rename = "data")] - pub data: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl EndpointUpdatedEvent { - /// Sent when an endpoint is updated. - pub fn new(data: models::EndpointUpdatedEventData, r#type: Type) -> EndpointUpdatedEvent { - EndpointUpdatedEvent { - data: Box::new(data), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "endpoint.updated")] - EndpointPeriodUpdated, -} - -impl Default for Type { - fn default() -> Type { - Self::EndpointPeriodUpdated - } -} diff --git a/rust/src/models/endpoint_updated_event_data.rs b/rust/src/models/endpoint_updated_event_data.rs deleted file mode 100644 index 4153d3ae4..000000000 --- a/rust/src/models/endpoint_updated_event_data.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// EndpointUpdatedEventData : Sent when an endpoint is created, updated, or -/// deleted -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EndpointUpdatedEventData { - /// The app's ID - #[serde(rename = "appId")] - pub app_id: String, - /// The app's UID - #[serde(rename = "appUid", skip_serializing_if = "Option::is_none")] - pub app_uid: Option, - /// The ep's ID - #[serde(rename = "endpointId")] - pub endpoint_id: String, - /// The ep's UID - #[serde(rename = "endpointUid", skip_serializing_if = "Option::is_none")] - pub endpoint_uid: Option, -} - -impl EndpointUpdatedEventData { - /// Sent when an endpoint is created, updated, or deleted - pub fn new(app_id: String, endpoint_id: String) -> EndpointUpdatedEventData { - EndpointUpdatedEventData { - app_id, - app_uid: None, - endpoint_id, - endpoint_uid: None, - } - } -} diff --git a/rust/src/models/environment_in.rs b/rust/src/models/environment_in.rs index 0ba652616..4f22673c4 100644 --- a/rust/src/models/environment_in.rs +++ b/rust/src/models/environment_in.rs @@ -1,36 +1,27 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{event_type_in::EventTypeIn, template_in::TemplateIn}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EnvironmentIn { - #[serde(rename = "eventTypes", skip_serializing_if = "Option::is_none")] - pub event_types: Option>, - #[serde(rename = "settings", deserialize_with = "Option::deserialize")] + #[serde(rename = "eventTypes")] + #[serde(skip_serializing_if = "Option::is_none")] + pub event_types: Option>, + + #[serde(skip_serializing_if = "Option::is_none")] pub settings: Option, - #[serde( - rename = "transformationTemplates", - skip_serializing_if = "Option::is_none" - )] - pub transformation_templates: Option>, + + #[serde(rename = "transformationTemplates")] + #[serde(skip_serializing_if = "Option::is_none")] + pub transformation_templates: Option>, } impl EnvironmentIn { - pub fn new(settings: Option) -> EnvironmentIn { - EnvironmentIn { + pub fn new() -> Self { + Self { event_types: None, - settings, + settings: None, transformation_templates: None, } } diff --git a/rust/src/models/environment_out.rs b/rust/src/models/environment_out.rs index 3f7d1e9b0..80dff25fe 100644 --- a/rust/src/models/environment_out.rs +++ b/rust/src/models/environment_out.rs @@ -1,40 +1,33 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{event_type_out::EventTypeOut, template_out::TemplateOut}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EnvironmentOut { #[serde(rename = "createdAt")] pub created_at: String, + #[serde(rename = "eventTypes")] - pub event_types: Vec, - #[serde(rename = "settings", deserialize_with = "Option::deserialize")] - pub settings: Option, + pub event_types: Vec, + + pub settings: serde_json::Value, + #[serde(rename = "transformationTemplates")] - pub transformation_templates: Vec, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub transformation_templates: Vec, + + #[serde(skip_serializing_if = "Option::is_none")] pub version: Option, } impl EnvironmentOut { pub fn new( created_at: String, - event_types: Vec, - settings: Option, - transformation_templates: Vec, - ) -> EnvironmentOut { - EnvironmentOut { + event_types: Vec, + settings: serde_json::Value, + transformation_templates: Vec, + ) -> Self { + Self { created_at, event_types, settings, diff --git a/rust/src/models/environment_settings_out.rs b/rust/src/models/environment_settings_out.rs deleted file mode 100644 index 85a351e32..000000000 --- a/rust/src/models/environment_settings_out.rs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EnvironmentSettingsOut { - #[serde(rename = "colorPaletteDark", skip_serializing_if = "Option::is_none")] - pub color_palette_dark: Option>, - #[serde(rename = "colorPaletteLight", skip_serializing_if = "Option::is_none")] - pub color_palette_light: Option>, - #[serde(rename = "customColor", skip_serializing_if = "Option::is_none")] - pub custom_color: Option, - #[serde(rename = "customFontFamily", skip_serializing_if = "Option::is_none")] - pub custom_font_family: Option, - #[serde( - rename = "customFontFamilyUrl", - skip_serializing_if = "Option::is_none" - )] - pub custom_font_family_url: Option, - #[serde(rename = "customLogoUrl", skip_serializing_if = "Option::is_none")] - pub custom_logo_url: Option, - #[serde( - rename = "customStringsOverride", - skip_serializing_if = "Option::is_none" - )] - pub custom_strings_override: Option>, - #[serde( - rename = "customThemeOverride", - skip_serializing_if = "Option::is_none" - )] - pub custom_theme_override: Option>, - #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")] - pub display_name: Option, - #[serde(rename = "enableChannels", skip_serializing_if = "Option::is_none")] - pub enable_channels: Option, - #[serde( - rename = "enableIntegrationManagement", - skip_serializing_if = "Option::is_none" - )] - pub enable_integration_management: Option, - #[serde( - rename = "enableMessageStream", - skip_serializing_if = "Option::is_none" - )] - pub enable_message_stream: Option, - #[serde(rename = "enableMessageTags", skip_serializing_if = "Option::is_none")] - pub enable_message_tags: Option, - #[serde( - rename = "enableTransformations", - skip_serializing_if = "Option::is_none" - )] - pub enable_transformations: Option, - #[serde(rename = "showUseSvixPlay", skip_serializing_if = "Option::is_none")] - pub show_use_svix_play: Option, - #[serde( - rename = "wipeSuccessfulPayload", - skip_serializing_if = "Option::is_none" - )] - pub wipe_successful_payload: Option, -} - -impl EnvironmentSettingsOut { - pub fn new() -> EnvironmentSettingsOut { - EnvironmentSettingsOut { - color_palette_dark: None, - color_palette_light: None, - custom_color: None, - custom_font_family: None, - custom_font_family_url: None, - custom_logo_url: None, - custom_strings_override: None, - custom_theme_override: None, - display_name: None, - enable_channels: None, - enable_integration_management: None, - enable_message_stream: None, - enable_message_tags: None, - enable_transformations: None, - show_use_svix_play: None, - wipe_successful_payload: None, - } - } -} diff --git a/rust/src/models/event_example_in.rs b/rust/src/models/event_example_in.rs index 20197ba3b..ee99fc5c0 100644 --- a/rust/src/models/event_example_in.rs +++ b/rust/src/models/event_example_in.rs @@ -1,33 +1,25 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventExampleIn { /// The event type's name #[serde(rename = "eventType")] pub event_type: String, + /// If the event type schema contains an array of examples, chooses which - /// one to send. Defaults to the first example. Ignored if the schema - /// doesn't contain an array of examples. - #[serde(rename = "exampleIndex", skip_serializing_if = "Option::is_none")] + /// one to send. + /// + /// Defaults to the first example. Ignored if the schema doesn't contain an + /// array of examples. + #[serde(rename = "exampleIndex")] + #[serde(skip_serializing_if = "Option::is_none")] pub example_index: Option, } impl EventExampleIn { - pub fn new(event_type: String) -> EventExampleIn { - EventExampleIn { + pub fn new(event_type: String) -> Self { + Self { event_type, example_index: None, } diff --git a/rust/src/models/event_in.rs b/rust/src/models/event_in.rs deleted file mode 100644 index 6c1a0c7f2..000000000 --- a/rust/src/models/event_in.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EventIn { - /// The event type's name - #[serde(rename = "eventType", skip_serializing_if = "Option::is_none")] - pub event_type: Option, - #[serde(rename = "payload")] - pub payload: String, -} - -impl EventIn { - pub fn new(payload: String) -> EventIn { - EventIn { - event_type: None, - payload, - } - } -} diff --git a/rust/src/models/event_out.rs b/rust/src/models/event_out.rs deleted file mode 100644 index 819d6c42b..000000000 --- a/rust/src/models/event_out.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EventOut { - /// The event type's name - #[serde(rename = "eventType", skip_serializing_if = "Option::is_none")] - pub event_type: Option, - #[serde(rename = "payload")] - pub payload: String, - #[serde(rename = "timestamp")] - pub timestamp: String, -} - -impl EventOut { - pub fn new(payload: String, timestamp: String) -> EventOut { - EventOut { - event_type: None, - payload, - timestamp, - } - } -} diff --git a/rust/src/models/event_stream_out.rs b/rust/src/models/event_stream_out.rs deleted file mode 100644 index fb3cafbaa..000000000 --- a/rust/src/models/event_stream_out.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EventStreamOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator")] - pub iterator: String, -} - -impl EventStreamOut { - pub fn new(data: Vec, done: bool, iterator: String) -> EventStreamOut { - EventStreamOut { - data, - done, - iterator, - } - } -} diff --git a/rust/src/models/event_type_example_out.rs b/rust/src/models/event_type_example_out.rs deleted file mode 100644 index 37d82ad9c..000000000 --- a/rust/src/models/event_type_example_out.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EventTypeExampleOut { - #[serde(rename = "example")] - pub example: serde_json::Value, -} - -impl EventTypeExampleOut { - pub fn new(example: serde_json::Value) -> EventTypeExampleOut { - EventTypeExampleOut { example } - } -} diff --git a/rust/src/models/event_type_from_open_api.rs b/rust/src/models/event_type_from_open_api.rs index 159435f0b..f69fa927b 100644 --- a/rust/src/models/event_type_from_open_api.rs +++ b/rust/src/models/event_type_from_open_api.rs @@ -1,39 +1,31 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventTypeFromOpenApi { - #[serde(rename = "deprecated")] pub deprecated: bool, - #[serde(rename = "description")] + pub description: String, - #[serde(rename = "featureFlag", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "featureFlag")] + #[serde(skip_serializing_if = "Option::is_none")] pub feature_flag: Option, + /// The event type group's name - #[serde(rename = "groupName", skip_serializing_if = "Option::is_none")] + #[serde(rename = "groupName")] + #[serde(skip_serializing_if = "Option::is_none")] pub group_name: Option, + /// The event type's name - #[serde(rename = "name")] pub name: String, - #[serde(rename = "schemas", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub schemas: Option, } impl EventTypeFromOpenApi { - pub fn new(deprecated: bool, description: String, name: String) -> EventTypeFromOpenApi { - EventTypeFromOpenApi { + pub fn new(deprecated: bool, description: String, name: String) -> Self { + Self { deprecated, description, feature_flag: None, diff --git a/rust/src/models/event_type_import_open_api_in.rs b/rust/src/models/event_type_import_open_api_in.rs index 70b1285e5..0cb7db89e 100644 --- a/rust/src/models/event_type_import_open_api_in.rs +++ b/rust/src/models/event_type_import_open_api_in.rs @@ -1,45 +1,32 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -/// EventTypeImportOpenApiIn : Import a list of event types from webhooks -/// defined in an OpenAPI spec. The OpenAPI spec can be specified as either -/// `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which -/// will be parsed as YAML or JSON by the server. Sending neither or both is -/// invalid, resulting in a `400` **Bad Request**. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +/// Import a list of event types from webhooks defined in an OpenAPI spec. +/// +/// The OpenAPI spec can be specified as either `spec` given the spec as a JSON +/// object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by +/// the server. Sending neither or both is invalid, resulting in a `400` **Bad +/// Request**. +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventTypeImportOpenApiIn { /// If `true`, return the event types that would be modified without /// actually modifying them. - #[serde(rename = "dry_run", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub dry_run: Option, + /// A pre-parsed JSON spec. - #[serde(rename = "spec", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub spec: Option, + /// A string, parsed by the server as YAML or JSON. - #[serde(rename = "specRaw", skip_serializing_if = "Option::is_none")] + #[serde(rename = "specRaw")] + #[serde(skip_serializing_if = "Option::is_none")] pub spec_raw: Option, } impl EventTypeImportOpenApiIn { - /// Import a list of event types from webhooks defined in an OpenAPI spec. - /// The OpenAPI spec can be specified as either `spec` given the spec as a - /// JSON object, or as `specRaw` (a `string`) which will be parsed as YAML - /// or JSON by the server. Sending neither or both is invalid, resulting in - /// a `400` **Bad Request**. - pub fn new() -> EventTypeImportOpenApiIn { - EventTypeImportOpenApiIn { + pub fn new() -> Self { + Self { dry_run: None, spec: None, spec_raw: None, diff --git a/rust/src/models/event_type_import_open_api_out.rs b/rust/src/models/event_type_import_open_api_out.rs index 0e23f754b..fe14b871f 100644 --- a/rust/src/models/event_type_import_open_api_out.rs +++ b/rust/src/models/event_type_import_open_api_out.rs @@ -1,28 +1,15 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::event_type_import_open_api_out_data::EventTypeImportOpenApiOutData; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventTypeImportOpenApiOut { - #[serde(rename = "data")] - pub data: Box, + pub data: EventTypeImportOpenApiOutData, } impl EventTypeImportOpenApiOut { - pub fn new(data: models::EventTypeImportOpenApiOutData) -> EventTypeImportOpenApiOut { - EventTypeImportOpenApiOut { - data: Box::new(data), - } + pub fn new(data: EventTypeImportOpenApiOutData) -> Self { + Self { data } } } diff --git a/rust/src/models/event_type_import_open_api_out_data.rs b/rust/src/models/event_type_import_open_api_out_data.rs index ea737ef1c..0e352b1a0 100644 --- a/rust/src/models/event_type_import_open_api_out_data.rs +++ b/rust/src/models/event_type_import_open_api_out_data.rs @@ -1,29 +1,19 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::event_type_from_open_api::EventTypeFromOpenApi; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventTypeImportOpenApiOutData { - #[serde(rename = "modified")] pub modified: Vec, - #[serde(rename = "to_modify", skip_serializing_if = "Option::is_none")] - pub to_modify: Option>, + + #[serde(skip_serializing_if = "Option::is_none")] + pub to_modify: Option>, } impl EventTypeImportOpenApiOutData { - pub fn new(modified: Vec) -> EventTypeImportOpenApiOutData { - EventTypeImportOpenApiOutData { + pub fn new(modified: Vec) -> Self { + Self { modified, to_modify: None, } diff --git a/rust/src/models/event_type_in.rs b/rust/src/models/event_type_in.rs index fb6e39a22..e220d5a61 100644 --- a/rust/src/models/event_type_in.rs +++ b/rust/src/models/event_type_in.rs @@ -1,42 +1,36 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventTypeIn { - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub archived: Option, - #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub deprecated: Option, - #[serde(rename = "description")] + pub description: String, - #[serde(rename = "featureFlag", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "featureFlag")] + #[serde(skip_serializing_if = "Option::is_none")] pub feature_flag: Option, + /// The event type group's name - #[serde(rename = "groupName", skip_serializing_if = "Option::is_none")] + #[serde(rename = "groupName")] + #[serde(skip_serializing_if = "Option::is_none")] pub group_name: Option, + /// The event type's name - #[serde(rename = "name")] pub name: String, + /// The schema for the event type for a specific version as a JSON schema. - #[serde(rename = "schemas", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub schemas: Option, } impl EventTypeIn { - pub fn new(description: String, name: String) -> EventTypeIn { - EventTypeIn { + pub fn new(description: String, name: String) -> Self { + Self { archived: None, deprecated: None, description, diff --git a/rust/src/models/event_type_out.rs b/rust/src/models/event_type_out.rs index 814669791..0a5e91421 100644 --- a/rust/src/models/event_type_out.rs +++ b/rust/src/models/event_type_out.rs @@ -1,39 +1,34 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventTypeOut { - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub archived: Option, + #[serde(rename = "createdAt")] pub created_at: String, - #[serde(rename = "deprecated")] + pub deprecated: bool, - #[serde(rename = "description")] + pub description: String, - #[serde(rename = "featureFlag", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "featureFlag")] + #[serde(skip_serializing_if = "Option::is_none")] pub feature_flag: Option, + /// The event type group's name - #[serde(rename = "groupName", skip_serializing_if = "Option::is_none")] + #[serde(rename = "groupName")] + #[serde(skip_serializing_if = "Option::is_none")] pub group_name: Option, + /// The event type's name - #[serde(rename = "name")] pub name: String, + /// The schema for the event type for a specific version as a JSON schema. - #[serde(rename = "schemas", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub schemas: Option, + #[serde(rename = "updatedAt")] pub updated_at: String, } @@ -45,8 +40,8 @@ impl EventTypeOut { description: String, name: String, updated_at: String, - ) -> EventTypeOut { - EventTypeOut { + ) -> Self { + Self { archived: None, created_at, deprecated, diff --git a/rust/src/models/event_type_patch.rs b/rust/src/models/event_type_patch.rs index 979b34ab0..f28207b50 100644 --- a/rust/src/models/event_type_patch.rs +++ b/rust/src/models/event_type_patch.rs @@ -1,59 +1,40 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated +use js_option::JsOption; use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventTypePatch { - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub archived: Option, - #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub deprecated: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - #[serde( - rename = "featureFlag", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub feature_flag: Option>, + + #[serde(rename = "featureFlag")] + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub feature_flag: JsOption, + /// The event type group's name - #[serde( - rename = "groupName", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub group_name: Option>, - #[serde( - rename = "schemas", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub schemas: Option>, + #[serde(rename = "groupName")] + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub group_name: JsOption, + + #[serde(default, skip_serializing_if = "JsOption::is_undefined")] + pub schemas: JsOption, } impl EventTypePatch { - pub fn new() -> EventTypePatch { - EventTypePatch { + pub fn new() -> Self { + Self { archived: None, deprecated: None, description: None, - feature_flag: None, - group_name: None, - schemas: None, + feature_flag: JsOption::Undefined, + group_name: JsOption::Undefined, + schemas: JsOption::Undefined, } } } diff --git a/rust/src/models/event_type_schema_in.rs b/rust/src/models/event_type_schema_in.rs deleted file mode 100644 index 25a092885..000000000 --- a/rust/src/models/event_type_schema_in.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EventTypeSchemaIn { - #[serde(rename = "schema")] - pub schema: serde_json::Value, -} - -impl EventTypeSchemaIn { - pub fn new(schema: serde_json::Value) -> EventTypeSchemaIn { - EventTypeSchemaIn { schema } - } -} diff --git a/rust/src/models/event_type_update.rs b/rust/src/models/event_type_update.rs index d4eb398bc..fb27565ad 100644 --- a/rust/src/models/event_type_update.rs +++ b/rust/src/models/event_type_update.rs @@ -1,39 +1,33 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct EventTypeUpdate { - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub archived: Option, - #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub deprecated: Option, - #[serde(rename = "description")] + pub description: String, - #[serde(rename = "featureFlag", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "featureFlag")] + #[serde(skip_serializing_if = "Option::is_none")] pub feature_flag: Option, + /// The event type group's name - #[serde(rename = "groupName", skip_serializing_if = "Option::is_none")] + #[serde(rename = "groupName")] + #[serde(skip_serializing_if = "Option::is_none")] pub group_name: Option, + /// The schema for the event type for a specific version as a JSON schema. - #[serde(rename = "schemas", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub schemas: Option, } impl EventTypeUpdate { - pub fn new(description: String) -> EventTypeUpdate { - EventTypeUpdate { + pub fn new(description: String) -> Self { + Self { archived: None, deprecated: None, description, diff --git a/rust/src/models/export_event_type_out.rs b/rust/src/models/export_event_type_out.rs deleted file mode 100644 index b3557c479..000000000 --- a/rust/src/models/export_event_type_out.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ExportEventTypeOut { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, -} - -impl ExportEventTypeOut { - pub fn new( - id: String, - status: models::BackgroundTaskStatus, - task: models::BackgroundTaskType, - ) -> ExportEventTypeOut { - ExportEventTypeOut { id, status, task } - } -} diff --git a/rust/src/models/font_size_config.rs b/rust/src/models/font_size_config.rs deleted file mode 100644 index 36243f933..000000000 --- a/rust/src/models/font_size_config.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct FontSizeConfig { - #[serde(rename = "base", skip_serializing_if = "Option::is_none")] - pub base: Option, -} - -impl FontSizeConfig { - pub fn new() -> FontSizeConfig { - FontSizeConfig { base: None } - } -} diff --git a/rust/src/models/generate_in.rs b/rust/src/models/generate_in.rs deleted file mode 100644 index f0fd6d535..000000000 --- a/rust/src/models/generate_in.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GenerateIn { - #[serde(rename = "prompt")] - pub prompt: String, -} - -impl GenerateIn { - pub fn new(prompt: String) -> GenerateIn { - GenerateIn { prompt } - } -} diff --git a/rust/src/models/generate_out.rs b/rust/src/models/generate_out.rs deleted file mode 100644 index 35426b4d4..000000000 --- a/rust/src/models/generate_out.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GenerateOut { - #[serde(rename = "choices")] - pub choices: Vec, - #[serde(rename = "created")] - pub created: i64, - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "model")] - pub model: String, - #[serde(rename = "object")] - pub object: String, -} - -impl GenerateOut { - pub fn new( - choices: Vec, - created: i64, - id: String, - model: String, - object: String, - ) -> GenerateOut { - GenerateOut { - choices, - created, - id, - model, - object, - } - } -} diff --git a/rust/src/models/google_cloud_storage_config.rs b/rust/src/models/google_cloud_storage_config.rs deleted file mode 100644 index 54e25a6e9..000000000 --- a/rust/src/models/google_cloud_storage_config.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// GoogleCloudStorageConfig : Configuration for a Google Cloud Storage sink. -/// Write stream events into the named bucket using the supplied Google Cloud -/// credentials. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GoogleCloudStorageConfig { - #[serde(rename = "bucket")] - pub bucket: String, - /// Google Cloud Credentials JSON Object as a string. - #[serde(rename = "credentials")] - pub credentials: String, -} - -impl GoogleCloudStorageConfig { - /// Configuration for a Google Cloud Storage sink. Write stream events into - /// the named bucket using the supplied Google Cloud credentials. - pub fn new(bucket: String, credentials: String) -> GoogleCloudStorageConfig { - GoogleCloudStorageConfig { - bucket, - credentials, - } - } -} diff --git a/rust/src/models/hubspot_oauth_config_in.rs b/rust/src/models/hubspot_oauth_config_in.rs deleted file mode 100644 index a539671f8..000000000 --- a/rust/src/models/hubspot_oauth_config_in.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct HubspotOauthConfigIn { - #[serde(rename = "refresh_token")] - pub refresh_token: String, -} - -impl HubspotOauthConfigIn { - pub fn new(refresh_token: String) -> HubspotOauthConfigIn { - HubspotOauthConfigIn { refresh_token } - } -} diff --git a/rust/src/models/inbound_path_params.rs b/rust/src/models/inbound_path_params.rs deleted file mode 100644 index 756d95352..000000000 --- a/rust/src/models/inbound_path_params.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct InboundPathParams { - /// The app's ID or UID - #[serde(rename = "app_id")] - pub app_id: String, - #[serde(rename = "inbound_token")] - pub inbound_token: String, -} - -impl InboundPathParams { - pub fn new(app_id: String, inbound_token: String) -> InboundPathParams { - InboundPathParams { - app_id, - inbound_token, - } - } -} diff --git a/rust/src/models/incoming_webhook_payload_out.rs b/rust/src/models/incoming_webhook_payload_out.rs deleted file mode 100644 index b1d9ef9f8..000000000 --- a/rust/src/models/incoming_webhook_payload_out.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IncomingWebhookPayloadOut { - #[serde(rename = "channel", skip_serializing_if = "Option::is_none")] - pub channel: Option, - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option, - #[serde(rename = "incomingWebhookUrl", skip_serializing_if = "Option::is_none")] - pub incoming_webhook_url: Option, -} - -impl IncomingWebhookPayloadOut { - pub fn new() -> IncomingWebhookPayloadOut { - IncomingWebhookPayloadOut { - channel: None, - error: None, - incoming_webhook_url: None, - } - } -} diff --git a/rust/src/models/integration_in.rs b/rust/src/models/integration_in.rs index cc1b5a129..d7ac39a3d 100644 --- a/rust/src/models/integration_in.rs +++ b/rust/src/models/integration_in.rs @@ -1,26 +1,13 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct IntegrationIn { - #[serde(rename = "name")] pub name: String, } impl IntegrationIn { - pub fn new(name: String) -> IntegrationIn { - IntegrationIn { name } + pub fn new(name: String) -> Self { + Self { name } } } diff --git a/rust/src/models/integration_key_out.rs b/rust/src/models/integration_key_out.rs index 78e605655..e9c3bd969 100644 --- a/rust/src/models/integration_key_out.rs +++ b/rust/src/models/integration_key_out.rs @@ -1,26 +1,13 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct IntegrationKeyOut { - #[serde(rename = "key")] pub key: String, } impl IntegrationKeyOut { - pub fn new(key: String) -> IntegrationKeyOut { - IntegrationKeyOut { key } + pub fn new(key: String) -> Self { + Self { key } } } diff --git a/rust/src/models/integration_out.rs b/rust/src/models/integration_out.rs index 977465342..02e3e84a1 100644 --- a/rust/src/models/integration_out.rs +++ b/rust/src/models/integration_out.rs @@ -1,34 +1,23 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct IntegrationOut { #[serde(rename = "createdAt")] pub created_at: String, + /// The integ's ID - #[serde(rename = "id")] pub id: String, - #[serde(rename = "name")] + pub name: String, + #[serde(rename = "updatedAt")] pub updated_at: String, } impl IntegrationOut { - pub fn new(created_at: String, id: String, name: String, updated_at: String) -> IntegrationOut { - IntegrationOut { + pub fn new(created_at: String, id: String, name: String, updated_at: String) -> Self { + Self { created_at, id, name, diff --git a/rust/src/models/integration_update.rs b/rust/src/models/integration_update.rs index 418efd17e..2be02f71d 100644 --- a/rust/src/models/integration_update.rs +++ b/rust/src/models/integration_update.rs @@ -1,26 +1,13 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct IntegrationUpdate { - #[serde(rename = "name")] pub name: String, } impl IntegrationUpdate { - pub fn new(name: String) -> IntegrationUpdate { - IntegrationUpdate { name } + pub fn new(name: String) -> Self { + Self { name } } } diff --git a/rust/src/models/kafka_security_protocol_type.rs b/rust/src/models/kafka_security_protocol_type.rs deleted file mode 100644 index be2949cf8..000000000 --- a/rust/src/models/kafka_security_protocol_type.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum KafkaSecurityProtocolType { - #[serde(rename = "plaintext")] - Plaintext, - #[serde(rename = "ssl")] - Ssl, - #[serde(rename = "sasl-ssl")] - SaslSsl, -} - -impl std::fmt::Display for KafkaSecurityProtocolType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Plaintext => write!(f, "plaintext"), - Self::Ssl => write!(f, "ssl"), - Self::SaslSsl => write!(f, "sasl-ssl"), - } - } -} - -impl Default for KafkaSecurityProtocolType { - fn default() -> KafkaSecurityProtocolType { - Self::Plaintext - } -} diff --git a/rust/src/models/list_response_application_out.rs b/rust/src/models/list_response_application_out.rs new file mode 100644 index 000000000..21353bc3a --- /dev/null +++ b/rust/src/models/list_response_application_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::application_out::ApplicationOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseApplicationOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseApplicationOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_application_out_.rs b/rust/src/models/list_response_application_out_.rs deleted file mode 100644 index 2f20510cd..000000000 --- a/rust/src/models/list_response_application_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseApplicationOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseApplicationOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseApplicationOut { - ListResponseApplicationOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_application_stats_.rs b/rust/src/models/list_response_application_stats_.rs deleted file mode 100644 index f7c1bdeef..000000000 --- a/rust/src/models/list_response_application_stats_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseApplicationStats { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseApplicationStats { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseApplicationStats { - ListResponseApplicationStats { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_background_task_out_.rs b/rust/src/models/list_response_background_task_out.rs similarity index 53% rename from rust/src/models/list_response_background_task_out_.rs rename to rust/src/models/list_response_background_task_out.rs index 0aabb46fe..fdb7c34cd 100644 --- a/rust/src/models/list_response_background_task_out_.rs +++ b/rust/src/models/list_response_background_task_out.rs @@ -1,25 +1,9 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ListResponseBackgroundTaskOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] + pub data: Vec, pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] pub iterator: Option, #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] pub prev_iterator: Option, @@ -27,7 +11,7 @@ pub struct ListResponseBackgroundTaskOut { impl ListResponseBackgroundTaskOut { pub fn new( - data: Vec, + data: Vec, done: bool, iterator: Option, ) -> ListResponseBackgroundTaskOut { diff --git a/rust/src/models/list_response_endpoint_message_out.rs b/rust/src/models/list_response_endpoint_message_out.rs new file mode 100644 index 000000000..33d24c4f0 --- /dev/null +++ b/rust/src/models/list_response_endpoint_message_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::endpoint_message_out::EndpointMessageOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseEndpointMessageOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseEndpointMessageOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_endpoint_message_out_.rs b/rust/src/models/list_response_endpoint_message_out_.rs deleted file mode 100644 index 218b67c4a..000000000 --- a/rust/src/models/list_response_endpoint_message_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseEndpointMessageOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseEndpointMessageOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseEndpointMessageOut { - ListResponseEndpointMessageOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_endpoint_out.rs b/rust/src/models/list_response_endpoint_out.rs new file mode 100644 index 000000000..b20003ac5 --- /dev/null +++ b/rust/src/models/list_response_endpoint_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::endpoint_out::EndpointOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseEndpointOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseEndpointOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_endpoint_out_.rs b/rust/src/models/list_response_endpoint_out_.rs deleted file mode 100644 index fd166c356..000000000 --- a/rust/src/models/list_response_endpoint_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseEndpointOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseEndpointOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseEndpointOut { - ListResponseEndpointOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_event_type_out.rs b/rust/src/models/list_response_event_type_out.rs new file mode 100644 index 000000000..a2eb45516 --- /dev/null +++ b/rust/src/models/list_response_event_type_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::event_type_out::EventTypeOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseEventTypeOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseEventTypeOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_event_type_out_.rs b/rust/src/models/list_response_event_type_out_.rs deleted file mode 100644 index 49f721168..000000000 --- a/rust/src/models/list_response_event_type_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseEventTypeOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseEventTypeOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseEventTypeOut { - ListResponseEventTypeOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_integration_out.rs b/rust/src/models/list_response_integration_out.rs new file mode 100644 index 000000000..2ddbf510f --- /dev/null +++ b/rust/src/models/list_response_integration_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::integration_out::IntegrationOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseIntegrationOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseIntegrationOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_integration_out_.rs b/rust/src/models/list_response_integration_out_.rs deleted file mode 100644 index 6a3902543..000000000 --- a/rust/src/models/list_response_integration_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseIntegrationOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseIntegrationOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseIntegrationOut { - ListResponseIntegrationOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_message_attempt_endpoint_out.rs b/rust/src/models/list_response_message_attempt_endpoint_out.rs new file mode 100644 index 000000000..9c2ab6d4f --- /dev/null +++ b/rust/src/models/list_response_message_attempt_endpoint_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::message_attempt_endpoint_out::MessageAttemptEndpointOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseMessageAttemptEndpointOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseMessageAttemptEndpointOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_message_attempt_endpoint_out_.rs b/rust/src/models/list_response_message_attempt_endpoint_out_.rs deleted file mode 100644 index be4560c99..000000000 --- a/rust/src/models/list_response_message_attempt_endpoint_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseMessageAttemptEndpointOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseMessageAttemptEndpointOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseMessageAttemptEndpointOut { - ListResponseMessageAttemptEndpointOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_message_attempt_out.rs b/rust/src/models/list_response_message_attempt_out.rs new file mode 100644 index 000000000..9e01a7db8 --- /dev/null +++ b/rust/src/models/list_response_message_attempt_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::message_attempt_out::MessageAttemptOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseMessageAttemptOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseMessageAttemptOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_message_attempt_out_.rs b/rust/src/models/list_response_message_attempt_out_.rs deleted file mode 100644 index f1b5d79ef..000000000 --- a/rust/src/models/list_response_message_attempt_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseMessageAttemptOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseMessageAttemptOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseMessageAttemptOut { - ListResponseMessageAttemptOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_message_endpoint_out.rs b/rust/src/models/list_response_message_endpoint_out.rs new file mode 100644 index 000000000..527c7f1ca --- /dev/null +++ b/rust/src/models/list_response_message_endpoint_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::message_endpoint_out::MessageEndpointOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseMessageEndpointOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseMessageEndpointOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_message_endpoint_out_.rs b/rust/src/models/list_response_message_endpoint_out_.rs deleted file mode 100644 index e398bcde4..000000000 --- a/rust/src/models/list_response_message_endpoint_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseMessageEndpointOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseMessageEndpointOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseMessageEndpointOut { - ListResponseMessageEndpointOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_message_out.rs b/rust/src/models/list_response_message_out.rs new file mode 100644 index 000000000..284d36a3c --- /dev/null +++ b/rust/src/models/list_response_message_out.rs @@ -0,0 +1,28 @@ +// this file is @generated +use serde::{Deserialize, Serialize}; + +use super::message_out::MessageOut; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] +pub struct ListResponseMessageOut { + pub data: Vec, + + pub done: bool, + + pub iterator: String, + + #[serde(rename = "prevIterator")] + #[serde(skip_serializing_if = "Option::is_none")] + pub prev_iterator: Option, +} + +impl ListResponseMessageOut { + pub fn new(data: Vec, done: bool, iterator: String) -> Self { + Self { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_message_out_.rs b/rust/src/models/list_response_message_out_.rs deleted file mode 100644 index a56f3727b..000000000 --- a/rust/src/models/list_response_message_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseMessageOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseMessageOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseMessageOut { - ListResponseMessageOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_operational_webhook_endpoint_out_.rs b/rust/src/models/list_response_operational_webhook_endpoint_out.rs similarity index 54% rename from rust/src/models/list_response_operational_webhook_endpoint_out_.rs rename to rust/src/models/list_response_operational_webhook_endpoint_out.rs index c16302eff..62497df5b 100644 --- a/rust/src/models/list_response_operational_webhook_endpoint_out_.rs +++ b/rust/src/models/list_response_operational_webhook_endpoint_out.rs @@ -1,25 +1,9 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ListResponseOperationalWebhookEndpointOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] + pub data: Vec, pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] pub iterator: Option, #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] pub prev_iterator: Option, @@ -27,7 +11,7 @@ pub struct ListResponseOperationalWebhookEndpointOut { impl ListResponseOperationalWebhookEndpointOut { pub fn new( - data: Vec, + data: Vec, done: bool, iterator: Option, ) -> ListResponseOperationalWebhookEndpointOut { diff --git a/rust/src/models/list_response_sink_out_.rs b/rust/src/models/list_response_sink_out_.rs deleted file mode 100644 index bdacb1b9e..000000000 --- a/rust/src/models/list_response_sink_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseSinkOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseSinkOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseSinkOut { - ListResponseSinkOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_stream_event_type_out_.rs b/rust/src/models/list_response_stream_event_type_out_.rs deleted file mode 100644 index da79805c1..000000000 --- a/rust/src/models/list_response_stream_event_type_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseStreamEventTypeOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseStreamEventTypeOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseStreamEventTypeOut { - ListResponseStreamEventTypeOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_stream_out_.rs b/rust/src/models/list_response_stream_out_.rs deleted file mode 100644 index 520a9223c..000000000 --- a/rust/src/models/list_response_stream_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseStreamOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseStreamOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseStreamOut { - ListResponseStreamOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_stream_sink_out_.rs b/rust/src/models/list_response_stream_sink_out_.rs deleted file mode 100644 index efee163f1..000000000 --- a/rust/src/models/list_response_stream_sink_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseStreamSinkOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseStreamSinkOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseStreamSinkOut { - ListResponseStreamSinkOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/list_response_template_out_.rs b/rust/src/models/list_response_template_out_.rs deleted file mode 100644 index e481b55e4..000000000 --- a/rust/src/models/list_response_template_out_.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListResponseTemplateOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator", deserialize_with = "Option::deserialize")] - pub iterator: Option, - #[serde(rename = "prevIterator", skip_serializing_if = "Option::is_none")] - pub prev_iterator: Option, -} - -impl ListResponseTemplateOut { - pub fn new( - data: Vec, - done: bool, - iterator: Option, - ) -> ListResponseTemplateOut { - ListResponseTemplateOut { - data, - done, - iterator, - prev_iterator: None, - } - } -} diff --git a/rust/src/models/message_attempt_endpoint_out.rs b/rust/src/models/message_attempt_endpoint_out.rs index 1b805c805..2e80dbd24 100644 --- a/rust/src/models/message_attempt_endpoint_out.rs +++ b/rust/src/models/message_attempt_endpoint_out.rs @@ -1,45 +1,43 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{ + message_attempt_trigger_type::MessageAttemptTriggerType, message_out::MessageOut, + message_status::MessageStatus, +}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct MessageAttemptEndpointOut { /// The ep's ID #[serde(rename = "endpointId")] pub endpoint_id: String, + /// The attempt's ID - #[serde(rename = "id")] pub id: String, - #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] - pub msg: Option>, + + #[serde(skip_serializing_if = "Option::is_none")] + pub msg: Option, + /// The msg's ID #[serde(rename = "msgId")] pub msg_id: String, - #[serde(rename = "response")] + pub response: String, + /// Response duration in milliseconds. #[serde(rename = "responseDurationMs")] - pub response_duration_ms: i64, + pub response_duration_ms: i32, + #[serde(rename = "responseStatusCode")] - pub response_status_code: i32, - #[serde(rename = "status")] - pub status: models::MessageStatus, - #[serde(rename = "timestamp")] + pub response_status_code: i16, + + pub status: MessageStatus, + pub timestamp: String, + #[serde(rename = "triggerType")] - pub trigger_type: models::MessageAttemptTriggerType, - #[serde(rename = "url")] + pub trigger_type: MessageAttemptTriggerType, + pub url: String, } @@ -49,14 +47,14 @@ impl MessageAttemptEndpointOut { id: String, msg_id: String, response: String, - response_duration_ms: i64, - response_status_code: i32, - status: models::MessageStatus, + response_duration_ms: i32, + response_status_code: i16, + status: MessageStatus, timestamp: String, - trigger_type: models::MessageAttemptTriggerType, + trigger_type: MessageAttemptTriggerType, url: String, - ) -> MessageAttemptEndpointOut { - MessageAttemptEndpointOut { + ) -> Self { + Self { endpoint_id, id, msg: None, diff --git a/rust/src/models/message_attempt_exhausted_event.rs b/rust/src/models/message_attempt_exhausted_event.rs deleted file mode 100644 index 73ee8868d..000000000 --- a/rust/src/models/message_attempt_exhausted_event.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// MessageAttemptExhaustedEvent : Sent when a message delivery has failed (all -/// of the retry attempts have been exhausted). -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageAttemptExhaustedEvent { - #[serde(rename = "data")] - pub data: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl MessageAttemptExhaustedEvent { - /// Sent when a message delivery has failed (all of the retry attempts have - /// been exhausted). - pub fn new( - data: models::MessageAttemptExhaustedEventData, - r#type: Type, - ) -> MessageAttemptExhaustedEvent { - MessageAttemptExhaustedEvent { - data: Box::new(data), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "message.attempt.exhausted")] - MessagePeriodAttemptPeriodExhausted, -} - -impl Default for Type { - fn default() -> Type { - Self::MessagePeriodAttemptPeriodExhausted - } -} diff --git a/rust/src/models/message_attempt_exhausted_event_data.rs b/rust/src/models/message_attempt_exhausted_event_data.rs deleted file mode 100644 index b32076c59..000000000 --- a/rust/src/models/message_attempt_exhausted_event_data.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// MessageAttemptExhaustedEventData : Sent when a message delivery has failed -/// (all of the retry attempts have been exhausted) as a -/// \"message.attempt.exhausted\" type or after it's failed four times as a -/// \"message.attempt.failing\" event. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageAttemptExhaustedEventData { - /// The app's ID - #[serde(rename = "appId")] - pub app_id: String, - /// The app's UID - #[serde(rename = "appUid", skip_serializing_if = "Option::is_none")] - pub app_uid: Option, - /// The ep's ID - #[serde(rename = "endpointId")] - pub endpoint_id: String, - #[serde(rename = "lastAttempt")] - pub last_attempt: Box, - /// The msg's UID - #[serde(rename = "msgEventId", skip_serializing_if = "Option::is_none")] - pub msg_event_id: Option, - /// The msg's ID - #[serde(rename = "msgId")] - pub msg_id: String, -} - -impl MessageAttemptExhaustedEventData { - /// Sent when a message delivery has failed (all of the retry attempts have - /// been exhausted) as a \"message.attempt.exhausted\" type or after it's - /// failed four times as a \"message.attempt.failing\" event. - pub fn new( - app_id: String, - endpoint_id: String, - last_attempt: models::MessageAttemptFailedData, - msg_id: String, - ) -> MessageAttemptExhaustedEventData { - MessageAttemptExhaustedEventData { - app_id, - app_uid: None, - endpoint_id, - last_attempt: Box::new(last_attempt), - msg_event_id: None, - msg_id, - } - } -} diff --git a/rust/src/models/message_attempt_failed_data.rs b/rust/src/models/message_attempt_failed_data.rs deleted file mode 100644 index 1e859e443..000000000 --- a/rust/src/models/message_attempt_failed_data.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageAttemptFailedData { - /// The attempt's ID - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "responseStatusCode")] - pub response_status_code: i32, - #[serde(rename = "timestamp")] - pub timestamp: String, -} - -impl MessageAttemptFailedData { - pub fn new( - id: String, - response_status_code: i32, - timestamp: String, - ) -> MessageAttemptFailedData { - MessageAttemptFailedData { - id, - response_status_code, - timestamp, - } - } -} diff --git a/rust/src/models/message_attempt_failing_event.rs b/rust/src/models/message_attempt_failing_event.rs deleted file mode 100644 index 3286aaa64..000000000 --- a/rust/src/models/message_attempt_failing_event.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// MessageAttemptFailingEvent : Sent after a message has been failing for a few -/// times. It's sent on the fourth failure. It complements -/// `message.attempt.exhausted` which is sent after the last failure. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageAttemptFailingEvent { - #[serde(rename = "data")] - pub data: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl MessageAttemptFailingEvent { - /// Sent after a message has been failing for a few times. It's sent on the - /// fourth failure. It complements `message.attempt.exhausted` which is sent - /// after the last failure. - pub fn new( - data: models::MessageAttemptFailingEventData, - r#type: Type, - ) -> MessageAttemptFailingEvent { - MessageAttemptFailingEvent { - data: Box::new(data), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "message.attempt.failing")] - MessagePeriodAttemptPeriodFailing, -} - -impl Default for Type { - fn default() -> Type { - Self::MessagePeriodAttemptPeriodFailing - } -} diff --git a/rust/src/models/message_attempt_failing_event_data.rs b/rust/src/models/message_attempt_failing_event_data.rs deleted file mode 100644 index a6cf23768..000000000 --- a/rust/src/models/message_attempt_failing_event_data.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// MessageAttemptFailingEventData : Sent when a message delivery has failed -/// (all of the retry attempts have been exhausted) as a -/// \"message.attempt.exhausted\" type or after it's failed four times as a -/// \"message.attempt.failing\" event. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageAttemptFailingEventData { - /// The app's ID - #[serde(rename = "appId")] - pub app_id: String, - /// The app's UID - #[serde(rename = "appUid", skip_serializing_if = "Option::is_none")] - pub app_uid: Option, - /// The ep's ID - #[serde(rename = "endpointId")] - pub endpoint_id: String, - #[serde(rename = "lastAttempt")] - pub last_attempt: Box, - /// The msg's UID - #[serde(rename = "msgEventId", skip_serializing_if = "Option::is_none")] - pub msg_event_id: Option, - /// The msg's ID - #[serde(rename = "msgId")] - pub msg_id: String, -} - -impl MessageAttemptFailingEventData { - /// Sent when a message delivery has failed (all of the retry attempts have - /// been exhausted) as a \"message.attempt.exhausted\" type or after it's - /// failed four times as a \"message.attempt.failing\" event. - pub fn new( - app_id: String, - endpoint_id: String, - last_attempt: models::MessageAttemptFailedData, - msg_id: String, - ) -> MessageAttemptFailingEventData { - MessageAttemptFailingEventData { - app_id, - app_uid: None, - endpoint_id, - last_attempt: Box::new(last_attempt), - msg_event_id: None, - msg_id, - } - } -} diff --git a/rust/src/models/message_attempt_headers_out.rs b/rust/src/models/message_attempt_headers_out.rs deleted file mode 100644 index 4427ab2f0..000000000 --- a/rust/src/models/message_attempt_headers_out.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageAttemptHeadersOut { - #[serde(rename = "responseHeaders", skip_serializing_if = "Option::is_none")] - pub response_headers: Option>>, - #[serde(rename = "sensitive")] - pub sensitive: Vec, - #[serde(rename = "sentHeaders")] - pub sent_headers: std::collections::HashMap, -} - -impl MessageAttemptHeadersOut { - pub fn new( - sensitive: Vec, - sent_headers: std::collections::HashMap, - ) -> MessageAttemptHeadersOut { - MessageAttemptHeadersOut { - response_headers: None, - sensitive, - sent_headers, - } - } -} diff --git a/rust/src/models/message_attempt_out.rs b/rust/src/models/message_attempt_out.rs index 43abc43aa..dbbdf25fe 100644 --- a/rust/src/models/message_attempt_out.rs +++ b/rust/src/models/message_attempt_out.rs @@ -1,45 +1,43 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{ + message_attempt_trigger_type::MessageAttemptTriggerType, message_out::MessageOut, + message_status::MessageStatus, +}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct MessageAttemptOut { /// The ep's ID #[serde(rename = "endpointId")] pub endpoint_id: String, + /// The attempt's ID - #[serde(rename = "id")] pub id: String, - #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] - pub msg: Option>, + + #[serde(skip_serializing_if = "Option::is_none")] + pub msg: Option, + /// The msg's ID #[serde(rename = "msgId")] pub msg_id: String, - #[serde(rename = "response")] + pub response: String, + /// Response duration in milliseconds. #[serde(rename = "responseDurationMs")] - pub response_duration_ms: i64, + pub response_duration_ms: i32, + #[serde(rename = "responseStatusCode")] - pub response_status_code: i32, - #[serde(rename = "status")] - pub status: models::MessageStatus, - #[serde(rename = "timestamp")] + pub response_status_code: i16, + + pub status: MessageStatus, + pub timestamp: String, + #[serde(rename = "triggerType")] - pub trigger_type: models::MessageAttemptTriggerType, - #[serde(rename = "url")] + pub trigger_type: MessageAttemptTriggerType, + pub url: String, } @@ -49,14 +47,14 @@ impl MessageAttemptOut { id: String, msg_id: String, response: String, - response_duration_ms: i64, - response_status_code: i32, - status: models::MessageStatus, + response_duration_ms: i32, + response_status_code: i16, + status: MessageStatus, timestamp: String, - trigger_type: models::MessageAttemptTriggerType, + trigger_type: MessageAttemptTriggerType, url: String, - ) -> MessageAttemptOut { - MessageAttemptOut { + ) -> Self { + Self { endpoint_id, id, msg: None, diff --git a/rust/src/models/message_attempt_recovered_event.rs b/rust/src/models/message_attempt_recovered_event.rs deleted file mode 100644 index cebda5f63..000000000 --- a/rust/src/models/message_attempt_recovered_event.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// MessageAttemptRecoveredEvent : Sent on a successful dispatch after an -/// earlier failure op webhook has already been sent. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageAttemptRecoveredEvent { - #[serde(rename = "data")] - pub data: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl MessageAttemptRecoveredEvent { - /// Sent on a successful dispatch after an earlier failure op webhook has - /// already been sent. - pub fn new( - data: models::MessageAttemptRecoveredEventData, - r#type: Type, - ) -> MessageAttemptRecoveredEvent { - MessageAttemptRecoveredEvent { - data: Box::new(data), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "message.attempt.recovered")] - MessagePeriodAttemptPeriodRecovered, -} - -impl Default for Type { - fn default() -> Type { - Self::MessagePeriodAttemptPeriodRecovered - } -} diff --git a/rust/src/models/message_attempt_recovered_event_data.rs b/rust/src/models/message_attempt_recovered_event_data.rs deleted file mode 100644 index 00ed41878..000000000 --- a/rust/src/models/message_attempt_recovered_event_data.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// MessageAttemptRecoveredEventData : Sent when a message delivery has failed -/// (all of the retry attempts have been exhausted) as a -/// \"message.attempt.exhausted\" type or after it's failed four times as a -/// \"message.attempt.failing\" event. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageAttemptRecoveredEventData { - /// The app's ID - #[serde(rename = "appId")] - pub app_id: String, - /// The app's UID - #[serde(rename = "appUid", skip_serializing_if = "Option::is_none")] - pub app_uid: Option, - /// The ep's ID - #[serde(rename = "endpointId")] - pub endpoint_id: String, - #[serde(rename = "lastAttempt")] - pub last_attempt: Box, - /// The msg's UID - #[serde(rename = "msgEventId", skip_serializing_if = "Option::is_none")] - pub msg_event_id: Option, - /// The msg's ID - #[serde(rename = "msgId")] - pub msg_id: String, -} - -impl MessageAttemptRecoveredEventData { - /// Sent when a message delivery has failed (all of the retry attempts have - /// been exhausted) as a \"message.attempt.exhausted\" type or after it's - /// failed four times as a \"message.attempt.failing\" event. - pub fn new( - app_id: String, - endpoint_id: String, - last_attempt: models::MessageAttemptFailedData, - msg_id: String, - ) -> MessageAttemptRecoveredEventData { - MessageAttemptRecoveredEventData { - app_id, - app_uid: None, - endpoint_id, - last_attempt: Box::new(last_attempt), - msg_event_id: None, - msg_id, - } - } -} diff --git a/rust/src/models/message_broadcast_in.rs b/rust/src/models/message_broadcast_in.rs deleted file mode 100644 index 44cf7a056..000000000 --- a/rust/src/models/message_broadcast_in.rs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageBroadcastIn { - /// List of free-form identifiers that endpoints can filter by. - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] - pub channels: Option>, - /// Optional unique identifier for the message. - #[serde(rename = "eventId", skip_serializing_if = "Option::is_none")] - pub event_id: Option, - /// The event type's name - #[serde(rename = "eventType")] - pub event_type: String, - #[serde(rename = "payload")] - pub payload: serde_json::Value, - /// Optional number of hours to retain the message payload. Note that this - /// is mutually exclusive with `payloadRetentionPeriod`. - #[serde( - rename = "payloadRetentionHours", - skip_serializing_if = "Option::is_none" - )] - pub payload_retention_hours: Option, - /// Optional number of days to retain the message payload. Defaults to 90. - /// Note that this is mutually exclusive with `payloadRetentionHours`. - #[serde( - rename = "payloadRetentionPeriod", - skip_serializing_if = "Option::is_none" - )] - pub payload_retention_period: Option, -} - -impl MessageBroadcastIn { - pub fn new(event_type: String, payload: serde_json::Value) -> MessageBroadcastIn { - MessageBroadcastIn { - channels: None, - event_id: None, - event_type, - payload, - payload_retention_hours: None, - payload_retention_period: None, - } - } -} diff --git a/rust/src/models/message_broadcast_out.rs b/rust/src/models/message_broadcast_out.rs deleted file mode 100644 index d26b827cd..000000000 --- a/rust/src/models/message_broadcast_out.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageBroadcastOut { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, -} - -impl MessageBroadcastOut { - pub fn new( - id: String, - status: models::BackgroundTaskStatus, - task: models::BackgroundTaskType, - ) -> MessageBroadcastOut { - MessageBroadcastOut { id, status, task } - } -} diff --git a/rust/src/models/message_endpoint_out.rs b/rust/src/models/message_endpoint_out.rs index e49a3f7da..fc0ce2b2a 100644 --- a/rust/src/models/message_endpoint_out.rs +++ b/rust/src/models/message_endpoint_out.rs @@ -1,49 +1,50 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::message_status::MessageStatus; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct MessageEndpointOut { /// List of message channels this endpoint listens to (omit for all). - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub channels: Option>, + #[serde(rename = "createdAt")] pub created_at: String, + /// An example endpoint name. - #[serde(rename = "description")] pub description: String, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub disabled: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "filterTypes")] + #[serde(skip_serializing_if = "Option::is_none")] pub filter_types: Option>, + /// The ep's ID - #[serde(rename = "id")] pub id: String, - #[serde(rename = "nextAttempt", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "nextAttempt")] + #[serde(skip_serializing_if = "Option::is_none")] pub next_attempt: Option, - #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")] - pub rate_limit: Option, - #[serde(rename = "status")] - pub status: models::MessageStatus, + + #[serde(rename = "rateLimit")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + + pub status: MessageStatus, + /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub uid: Option, + #[serde(rename = "updatedAt")] pub updated_at: String, - #[serde(rename = "url")] + pub url: String, - #[serde(rename = "version")] + + #[deprecated] pub version: i32, } @@ -52,12 +53,13 @@ impl MessageEndpointOut { created_at: String, description: String, id: String, - status: models::MessageStatus, + status: MessageStatus, updated_at: String, url: String, version: i32, - ) -> MessageEndpointOut { - MessageEndpointOut { + ) -> Self { + #[allow(deprecated)] + Self { channels: None, created_at, description, diff --git a/rust/src/models/message_in.rs b/rust/src/models/message_in.rs index 5b79d7f76..38549ba58 100644 --- a/rust/src/models/message_in.rs +++ b/rust/src/models/message_in.rs @@ -1,64 +1,61 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::application_in::ApplicationIn; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct MessageIn { - #[serde(rename = "application", skip_serializing_if = "Option::is_none")] - pub application: Option>, + /// Optionally creates a new application alongside the message. + /// + /// If the application id or uid that is used in the path already exists, + /// this argument is ignored. + #[serde(skip_serializing_if = "Option::is_none")] + pub application: Option, + /// List of free-form identifiers that endpoints can filter by - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub channels: Option>, + /// Optional unique identifier for the message - #[serde(rename = "eventId", skip_serializing_if = "Option::is_none")] + #[serde(rename = "eventId")] + #[serde(skip_serializing_if = "Option::is_none")] pub event_id: Option, + /// The event type's name #[serde(rename = "eventType")] pub event_type: String, - /// JSON payload to send as the request body of the webhook. We also - /// support sending non-JSON payloads. Please contact us for more + + /// JSON payload to send as the request body of the webhook. + /// + /// We also support sending non-JSON payloads. Please contact us for more /// information. - #[serde(rename = "payload")] pub payload: serde_json::Value, + /// Optional number of hours to retain the message payload. Note that this /// is mutually exclusive with `payloadRetentionPeriod`. - #[serde( - rename = "payloadRetentionHours", - skip_serializing_if = "Option::is_none" - )] - pub payload_retention_hours: Option, + #[serde(rename = "payloadRetentionHours")] + #[serde(skip_serializing_if = "Option::is_none")] + pub payload_retention_hours: Option, + /// Optional number of days to retain the message payload. Defaults to 90. /// Note that this is mutually exclusive with `payloadRetentionHours`. - #[serde( - rename = "payloadRetentionPeriod", - skip_serializing_if = "Option::is_none" - )] - pub payload_retention_period: Option, + #[serde(rename = "payloadRetentionPeriod")] + #[serde(skip_serializing_if = "Option::is_none")] + pub payload_retention_period: Option, + /// List of free-form tags that can be filtered by when listing messages - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option>, + /// Extra parameters to pass to Transformations (for future use) - #[serde( - rename = "transformationsParams", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "transformationsParams")] + #[serde(skip_serializing_if = "Option::is_none")] pub transformations_params: Option, } impl MessageIn { - pub fn new(event_type: String, payload: serde_json::Value) -> MessageIn { - MessageIn { + pub fn new(event_type: String, payload: serde_json::Value) -> Self { + Self { application: None, channels: None, event_id: None, diff --git a/rust/src/models/message_out.rs b/rust/src/models/message_out.rs index 05a74cf99..fa2211833 100644 --- a/rust/src/models/message_out.rs +++ b/rust/src/models/message_out.rs @@ -1,37 +1,29 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct MessageOut { /// List of free-form identifiers that endpoints can filter by - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub channels: Option>, + /// Optional unique identifier for the message - #[serde(rename = "eventId", skip_serializing_if = "Option::is_none")] + #[serde(rename = "eventId")] + #[serde(skip_serializing_if = "Option::is_none")] pub event_id: Option, + /// The event type's name #[serde(rename = "eventType")] pub event_type: String, + /// The msg's ID - #[serde(rename = "id")] pub id: String, - #[serde(rename = "payload")] + pub payload: serde_json::Value, - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option>, - #[serde(rename = "timestamp")] + pub timestamp: String, } @@ -41,8 +33,8 @@ impl MessageOut { id: String, payload: serde_json::Value, timestamp: String, - ) -> MessageOut { - MessageOut { + ) -> Self { + Self { channels: None, event_id: None, event_type, diff --git a/rust/src/models/message_raw_payload_out.rs b/rust/src/models/message_raw_payload_out.rs deleted file mode 100644 index 3ca400cb5..000000000 --- a/rust/src/models/message_raw_payload_out.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageRawPayloadOut { - #[serde(rename = "payload")] - pub payload: String, -} - -impl MessageRawPayloadOut { - pub fn new(payload: String) -> MessageRawPayloadOut { - MessageRawPayloadOut { payload } - } -} diff --git a/rust/src/models/message_subscriber_auth_token_out.rs b/rust/src/models/message_subscriber_auth_token_out.rs deleted file mode 100644 index ec3b1783a..000000000 --- a/rust/src/models/message_subscriber_auth_token_out.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MessageSubscriberAuthTokenOut { - #[serde(rename = "bridgeToken")] - pub bridge_token: String, - #[serde(rename = "token")] - pub token: String, -} - -impl MessageSubscriberAuthTokenOut { - pub fn new(bridge_token: String, token: String) -> MessageSubscriberAuthTokenOut { - MessageSubscriberAuthTokenOut { - bridge_token, - token, - } - } -} diff --git a/rust/src/models/mod.rs b/rust/src/models/mod.rs index 6e33f6682..d684a61df 100644 --- a/rust/src/models/mod.rs +++ b/rust/src/models/mod.rs @@ -1,570 +1,160 @@ -// TODO: Make modules private for v2.0 of the library +#![allow(clippy::too_many_arguments)] + pub mod aggregate_event_types_out; -pub use self::aggregate_event_types_out::AggregateEventTypesOut; -// TODO: Make modules private for v2.0 of the library pub mod app_portal_access_in; -pub use self::app_portal_access_in::AppPortalAccessIn; -// TODO: Make modules private for v2.0 of the library pub mod app_portal_access_out; -pub use self::app_portal_access_out::AppPortalAccessOut; -// TODO: Make modules private for v2.0 of the library pub mod app_usage_stats_in; -pub use self::app_usage_stats_in::AppUsageStatsIn; -// TODO: Make modules private for v2.0 of the library pub mod app_usage_stats_out; -pub use self::app_usage_stats_out::AppUsageStatsOut; -// TODO: Make modules private for v2.0 of the library pub mod application_in; -pub use self::application_in::ApplicationIn; -// TODO: Make modules private for v2.0 of the library pub mod application_out; -pub use self::application_out::ApplicationOut; -// TODO: Make modules private for v2.0 of the library pub mod application_patch; -pub use self::application_patch::ApplicationPatch; -// TODO: Make modules private for v2.0 of the library -pub mod application_stats; -pub use self::application_stats::ApplicationStats; -// TODO: Make modules private for v2.0 of the library pub mod application_token_expire_in; -pub use self::application_token_expire_in::ApplicationTokenExpireIn; -// TODO: Make modules private for v2.0 of the library -pub mod attempt_statistics_data; -pub use self::attempt_statistics_data::AttemptStatisticsData; -// TODO: Make modules private for v2.0 of the library -pub mod attempt_statistics_response; -pub use self::attempt_statistics_response::AttemptStatisticsResponse; -// TODO: Make modules private for v2.0 of the library -pub mod auth_token_out; -pub use self::auth_token_out::AuthTokenOut; -// TODO: Make modules private for v2.0 of the library -pub mod azure_blob_storage_config; -pub use self::azure_blob_storage_config::AzureBlobStorageConfig; -// TODO: Make modules private for v2.0 of the library pub mod background_task_out; -pub use self::background_task_out::BackgroundTaskOut; -// TODO: Make modules private for v2.0 of the library pub mod background_task_status; -pub use self::background_task_status::BackgroundTaskStatus; -// TODO: Make modules private for v2.0 of the library pub mod background_task_type; -pub use self::background_task_type::BackgroundTaskType; -// TODO: Make modules private for v2.0 of the library -pub mod big_query_config; -pub use self::big_query_config::BigQueryConfig; -// TODO: Make modules private for v2.0 of the library -pub mod border_radius_config; -pub use self::border_radius_config::BorderRadiusConfig; -// TODO: Make modules private for v2.0 of the library -pub mod border_radius_enum; -pub use self::border_radius_enum::BorderRadiusEnum; -// TODO: Make modules private for v2.0 of the library -pub mod client_secret_jwt_params_in; -pub use self::client_secret_jwt_params_in::ClientSecretJwtParamsIn; -// TODO: Make modules private for v2.0 of the library -pub mod completion_choice; -pub use self::completion_choice::CompletionChoice; -// TODO: Make modules private for v2.0 of the library -pub mod completion_message; -pub use self::completion_message::CompletionMessage; -// TODO: Make modules private for v2.0 of the library -pub mod count_out; -pub use self::count_out::CountOut; -// TODO: Make modules private for v2.0 of the library -pub mod create_stream_in; -pub use self::create_stream_in::CreateStreamIn; -// TODO: Make modules private for v2.0 of the library -pub mod create_token_in; -pub use self::create_token_in::CreateTokenIn; -// TODO: Make modules private for v2.0 of the library -pub mod custom_color_palette; -pub use self::custom_color_palette::CustomColorPalette; -// TODO: Make modules private for v2.0 of the library -pub mod custom_strings_override; -pub use self::custom_strings_override::CustomStringsOverride; -// TODO: Make modules private for v2.0 of the library -pub mod custom_theme_override; -pub use self::custom_theme_override::CustomThemeOverride; -// TODO: Make modules private for v2.0 of the library pub mod dashboard_access_out; -pub use self::dashboard_access_out::DashboardAccessOut; -// TODO: Make modules private for v2.0 of the library -pub mod duration; -pub use self::duration::Duration; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_created_event; -pub use self::endpoint_created_event::EndpointCreatedEvent; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_created_event_data; -pub use self::endpoint_created_event_data::EndpointCreatedEventData; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_deleted_event; -pub use self::endpoint_deleted_event::EndpointDeletedEvent; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_deleted_event_data; -pub use self::endpoint_deleted_event_data::EndpointDeletedEventData; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_disabled_event; -pub use self::endpoint_disabled_event::EndpointDisabledEvent; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_disabled_event_data; -pub use self::endpoint_disabled_event_data::EndpointDisabledEventData; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_headers_in; -pub use self::endpoint_headers_in::EndpointHeadersIn; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_headers_out; -pub use self::endpoint_headers_out::EndpointHeadersOut; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_headers_patch_in; -pub use self::endpoint_headers_patch_in::EndpointHeadersPatchIn; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_in; -pub use self::endpoint_in::EndpointIn; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_message_out; -pub use self::endpoint_message_out::EndpointMessageOut; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_mtls_config_in; -pub use self::endpoint_mtls_config_in::EndpointMtlsConfigIn; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_oauth_config_in; -pub use self::endpoint_oauth_config_in::EndpointOauthConfigIn; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_out; -pub use self::endpoint_out::EndpointOut; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_patch; -pub use self::endpoint_patch::EndpointPatch; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_secret_out; -pub use self::endpoint_secret_out::EndpointSecretOut; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_secret_rotate_in; -pub use self::endpoint_secret_rotate_in::EndpointSecretRotateIn; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_stats; -pub use self::endpoint_stats::EndpointStats; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_transformation_in; -pub use self::endpoint_transformation_in::EndpointTransformationIn; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_transformation_out; -pub use self::endpoint_transformation_out::EndpointTransformationOut; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_transformation_simulate_in; -pub use self::endpoint_transformation_simulate_in::EndpointTransformationSimulateIn; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_transformation_simulate_out; -pub use self::endpoint_transformation_simulate_out::EndpointTransformationSimulateOut; -// TODO: Make modules private for v2.0 of the library pub mod endpoint_update; -pub use self::endpoint_update::EndpointUpdate; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_updated_event; -pub use self::endpoint_updated_event::EndpointUpdatedEvent; -// TODO: Make modules private for v2.0 of the library -pub mod endpoint_updated_event_data; -pub use self::endpoint_updated_event_data::EndpointUpdatedEventData; -// TODO: Make modules private for v2.0 of the library pub mod environment_in; -pub use self::environment_in::EnvironmentIn; -// TODO: Make modules private for v2.0 of the library pub mod environment_out; -pub use self::environment_out::EnvironmentOut; -// TODO: Make modules private for v2.0 of the library -pub mod environment_settings_out; -pub use self::environment_settings_out::EnvironmentSettingsOut; -// TODO: Make modules private for v2.0 of the library pub mod event_example_in; -pub use self::event_example_in::EventExampleIn; -// TODO: Make modules private for v2.0 of the library -pub mod event_in; -pub use self::event_in::EventIn; -// TODO: Make modules private for v2.0 of the library -pub mod event_out; -pub use self::event_out::EventOut; -// TODO: Make modules private for v2.0 of the library -pub mod event_stream_out; -pub use self::event_stream_out::EventStreamOut; -// TODO: Make modules private for v2.0 of the library -pub mod event_type_example_out; -pub use self::event_type_example_out::EventTypeExampleOut; -// TODO: Make modules private for v2.0 of the library pub mod event_type_from_open_api; -pub use self::event_type_from_open_api::EventTypeFromOpenApi; -// TODO: Make modules private for v2.0 of the library pub mod event_type_import_open_api_in; -pub use self::event_type_import_open_api_in::EventTypeImportOpenApiIn; -// TODO: Make modules private for v2.0 of the library pub mod event_type_import_open_api_out; -pub use self::event_type_import_open_api_out::EventTypeImportOpenApiOut; -// TODO: Make modules private for v2.0 of the library pub mod event_type_import_open_api_out_data; -pub use self::event_type_import_open_api_out_data::EventTypeImportOpenApiOutData; -// TODO: Make modules private for v2.0 of the library pub mod event_type_in; -pub use self::event_type_in::EventTypeIn; -// TODO: Make modules private for v2.0 of the library pub mod event_type_out; -pub use self::event_type_out::EventTypeOut; -// TODO: Make modules private for v2.0 of the library pub mod event_type_patch; -pub use self::event_type_patch::EventTypePatch; -// TODO: Make modules private for v2.0 of the library -pub mod event_type_schema_in; -pub use self::event_type_schema_in::EventTypeSchemaIn; -// TODO: Make modules private for v2.0 of the library pub mod event_type_update; -pub use self::event_type_update::EventTypeUpdate; -// TODO: Make modules private for v2.0 of the library -pub mod export_event_type_out; -pub use self::export_event_type_out::ExportEventTypeOut; -// TODO: Make modules private for v2.0 of the library -pub mod font_size_config; -pub use self::font_size_config::FontSizeConfig; -// TODO: Make modules private for v2.0 of the library -pub mod generate_in; -pub use self::generate_in::GenerateIn; -// TODO: Make modules private for v2.0 of the library -pub mod generate_out; -pub use self::generate_out::GenerateOut; -// TODO: Make modules private for v2.0 of the library -pub mod google_cloud_storage_config; -pub use self::google_cloud_storage_config::GoogleCloudStorageConfig; -// TODO: Make modules private for v2.0 of the library pub mod http_error_out; -pub use self::http_error_out::HttpErrorOut; -// TODO: Make modules private for v2.0 of the library pub mod http_validation_error; -pub use self::http_validation_error::HttpValidationError; -// TODO: Make modules private for v2.0 of the library -pub mod hubspot_oauth_config_in; -pub use self::hubspot_oauth_config_in::HubspotOauthConfigIn; -// TODO: Make modules private for v2.0 of the library -pub mod inbound_path_params; -pub use self::inbound_path_params::InboundPathParams; -// TODO: Make modules private for v2.0 of the library -pub mod incoming_webhook_payload_out; -pub use self::incoming_webhook_payload_out::IncomingWebhookPayloadOut; -// TODO: Make modules private for v2.0 of the library pub mod integration_in; -pub use self::integration_in::IntegrationIn; -// TODO: Make modules private for v2.0 of the library pub mod integration_key_out; -pub use self::integration_key_out::IntegrationKeyOut; -// TODO: Make modules private for v2.0 of the library pub mod integration_out; -pub use self::integration_out::IntegrationOut; -// TODO: Make modules private for v2.0 of the library pub mod integration_update; -pub use self::integration_update::IntegrationUpdate; -// TODO: Make modules private for v2.0 of the library -pub mod kafka_security_protocol_type; -pub use self::kafka_security_protocol_type::KafkaSecurityProtocolType; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_application_out_; -pub use self::list_response_application_out_::ListResponseApplicationOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_application_stats_; -pub use self::list_response_application_stats_::ListResponseApplicationStats; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_background_task_out_; -pub use self::list_response_background_task_out_::ListResponseBackgroundTaskOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_endpoint_message_out_; -pub use self::list_response_endpoint_message_out_::ListResponseEndpointMessageOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_endpoint_out_; -pub use self::list_response_endpoint_out_::ListResponseEndpointOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_event_type_out_; -pub use self::list_response_event_type_out_::ListResponseEventTypeOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_integration_out_; -pub use self::list_response_integration_out_::ListResponseIntegrationOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_message_attempt_endpoint_out_; -pub use self::list_response_message_attempt_endpoint_out_::ListResponseMessageAttemptEndpointOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_message_attempt_out_; -pub use self::list_response_message_attempt_out_::ListResponseMessageAttemptOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_message_endpoint_out_; -pub use self::list_response_message_endpoint_out_::ListResponseMessageEndpointOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_message_out_; -pub use self::list_response_message_out_::ListResponseMessageOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_operational_webhook_endpoint_out_; -pub use self::list_response_operational_webhook_endpoint_out_::ListResponseOperationalWebhookEndpointOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_sink_out_; -pub use self::list_response_sink_out_::ListResponseSinkOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_stream_event_type_out_; -pub use self::list_response_stream_event_type_out_::ListResponseStreamEventTypeOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_stream_out_; -pub use self::list_response_stream_out_::ListResponseStreamOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_stream_sink_out_; -pub use self::list_response_stream_sink_out_::ListResponseStreamSinkOut; -// TODO: Make modules private for v2.0 of the library -pub mod list_response_template_out_; -pub use self::list_response_template_out_::ListResponseTemplateOut; -// TODO: Make modules private for v2.0 of the library +pub mod list_response_application_out; +pub mod list_response_background_task_out; +pub mod list_response_endpoint_message_out; +pub mod list_response_endpoint_out; +pub mod list_response_event_type_out; +pub mod list_response_integration_out; +pub mod list_response_message_attempt_endpoint_out; +pub mod list_response_message_attempt_out; +pub mod list_response_message_endpoint_out; +pub mod list_response_message_out; +pub mod list_response_operational_webhook_endpoint_out; pub mod message_attempt_endpoint_out; -pub use self::message_attempt_endpoint_out::MessageAttemptEndpointOut; -// TODO: Make modules private for v2.0 of the library -pub mod message_attempt_exhausted_event; -pub use self::message_attempt_exhausted_event::MessageAttemptExhaustedEvent; -// TODO: Make modules private for v2.0 of the library -pub mod message_attempt_exhausted_event_data; -pub use self::message_attempt_exhausted_event_data::MessageAttemptExhaustedEventData; -// TODO: Make modules private for v2.0 of the library -pub mod message_attempt_failed_data; -pub use self::message_attempt_failed_data::MessageAttemptFailedData; -// TODO: Make modules private for v2.0 of the library -pub mod message_attempt_failing_event; -pub use self::message_attempt_failing_event::MessageAttemptFailingEvent; -// TODO: Make modules private for v2.0 of the library -pub mod message_attempt_failing_event_data; -pub use self::message_attempt_failing_event_data::MessageAttemptFailingEventData; -// TODO: Make modules private for v2.0 of the library -pub mod message_attempt_headers_out; -pub use self::message_attempt_headers_out::MessageAttemptHeadersOut; -// TODO: Make modules private for v2.0 of the library pub mod message_attempt_out; -pub use self::message_attempt_out::MessageAttemptOut; -// TODO: Make modules private for v2.0 of the library -pub mod message_attempt_recovered_event; -pub use self::message_attempt_recovered_event::MessageAttemptRecoveredEvent; -// TODO: Make modules private for v2.0 of the library -pub mod message_attempt_recovered_event_data; -pub use self::message_attempt_recovered_event_data::MessageAttemptRecoveredEventData; -// TODO: Make modules private for v2.0 of the library pub mod message_attempt_trigger_type; -pub use self::message_attempt_trigger_type::MessageAttemptTriggerType; -// TODO: Make modules private for v2.0 of the library -pub mod message_broadcast_in; -pub use self::message_broadcast_in::MessageBroadcastIn; -// TODO: Make modules private for v2.0 of the library -pub mod message_broadcast_out; -pub use self::message_broadcast_out::MessageBroadcastOut; -// TODO: Make modules private for v2.0 of the library pub mod message_endpoint_out; -pub use self::message_endpoint_out::MessageEndpointOut; -// TODO: Make modules private for v2.0 of the library pub mod message_events_out; -pub use self::message_events_out::MessageEventsOut; -// TODO: Make modules private for v2.0 of the library pub mod message_in; -pub use self::message_in::MessageIn; -// TODO: Make modules private for v2.0 of the library pub mod message_out; -pub use self::message_out::MessageOut; -// TODO: Make modules private for v2.0 of the library -pub mod message_raw_payload_out; -pub use self::message_raw_payload_out::MessageRawPayloadOut; -// TODO: Make modules private for v2.0 of the library pub mod message_status; -pub use self::message_status::MessageStatus; -// TODO: Make modules private for v2.0 of the library -pub mod message_subscriber_auth_token_out; -pub use self::message_subscriber_auth_token_out::MessageSubscriberAuthTokenOut; -// TODO: Make modules private for v2.0 of the library -pub mod o_auth_payload_in; -pub use self::o_auth_payload_in::OAuthPayloadIn; -// TODO: Make modules private for v2.0 of the library -pub mod o_auth_payload_out; -pub use self::o_auth_payload_out::OAuthPayloadOut; -// TODO: Make modules private for v2.0 of the library -pub mod oauth2_auth_method_in; -pub use self::oauth2_auth_method_in::Oauth2AuthMethodIn; -// TODO: Make modules private for v2.0 of the library -pub mod oauth2_grant_type_in; -pub use self::oauth2_grant_type_in::Oauth2GrantTypeIn; -// TODO: Make modules private for v2.0 of the library -pub mod oauth_jws_signing_algorithm; -pub use self::oauth_jws_signing_algorithm::OauthJwsSigningAlgorithm; -// TODO: Make modules private for v2.0 of the library -pub mod one_time_token_in; -pub use self::one_time_token_in::OneTimeTokenIn; -// TODO: Make modules private for v2.0 of the library -pub mod one_time_token_out; -pub use self::one_time_token_out::OneTimeTokenOut; -// TODO: Make modules private for v2.0 of the library pub mod operational_webhook_endpoint_in; -pub use self::operational_webhook_endpoint_in::OperationalWebhookEndpointIn; -// TODO: Make modules private for v2.0 of the library pub mod operational_webhook_endpoint_out; -pub use self::operational_webhook_endpoint_out::OperationalWebhookEndpointOut; -// TODO: Make modules private for v2.0 of the library pub mod operational_webhook_endpoint_secret_in; -pub use self::operational_webhook_endpoint_secret_in::OperationalWebhookEndpointSecretIn; -// TODO: Make modules private for v2.0 of the library pub mod operational_webhook_endpoint_secret_out; -pub use self::operational_webhook_endpoint_secret_out::OperationalWebhookEndpointSecretOut; -// TODO: Make modules private for v2.0 of the library pub mod operational_webhook_endpoint_update; -pub use self::operational_webhook_endpoint_update::OperationalWebhookEndpointUpdate; -// TODO: Make modules private for v2.0 of the library pub mod ordering; -pub use self::ordering::Ordering; -// TODO: Make modules private for v2.0 of the library pub mod recover_in; -pub use self::recover_in::RecoverIn; -// TODO: Make modules private for v2.0 of the library pub mod recover_out; -pub use self::recover_out::RecoverOut; -// TODO: Make modules private for v2.0 of the library -pub mod redshift_config; -pub use self::redshift_config::RedshiftConfig; -// TODO: Make modules private for v2.0 of the library pub mod replay_in; -pub use self::replay_in::ReplayIn; -// TODO: Make modules private for v2.0 of the library pub mod replay_out; -pub use self::replay_out::ReplayOut; -// TODO: Make modules private for v2.0 of the library -pub mod retry_schedule_in_out; -pub use self::retry_schedule_in_out::RetryScheduleInOut; -// TODO: Make modules private for v2.0 of the library -pub mod rotate_poller_token_in; -pub use self::rotate_poller_token_in::RotatePollerTokenIn; -// TODO: Make modules private for v2.0 of the library -pub mod rotated_url_out; -pub use self::rotated_url_out::RotatedUrlOut; -// TODO: Make modules private for v2.0 of the library -pub mod s3_config; -pub use self::s3_config::S3Config; -// TODO: Make modules private for v2.0 of the library -pub mod sink_http_config; -pub use self::sink_http_config::SinkHttpConfig; -// TODO: Make modules private for v2.0 of the library -pub mod sink_in; -pub use self::sink_in::SinkIn; -// TODO: Make modules private for v2.0 of the library -pub mod sink_in_one_of; -pub use self::sink_in_one_of::SinkInOneOf; -// TODO: Make modules private for v2.0 of the library -pub mod sink_in_one_of_1; -pub use self::sink_in_one_of_1::SinkInOneOf1; -// TODO: Make modules private for v2.0 of the library -pub mod sink_in_one_of_2; -pub use self::sink_in_one_of_2::SinkInOneOf2; -// TODO: Make modules private for v2.0 of the library -pub mod sink_in_one_of_3; -pub use self::sink_in_one_of_3::SinkInOneOf3; -// TODO: Make modules private for v2.0 of the library -pub mod sink_in_one_of_4; -pub use self::sink_in_one_of_4::SinkInOneOf4; -// TODO: Make modules private for v2.0 of the library -pub mod sink_otel_v1_config; -pub use self::sink_otel_v1_config::SinkOtelV1Config; -// TODO: Make modules private for v2.0 of the library -pub mod sink_out; -pub use self::sink_out::SinkOut; -// TODO: Make modules private for v2.0 of the library -pub mod sink_payload_format; -pub use self::sink_payload_format::SinkPayloadFormat; -// TODO: Make modules private for v2.0 of the library -pub mod sink_status; -pub use self::sink_status::SinkStatus; -// TODO: Make modules private for v2.0 of the library -pub mod sink_status_in; -pub use self::sink_status_in::SinkStatusIn; -// TODO: Make modules private for v2.0 of the library -pub mod sink_transform_in; -pub use self::sink_transform_in::SinkTransformIn; -// TODO: Make modules private for v2.0 of the library -pub mod sink_transformation_out; -pub use self::sink_transformation_out::SinkTransformationOut; -// TODO: Make modules private for v2.0 of the library -pub mod snowflake_config; -pub use self::snowflake_config::SnowflakeConfig; -// TODO: Make modules private for v2.0 of the library -pub mod statistics_period; -pub use self::statistics_period::StatisticsPeriod; -// TODO: Make modules private for v2.0 of the library pub mod status_code_class; -pub use self::status_code_class::StatusCodeClass; -// TODO: Make modules private for v2.0 of the library -pub mod stream_event_type_in; -pub use self::stream_event_type_in::StreamEventTypeIn; -// TODO: Make modules private for v2.0 of the library -pub mod stream_event_type_out; -pub use self::stream_event_type_out::StreamEventTypeOut; -// TODO: Make modules private for v2.0 of the library -pub mod stream_event_type_patch; -pub use self::stream_event_type_patch::StreamEventTypePatch; -// TODO: Make modules private for v2.0 of the library -pub mod stream_in; -pub use self::stream_in::StreamIn; -// TODO: Make modules private for v2.0 of the library -pub mod stream_out; -pub use self::stream_out::StreamOut; -// TODO: Make modules private for v2.0 of the library -pub mod stream_patch; -pub use self::stream_patch::StreamPatch; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in; -pub use self::stream_sink_in::StreamSinkIn; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in_one_of; -pub use self::stream_sink_in_one_of::StreamSinkInOneOf; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in_one_of_1; -pub use self::stream_sink_in_one_of_1::StreamSinkInOneOf1; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in_one_of_2; -pub use self::stream_sink_in_one_of_2::StreamSinkInOneOf2; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in_one_of_3; -pub use self::stream_sink_in_one_of_3::StreamSinkInOneOf3; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in_one_of_4; -pub use self::stream_sink_in_one_of_4::StreamSinkInOneOf4; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in_one_of_5; -pub use self::stream_sink_in_one_of_5::StreamSinkInOneOf5; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in_one_of_6; -pub use self::stream_sink_in_one_of_6::StreamSinkInOneOf6; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_in_one_of_7; -pub use self::stream_sink_in_one_of_7::StreamSinkInOneOf7; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_out; -pub use self::stream_sink_out::StreamSinkOut; -// TODO: Make modules private for v2.0 of the library -pub mod stream_sink_patch; -pub use self::stream_sink_patch::StreamSinkPatch; -// TODO: Make modules private for v2.0 of the library pub mod template_in; -pub use self::template_in::TemplateIn; -// TODO: Make modules private for v2.0 of the library pub mod template_out; -pub use self::template_out::TemplateOut; -// TODO: Make modules private for v2.0 of the library -pub mod template_patch; -pub use self::template_patch::TemplatePatch; -// TODO: Make modules private for v2.0 of the library -pub mod template_update; -pub use self::template_update::TemplateUpdate; -// TODO: Make modules private for v2.0 of the library -pub mod transformation_http_method; -pub use self::transformation_http_method::TransformationHttpMethod; -// TODO: Make modules private for v2.0 of the library -pub mod transformation_simulate_in; -pub use self::transformation_simulate_in::TransformationSimulateIn; -// TODO: Make modules private for v2.0 of the library -pub mod transformation_simulate_out; -pub use self::transformation_simulate_out::TransformationSimulateOut; -// TODO: Make modules private for v2.0 of the library pub mod transformation_template_kind; -pub use self::transformation_template_kind::TransformationTemplateKind; -// TODO: Make modules private for v2.0 of the library pub mod validation_error; -pub use self::validation_error::ValidationError; + +#[rustfmt::skip] +pub use self::{ + aggregate_event_types_out::AggregateEventTypesOut, + app_portal_access_in::AppPortalAccessIn, + app_portal_access_out::AppPortalAccessOut, + app_usage_stats_in::AppUsageStatsIn, + app_usage_stats_out::AppUsageStatsOut, + application_in::ApplicationIn, + application_out::ApplicationOut, + application_patch::ApplicationPatch, + application_token_expire_in::ApplicationTokenExpireIn, + background_task_out::BackgroundTaskOut, + background_task_status::BackgroundTaskStatus, + background_task_type::BackgroundTaskType, + dashboard_access_out::DashboardAccessOut, + endpoint_headers_in::EndpointHeadersIn, + endpoint_headers_out::EndpointHeadersOut, + endpoint_headers_patch_in::EndpointHeadersPatchIn, + endpoint_in::EndpointIn, + endpoint_message_out::EndpointMessageOut, + endpoint_out::EndpointOut, + endpoint_patch::EndpointPatch, + endpoint_secret_out::EndpointSecretOut, + endpoint_secret_rotate_in::EndpointSecretRotateIn, + endpoint_stats::EndpointStats, + endpoint_transformation_in::EndpointTransformationIn, + endpoint_transformation_out::EndpointTransformationOut, + endpoint_update::EndpointUpdate, + environment_in::EnvironmentIn, + environment_out::EnvironmentOut, + event_example_in::EventExampleIn, + event_type_from_open_api::EventTypeFromOpenApi, + event_type_import_open_api_in::EventTypeImportOpenApiIn, + event_type_import_open_api_out::EventTypeImportOpenApiOut, + event_type_import_open_api_out_data::EventTypeImportOpenApiOutData, + event_type_in::EventTypeIn, + event_type_out::EventTypeOut, + event_type_patch::EventTypePatch, + event_type_update::EventTypeUpdate, + http_error_out::HttpErrorOut, + http_validation_error::HttpValidationError, + integration_in::IntegrationIn, + integration_key_out::IntegrationKeyOut, + integration_out::IntegrationOut, + integration_update::IntegrationUpdate, + list_response_application_out::ListResponseApplicationOut, + list_response_background_task_out::ListResponseBackgroundTaskOut, + list_response_endpoint_message_out::ListResponseEndpointMessageOut, + list_response_endpoint_out::ListResponseEndpointOut, + list_response_event_type_out::ListResponseEventTypeOut, + list_response_integration_out::ListResponseIntegrationOut, + list_response_message_attempt_endpoint_out::ListResponseMessageAttemptEndpointOut, + list_response_message_attempt_out::ListResponseMessageAttemptOut, + list_response_message_endpoint_out::ListResponseMessageEndpointOut, + list_response_message_out::ListResponseMessageOut, + list_response_operational_webhook_endpoint_out::ListResponseOperationalWebhookEndpointOut, + message_attempt_endpoint_out::MessageAttemptEndpointOut, + message_attempt_out::MessageAttemptOut, + message_attempt_trigger_type::MessageAttemptTriggerType, + message_endpoint_out::MessageEndpointOut, + message_events_out::MessageEventsOut, + message_in::MessageIn, + message_out::MessageOut, + message_status::MessageStatus, + operational_webhook_endpoint_in::OperationalWebhookEndpointIn, + operational_webhook_endpoint_out::OperationalWebhookEndpointOut, + operational_webhook_endpoint_secret_in::OperationalWebhookEndpointSecretIn, + operational_webhook_endpoint_secret_out::OperationalWebhookEndpointSecretOut, + operational_webhook_endpoint_update::OperationalWebhookEndpointUpdate, + ordering::Ordering, + recover_in::RecoverIn, + recover_out::RecoverOut, + replay_in::ReplayIn, + replay_out::ReplayOut, + status_code_class::StatusCodeClass, + template_in::TemplateIn, + template_out::TemplateOut, + transformation_template_kind::TransformationTemplateKind, + validation_error::ValidationError, +}; diff --git a/rust/src/models/o_auth_payload_in.rs b/rust/src/models/o_auth_payload_in.rs deleted file mode 100644 index 919893ced..000000000 --- a/rust/src/models/o_auth_payload_in.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OAuthPayloadIn { - #[serde(rename = "code")] - pub code: String, - #[serde(rename = "redirectUri")] - pub redirect_uri: String, -} - -impl OAuthPayloadIn { - pub fn new(code: String, redirect_uri: String) -> OAuthPayloadIn { - OAuthPayloadIn { code, redirect_uri } - } -} diff --git a/rust/src/models/o_auth_payload_out.rs b/rust/src/models/o_auth_payload_out.rs deleted file mode 100644 index 60e56c781..000000000 --- a/rust/src/models/o_auth_payload_out.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OAuthPayloadOut { - #[serde(rename = "accessToken", skip_serializing_if = "Option::is_none")] - pub access_token: Option, - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option, - #[serde(rename = "refreshToken", skip_serializing_if = "Option::is_none")] - pub refresh_token: Option, -} - -impl OAuthPayloadOut { - pub fn new() -> OAuthPayloadOut { - OAuthPayloadOut { - access_token: None, - error: None, - refresh_token: None, - } - } -} diff --git a/rust/src/models/oauth2_auth_method_in.rs b/rust/src/models/oauth2_auth_method_in.rs deleted file mode 100644 index 898d90c72..000000000 --- a/rust/src/models/oauth2_auth_method_in.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// Oauth2AuthMethodIn : The method used for authenticating to the OAuth -/// authorization server. `clientSecretJwt` will construct a JWT used for -/// authentication with the oauth authorization server. This method is less -/// commonly used and may not be supported by all oauth providers. -/// `clientSecretBasic` will authenticate to the oauth authorization server -/// using an `Authorization` header with the client secret as the value. This is -/// the most common means of authentication. `clientSecretPost` will -/// authenticate to the oauth authorization server by passing the client secret -/// in a `client_secret` field in the request body. This method may not be -/// supported by all oauth providers, and in general `clientSecretBasic` should -/// be preferred. The method used for authenticating to the OAuth authorization -/// server. `clientSecretJwt` will construct a JWT used for authentication with -/// the oauth authorization server. This method is less commonly used and may -/// not be supported by all oauth providers. `clientSecretBasic` will -/// authenticate to the oauth authorization server using an `Authorization` -/// header with the client secret as the value. This is the most common means of -/// authentication. `clientSecretPost` will authenticate to the oauth -/// authorization server by passing the client secret in a `client_secret` field -/// in the request body. This method may not be supported by all oauth -/// providers, and in general `clientSecretBasic` should be preferred. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Oauth2AuthMethodIn { - #[serde(rename = "clientSecretJwt")] - ClientSecretJwt, - #[serde(rename = "clientSecretBasic")] - ClientSecretBasic, - #[serde(rename = "clientSecretPost")] - ClientSecretPost, -} - -impl std::fmt::Display for Oauth2AuthMethodIn { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::ClientSecretJwt => write!(f, "clientSecretJwt"), - Self::ClientSecretBasic => write!(f, "clientSecretBasic"), - Self::ClientSecretPost => write!(f, "clientSecretPost"), - } - } -} - -impl Default for Oauth2AuthMethodIn { - fn default() -> Oauth2AuthMethodIn { - Self::ClientSecretJwt - } -} diff --git a/rust/src/models/oauth2_grant_type_in.rs b/rust/src/models/oauth2_grant_type_in.rs deleted file mode 100644 index d39f9d19f..000000000 --- a/rust/src/models/oauth2_grant_type_in.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Oauth2GrantTypeIn { - #[serde(rename = "clientCredentials")] - ClientCredentials, - #[serde(rename = "refreshToken")] - RefreshToken, -} - -impl std::fmt::Display for Oauth2GrantTypeIn { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::ClientCredentials => write!(f, "clientCredentials"), - Self::RefreshToken => write!(f, "refreshToken"), - } - } -} - -impl Default for Oauth2GrantTypeIn { - fn default() -> Oauth2GrantTypeIn { - Self::ClientCredentials - } -} diff --git a/rust/src/models/oauth_jws_signing_algorithm.rs b/rust/src/models/oauth_jws_signing_algorithm.rs deleted file mode 100644 index 44dec4839..000000000 --- a/rust/src/models/oauth_jws_signing_algorithm.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum OauthJwsSigningAlgorithm { - #[serde(rename = "RS256")] - Rs256, -} - -impl std::fmt::Display for OauthJwsSigningAlgorithm { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Rs256 => write!(f, "RS256"), - } - } -} - -impl Default for OauthJwsSigningAlgorithm { - fn default() -> OauthJwsSigningAlgorithm { - Self::Rs256 - } -} diff --git a/rust/src/models/one_time_token_in.rs b/rust/src/models/one_time_token_in.rs deleted file mode 100644 index df3ce7184..000000000 --- a/rust/src/models/one_time_token_in.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OneTimeTokenIn { - #[serde(rename = "oneTimeToken")] - pub one_time_token: String, -} - -impl OneTimeTokenIn { - pub fn new(one_time_token: String) -> OneTimeTokenIn { - OneTimeTokenIn { one_time_token } - } -} diff --git a/rust/src/models/one_time_token_out.rs b/rust/src/models/one_time_token_out.rs deleted file mode 100644 index 372201768..000000000 --- a/rust/src/models/one_time_token_out.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OneTimeTokenOut { - #[serde(rename = "token")] - pub token: String, -} - -impl OneTimeTokenOut { - pub fn new(token: String) -> OneTimeTokenOut { - OneTimeTokenOut { token } - } -} diff --git a/rust/src/models/recover_in.rs b/rust/src/models/recover_in.rs index a9ee8f453..d9e5b9528 100644 --- a/rust/src/models/recover_in.rs +++ b/rust/src/models/recover_in.rs @@ -1,28 +1,16 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct RecoverIn { - #[serde(rename = "since")] pub since: String, - #[serde(rename = "until", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub until: Option, } impl RecoverIn { - pub fn new(since: String) -> RecoverIn { - RecoverIn { since, until: None } + pub fn new(since: String) -> Self { + Self { since, until: None } } } diff --git a/rust/src/models/recover_out.rs b/rust/src/models/recover_out.rs index 4b720525f..1d46ce52e 100644 --- a/rust/src/models/recover_out.rs +++ b/rust/src/models/recover_out.rs @@ -1,34 +1,21 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{ + background_task_status::BackgroundTaskStatus, background_task_type::BackgroundTaskType, +}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct RecoverOut { - #[serde(rename = "id")] pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, + + pub status: BackgroundTaskStatus, + + pub task: BackgroundTaskType, } impl RecoverOut { - pub fn new( - id: String, - status: models::BackgroundTaskStatus, - task: models::BackgroundTaskType, - ) -> RecoverOut { - RecoverOut { id, status, task } + pub fn new(id: String, status: BackgroundTaskStatus, task: BackgroundTaskType) -> Self { + Self { id, status, task } } } diff --git a/rust/src/models/redshift_config.rs b/rust/src/models/redshift_config.rs deleted file mode 100644 index 021725861..000000000 --- a/rust/src/models/redshift_config.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// RedshiftConfig : Configuration parameters for defining a Redshift sink. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RedshiftConfig { - #[serde(rename = "accessKeyId")] - pub access_key_id: String, - #[serde(rename = "clusterIdentifier")] - pub cluster_identifier: String, - /// Database name. Only required if not using transformations. - #[serde(rename = "dbName", skip_serializing_if = "Option::is_none")] - pub db_name: Option, - #[serde(rename = "dbUser")] - pub db_user: String, - #[serde(rename = "region")] - pub region: String, - /// Schema name. Only used if not using transformations. - #[serde(rename = "schemaName", skip_serializing_if = "Option::is_none")] - pub schema_name: Option, - #[serde(rename = "secretAccessKey")] - pub secret_access_key: String, - /// Table name. Only required if not using transformations. - #[serde(rename = "tableName", skip_serializing_if = "Option::is_none")] - pub table_name: Option, -} - -impl RedshiftConfig { - /// Configuration parameters for defining a Redshift sink. - pub fn new( - access_key_id: String, - cluster_identifier: String, - db_user: String, - region: String, - secret_access_key: String, - ) -> RedshiftConfig { - RedshiftConfig { - access_key_id, - cluster_identifier, - db_name: None, - db_user, - region, - schema_name: None, - secret_access_key, - table_name: None, - } - } -} diff --git a/rust/src/models/replay_in.rs b/rust/src/models/replay_in.rs index 2465d6d1f..311d27167 100644 --- a/rust/src/models/replay_in.rs +++ b/rust/src/models/replay_in.rs @@ -1,28 +1,16 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct ReplayIn { - #[serde(rename = "since")] pub since: String, - #[serde(rename = "until", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub until: Option, } impl ReplayIn { - pub fn new(since: String) -> ReplayIn { - ReplayIn { since, until: None } + pub fn new(since: String) -> Self { + Self { since, until: None } } } diff --git a/rust/src/models/replay_out.rs b/rust/src/models/replay_out.rs index ede2ef3ba..8010cdcba 100644 --- a/rust/src/models/replay_out.rs +++ b/rust/src/models/replay_out.rs @@ -1,34 +1,21 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::{ + background_task_status::BackgroundTaskStatus, background_task_type::BackgroundTaskType, +}; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct ReplayOut { - #[serde(rename = "id")] pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, + + pub status: BackgroundTaskStatus, + + pub task: BackgroundTaskType, } impl ReplayOut { - pub fn new( - id: String, - status: models::BackgroundTaskStatus, - task: models::BackgroundTaskType, - ) -> ReplayOut { - ReplayOut { id, status, task } + pub fn new(id: String, status: BackgroundTaskStatus, task: BackgroundTaskType) -> Self { + Self { id, status, task } } } diff --git a/rust/src/models/retry_schedule_in_out.rs b/rust/src/models/retry_schedule_in_out.rs deleted file mode 100644 index 7f7850a69..000000000 --- a/rust/src/models/retry_schedule_in_out.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RetryScheduleInOut { - #[serde(rename = "retrySchedule", skip_serializing_if = "Option::is_none")] - pub retry_schedule: Option>, -} - -impl RetryScheduleInOut { - pub fn new() -> RetryScheduleInOut { - RetryScheduleInOut { - retry_schedule: None, - } - } -} diff --git a/rust/src/models/rotate_poller_token_in.rs b/rust/src/models/rotate_poller_token_in.rs deleted file mode 100644 index 789f483d5..000000000 --- a/rust/src/models/rotate_poller_token_in.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RotatePollerTokenIn { - /// How long the token will be valid for, in seconds. Can be up to - /// 31,536,000 seconds (1 year). - #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")] - pub expiry: Option, - /// Updates the previous token's expiration, in seconds. If set to 0, the - /// old token will immediately be revoked. Must be between 0 and 86,400 - /// seconds (1 day). Defaults to 300 seconds (5 minutes). - #[serde(rename = "oldTokenExpiry", skip_serializing_if = "Option::is_none")] - pub old_token_expiry: Option, -} - -impl RotatePollerTokenIn { - pub fn new() -> RotatePollerTokenIn { - RotatePollerTokenIn { - expiry: None, - old_token_expiry: None, - } - } -} diff --git a/rust/src/models/rotated_url_out.rs b/rust/src/models/rotated_url_out.rs deleted file mode 100644 index 7adeac271..000000000 --- a/rust/src/models/rotated_url_out.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RotatedUrlOut { - #[serde(rename = "url")] - pub url: String, -} - -impl RotatedUrlOut { - pub fn new(url: String) -> RotatedUrlOut { - RotatedUrlOut { url } - } -} diff --git a/rust/src/models/s3_config.rs b/rust/src/models/s3_config.rs deleted file mode 100644 index 025a49cf9..000000000 --- a/rust/src/models/s3_config.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct S3Config { - #[serde(rename = "accessKeyId")] - pub access_key_id: String, - #[serde(rename = "bucket")] - pub bucket: String, - #[serde(rename = "region")] - pub region: String, - #[serde(rename = "secretAccessKey")] - pub secret_access_key: String, -} - -impl S3Config { - pub fn new( - access_key_id: String, - bucket: String, - region: String, - secret_access_key: String, - ) -> S3Config { - S3Config { - access_key_id, - bucket, - region, - secret_access_key, - } - } -} diff --git a/rust/src/models/sink_http_config.rs b/rust/src/models/sink_http_config.rs deleted file mode 100644 index e5de3abb6..000000000 --- a/rust/src/models/sink_http_config.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkHttpConfig { - #[serde(rename = "headers", skip_serializing_if = "Option::is_none")] - pub headers: Option>, - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - #[serde(rename = "url")] - pub url: String, -} - -impl SinkHttpConfig { - pub fn new(url: String) -> SinkHttpConfig { - SinkHttpConfig { - headers: None, - key: None, - url, - } - } -} diff --git a/rust/src/models/sink_in.rs b/rust/src/models/sink_in.rs deleted file mode 100644 index 5df3fd53b..000000000 --- a/rust/src/models/sink_in.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SinkIn { - SinkInOneOf(Box), - SinkInOneOf1(Box), - SinkInOneOf2(Box), - SinkInOneOf3(Box), - SinkInOneOf4(Box), -} - -impl Default for SinkIn { - fn default() -> Self { - Self::SinkInOneOf(Default::default()) - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "rabbitMQ")] - RabbitMq, - #[serde(rename = "sqs")] - Sqs, - #[serde(rename = "kafka")] - Kafka, - #[serde(rename = "http")] - Http, - #[serde(rename = "eventStream")] - EventStream, -} - -impl Default for Type { - fn default() -> Type { - Self::RabbitMq - } -} diff --git a/rust/src/models/sink_in_one_of.rs b/rust/src/models/sink_in_one_of.rs deleted file mode 100644 index 42e894de7..000000000 --- a/rust/src/models/sink_in_one_of.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkInOneOf { - #[serde(rename = "routingKey")] - pub routing_key: String, - #[serde(rename = "type")] - pub r#type: Type, - #[serde(rename = "uri")] - pub uri: String, -} - -impl SinkInOneOf { - pub fn new(routing_key: String, r#type: Type, uri: String) -> SinkInOneOf { - SinkInOneOf { - routing_key, - r#type, - uri, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "rabbitMQ")] - RabbitMq, -} - -impl Default for Type { - fn default() -> Type { - Self::RabbitMq - } -} diff --git a/rust/src/models/sink_in_one_of_1.rs b/rust/src/models/sink_in_one_of_1.rs deleted file mode 100644 index cb95d1baf..000000000 --- a/rust/src/models/sink_in_one_of_1.rs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkInOneOf1 { - #[serde(rename = "accessKey")] - pub access_key: String, - #[serde(rename = "queueDsn")] - pub queue_dsn: String, - #[serde(rename = "region")] - pub region: String, - #[serde(rename = "secretKey")] - pub secret_key: String, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl SinkInOneOf1 { - pub fn new( - access_key: String, - queue_dsn: String, - region: String, - secret_key: String, - r#type: Type, - ) -> SinkInOneOf1 { - SinkInOneOf1 { - access_key, - queue_dsn, - region, - secret_key, - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "sqs")] - Sqs, -} - -impl Default for Type { - fn default() -> Type { - Self::Sqs - } -} diff --git a/rust/src/models/sink_in_one_of_2.rs b/rust/src/models/sink_in_one_of_2.rs deleted file mode 100644 index 4239ce4c4..000000000 --- a/rust/src/models/sink_in_one_of_2.rs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkInOneOf2 { - #[serde(rename = "brokers")] - pub brokers: String, - /// Password for SASL, if `security_protocol` is `sasl-ssl`. - #[serde( - rename = "saslPassword", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub sasl_password: Option>, - /// Username for SASL, if `security_protocol` is `sasl-ssl`. - #[serde( - rename = "saslUsername", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub sasl_username: Option>, - #[serde(rename = "securityProtocol")] - pub security_protocol: models::KafkaSecurityProtocolType, - #[serde(rename = "topic")] - pub topic: String, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl SinkInOneOf2 { - pub fn new( - brokers: String, - security_protocol: models::KafkaSecurityProtocolType, - topic: String, - r#type: Type, - ) -> SinkInOneOf2 { - SinkInOneOf2 { - brokers, - sasl_password: None, - sasl_username: None, - security_protocol, - topic, - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "kafka")] - Kafka, -} - -impl Default for Type { - fn default() -> Type { - Self::Kafka - } -} diff --git a/rust/src/models/sink_in_one_of_3.rs b/rust/src/models/sink_in_one_of_3.rs deleted file mode 100644 index 1db372875..000000000 --- a/rust/src/models/sink_in_one_of_3.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkInOneOf3 { - #[serde(rename = "type")] - pub r#type: Type, - #[serde(rename = "url")] - pub url: String, -} - -impl SinkInOneOf3 { - pub fn new(r#type: Type, url: String) -> SinkInOneOf3 { - SinkInOneOf3 { r#type, url } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "http")] - Http, -} - -impl Default for Type { - fn default() -> Type { - Self::Http - } -} diff --git a/rust/src/models/sink_in_one_of_4.rs b/rust/src/models/sink_in_one_of_4.rs deleted file mode 100644 index e276a4e29..000000000 --- a/rust/src/models/sink_in_one_of_4.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkInOneOf4 { - #[serde(rename = "type")] - pub r#type: Type, -} - -impl SinkInOneOf4 { - pub fn new(r#type: Type) -> SinkInOneOf4 { - SinkInOneOf4 { r#type } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "eventStream")] - EventStream, -} - -impl Default for Type { - fn default() -> Type { - Self::EventStream - } -} diff --git a/rust/src/models/sink_otel_v1_config.rs b/rust/src/models/sink_otel_v1_config.rs deleted file mode 100644 index 5dc7dba23..000000000 --- a/rust/src/models/sink_otel_v1_config.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkOtelV1Config { - #[serde(rename = "url")] - pub url: String, -} - -impl SinkOtelV1Config { - pub fn new(url: String) -> SinkOtelV1Config { - SinkOtelV1Config { url } - } -} diff --git a/rust/src/models/sink_out.rs b/rust/src/models/sink_out.rs deleted file mode 100644 index 7a266aa58..000000000 --- a/rust/src/models/sink_out.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SinkOut { - SinkInOneOf(Box), - SinkInOneOf1(Box), - SinkInOneOf2(Box), - SinkInOneOf3(Box), - SinkInOneOf4(Box), -} - -impl Default for SinkOut { - fn default() -> Self { - Self::SinkInOneOf(Default::default()) - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "rabbitMQ")] - RabbitMq, - #[serde(rename = "sqs")] - Sqs, - #[serde(rename = "kafka")] - Kafka, - #[serde(rename = "http")] - Http, - #[serde(rename = "eventStream")] - EventStream, -} - -impl Default for Type { - fn default() -> Type { - Self::RabbitMq - } -} diff --git a/rust/src/models/sink_payload_format.rs b/rust/src/models/sink_payload_format.rs deleted file mode 100644 index 5fc6706f8..000000000 --- a/rust/src/models/sink_payload_format.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum SinkPayloadFormat { - #[serde(rename = "json")] - Json, -} - -impl std::fmt::Display for SinkPayloadFormat { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Json => write!(f, "json"), - } - } -} - -impl Default for SinkPayloadFormat { - fn default() -> SinkPayloadFormat { - Self::Json - } -} diff --git a/rust/src/models/sink_status.rs b/rust/src/models/sink_status.rs deleted file mode 100644 index 66e918517..000000000 --- a/rust/src/models/sink_status.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum SinkStatus { - #[serde(rename = "enabled")] - Enabled, - #[serde(rename = "paused")] - Paused, - #[serde(rename = "disabled")] - Disabled, -} - -impl std::fmt::Display for SinkStatus { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Enabled => write!(f, "enabled"), - Self::Paused => write!(f, "paused"), - Self::Disabled => write!(f, "disabled"), - } - } -} - -impl Default for SinkStatus { - fn default() -> SinkStatus { - Self::Enabled - } -} diff --git a/rust/src/models/sink_status_in.rs b/rust/src/models/sink_status_in.rs deleted file mode 100644 index 3d492b7dc..000000000 --- a/rust/src/models/sink_status_in.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum SinkStatusIn { - #[serde(rename = "enabled")] - Enabled, - #[serde(rename = "paused")] - Paused, -} - -impl std::fmt::Display for SinkStatusIn { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Enabled => write!(f, "enabled"), - Self::Paused => write!(f, "paused"), - } - } -} - -impl Default for SinkStatusIn { - fn default() -> SinkStatusIn { - Self::Enabled - } -} diff --git a/rust/src/models/sink_transform_in.rs b/rust/src/models/sink_transform_in.rs deleted file mode 100644 index 533963f81..000000000 --- a/rust/src/models/sink_transform_in.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkTransformIn { - #[serde(rename = "code", skip_serializing_if = "Option::is_none")] - pub code: Option, - #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] - pub enabled: Option, -} - -impl SinkTransformIn { - pub fn new() -> SinkTransformIn { - SinkTransformIn { - code: None, - enabled: None, - } - } -} diff --git a/rust/src/models/sink_transformation_out.rs b/rust/src/models/sink_transformation_out.rs deleted file mode 100644 index 99b74919f..000000000 --- a/rust/src/models/sink_transformation_out.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SinkTransformationOut { - #[serde(rename = "code", skip_serializing_if = "Option::is_none")] - pub code: Option, - #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] - pub enabled: Option, -} - -impl SinkTransformationOut { - pub fn new() -> SinkTransformationOut { - SinkTransformationOut { - code: None, - enabled: None, - } - } -} diff --git a/rust/src/models/snowflake_config.rs b/rust/src/models/snowflake_config.rs deleted file mode 100644 index a927f83b3..000000000 --- a/rust/src/models/snowflake_config.rs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// SnowflakeConfig : Configuration parameters for defining a Snowflake sink. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SnowflakeConfig { - /// Snowflake account identifier, which includes both the organization and - /// account IDs separated by a hyphen. - #[serde(rename = "accountIdentifier")] - pub account_identifier: String, - /// Database name. Only required if not using transformations. - #[serde(rename = "dbName", skip_serializing_if = "Option::is_none")] - pub db_name: Option, - /// PEM-encoded private key used for signing token-based requests to the - /// Snowflake API. Beginning/end delimiters are not required. - #[serde(rename = "privateKey")] - pub private_key: String, - /// Schema name. Only required if not using transformations. - #[serde(rename = "schemaName", skip_serializing_if = "Option::is_none")] - pub schema_name: Option, - /// Table name. Only required if not using transformations. - #[serde(rename = "tableName", skip_serializing_if = "Option::is_none")] - pub table_name: Option, - /// The Snowflake user id. - #[serde(rename = "userId")] - pub user_id: String, -} - -impl SnowflakeConfig { - /// Configuration parameters for defining a Snowflake sink. - pub fn new( - account_identifier: String, - private_key: String, - user_id: String, - ) -> SnowflakeConfig { - SnowflakeConfig { - account_identifier, - db_name: None, - private_key, - schema_name: None, - table_name: None, - user_id, - } - } -} diff --git a/rust/src/models/statistics_period.rs b/rust/src/models/statistics_period.rs deleted file mode 100644 index 008550912..000000000 --- a/rust/src/models/statistics_period.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// StatisticsPeriod : Period length for a statistics data point. -/// Period length for a statistics data point. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum StatisticsPeriod { - #[serde(rename = "OneDay")] - OneDay, - #[serde(rename = "FiveMinutes")] - FiveMinutes, -} - -impl std::fmt::Display for StatisticsPeriod { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::OneDay => write!(f, "OneDay"), - Self::FiveMinutes => write!(f, "FiveMinutes"), - } - } -} - -impl Default for StatisticsPeriod { - fn default() -> StatisticsPeriod { - Self::OneDay - } -} diff --git a/rust/src/models/stream_event_type_in.rs b/rust/src/models/stream_event_type_in.rs deleted file mode 100644 index 819bf8ca5..000000000 --- a/rust/src/models/stream_event_type_in.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamEventTypeIn { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - /// The event type's name - #[serde(rename = "name")] - pub name: String, -} - -impl StreamEventTypeIn { - pub fn new(name: String) -> StreamEventTypeIn { - StreamEventTypeIn { - description: None, - name, - } - } -} diff --git a/rust/src/models/stream_event_type_out.rs b/rust/src/models/stream_event_type_out.rs deleted file mode 100644 index ddaa4239a..000000000 --- a/rust/src/models/stream_event_type_out.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamEventTypeOut { - #[serde(rename = "createdAt")] - pub created_at: String, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - /// The event type's name - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "updatedAt")] - pub updated_at: String, -} - -impl StreamEventTypeOut { - pub fn new(created_at: String, name: String, updated_at: String) -> StreamEventTypeOut { - StreamEventTypeOut { - created_at, - description: None, - name, - updated_at, - } - } -} diff --git a/rust/src/models/stream_event_type_patch.rs b/rust/src/models/stream_event_type_patch.rs deleted file mode 100644 index 948523707..000000000 --- a/rust/src/models/stream_event_type_patch.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamEventTypePatch { - #[serde(rename = "description", deserialize_with = "Option::deserialize")] - pub description: Option, - /// The event type's name - #[serde( - rename = "name", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub name: Option>, -} - -impl StreamEventTypePatch { - pub fn new(description: Option) -> StreamEventTypePatch { - StreamEventTypePatch { - description, - name: None, - } - } -} diff --git a/rust/src/models/stream_in.rs b/rust/src/models/stream_in.rs deleted file mode 100644 index 76984fadd..000000000 --- a/rust/src/models/stream_in.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamIn { - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] - pub uid: Option, -} - -impl StreamIn { - pub fn new(description: String) -> StreamIn { - StreamIn { - description, - uid: None, - } - } -} diff --git a/rust/src/models/stream_out.rs b/rust/src/models/stream_out.rs deleted file mode 100644 index 1a8bb74d6..000000000 --- a/rust/src/models/stream_out.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamOut { - #[serde(rename = "createdAt")] - pub created_at: String, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] - pub uid: Option, - #[serde(rename = "updatedAt")] - pub updated_at: String, -} - -impl StreamOut { - pub fn new(created_at: String, id: String, updated_at: String) -> StreamOut { - StreamOut { - created_at, - description: None, - id, - uid: None, - updated_at, - } - } -} diff --git a/rust/src/models/stream_patch.rs b/rust/src/models/stream_patch.rs deleted file mode 100644 index a89704d40..000000000 --- a/rust/src/models/stream_patch.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamPatch { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] - pub uid: Option, -} - -impl StreamPatch { - pub fn new() -> StreamPatch { - StreamPatch { - description: None, - uid: None, - } - } -} diff --git a/rust/src/models/stream_sink_in.rs b/rust/src/models/stream_sink_in.rs deleted file mode 100644 index aa669b852..000000000 --- a/rust/src/models/stream_sink_in.rs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(untagged)] -pub enum StreamSinkIn { - StreamSinkInOneOf(Box), - StreamSinkInOneOf1(Box), - StreamSinkInOneOf2(Box), - StreamSinkInOneOf3(Box), - StreamSinkInOneOf4(Box), - StreamSinkInOneOf5(Box), - StreamSinkInOneOf6(Box), - StreamSinkInOneOf7(Box), -} - -impl Default for StreamSinkIn { - fn default() -> Self { - Self::StreamSinkInOneOf(Default::default()) - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "azureBlobStorage")] - AzureBlobStorage, - #[serde(rename = "otelV1HttpTrace")] - OtelV1HttpTrace, - #[serde(rename = "http")] - Http, - #[serde(rename = "amazonS3")] - AmazonS3, - #[serde(rename = "snowflake")] - Snowflake, - #[serde(rename = "googleCloudStorage")] - GoogleCloudStorage, - #[serde(rename = "redshift")] - Redshift, - #[serde(rename = "bigQuery")] - BigQuery, -} - -impl Default for Type { - fn default() -> Type { - Self::AzureBlobStorage - } -} diff --git a/rust/src/models/stream_sink_in_one_of.rs b/rust/src/models/stream_sink_in_one_of.rs deleted file mode 100644 index 20b1266eb..000000000 --- a/rust/src/models/stream_sink_in_one_of.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamSinkInOneOf { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl StreamSinkInOneOf { - pub fn new(config: models::AzureBlobStorageConfig, r#type: Type) -> StreamSinkInOneOf { - StreamSinkInOneOf { - config: Box::new(config), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "azureBlobStorage")] - AzureBlobStorage, -} - -impl Default for Type { - fn default() -> Type { - Self::AzureBlobStorage - } -} diff --git a/rust/src/models/stream_sink_in_one_of_1.rs b/rust/src/models/stream_sink_in_one_of_1.rs deleted file mode 100644 index f09233296..000000000 --- a/rust/src/models/stream_sink_in_one_of_1.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamSinkInOneOf1 { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl StreamSinkInOneOf1 { - pub fn new(config: models::SinkOtelV1Config, r#type: Type) -> StreamSinkInOneOf1 { - StreamSinkInOneOf1 { - config: Box::new(config), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "otelV1HttpTrace")] - OtelV1HttpTrace, -} - -impl Default for Type { - fn default() -> Type { - Self::OtelV1HttpTrace - } -} diff --git a/rust/src/models/stream_sink_in_one_of_2.rs b/rust/src/models/stream_sink_in_one_of_2.rs deleted file mode 100644 index 3fc7042d1..000000000 --- a/rust/src/models/stream_sink_in_one_of_2.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamSinkInOneOf2 { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl StreamSinkInOneOf2 { - pub fn new(config: models::SinkHttpConfig, r#type: Type) -> StreamSinkInOneOf2 { - StreamSinkInOneOf2 { - config: Box::new(config), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "http")] - Http, -} - -impl Default for Type { - fn default() -> Type { - Self::Http - } -} diff --git a/rust/src/models/stream_sink_in_one_of_3.rs b/rust/src/models/stream_sink_in_one_of_3.rs deleted file mode 100644 index 756459d87..000000000 --- a/rust/src/models/stream_sink_in_one_of_3.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamSinkInOneOf3 { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl StreamSinkInOneOf3 { - pub fn new(config: models::S3Config, r#type: Type) -> StreamSinkInOneOf3 { - StreamSinkInOneOf3 { - config: Box::new(config), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "amazonS3")] - AmazonS3, -} - -impl Default for Type { - fn default() -> Type { - Self::AmazonS3 - } -} diff --git a/rust/src/models/stream_sink_in_one_of_4.rs b/rust/src/models/stream_sink_in_one_of_4.rs deleted file mode 100644 index b16e47142..000000000 --- a/rust/src/models/stream_sink_in_one_of_4.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamSinkInOneOf4 { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl StreamSinkInOneOf4 { - pub fn new(config: models::SnowflakeConfig, r#type: Type) -> StreamSinkInOneOf4 { - StreamSinkInOneOf4 { - config: Box::new(config), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "snowflake")] - Snowflake, -} - -impl Default for Type { - fn default() -> Type { - Self::Snowflake - } -} diff --git a/rust/src/models/stream_sink_in_one_of_5.rs b/rust/src/models/stream_sink_in_one_of_5.rs deleted file mode 100644 index caad2d8b6..000000000 --- a/rust/src/models/stream_sink_in_one_of_5.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamSinkInOneOf5 { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl StreamSinkInOneOf5 { - pub fn new(config: models::GoogleCloudStorageConfig, r#type: Type) -> StreamSinkInOneOf5 { - StreamSinkInOneOf5 { - config: Box::new(config), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "googleCloudStorage")] - GoogleCloudStorage, -} - -impl Default for Type { - fn default() -> Type { - Self::GoogleCloudStorage - } -} diff --git a/rust/src/models/stream_sink_in_one_of_6.rs b/rust/src/models/stream_sink_in_one_of_6.rs deleted file mode 100644 index 1aed89956..000000000 --- a/rust/src/models/stream_sink_in_one_of_6.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamSinkInOneOf6 { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl StreamSinkInOneOf6 { - pub fn new(config: models::RedshiftConfig, r#type: Type) -> StreamSinkInOneOf6 { - StreamSinkInOneOf6 { - config: Box::new(config), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "redshift")] - Redshift, -} - -impl Default for Type { - fn default() -> Type { - Self::Redshift - } -} diff --git a/rust/src/models/stream_sink_in_one_of_7.rs b/rust/src/models/stream_sink_in_one_of_7.rs deleted file mode 100644 index f4313dba6..000000000 --- a/rust/src/models/stream_sink_in_one_of_7.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StreamSinkInOneOf7 { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl StreamSinkInOneOf7 { - pub fn new(config: models::BigQueryConfig, r#type: Type) -> StreamSinkInOneOf7 { - StreamSinkInOneOf7 { - config: Box::new(config), - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "bigQuery")] - BigQuery, -} - -impl Default for Type { - fn default() -> Type { - Self::BigQuery - } -} diff --git a/rust/src/models/stream_sink_out.rs b/rust/src/models/stream_sink_out.rs deleted file mode 100644 index 8b0b0cb3a..000000000 --- a/rust/src/models/stream_sink_out.rs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(untagged)] -pub enum StreamSinkOut { - StreamSinkInOneOf(Box), - StreamSinkInOneOf1(Box), - StreamSinkInOneOf2(Box), - StreamSinkInOneOf3(Box), - StreamSinkInOneOf4(Box), - StreamSinkInOneOf5(Box), - StreamSinkInOneOf6(Box), - StreamSinkInOneOf7(Box), -} - -impl Default for StreamSinkOut { - fn default() -> Self { - Self::StreamSinkInOneOf(Default::default()) - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "azureBlobStorage")] - AzureBlobStorage, - #[serde(rename = "otelV1HttpTrace")] - OtelV1HttpTrace, - #[serde(rename = "http")] - Http, - #[serde(rename = "amazonS3")] - AmazonS3, - #[serde(rename = "snowflake")] - Snowflake, - #[serde(rename = "googleCloudStorage")] - GoogleCloudStorage, - #[serde(rename = "redshift")] - Redshift, - #[serde(rename = "bigQuery")] - BigQuery, -} - -impl Default for Type { - fn default() -> Type { - Self::AzureBlobStorage - } -} diff --git a/rust/src/models/stream_sink_patch.rs b/rust/src/models/stream_sink_patch.rs deleted file mode 100644 index 8aa7563ef..000000000 --- a/rust/src/models/stream_sink_patch.rs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(untagged)] -pub enum StreamSinkPatch { - StreamSinkInOneOf(Box), - StreamSinkInOneOf1(Box), - StreamSinkInOneOf2(Box), - StreamSinkInOneOf3(Box), - StreamSinkInOneOf4(Box), - StreamSinkInOneOf5(Box), - StreamSinkInOneOf6(Box), - StreamSinkInOneOf7(Box), -} - -impl Default for StreamSinkPatch { - fn default() -> Self { - Self::StreamSinkInOneOf(Default::default()) - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "azureBlobStorage")] - AzureBlobStorage, - #[serde(rename = "otelV1HttpTrace")] - OtelV1HttpTrace, - #[serde(rename = "http")] - Http, - #[serde(rename = "amazonS3")] - AmazonS3, - #[serde(rename = "snowflake")] - Snowflake, - #[serde(rename = "googleCloudStorage")] - GoogleCloudStorage, - #[serde(rename = "redshift")] - Redshift, - #[serde(rename = "bigQuery")] - BigQuery, -} - -impl Default for Type { - fn default() -> Type { - Self::AzureBlobStorage - } -} diff --git a/rust/src/models/template_in.rs b/rust/src/models/template_in.rs index 4af46a715..453399884 100644 --- a/rust/src/models/template_in.rs +++ b/rust/src/models/template_in.rs @@ -1,43 +1,41 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::transformation_template_kind::TransformationTemplateKind; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct TemplateIn { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - #[serde(rename = "featureFlag", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "featureFlag")] + #[serde(skip_serializing_if = "Option::is_none")] pub feature_flag: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "filterTypes")] + #[serde(skip_serializing_if = "Option::is_none")] pub filter_types: Option>, - #[serde(rename = "instructions", skip_serializing_if = "Option::is_none")] + + #[serde(skip_serializing_if = "Option::is_none")] pub instructions: Option, - #[serde(rename = "instructionsLink", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "instructionsLink")] + #[serde(skip_serializing_if = "Option::is_none")] pub instructions_link: Option, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "logo")] + + #[serde(skip_serializing_if = "Option::is_none")] + pub kind: Option, + pub logo: String, - #[serde(rename = "name")] + pub name: String, - #[serde(rename = "transformation")] + pub transformation: String, } impl TemplateIn { - pub fn new(logo: String, name: String, transformation: String) -> TemplateIn { - TemplateIn { + pub fn new(logo: String, name: String, transformation: String) -> Self { + Self { description: None, feature_flag: None, filter_types: None, diff --git a/rust/src/models/template_out.rs b/rust/src/models/template_out.rs index 69d259596..ba3bb1384 100644 --- a/rust/src/models/template_out.rs +++ b/rust/src/models/template_out.rs @@ -1,44 +1,42 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] +// this file is @generated use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +use super::transformation_template_kind::TransformationTemplateKind; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] pub struct TemplateOut { #[serde(rename = "createdAt")] pub created_at: String, - #[serde(rename = "description")] + pub description: String, - #[serde(rename = "featureFlag", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "featureFlag")] + #[serde(skip_serializing_if = "Option::is_none")] pub feature_flag: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "filterTypes")] + #[serde(skip_serializing_if = "Option::is_none")] pub filter_types: Option>, - #[serde(rename = "id")] + pub id: String, - #[serde(rename = "instructions")] + pub instructions: String, - #[serde(rename = "instructionsLink", skip_serializing_if = "Option::is_none")] + + #[serde(rename = "instructionsLink")] + #[serde(skip_serializing_if = "Option::is_none")] pub instructions_link: Option, - #[serde(rename = "kind")] - pub kind: models::TransformationTemplateKind, - #[serde(rename = "logo")] + + pub kind: TransformationTemplateKind, + pub logo: String, - #[serde(rename = "name")] + pub name: String, + #[serde(rename = "orgId")] pub org_id: String, - #[serde(rename = "transformation")] + pub transformation: String, + #[serde(rename = "updatedAt")] pub updated_at: String, } @@ -49,14 +47,14 @@ impl TemplateOut { description: String, id: String, instructions: String, - kind: models::TransformationTemplateKind, + kind: TransformationTemplateKind, logo: String, name: String, org_id: String, transformation: String, updated_at: String, - ) -> TemplateOut { - TemplateOut { + ) -> Self { + Self { created_at, description, feature_flag: None, diff --git a/rust/src/models/template_patch.rs b/rust/src/models/template_patch.rs deleted file mode 100644 index 47eb64a51..000000000 --- a/rust/src/models/template_patch.rs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TemplatePatch { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde( - rename = "featureFlag", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub feature_flag: Option>, - #[serde( - rename = "filterTypes", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub filter_types: Option>>, - #[serde(rename = "instructions", skip_serializing_if = "Option::is_none")] - pub instructions: Option, - #[serde( - rename = "instructionsLink", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub instructions_link: Option>, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "logo", skip_serializing_if = "Option::is_none")] - pub logo: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "transformation", skip_serializing_if = "Option::is_none")] - pub transformation: Option, -} - -impl TemplatePatch { - pub fn new() -> TemplatePatch { - TemplatePatch { - description: None, - feature_flag: None, - filter_types: None, - instructions: None, - instructions_link: None, - kind: None, - logo: None, - name: None, - transformation: None, - } - } -} diff --git a/rust/src/models/template_update.rs b/rust/src/models/template_update.rs deleted file mode 100644 index e97d59898..000000000 --- a/rust/src/models/template_update.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TemplateUpdate { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "featureFlag", skip_serializing_if = "Option::is_none")] - pub feature_flag: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] - pub filter_types: Option>, - #[serde(rename = "instructions", skip_serializing_if = "Option::is_none")] - pub instructions: Option, - #[serde(rename = "instructionsLink", skip_serializing_if = "Option::is_none")] - pub instructions_link: Option, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "logo")] - pub logo: String, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "transformation")] - pub transformation: String, -} - -impl TemplateUpdate { - pub fn new(logo: String, transformation: String) -> TemplateUpdate { - TemplateUpdate { - description: None, - feature_flag: None, - filter_types: None, - instructions: None, - instructions_link: None, - kind: None, - logo, - name: None, - transformation, - } - } -} diff --git a/rust/src/models/transformation_http_method.rs b/rust/src/models/transformation_http_method.rs deleted file mode 100644 index f85fedd93..000000000 --- a/rust/src/models/transformation_http_method.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum TransformationHttpMethod { - #[serde(rename = "POST")] - Post, - #[serde(rename = "PUT")] - Put, - #[serde(rename = "PATCH")] - Patch, -} - -impl std::fmt::Display for TransformationHttpMethod { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Post => write!(f, "POST"), - Self::Put => write!(f, "PUT"), - Self::Patch => write!(f, "PATCH"), - } - } -} - -impl Default for TransformationHttpMethod { - fn default() -> TransformationHttpMethod { - Self::Post - } -} diff --git a/rust/src/models/transformation_simulate_in.rs b/rust/src/models/transformation_simulate_in.rs deleted file mode 100644 index c89d611d6..000000000 --- a/rust/src/models/transformation_simulate_in.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TransformationSimulateIn { - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] - pub channels: Option>, - #[serde(rename = "code")] - pub code: String, - /// The event type's name - #[serde(rename = "eventType")] - pub event_type: String, - #[serde(rename = "payload")] - pub payload: serde_json::Value, -} - -impl TransformationSimulateIn { - pub fn new( - code: String, - event_type: String, - payload: serde_json::Value, - ) -> TransformationSimulateIn { - TransformationSimulateIn { - channels: None, - code, - event_type, - payload, - } - } -} diff --git a/rust/src/models/transformation_simulate_out.rs b/rust/src/models/transformation_simulate_out.rs deleted file mode 100644 index bc4acc779..000000000 --- a/rust/src/models/transformation_simulate_out.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Svix API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.1.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TransformationSimulateOut { - #[serde(rename = "method", skip_serializing_if = "Option::is_none")] - pub method: Option, - #[serde(rename = "payload")] - pub payload: String, - #[serde(rename = "url")] - pub url: String, -} - -impl TransformationSimulateOut { - pub fn new(payload: String, url: String) -> TransformationSimulateOut { - TransformationSimulateOut { - method: None, - payload, - url, - } - } -} diff --git a/rust/templates/model.mustache b/rust/templates/model.mustache deleted file mode 100644 index 23c0105e3..000000000 --- a/rust/templates/model.mustache +++ /dev/null @@ -1,203 +0,0 @@ -{{>partial_header}} -#[allow(unused_imports)] -use crate::models; -#[allow(unused_imports)] -use serde::{Deserialize, Serialize}; -{{#models}} - {{#model}} - {{^isEnum}}{{#vendorExtensions.x-rust-has-byte-array}} - use serde_with::serde_as; - {{/vendorExtensions.x-rust-has-byte-array}}{{/isEnum}} - {{#isEnum}} - {{#isInteger}} - use serde_repr::{Serialize_repr,Deserialize_repr}; - {{/isInteger}} - {{/isEnum}} - {{#description}} - /// {{{classname}}} : {{{description}}} - {{/description}} - {{!-- for repr(int) enum schemas --}} - {{#isEnum}} - {{#isInteger}} - /// {{{description}}} - #[repr(i64)] - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr)] - pub enum {{{classname}}} { - {{#allowableValues}} - {{#enumVars}} - {{{name}}} = {{{value}}}, - {{/enumVars}}{{/allowableValues}} - } - - impl std::fmt::Display for {{{classname}}} { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", match self { - {{#allowableValues}} - {{#enumVars}} - Self::{{{name}}} => "{{{value}}}", - {{/enumVars}} - {{/allowableValues}} - }) - } - } - {{/isInteger}} - {{/isEnum}} - {{!-- for enum schemas --}} - {{#isEnum}} - {{^isInteger}} - /// {{{description}}} - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] - pub enum {{{classname}}} { - {{#allowableValues}} - {{#enumVars}} - #[serde(rename = "{{{value}}}")] - {{{name}}}, - {{/enumVars}}{{/allowableValues}} - } - - impl std::fmt::Display for {{{classname}}} { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - {{#allowableValues}} - {{#enumVars}} - Self::{{{name}}} => write!(f, "{{{value}}}"), - {{/enumVars}} - {{/allowableValues}} - } - } - } - - {{/isInteger}} - impl Default for {{{classname}}} { - fn default() -> {{{classname}}} { - {{#allowableValues}} - Self::{{ enumVars.0.name }} - {{/allowableValues}} - } - } - {{/isEnum}} - {{!-- for schemas that have a discriminator --}} - {{#discriminator}} - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] - #[serde(tag = "{{{propertyBaseName}}}")] - pub enum {{{classname}}} { - {{^oneOf}} - {{#mappedModels}} - #[serde(rename="{{mappingName}}")] - {{{modelName}}} { - {{#vars}} - {{#description}} - /// {{{.}}} - {{/description}} - #[serde(rename = "{{{baseName}}}"{{^required}}, skip_serializing_if = "Option::is_none"{{/required}})] - {{{name}}}: {{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{^required}}Option<{{/required}}{{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{#isModel}}{{^avoidBoxedModels}}Box<{{/avoidBoxedModels}}{{{dataType}}}{{^avoidBoxedModels}}>{{/avoidBoxedModels}}{{/isModel}}{{^isModel}}{{{dataType}}}{{/isModel}}{{/isEnum}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^required}}>{{/required}}, - {{/vars}} - }, - {{/mappedModels}} - {{/oneOf}} - {{^oneOf.isEmpty}} - {{#composedSchemas.oneOf}} - {{#description}} - /// {{{.}}} - {{/description}} - {{#baseName}} - #[serde(rename="{{{.}}}")] - {{/baseName}} - {{{name}}}({{#isModel}}{{^avoidBoxedModels}}Box<{{/avoidBoxedModels}}{{/isModel}}{{{dataType}}}{{#isModel}}{{^avoidBoxedModels}}>{{/avoidBoxedModels}}{{/isModel}}), - {{/composedSchemas.oneOf}} - {{/oneOf.isEmpty}} - } - - impl Default for {{classname}} { - fn default() -> Self { - {{^oneOf}}{{#mappedModels}}{{#-first}}Self::{{modelName}} { - {{#vars}} - {{{name}}}: Default::default(), - {{/vars}} - }{{/-first}}{{/mappedModels}} - {{/oneOf}}{{^oneOf.isEmpty}}{{#composedSchemas.oneOf}}{{#-first}}Self::{{{name}}}(Default::default()){{/-first}}{{/composedSchemas.oneOf}}{{/oneOf.isEmpty}} - } - } - - {{/discriminator}} - {{!-- for non-enum schemas --}} - {{^isEnum}} - {{^discriminator}} - {{#vendorExtensions.x-rust-has-byte-array}}#[serde_as] - {{/vendorExtensions.x-rust-has-byte-array}}{{#oneOf.isEmpty}}#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct {{{classname}}} { - {{#vars}} - {{#description}} - /// {{{.}}} - {{/description}} - {{#isByteArray}} - {{#required}}#[serde_as(as = "serde_with::base64::Base64")]{{/required}}{{^required}}#[serde_as(as = "Option")]{{/required}} - {{/isByteArray}} - #[serde(rename = "{{{baseName}}}"{{^required}}{{#isNullable}}, default, with = "::serde_with::rust::double_option"{{/isNullable}}{{/required}}{{^required}}, skip_serializing_if = "Option::is_none"{{/required}}{{#required}}{{#isNullable}}, deserialize_with = "Option::deserialize"{{/isNullable}}{{/required}})] - pub {{{name}}}: {{#isNullable}}Option<{{/isNullable}}{{^required}}Option<{{/required}}{{#isEnum}}{{#isArray}}{{#uniqueItems}}std::collections::HashSet<{{/uniqueItems}}{{^uniqueItems}}Vec<{{/uniqueItems}}{{/isArray}}{{{enumName}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{#isModel}}{{^avoidBoxedModels}}Box<{{/avoidBoxedModels}}{{{dataType}}}{{^avoidBoxedModels}}>{{/avoidBoxedModels}}{{/isModel}}{{^isModel}}{{#isByteArray}}Vec{{/isByteArray}}{{^isByteArray}}{{{dataType}}}{{/isByteArray}}{{/isModel}}{{/isEnum}}{{#isNullable}}>{{/isNullable}}{{^required}}>{{/required}}, - {{/vars}} - } - - impl {{{classname}}} { - {{#description}} - /// {{{.}}} - {{/description}} - pub fn new({{#requiredVars}}{{{name}}}: {{#isNullable}}Option<{{/isNullable}}{{#isEnum}}{{#isArray}}{{#uniqueItems}}std::collections::HashSet<{{/uniqueItems}}{{^uniqueItems}}Vec<{{/uniqueItems}}{{/isArray}}{{{enumName}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{#isByteArray}}Vec{{/isByteArray}}{{^isByteArray}}{{{dataType}}}{{/isByteArray}}{{/isEnum}}{{#isNullable}}>{{/isNullable}}{{^-last}}, {{/-last}}{{/requiredVars}}) -> {{{classname}}} { - {{{classname}}} { - {{#vars}} - {{{name}}}{{^required}}: None{{/required}}{{#required}}{{#isModel}}{{^avoidBoxedModels}}: {{^isNullable}}Box::new({{{name}}}){{/isNullable}}{{#isNullable}}if let Some(x) = {{{name}}} {Some(Box::new(x))} else {None}{{/isNullable}}{{/avoidBoxedModels}}{{/isModel}}{{/required}}, - {{/vars}} - } - } - } - {{/oneOf.isEmpty}} - {{^oneOf.isEmpty}} - {{! TODO: add other vars that are not part of the oneOf}} - {{#description}} - /// {{{.}}} - {{/description}} - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] - #[serde(untagged)] - pub enum {{classname}} { - {{#composedSchemas.oneOf}} - {{#description}} - /// {{{.}}} - {{/description}} - {{{name}}}({{#isModel}}{{^avoidBoxedModels}}Box<{{/avoidBoxedModels}}{{/isModel}}{{{dataType}}}{{#isModel}}{{^avoidBoxedModels}}>{{/avoidBoxedModels}}{{/isModel}}), - {{/composedSchemas.oneOf}} - } - - impl Default for {{classname}} { - fn default() -> Self { - {{#composedSchemas.oneOf}}{{#-first}}Self::{{{name}}}(Default::default()){{/-first}}{{/composedSchemas.oneOf}} - } - } - {{/oneOf.isEmpty}} - {{/discriminator}} - {{/isEnum}} - {{!-- for properties that are of enum type --}} - {{#vars}} - {{#isEnum}} - /// {{{description}}} - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] - pub enum {{{enumName}}} { - {{#allowableValues}} - {{#enumVars}} - #[serde(rename = "{{{value}}}")] - {{{name}}}, - {{/enumVars}} - {{/allowableValues}} - } - - impl Default for {{{enumName}}} { - fn default() -> {{{enumName}}} { - {{#allowableValues}} - Self::{{ enumVars.0.name }} - {{/allowableValues}} - } - } - {{/isEnum}} - {{/vars}} - - {{/model}} -{{/models}} diff --git a/rust/templates/model_mod.mustache b/rust/templates/model_mod.mustache deleted file mode 100644 index 0465bca27..000000000 --- a/rust/templates/model_mod.mustache +++ /dev/null @@ -1,7 +0,0 @@ -{{#models}} -{{#model}} -// TODO: Make modules private for v2.0 of the library -pub mod {{{classFilename}}}; -pub use self::{{{classFilename}}}::{{{classname}}}; -{{/model}} -{{/models}} diff --git a/rust/tests/kitchen_sink.rs b/rust/tests/kitchen_sink.rs index 7e6a8c286..dba13cb67 100644 --- a/rust/tests/kitchen_sink.rs +++ b/rust/tests/kitchen_sink.rs @@ -1,3 +1,4 @@ +use js_option::JsOption; use std::collections::HashSet; use svix::{ api::{ApplicationIn, EndpointIn, EndpointPatch, EventTypeIn, Svix, SvixOptions}, @@ -105,10 +106,10 @@ async fn test_endpoint_crud() { app.id.clone(), ep.id.clone(), EndpointPatch { - filter_types: Some(Some(vec![ + filter_types: JsOption::Some(vec![ String::from("event.started"), String::from("event.ended"), - ])), + ]), ..Default::default() }, ) diff --git a/svix-cli/Cargo.lock b/svix-cli/Cargo.lock index 990454604..8d6c3e88e 100644 --- a/svix-cli/Cargo.lock +++ b/svix-cli/Cargo.lock @@ -211,7 +211,6 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", - "serde", "wasm-bindgen", "windows-targets 0.52.6", ] @@ -370,41 +369,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "darling" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -dependencies = [ - "darling_core", - "quote", - "syn", -] - [[package]] name = "data-encoding" version = "2.6.0" @@ -418,7 +382,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", - "serde", ] [[package]] @@ -610,19 +573,13 @@ dependencies = [ "futures-core", "futures-sink", "http 1.2.0", - "indexmap 2.7.0", + "indexmap", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.15.2" @@ -641,12 +598,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - [[package]] name = "hmac-sha256" version = "1.1.8" @@ -812,12 +763,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "1.0.3" @@ -849,17 +794,6 @@ dependencies = [ "unicode-joining-type", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - [[package]] name = "indexmap" version = "2.7.0" @@ -867,8 +801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.15.2", - "serde", + "hashbrown", ] [[package]] @@ -950,6 +883,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "js_option" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68421373957a1593a767013698dbf206e2b221eefe97a44d98d18672ff38423c" +dependencies = [ + "serde", +] + [[package]] name = "libc" version = "0.2.169" @@ -1505,36 +1447,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_with" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.7.0", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sha1" version = "0.10.6" @@ -1614,10 +1526,10 @@ dependencies = [ "hyper-rustls 0.26.0", "hyper-util", "itertools", + "js_option", "serde", "serde_json", "serde_repr", - "serde_with", "thiserror 1.0.69", "time", "tokio", @@ -1756,12 +1668,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", - "itoa", "num-conv", "powerfmt", "serde", "time-core", - "time-macros", ] [[package]] @@ -1770,16 +1680,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" -[[package]] -name = "time-macros" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" -dependencies = [ - "num-conv", - "time-core", -] - [[package]] name = "tinyvec" version = "1.8.1" @@ -1899,7 +1799,7 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.7.0", + "indexmap", "serde", "serde_spanned", "toml_datetime",