diff --git a/rust/src/lib.rs b/rust/src/lib.rs index b365c2670..8bb493cd4 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -16,13 +16,11 @@ 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; -#[rustfmt::skip] -#[allow(dead_code, clippy::all)] -mod models; - pub struct Configuration { pub base_path: String, pub user_agent: Option, diff --git a/rust/src/models/aggregate_event_types_out.rs b/rust/src/models/aggregate_event_types_out.rs index 5431fb0c9..3b32e4c68 100644 --- a/rust/src/models/aggregate_event_types_out.rs +++ b/rust/src/models/aggregate_event_types_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct AggregateEventTypesOut { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, - } - impl AggregateEventTypesOut { - pub fn new(id: String, status: models::BackgroundTaskStatus, task: models::BackgroundTaskType) -> AggregateEventTypesOut { - AggregateEventTypesOut { - id, - status, - task, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AggregateEventTypesOut { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "status")] + pub status: models::BackgroundTaskStatus, + #[serde(rename = "task")] + pub task: models::BackgroundTaskType, +} +impl AggregateEventTypesOut { + pub fn new( + id: String, + status: models::BackgroundTaskStatus, + task: models::BackgroundTaskType, + ) -> AggregateEventTypesOut { + AggregateEventTypesOut { id, status, task } + } +} diff --git a/rust/src/models/app_portal_access_in.rs b/rust/src/models/app_portal_access_in.rs index e15e1357f..2fdf42ebe 100644 --- a/rust/src/models/app_portal_access_in.rs +++ b/rust/src/models/app_portal_access_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,30 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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")] - pub expiry: Option, - /// The set of feature flags the created token will have access to. - #[serde(rename = "featureFlags", 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")] - pub read_only: Option, - } - impl AppPortalAccessIn { - pub fn new() -> AppPortalAccessIn { - AppPortalAccessIn { - application: None, - expiry: None, - feature_flags: None, - read_only: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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")] + pub expiry: Option, + /// The set of feature flags the created token will have access to. + #[serde(rename = "featureFlags", 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")] + pub read_only: Option, +} +impl AppPortalAccessIn { + pub fn new() -> AppPortalAccessIn { + AppPortalAccessIn { + application: None, + expiry: None, + feature_flags: None, + read_only: None, + } + } +} diff --git a/rust/src/models/app_portal_access_out.rs b/rust/src/models/app_portal_access_out.rs index 3607e448a..d3224ec6a 100644 --- a/rust/src/models/app_portal_access_out.rs +++ b/rust/src/models/app_portal_access_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,17 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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 } + } +} diff --git a/rust/src/models/app_usage_stats_in.rs b/rust/src/models/app_usage_stats_in.rs index 956eb450e..5f47f0119 100644 --- a/rust/src/models/app_usage_stats_in.rs +++ b/rust/src/models/app_usage_stats_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,25 +12,25 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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")] - 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 { - app_ids: None, - since, - until, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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")] + 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 { + 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 3fd517051..bd21a22e0 100644 --- a/rust/src/models/app_usage_stats_out.rs +++ b/rust/src/models/app_usage_stats_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,28 +12,33 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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. - #[serde(rename = "unresolvedAppIds")] - pub unresolved_app_ids: Vec, - } - impl AppUsageStatsOut { - pub fn new(id: String, status: models::BackgroundTaskStatus, task: models::BackgroundTaskType, unresolved_app_ids: Vec) -> AppUsageStatsOut { - AppUsageStatsOut { - id, - status, - task, - unresolved_app_ids, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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. + #[serde(rename = "unresolvedAppIds")] + pub unresolved_app_ids: Vec, +} +impl AppUsageStatsOut { + pub fn new( + id: String, + status: models::BackgroundTaskStatus, + task: models::BackgroundTaskType, + unresolved_app_ids: Vec, + ) -> AppUsageStatsOut { + AppUsageStatsOut { + id, + status, + task, + unresolved_app_ids, + } + } +} diff --git a/rust/src/models/application_in.rs b/rust/src/models/application_in.rs index aac8f4fb4..cc8bc2092 100644 --- a/rust/src/models/application_in.rs +++ b/rust/src/models/application_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,28 +12,27 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct ApplicationIn { - #[serde(rename = "metadata", 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, - /// Optional unique identifier for the application. - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] - pub uid: Option, - } - impl ApplicationIn { - pub fn new(name: String) -> ApplicationIn { - ApplicationIn { - metadata: None, - name, - rate_limit: None, - uid: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationIn { + #[serde(rename = "metadata", 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, + /// Optional unique identifier for the application. + #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + pub uid: Option, +} +impl ApplicationIn { + pub fn new(name: String) -> ApplicationIn { + ApplicationIn { + metadata: None, + name, + rate_limit: None, + uid: None, + } + } +} diff --git a/rust/src/models/application_out.rs b/rust/src/models/application_out.rs index 97255d7a1..dbd09e0c1 100644 --- a/rust/src/models/application_out.rs +++ b/rust/src/models/application_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,38 +12,43 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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, - /// The app's UID - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] - pub uid: Option, - #[serde(rename = "updatedAt")] - pub updated_at: String, - } - impl ApplicationOut { - pub fn new(created_at: String, id: String, metadata: std::collections::HashMap, name: String, updated_at: String) -> ApplicationOut { - ApplicationOut { - created_at, - id, - metadata, - name, - rate_limit: None, - uid: None, - updated_at, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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, + /// The app's UID + #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + pub uid: Option, + #[serde(rename = "updatedAt")] + pub updated_at: String, +} +impl ApplicationOut { + pub fn new( + created_at: String, + id: String, + metadata: std::collections::HashMap, + name: String, + updated_at: String, + ) -> ApplicationOut { + ApplicationOut { + created_at, + id, + metadata, + name, + rate_limit: None, + uid: None, + updated_at, + } + } +} diff --git a/rust/src/models/application_patch.rs b/rust/src/models/application_patch.rs index 5b97ea7e0..57cbab89f 100644 --- a/rust/src/models/application_patch.rs +++ b/rust/src/models/application_patch.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,28 +12,37 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct ApplicationPatch { - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option>, - #[serde(rename = "name", 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>, - /// The app's UID - #[serde(rename = "uid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub uid: Option>, - } - impl ApplicationPatch { - pub fn new() -> ApplicationPatch { - ApplicationPatch { - metadata: None, - name: None, - rate_limit: None, - uid: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationPatch { + #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + pub metadata: Option>, + #[serde(rename = "name", 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>, + /// The app's UID + #[serde( + rename = "uid", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub uid: Option>, +} +impl ApplicationPatch { + pub fn new() -> ApplicationPatch { + ApplicationPatch { + metadata: None, + name: None, + rate_limit: None, + uid: None, + } + } +} diff --git a/rust/src/models/application_stats.rs b/rust/src/models/application_stats.rs index 2a22c301a..742ed0b8c 100644 --- a/rust/src/models/application_stats.rs +++ b/rust/src/models/application_stats.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,26 +12,25 @@ 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, - } - } - } +#[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 592c4d07e..f90ac6b63 100644 --- a/rust/src/models/application_token_expire_in.rs +++ b/rust/src/models/application_token_expire_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,19 +12,16 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct ApplicationTokenExpireIn { - /// How many seconds until the old key is expired. - #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")] - pub expiry: Option, - } - impl ApplicationTokenExpireIn { - pub fn new() -> ApplicationTokenExpireIn { - ApplicationTokenExpireIn { - expiry: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationTokenExpireIn { + /// How many seconds until the old key is expired. + #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")] + pub expiry: Option, +} +impl ApplicationTokenExpireIn { + pub fn new() -> ApplicationTokenExpireIn { + ApplicationTokenExpireIn { expiry: None } + } +} diff --git a/rust/src/models/attempt_statistics_data.rs b/rust/src/models/attempt_statistics_data.rs index c240d29ce..058146632 100644 --- a/rust/src/models/attempt_statistics_data.rs +++ b/rust/src/models/attempt_statistics_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ 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, - } - } - } +#[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 index 671cb517a..21f50b1f6 100644 --- a/rust/src/models/attempt_statistics_response.rs +++ b/rust/src/models/attempt_statistics_response.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,31 @@ 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, - } - } - } +#[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 index f12ea1585..01492a239 100644 --- a/rust/src/models/auth_token_out.rs +++ b/rust/src/models/auth_token_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,34 +12,33 @@ 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, - } - } - } +#[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 index bcf8c7871..9912d0d68 100644 --- a/rust/src/models/azure_blob_storage_config.rs +++ b/rust/src/models/azure_blob_storage_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 29ae750ad..71146d6a2 100644 --- a/rust/src/models/background_task_out.rs +++ b/rust/src/models/background_task_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,31 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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, - } - impl BackgroundTaskOut { - pub fn new(data: serde_json::Value, id: String, status: models::BackgroundTaskStatus, task: models::BackgroundTaskType) -> BackgroundTaskOut { - BackgroundTaskOut { - data, - id, - status, - task, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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, +} +impl BackgroundTaskOut { + pub fn new( + data: serde_json::Value, + id: String, + status: models::BackgroundTaskStatus, + task: models::BackgroundTaskType, + ) -> BackgroundTaskOut { + BackgroundTaskOut { + data, + id, + status, + task, + } + } +} diff --git a/rust/src/models/background_task_status.rs b/rust/src/models/background_task_status.rs index 84d71b290..89b066161 100644 --- a/rust/src/models/background_task_status.rs +++ b/rust/src/models/background_task_status.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,32 +12,30 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - /// - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] - pub enum BackgroundTaskStatus { - #[serde(rename = "running")] - Running, - #[serde(rename = "finished")] - Finished, - #[serde(rename = "failed")] - Failed, - - } - impl std::fmt::Display for BackgroundTaskStatus { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Running => write!(f, "running"), - Self::Finished => write!(f, "finished"), - Self::Failed => write!(f, "failed"), - } - } - } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum BackgroundTaskStatus { + #[serde(rename = "running")] + Running, + #[serde(rename = "finished")] + Finished, + #[serde(rename = "failed")] + Failed, +} - impl Default for BackgroundTaskStatus { - fn default() -> BackgroundTaskStatus { - Self::Running - } - } +impl std::fmt::Display for BackgroundTaskStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Running => write!(f, "running"), + Self::Finished => write!(f, "finished"), + Self::Failed => write!(f, "failed"), + } + } +} +impl Default for BackgroundTaskStatus { + fn default() -> BackgroundTaskStatus { + Self::Running + } +} diff --git a/rust/src/models/background_task_type.rs b/rust/src/models/background_task_type.rs index 89b2770fa..2593b356c 100644 --- a/rust/src/models/background_task_type.rs +++ b/rust/src/models/background_task_type.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,41 +12,39 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - /// - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] - pub enum BackgroundTaskType { - #[serde(rename = "endpoint.replay")] - EndpointPeriodReplay, - #[serde(rename = "endpoint.recover")] - EndpointPeriodRecover, - #[serde(rename = "application.stats")] - ApplicationPeriodStats, - #[serde(rename = "message.broadcast")] - MessagePeriodBroadcast, - #[serde(rename = "sdk.generate")] - SdkPeriodGenerate, - #[serde(rename = "event-type.aggregate")] - EventTypePeriodAggregate, - - } - impl std::fmt::Display for BackgroundTaskType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::EndpointPeriodReplay => write!(f, "endpoint.replay"), - Self::EndpointPeriodRecover => write!(f, "endpoint.recover"), - Self::ApplicationPeriodStats => write!(f, "application.stats"), - Self::MessagePeriodBroadcast => write!(f, "message.broadcast"), - Self::SdkPeriodGenerate => write!(f, "sdk.generate"), - Self::EventTypePeriodAggregate => write!(f, "event-type.aggregate"), - } - } - } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum BackgroundTaskType { + #[serde(rename = "endpoint.replay")] + EndpointPeriodReplay, + #[serde(rename = "endpoint.recover")] + EndpointPeriodRecover, + #[serde(rename = "application.stats")] + ApplicationPeriodStats, + #[serde(rename = "message.broadcast")] + MessagePeriodBroadcast, + #[serde(rename = "sdk.generate")] + SdkPeriodGenerate, + #[serde(rename = "event-type.aggregate")] + EventTypePeriodAggregate, +} - impl Default for BackgroundTaskType { - fn default() -> BackgroundTaskType { - Self::EndpointPeriodReplay - } - } +impl std::fmt::Display for BackgroundTaskType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::EndpointPeriodReplay => write!(f, "endpoint.replay"), + Self::EndpointPeriodRecover => write!(f, "endpoint.recover"), + Self::ApplicationPeriodStats => write!(f, "application.stats"), + Self::MessagePeriodBroadcast => write!(f, "message.broadcast"), + Self::SdkPeriodGenerate => write!(f, "sdk.generate"), + Self::EventTypePeriodAggregate => write!(f, "event-type.aggregate"), + } + } +} +impl Default for BackgroundTaskType { + fn default() -> BackgroundTaskType { + Self::EndpointPeriodReplay + } +} diff --git a/rust/src/models/big_query_config.rs b/rust/src/models/big_query_config.rs index 75ee5fecd..993e5bbd7 100644 --- a/rust/src/models/big_query_config.rs +++ b/rust/src/models/big_query_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,34 @@ 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, - } - } - } +/// 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 index c429a1387..bc75a87b5 100644 --- a/rust/src/models/border_radius_config.rs +++ b/rust/src/models/border_radius_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 index 31b02997e..c36191d02 100644 --- a/rust/src/models/border_radius_enum.rs +++ b/rust/src/models/border_radius_enum.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,38 +12,36 @@ 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"), - } - } - } +/// +#[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 Default for BorderRadiusEnum { - fn default() -> BorderRadiusEnum { - Self::None - } - } +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 index d6e613312..32397e7df 100644 --- a/rust/src/models/client_secret_jwt_params_in.rs +++ b/rust/src/models/client_secret_jwt_params_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,34 @@ 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, - } - } - } +#[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 index 6829a81a0..16849f5f0 100644 --- a/rust/src/models/completion_choice.rs +++ b/rust/src/models/completion_choice.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,27 @@ 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), - } - } - } +#[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 index 0ac2a1ed7..22e890497 100644 --- a/rust/src/models/completion_message.rs +++ b/rust/src/models/completion_message.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,17 @@ 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, - } - } - } +#[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 index b42258883..577ec794b 100644 --- a/rust/src/models/count_out.rs +++ b/rust/src/models/count_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,23 +12,24 @@ 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, - } - } - } +#[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 index 0027c0cb1..e810387c6 100644 --- a/rust/src/models/create_stream_in.rs +++ b/rust/src/models/create_stream_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ 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, - } - } - } +#[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 index e010e00e4..a318598db 100644 --- a/rust/src/models/create_token_in.rs +++ b/rust/src/models/create_token_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,23 +12,19 @@ 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, - } - } - } +#[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 index e6cafb07b..75f5f4af8 100644 --- a/rust/src/models/custom_color_palette.rs +++ b/rust/src/models/custom_color_palette.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,42 +12,44 @@ 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, - } - } - } +#[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 index 18ce090df..3b449c1a4 100644 --- a/rust/src/models/custom_strings_override.rs +++ b/rust/src/models/custom_strings_override.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 index 4f7d79803..a7c15d275 100644 --- a/rust/src/models/custom_theme_override.rs +++ b/rust/src/models/custom_theme_override.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ 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, - } - } - } +#[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 a3a198775..d37e28a88 100644 --- a/rust/src/models/dashboard_access_out.rs +++ b/rust/src/models/dashboard_access_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,17 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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 } + } +} diff --git a/rust/src/models/duration.rs b/rust/src/models/duration.rs index 9c623f0ae..a28a430d2 100644 --- a/rust/src/models/duration.rs +++ b/rust/src/models/duration.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,17 @@ 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, - } - } - } +#[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 index 2ff50559a..2c5d9bcd5 100644 --- a/rust/src/models/endpoint_created_event.rs +++ b/rust/src/models/endpoint_created_event.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,34 @@ 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, - } +/// 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 Default for Type { - fn default() -> Type { - Self::EndpointPeriodCreated - } - } +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 index 03283027e..750e021b6 100644 --- a/rust/src/models/endpoint_created_event_data.rs +++ b/rust/src/models/endpoint_created_event_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,33 @@ 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, - } - } - } +/// 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 index 0857081f3..89dd96f9a 100644 --- a/rust/src/models/endpoint_deleted_event.rs +++ b/rust/src/models/endpoint_deleted_event.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,34 @@ 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, - } +/// 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 Default for Type { - fn default() -> Type { - Self::EndpointPeriodDeleted - } - } +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 index a72b4d62c..2289491ff 100644 --- a/rust/src/models/endpoint_deleted_event_data.rs +++ b/rust/src/models/endpoint_deleted_event_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,33 @@ 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, - } - } - } +/// 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 index ffebac78f..5b6d5fd28 100644 --- a/rust/src/models/endpoint_disabled_event.rs +++ b/rust/src/models/endpoint_disabled_event.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,36 @@ 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, - } +/// 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 Default for Type { - fn default() -> Type { - Self::EndpointPeriodDisabled - } - } +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 index d8e03dec3..252bafe2e 100644 --- a/rust/src/models/endpoint_disabled_event_data.rs +++ b/rust/src/models/endpoint_disabled_event_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,36 +12,41 @@ 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, - } - } - } +/// 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 61357862e..e9f3ab60f 100644 --- a/rust/src/models/endpoint_headers_in.rs +++ b/rust/src/models/endpoint_headers_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EndpointHeadersIn { - #[serde(rename = "headers")] - pub headers: std::collections::HashMap, - } - impl EndpointHeadersIn { - pub fn new(headers: std::collections::HashMap) -> EndpointHeadersIn { - EndpointHeadersIn { - headers, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EndpointHeadersIn { + #[serde(rename = "headers")] + pub headers: std::collections::HashMap, +} +impl EndpointHeadersIn { + pub fn new(headers: std::collections::HashMap) -> EndpointHeadersIn { + EndpointHeadersIn { headers } + } +} diff --git a/rust/src/models/endpoint_headers_out.rs b/rust/src/models/endpoint_headers_out.rs index d3145c793..3013766f8 100644 --- a/rust/src/models/endpoint_headers_out.rs +++ b/rust/src/models/endpoint_headers_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,23 +12,25 @@ use crate::models; #[allow(unused_imports)] 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)] - 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, - } - } - } +/// 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)] +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 } + } +} diff --git a/rust/src/models/endpoint_headers_patch_in.rs b/rust/src/models/endpoint_headers_patch_in.rs index 3bc5d983b..c2b7f5703 100644 --- a/rust/src/models/endpoint_headers_patch_in.rs +++ b/rust/src/models/endpoint_headers_patch_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EndpointHeadersPatchIn { - #[serde(rename = "headers")] - pub headers: std::collections::HashMap, - } - impl EndpointHeadersPatchIn { - pub fn new(headers: std::collections::HashMap) -> EndpointHeadersPatchIn { - EndpointHeadersPatchIn { - headers, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EndpointHeadersPatchIn { + #[serde(rename = "headers")] + pub headers: std::collections::HashMap, +} +impl EndpointHeadersPatchIn { + pub fn new(headers: std::collections::HashMap) -> EndpointHeadersPatchIn { + EndpointHeadersPatchIn { headers } + } +} diff --git a/rust/src/models/endpoint_in.rs b/rust/src/models/endpoint_in.rs index b015de456..1c0932043 100644 --- a/rust/src/models/endpoint_in.rs +++ b/rust/src/models/endpoint_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,48 +12,49 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EndpointIn { - /// List of message channels this endpoint listens to (omit for all). - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] - pub channels: Option>, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] - pub disabled: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] - pub filter_types: Option>, - #[serde(rename = "metadata", 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")] - pub secret: Option, - /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", 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, - } - impl EndpointIn { - pub fn new(url: String) -> EndpointIn { - EndpointIn { - channels: None, - description: None, - disabled: None, - filter_types: None, - metadata: None, - rate_limit: None, - secret: None, - uid: None, - url, - version: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EndpointIn { + /// List of message channels this endpoint listens to (omit for all). + #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + pub channels: Option>, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + pub filter_types: Option>, + #[serde(rename = "metadata", 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")] + pub secret: Option, + /// Optional unique identifier for the endpoint. + #[serde(rename = "uid", 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, +} +impl EndpointIn { + pub fn new(url: String) -> EndpointIn { + EndpointIn { + channels: None, + description: None, + disabled: None, + filter_types: None, + metadata: None, + rate_limit: None, + secret: None, + uid: None, + url, + version: None, + } + } +} diff --git a/rust/src/models/endpoint_message_out.rs b/rust/src/models/endpoint_message_out.rs index fd3c7a264..d52f74b0e 100644 --- a/rust/src/models/endpoint_message_out.rs +++ b/rust/src/models/endpoint_message_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,48 +12,55 @@ use crate::models; #[allow(unused_imports)] 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)] - pub struct EndpointMessageOut { - /// 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, - /// The msg's ID - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "nextAttempt", 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 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, timestamp: String) -> EndpointMessageOut { - EndpointMessageOut { - channels: None, - event_id: None, - event_type, - id, - next_attempt: None, - payload, - status, - tags: None, - timestamp, - } - } - } +/// 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)] +pub struct EndpointMessageOut { + /// 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, + /// The msg's ID + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "nextAttempt", 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 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, + timestamp: String, + ) -> EndpointMessageOut { + EndpointMessageOut { + channels: None, + event_id: None, + event_type, + id, + next_attempt: None, + payload, + status, + tags: None, + timestamp, + } + } +} diff --git a/rust/src/models/endpoint_mtls_config_in.rs b/rust/src/models/endpoint_mtls_config_in.rs index 5ea408bda..0ced00775 100644 --- a/rust/src/models/endpoint_mtls_config_in.rs +++ b/rust/src/models/endpoint_mtls_config_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,23 +12,24 @@ 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, - } - } - } +#[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 index 53fa56b88..515a309ea 100644 --- a/rust/src/models/endpoint_oauth_config_in.rs +++ b/rust/src/models/endpoint_oauth_config_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,48 +12,55 @@ 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, - } - } - } +#[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 53bb6ef03..4c665ef7f 100644 --- a/rust/src/models/endpoint_out.rs +++ b/rust/src/models/endpoint_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,55 +12,62 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EndpointOut { - /// List of message channels this endpoint listens to (omit for all). - #[serde(rename = "channels", 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")] - pub disabled: Option, - #[serde(rename = "filterTypes", 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, - /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", 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")] - pub version: i32, - } - impl EndpointOut { - pub fn new(created_at: String, description: String, id: String, metadata: std::collections::HashMap, updated_at: String, url: String, version: i32) -> EndpointOut { - EndpointOut { - channels: None, - created_at, - description, - disabled: None, - filter_types: None, - id, - metadata, - rate_limit: None, - uid: None, - updated_at, - url, - version, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EndpointOut { + /// List of message channels this endpoint listens to (omit for all). + #[serde(rename = "channels", 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")] + pub disabled: Option, + #[serde(rename = "filterTypes", 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, + /// Optional unique identifier for the endpoint. + #[serde(rename = "uid", 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")] + pub version: i32, +} +impl EndpointOut { + pub fn new( + created_at: String, + description: String, + id: String, + metadata: std::collections::HashMap, + updated_at: String, + url: String, + version: i32, + ) -> EndpointOut { + EndpointOut { + channels: None, + created_at, + description, + disabled: None, + filter_types: None, + id, + metadata, + rate_limit: None, + uid: None, + updated_at, + url, + version, + } + } +} diff --git a/rust/src/models/endpoint_patch.rs b/rust/src/models/endpoint_patch.rs index 999cac9f6..fe19dff76 100644 --- a/rust/src/models/endpoint_patch.rs +++ b/rust/src/models/endpoint_patch.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,47 +12,73 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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")] - pub description: Option, - #[serde(rename = "disabled", 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")] - 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>, - /// 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")] - pub url: Option, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, - } - impl EndpointPatch { - pub fn new() -> EndpointPatch { - EndpointPatch { - channels: None, - description: None, - disabled: None, - filter_types: None, - metadata: None, - rate_limit: None, - secret: None, - uid: None, - url: None, - version: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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")] + pub description: Option, + #[serde(rename = "disabled", 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")] + 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>, + /// 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")] + pub url: Option, + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, +} +impl EndpointPatch { + pub fn new() -> EndpointPatch { + EndpointPatch { + channels: None, + description: None, + disabled: None, + filter_types: None, + metadata: None, + rate_limit: None, + secret: None, + uid: None, + url: None, + version: None, + } + } +} diff --git a/rust/src/models/endpoint_secret_out.rs b/rust/src/models/endpoint_secret_out.rs index ef80d9709..11b3ee052 100644 --- a/rust/src/models/endpoint_secret_out.rs +++ b/rust/src/models/endpoint_secret_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,19 +12,18 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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")] - pub key: String, - } - impl EndpointSecretOut { - pub fn new(key: String) -> EndpointSecretOut { - EndpointSecretOut { - key, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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")] + pub key: String, +} +impl EndpointSecretOut { + pub fn new(key: String) -> EndpointSecretOut { + EndpointSecretOut { key } + } +} diff --git a/rust/src/models/endpoint_secret_rotate_in.rs b/rust/src/models/endpoint_secret_rotate_in.rs index 164c0b5f1..70c98096d 100644 --- a/rust/src/models/endpoint_secret_rotate_in.rs +++ b/rust/src/models/endpoint_secret_rotate_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,19 +12,18 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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")] - pub key: Option, - } - impl EndpointSecretRotateIn { - pub fn new() -> EndpointSecretRotateIn { - EndpointSecretRotateIn { - key: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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")] + pub key: Option, +} +impl EndpointSecretRotateIn { + pub fn new() -> EndpointSecretRotateIn { + EndpointSecretRotateIn { key: None } + } +} diff --git a/rust/src/models/endpoint_stats.rs b/rust/src/models/endpoint_stats.rs index 8f7a1e824..d248185c7 100644 --- a/rust/src/models/endpoint_stats.rs +++ b/rust/src/models/endpoint_stats.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,26 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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, - } - impl EndpointStats { - pub fn new(fail: i64, pending: i64, sending: i64, success: i64) -> EndpointStats { - EndpointStats { - fail, - pending, - sending, - success, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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, +} +impl EndpointStats { + pub fn new(fail: i64, pending: i64, sending: i64, success: i64) -> EndpointStats { + EndpointStats { + fail, + pending, + sending, + success, + } + } +} diff --git a/rust/src/models/endpoint_transformation_in.rs b/rust/src/models/endpoint_transformation_in.rs index 332b7a5d8..c7ddb59e1 100644 --- a/rust/src/models/endpoint_transformation_in.rs +++ b/rust/src/models/endpoint_transformation_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EndpointTransformationIn { - #[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 EndpointTransformationIn { - pub fn new() -> EndpointTransformationIn { - EndpointTransformationIn { - code: None, - enabled: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EndpointTransformationIn { + #[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 EndpointTransformationIn { + pub fn new() -> EndpointTransformationIn { + EndpointTransformationIn { + code: None, + enabled: None, + } + } +} diff --git a/rust/src/models/endpoint_transformation_out.rs b/rust/src/models/endpoint_transformation_out.rs index e3fb3d9ed..9882926fd 100644 --- a/rust/src/models/endpoint_transformation_out.rs +++ b/rust/src/models/endpoint_transformation_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EndpointTransformationOut { - #[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 EndpointTransformationOut { - pub fn new() -> EndpointTransformationOut { - EndpointTransformationOut { - code: None, - enabled: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EndpointTransformationOut { + #[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 EndpointTransformationOut { + pub fn new() -> EndpointTransformationOut { + EndpointTransformationOut { + code: None, + enabled: None, + } + } +} diff --git a/rust/src/models/endpoint_transformation_simulate_in.rs b/rust/src/models/endpoint_transformation_simulate_in.rs index 94f37a764..e9ecb5494 100644 --- a/rust/src/models/endpoint_transformation_simulate_in.rs +++ b/rust/src/models/endpoint_transformation_simulate_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,28 +12,31 @@ 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, - } - } - } +#[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 index 6e722f0fd..ff3522de8 100644 --- a/rust/src/models/endpoint_transformation_simulate_out.rs +++ b/rust/src/models/endpoint_transformation_simulate_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 85efa00d3..51abcf825 100644 --- a/rust/src/models/endpoint_update.rs +++ b/rust/src/models/endpoint_update.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,44 +12,43 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EndpointUpdate { - /// List of message channels this endpoint listens to (omit for all). - #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] - pub channels: Option>, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] - pub disabled: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] - pub filter_types: Option>, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option>, - #[serde(rename = "rateLimit", 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")] - pub uid: Option, - #[serde(rename = "url")] - pub url: String, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, - } - impl EndpointUpdate { - pub fn new(url: String) -> EndpointUpdate { - EndpointUpdate { - channels: None, - description: None, - disabled: None, - filter_types: None, - metadata: None, - rate_limit: None, - uid: None, - url, - version: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EndpointUpdate { + /// List of message channels this endpoint listens to (omit for all). + #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + pub channels: Option>, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + pub filter_types: Option>, + #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + pub metadata: Option>, + #[serde(rename = "rateLimit", 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")] + pub uid: Option, + #[serde(rename = "url")] + pub url: String, + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, +} +impl EndpointUpdate { + pub fn new(url: String) -> EndpointUpdate { + EndpointUpdate { + channels: None, + description: None, + disabled: None, + filter_types: None, + metadata: None, + rate_limit: None, + uid: None, + url, + version: None, + } + } +} diff --git a/rust/src/models/endpoint_updated_event.rs b/rust/src/models/endpoint_updated_event.rs index 4c650435b..ec39ea608 100644 --- a/rust/src/models/endpoint_updated_event.rs +++ b/rust/src/models/endpoint_updated_event.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,34 @@ 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, - } +/// 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 Default for Type { - fn default() -> Type { - Self::EndpointPeriodUpdated - } - } +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 index 11774e277..4153d3ae4 100644 --- a/rust/src/models/endpoint_updated_event_data.rs +++ b/rust/src/models/endpoint_updated_event_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,33 @@ 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, - } - } - } +/// 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 896ce15ee..0ba652616 100644 --- a/rust/src/models/environment_in.rs +++ b/rust/src/models/environment_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,26 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EnvironmentIn { - #[serde(rename = "eventTypes", skip_serializing_if = "Option::is_none")] - pub event_types: Option>, - #[serde(rename = "settings", deserialize_with = "Option::deserialize")] - pub settings: Option, - #[serde(rename = "transformationTemplates", skip_serializing_if = "Option::is_none")] - pub transformation_templates: Option>, - } - impl EnvironmentIn { - pub fn new(settings: Option) -> EnvironmentIn { - EnvironmentIn { - event_types: None, - settings, - transformation_templates: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EnvironmentIn { + #[serde(rename = "eventTypes", skip_serializing_if = "Option::is_none")] + pub event_types: Option>, + #[serde(rename = "settings", deserialize_with = "Option::deserialize")] + pub settings: Option, + #[serde( + rename = "transformationTemplates", + skip_serializing_if = "Option::is_none" + )] + pub transformation_templates: Option>, +} +impl EnvironmentIn { + pub fn new(settings: Option) -> EnvironmentIn { + EnvironmentIn { + event_types: None, + settings, + transformation_templates: None, + } + } +} diff --git a/rust/src/models/environment_out.rs b/rust/src/models/environment_out.rs index 09ec79275..3f7d1e9b0 100644 --- a/rust/src/models/environment_out.rs +++ b/rust/src/models/environment_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,34 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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, - #[serde(rename = "transformationTemplates")] - pub transformation_templates: Vec, - #[serde(rename = "version", 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 { - created_at, - event_types, - settings, - transformation_templates, - version: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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, + #[serde(rename = "transformationTemplates")] + pub transformation_templates: Vec, + #[serde(rename = "version", 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 { + created_at, + event_types, + settings, + transformation_templates, + version: None, + } + } +} diff --git a/rust/src/models/environment_settings_out.rs b/rust/src/models/environment_settings_out.rs index 20fa3be48..85a351e32 100644 --- a/rust/src/models/environment_settings_out.rs +++ b/rust/src/models/environment_settings_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,63 +12,83 @@ 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, - } - } - } +#[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 807818951..20197ba3b 100644 --- a/rust/src/models/event_example_in.rs +++ b/rust/src/models/event_example_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,23 +12,24 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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")] - pub example_index: Option, - } - impl EventExampleIn { - pub fn new(event_type: String) -> EventExampleIn { - EventExampleIn { - event_type, - example_index: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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")] + pub example_index: Option, +} +impl EventExampleIn { + pub fn new(event_type: String) -> EventExampleIn { + EventExampleIn { + event_type, + example_index: None, + } + } +} diff --git a/rust/src/models/event_in.rs b/rust/src/models/event_in.rs index 65eef08e1..6c1a0c7f2 100644 --- a/rust/src/models/event_in.rs +++ b/rust/src/models/event_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,22 +12,21 @@ 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, - } - } - } +#[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 index 7938ade22..819d6c42b 100644 --- a/rust/src/models/event_out.rs +++ b/rust/src/models/event_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,25 +12,24 @@ 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, - } - } - } +#[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 index 3a96bf1a6..fb3cafbaa 100644 --- a/rust/src/models/event_stream_out.rs +++ b/rust/src/models/event_stream_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 index 57158dacc..37d82ad9c 100644 --- a/rust/src/models/event_type_example_out.rs +++ b/rust/src/models/event_type_example_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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 7d23ad3fe..159435f0b 100644 --- a/rust/src/models/event_type_from_open_api.rs +++ b/rust/src/models/event_type_from_open_api.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,34 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EventTypeFromOpenApi { - #[serde(rename = "deprecated")] - pub deprecated: bool, - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "featureFlag", 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")] - pub group_name: Option, - /// The event type's name - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "schemas", skip_serializing_if = "Option::is_none")] - pub schemas: Option, - } - impl EventTypeFromOpenApi { - pub fn new(deprecated: bool, description: String, name: String) -> EventTypeFromOpenApi { - EventTypeFromOpenApi { - deprecated, - description, - feature_flag: None, - group_name: None, - name, - schemas: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventTypeFromOpenApi { + #[serde(rename = "deprecated")] + pub deprecated: bool, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "featureFlag", 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")] + pub group_name: Option, + /// The event type's name + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "schemas", skip_serializing_if = "Option::is_none")] + pub schemas: Option, +} +impl EventTypeFromOpenApi { + pub fn new(deprecated: bool, description: String, name: String) -> EventTypeFromOpenApi { + EventTypeFromOpenApi { + deprecated, + description, + feature_flag: None, + group_name: None, + name, + schemas: 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 5850326fc..70b1285e5 100644 --- a/rust/src/models/event_type_import_open_api_in.rs +++ b/rust/src/models/event_type_import_open_api_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,29 +12,37 @@ use crate::models; #[allow(unused_imports)] 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)] - 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")] - pub dry_run: Option, - /// A pre-parsed JSON spec. - #[serde(rename = "spec", 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")] - 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 { - dry_run: None, - spec: None, - spec_raw: None, - } - } - } +/// 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)] +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")] + pub dry_run: Option, + /// A pre-parsed JSON spec. + #[serde(rename = "spec", 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")] + 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 { + 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 31b7d8acf..0e23f754b 100644 --- a/rust/src/models/event_type_import_open_api_out.rs +++ b/rust/src/models/event_type_import_open_api_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,17 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EventTypeImportOpenApiOut { - #[serde(rename = "data")] - pub data: Box, - } - impl EventTypeImportOpenApiOut { - pub fn new(data: models::EventTypeImportOpenApiOutData) -> EventTypeImportOpenApiOut { - EventTypeImportOpenApiOut { - data: Box::new(data), - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventTypeImportOpenApiOut { + #[serde(rename = "data")] + pub data: Box, +} +impl EventTypeImportOpenApiOut { + pub fn new(data: models::EventTypeImportOpenApiOutData) -> EventTypeImportOpenApiOut { + EventTypeImportOpenApiOut { + data: Box::new(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 1f2f3406f..ea737ef1c 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 @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EventTypeImportOpenApiOutData { - #[serde(rename = "modified")] - pub modified: Vec, - #[serde(rename = "to_modify", skip_serializing_if = "Option::is_none")] - pub to_modify: Option>, - } - impl EventTypeImportOpenApiOutData { - pub fn new(modified: Vec) -> EventTypeImportOpenApiOutData { - EventTypeImportOpenApiOutData { - modified, - to_modify: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventTypeImportOpenApiOutData { + #[serde(rename = "modified")] + pub modified: Vec, + #[serde(rename = "to_modify", skip_serializing_if = "Option::is_none")] + pub to_modify: Option>, +} +impl EventTypeImportOpenApiOutData { + pub fn new(modified: Vec) -> EventTypeImportOpenApiOutData { + EventTypeImportOpenApiOutData { + modified, + to_modify: None, + } + } +} diff --git a/rust/src/models/event_type_in.rs b/rust/src/models/event_type_in.rs index 118398758..fb6e39a22 100644 --- a/rust/src/models/event_type_in.rs +++ b/rust/src/models/event_type_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,39 +12,38 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EventTypeIn { - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] - pub archived: Option, - #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] - pub deprecated: Option, - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "featureFlag", 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")] - 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")] - pub schemas: Option, - } - impl EventTypeIn { - pub fn new(description: String, name: String) -> EventTypeIn { - EventTypeIn { - archived: None, - deprecated: None, - description, - feature_flag: None, - group_name: None, - name, - schemas: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventTypeIn { + #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + pub archived: Option, + #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] + pub deprecated: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "featureFlag", 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")] + 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")] + pub schemas: Option, +} +impl EventTypeIn { + pub fn new(description: String, name: String) -> EventTypeIn { + EventTypeIn { + archived: None, + deprecated: None, + description, + feature_flag: None, + group_name: None, + name, + schemas: None, + } + } +} diff --git a/rust/src/models/event_type_out.rs b/rust/src/models/event_type_out.rs index 499ecbb5e..814669791 100644 --- a/rust/src/models/event_type_out.rs +++ b/rust/src/models/event_type_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,45 +12,50 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EventTypeOut { - #[serde(rename = "archived", 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")] - pub feature_flag: Option, - /// The event type group's name - #[serde(rename = "groupName", 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")] - pub schemas: Option, - #[serde(rename = "updatedAt")] - pub updated_at: String, - } - impl EventTypeOut { - pub fn new(created_at: String, deprecated: bool, description: String, name: String, updated_at: String) -> EventTypeOut { - EventTypeOut { - archived: None, - created_at, - deprecated, - description, - feature_flag: None, - group_name: None, - name, - schemas: None, - updated_at, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventTypeOut { + #[serde(rename = "archived", 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")] + pub feature_flag: Option, + /// The event type group's name + #[serde(rename = "groupName", 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")] + pub schemas: Option, + #[serde(rename = "updatedAt")] + pub updated_at: String, +} +impl EventTypeOut { + pub fn new( + created_at: String, + deprecated: bool, + description: String, + name: String, + updated_at: String, + ) -> EventTypeOut { + EventTypeOut { + archived: None, + created_at, + deprecated, + description, + feature_flag: None, + group_name: None, + name, + schemas: None, + updated_at, + } + } +} diff --git a/rust/src/models/event_type_patch.rs b/rust/src/models/event_type_patch.rs index ad27491fe..979b34ab0 100644 --- a/rust/src/models/event_type_patch.rs +++ b/rust/src/models/event_type_patch.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,34 +12,48 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EventTypePatch { - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] - pub archived: Option, - #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] - pub deprecated: Option, - #[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>, - /// 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>, - } - impl EventTypePatch { - pub fn new() -> EventTypePatch { - EventTypePatch { - archived: None, - deprecated: None, - description: None, - feature_flag: None, - group_name: None, - schemas: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventTypePatch { + #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + pub archived: Option, + #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] + pub deprecated: Option, + #[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>, + /// 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>, +} +impl EventTypePatch { + pub fn new() -> EventTypePatch { + EventTypePatch { + archived: None, + deprecated: None, + description: None, + feature_flag: None, + group_name: None, + schemas: None, + } + } +} diff --git a/rust/src/models/event_type_schema_in.rs b/rust/src/models/event_type_schema_in.rs index 896497bc0..25a092885 100644 --- a/rust/src/models/event_type_schema_in.rs +++ b/rust/src/models/event_type_schema_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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 21f88ce05..d4eb398bc 100644 --- a/rust/src/models/event_type_update.rs +++ b/rust/src/models/event_type_update.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,34 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct EventTypeUpdate { - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] - pub archived: Option, - #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] - pub deprecated: Option, - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "featureFlag", 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")] - 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")] - pub schemas: Option, - } - impl EventTypeUpdate { - pub fn new(description: String) -> EventTypeUpdate { - EventTypeUpdate { - archived: None, - deprecated: None, - description, - feature_flag: None, - group_name: None, - schemas: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventTypeUpdate { + #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + pub archived: Option, + #[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")] + pub deprecated: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "featureFlag", 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")] + 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")] + pub schemas: Option, +} +impl EventTypeUpdate { + pub fn new(description: String) -> EventTypeUpdate { + EventTypeUpdate { + archived: None, + deprecated: None, + description, + feature_flag: None, + group_name: None, + schemas: None, + } + } +} diff --git a/rust/src/models/export_event_type_out.rs b/rust/src/models/export_event_type_out.rs index 09d8aa455..b3557c479 100644 --- a/rust/src/models/export_event_type_out.rs +++ b/rust/src/models/export_event_type_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 index 990fe2d01..36243f933 100644 --- a/rust/src/models/font_size_config.rs +++ b/rust/src/models/font_size_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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 index 23fe57e91..f0fd6d535 100644 --- a/rust/src/models/generate_in.rs +++ b/rust/src/models/generate_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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 index a5952aca2..35426b4d4 100644 --- a/rust/src/models/generate_out.rs +++ b/rust/src/models/generate_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,35 @@ 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, - } - } - } +#[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 index c43e99a5c..54e25a6e9 100644 --- a/rust/src/models/google_cloud_storage_config.rs +++ b/rust/src/models/google_cloud_storage_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,26 @@ 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, - } - } - } +/// 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/http_error_out.rs b/rust/src/models/http_error_out.rs index f7e24b654..f6f090d0d 100644 --- a/rust/src/models/http_error_out.rs +++ b/rust/src/models/http_error_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,17 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct HttpErrorOut { - #[serde(rename = "code")] - pub code: String, - #[serde(rename = "detail")] - pub detail: String, - } - impl HttpErrorOut { - pub fn new(code: String, detail: String) -> HttpErrorOut { - HttpErrorOut { - code, - detail, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct HttpErrorOut { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "detail")] + pub detail: String, +} +impl HttpErrorOut { + pub fn new(code: String, detail: String) -> HttpErrorOut { + HttpErrorOut { code, detail } + } +} diff --git a/rust/src/models/http_validation_error.rs b/rust/src/models/http_validation_error.rs index 1fc749c4e..f40e60945 100644 --- a/rust/src/models/http_validation_error.rs +++ b/rust/src/models/http_validation_error.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct HttpValidationError { - #[serde(rename = "detail")] - pub detail: Vec, - } - impl HttpValidationError { - pub fn new(detail: Vec) -> HttpValidationError { - HttpValidationError { - detail, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct HttpValidationError { + #[serde(rename = "detail")] + pub detail: Vec, +} +impl HttpValidationError { + pub fn new(detail: Vec) -> HttpValidationError { + HttpValidationError { detail } + } +} diff --git a/rust/src/models/hubspot_oauth_config_in.rs b/rust/src/models/hubspot_oauth_config_in.rs index 82ec3d792..a539671f8 100644 --- a/rust/src/models/hubspot_oauth_config_in.rs +++ b/rust/src/models/hubspot_oauth_config_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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 index 78bf0acb4..756d95352 100644 --- a/rust/src/models/inbound_path_params.rs +++ b/rust/src/models/inbound_path_params.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,22 +12,21 @@ 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, - } - } - } +#[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 index 9eb460505..b1d9ef9f8 100644 --- a/rust/src/models/incoming_webhook_payload_out.rs +++ b/rust/src/models/incoming_webhook_payload_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 48b8defcf..cc1b5a129 100644 --- a/rust/src/models/integration_in.rs +++ b/rust/src/models/integration_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct IntegrationIn { - #[serde(rename = "name")] - pub name: String, - } - impl IntegrationIn { - pub fn new(name: String) -> IntegrationIn { - IntegrationIn { - name, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IntegrationIn { + #[serde(rename = "name")] + pub name: String, +} +impl IntegrationIn { + pub fn new(name: String) -> IntegrationIn { + IntegrationIn { name } + } +} diff --git a/rust/src/models/integration_key_out.rs b/rust/src/models/integration_key_out.rs index 2b59044fc..78e605655 100644 --- a/rust/src/models/integration_key_out.rs +++ b/rust/src/models/integration_key_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct IntegrationKeyOut { - #[serde(rename = "key")] - pub key: String, - } - impl IntegrationKeyOut { - pub fn new(key: String) -> IntegrationKeyOut { - IntegrationKeyOut { - key, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IntegrationKeyOut { + #[serde(rename = "key")] + pub key: String, +} +impl IntegrationKeyOut { + pub fn new(key: String) -> IntegrationKeyOut { + IntegrationKeyOut { key } + } +} diff --git a/rust/src/models/integration_out.rs b/rust/src/models/integration_out.rs index 01dab8606..977465342 100644 --- a/rust/src/models/integration_out.rs +++ b/rust/src/models/integration_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,28 +12,27 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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 { - created_at, - id, - name, - updated_at, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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 { + created_at, + id, + name, + updated_at, + } + } +} diff --git a/rust/src/models/integration_update.rs b/rust/src/models/integration_update.rs index c084c3e02..418efd17e 100644 --- a/rust/src/models/integration_update.rs +++ b/rust/src/models/integration_update.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct IntegrationUpdate { - #[serde(rename = "name")] - pub name: String, - } - impl IntegrationUpdate { - pub fn new(name: String) -> IntegrationUpdate { - IntegrationUpdate { - name, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IntegrationUpdate { + #[serde(rename = "name")] + pub name: String, +} +impl IntegrationUpdate { + pub fn new(name: String) -> IntegrationUpdate { + IntegrationUpdate { name } + } +} diff --git a/rust/src/models/kafka_security_protocol_type.rs b/rust/src/models/kafka_security_protocol_type.rs index ed4993aee..be2949cf8 100644 --- a/rust/src/models/kafka_security_protocol_type.rs +++ b/rust/src/models/kafka_security_protocol_type.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,32 +12,30 @@ 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"), - } - } - } +/// +#[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 Default for KafkaSecurityProtocolType { - fn default() -> KafkaSecurityProtocolType { - Self::Plaintext - } - } +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 index f633116d0..2f20510cd 100644 --- a/rust/src/models/list_response_application_out_.rs +++ b/rust/src/models/list_response_application_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index d8a84f071..f7c1bdeef 100644 --- a/rust/src/models/list_response_application_stats_.rs +++ b/rust/src/models/list_response_application_stats_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index 7c859fe2f..0aabb46fe 100644 --- a/rust/src/models/list_response_background_task_out_.rs +++ b/rust/src/models/list_response_background_task_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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 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 ListResponseBackgroundTaskOut { - pub fn new(data: Vec, done: bool, iterator: Option) -> ListResponseBackgroundTaskOut { - ListResponseBackgroundTaskOut { - data, - done, - iterator, - prev_iterator: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListResponseBackgroundTaskOut { + #[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 ListResponseBackgroundTaskOut { + pub fn new( + data: Vec, + done: bool, + iterator: Option, + ) -> ListResponseBackgroundTaskOut { + ListResponseBackgroundTaskOut { + 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 index 5f133e67c..218b67c4a 100644 --- a/rust/src/models/list_response_endpoint_message_out_.rs +++ b/rust/src/models/list_response_endpoint_message_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index e5d6c8a60..fd166c356 100644 --- a/rust/src/models/list_response_endpoint_out_.rs +++ b/rust/src/models/list_response_endpoint_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index a9ffdb60e..49f721168 100644 --- a/rust/src/models/list_response_event_type_out_.rs +++ b/rust/src/models/list_response_event_type_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index a4c7784a7..6a3902543 100644 --- a/rust/src/models/list_response_integration_out_.rs +++ b/rust/src/models/list_response_integration_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index 703b2388a..be4560c99 100644 --- a/rust/src/models/list_response_message_attempt_endpoint_out_.rs +++ b/rust/src/models/list_response_message_attempt_endpoint_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index 447d05a3d..f1b5d79ef 100644 --- a/rust/src/models/list_response_message_attempt_out_.rs +++ b/rust/src/models/list_response_message_attempt_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index d111581f4..e398bcde4 100644 --- a/rust/src/models/list_response_message_endpoint_out_.rs +++ b/rust/src/models/list_response_message_endpoint_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index 9832da2a8..a56f3727b 100644 --- a/rust/src/models/list_response_message_out_.rs +++ b/rust/src/models/list_response_message_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index 4ed492409..c16302eff 100644 --- a/rust/src/models/list_response_operational_webhook_endpoint_out_.rs +++ b/rust/src/models/list_response_operational_webhook_endpoint_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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 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 ListResponseOperationalWebhookEndpointOut { - pub fn new(data: Vec, done: bool, iterator: Option) -> ListResponseOperationalWebhookEndpointOut { - ListResponseOperationalWebhookEndpointOut { - data, - done, - iterator, - prev_iterator: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListResponseOperationalWebhookEndpointOut { + #[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 ListResponseOperationalWebhookEndpointOut { + pub fn new( + data: Vec, + done: bool, + iterator: Option, + ) -> ListResponseOperationalWebhookEndpointOut { + ListResponseOperationalWebhookEndpointOut { + data, + done, + iterator, + prev_iterator: None, + } + } +} diff --git a/rust/src/models/list_response_sink_out_.rs b/rust/src/models/list_response_sink_out_.rs index 39caedbc0..bdacb1b9e 100644 --- a/rust/src/models/list_response_sink_out_.rs +++ b/rust/src/models/list_response_sink_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index 386ea3d5a..da79805c1 100644 --- a/rust/src/models/list_response_stream_event_type_out_.rs +++ b/rust/src/models/list_response_stream_event_type_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index aaedd80f0..520a9223c 100644 --- a/rust/src/models/list_response_stream_out_.rs +++ b/rust/src/models/list_response_stream_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index c33e75a8e..efee163f1 100644 --- a/rust/src/models/list_response_stream_sink_out_.rs +++ b/rust/src/models/list_response_stream_sink_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 index ff8653664..e481b55e4 100644 --- a/rust/src/models/list_response_template_out_.rs +++ b/rust/src/models/list_response_template_out_.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,30 @@ 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, - } - } - } +#[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 4e5e4fbb6..1b805c805 100644 --- a/rust/src/models/message_attempt_endpoint_out.rs +++ b/rust/src/models/message_attempt_endpoint_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,52 +12,62 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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>, - /// 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, - #[serde(rename = "responseStatusCode")] - pub response_status_code: i32, - #[serde(rename = "status")] - pub status: models::MessageStatus, - #[serde(rename = "timestamp")] - pub timestamp: String, - #[serde(rename = "triggerType")] - pub trigger_type: models::MessageAttemptTriggerType, - #[serde(rename = "url")] - pub url: String, - } - impl MessageAttemptEndpointOut { - pub fn new(endpoint_id: String, id: String, msg_id: String, response: String, response_duration_ms: i64, response_status_code: i32, status: models::MessageStatus, timestamp: String, trigger_type: models::MessageAttemptTriggerType, url: String) -> MessageAttemptEndpointOut { - MessageAttemptEndpointOut { - endpoint_id, - id, - msg: None, - msg_id, - response, - response_duration_ms, - response_status_code, - status, - timestamp, - trigger_type, - url, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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>, + /// 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, + #[serde(rename = "responseStatusCode")] + pub response_status_code: i32, + #[serde(rename = "status")] + pub status: models::MessageStatus, + #[serde(rename = "timestamp")] + pub timestamp: String, + #[serde(rename = "triggerType")] + pub trigger_type: models::MessageAttemptTriggerType, + #[serde(rename = "url")] + pub url: String, +} +impl MessageAttemptEndpointOut { + pub fn new( + endpoint_id: String, + id: String, + msg_id: String, + response: String, + response_duration_ms: i64, + response_status_code: i32, + status: models::MessageStatus, + timestamp: String, + trigger_type: models::MessageAttemptTriggerType, + url: String, + ) -> MessageAttemptEndpointOut { + MessageAttemptEndpointOut { + endpoint_id, + id, + msg: None, + msg_id, + response, + response_duration_ms, + response_status_code, + status, + timestamp, + trigger_type, + url, + } + } +} diff --git a/rust/src/models/message_attempt_exhausted_event.rs b/rust/src/models/message_attempt_exhausted_event.rs index 09e0b1eaa..73ee8868d 100644 --- a/rust/src/models/message_attempt_exhausted_event.rs +++ b/rust/src/models/message_attempt_exhausted_event.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,39 @@ 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, - } +/// 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 Default for Type { - fn default() -> Type { - Self::MessagePeriodAttemptPeriodExhausted - } - } +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 index 9448fdc5d..b32076c59 100644 --- a/rust/src/models/message_attempt_exhausted_event_data.rs +++ b/rust/src/models/message_attempt_exhausted_event_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,40 +12,49 @@ 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, - } - } - } +/// 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 index caf4e3ca1..1e859e443 100644 --- a/rust/src/models/message_attempt_failed_data.rs +++ b/rust/src/models/message_attempt_failed_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,25 +12,28 @@ 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, - } - } - } +#[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 index 19b1a2d70..3286aaa64 100644 --- a/rust/src/models/message_attempt_failing_event.rs +++ b/rust/src/models/message_attempt_failing_event.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,41 @@ 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, - } +/// 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 Default for Type { - fn default() -> Type { - Self::MessagePeriodAttemptPeriodFailing - } - } +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 index 0aa2b57f7..a6cf23768 100644 --- a/rust/src/models/message_attempt_failing_event_data.rs +++ b/rust/src/models/message_attempt_failing_event_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,40 +12,49 @@ 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, - } - } - } +/// 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 index 2e63d421f..4427ab2f0 100644 --- a/rust/src/models/message_attempt_headers_out.rs +++ b/rust/src/models/message_attempt_headers_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,26 @@ 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, - } - } - } +#[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 440d40de0..43abc43aa 100644 --- a/rust/src/models/message_attempt_out.rs +++ b/rust/src/models/message_attempt_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,52 +12,62 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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>, - /// 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, - #[serde(rename = "responseStatusCode")] - pub response_status_code: i32, - #[serde(rename = "status")] - pub status: models::MessageStatus, - #[serde(rename = "timestamp")] - pub timestamp: String, - #[serde(rename = "triggerType")] - pub trigger_type: models::MessageAttemptTriggerType, - #[serde(rename = "url")] - pub url: String, - } - impl MessageAttemptOut { - pub fn new(endpoint_id: String, id: String, msg_id: String, response: String, response_duration_ms: i64, response_status_code: i32, status: models::MessageStatus, timestamp: String, trigger_type: models::MessageAttemptTriggerType, url: String) -> MessageAttemptOut { - MessageAttemptOut { - endpoint_id, - id, - msg: None, - msg_id, - response, - response_duration_ms, - response_status_code, - status, - timestamp, - trigger_type, - url, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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>, + /// 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, + #[serde(rename = "responseStatusCode")] + pub response_status_code: i32, + #[serde(rename = "status")] + pub status: models::MessageStatus, + #[serde(rename = "timestamp")] + pub timestamp: String, + #[serde(rename = "triggerType")] + pub trigger_type: models::MessageAttemptTriggerType, + #[serde(rename = "url")] + pub url: String, +} +impl MessageAttemptOut { + pub fn new( + endpoint_id: String, + id: String, + msg_id: String, + response: String, + response_duration_ms: i64, + response_status_code: i32, + status: models::MessageStatus, + timestamp: String, + trigger_type: models::MessageAttemptTriggerType, + url: String, + ) -> MessageAttemptOut { + MessageAttemptOut { + endpoint_id, + id, + msg: None, + msg_id, + response, + response_duration_ms, + response_status_code, + status, + timestamp, + trigger_type, + url, + } + } +} diff --git a/rust/src/models/message_attempt_recovered_event.rs b/rust/src/models/message_attempt_recovered_event.rs index 02a9495fc..cebda5f63 100644 --- a/rust/src/models/message_attempt_recovered_event.rs +++ b/rust/src/models/message_attempt_recovered_event.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,35 +12,39 @@ 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, - } +/// 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 Default for Type { - fn default() -> Type { - Self::MessagePeriodAttemptPeriodRecovered - } - } +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 index f09487f84..00ed41878 100644 --- a/rust/src/models/message_attempt_recovered_event_data.rs +++ b/rust/src/models/message_attempt_recovered_event_data.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,40 +12,49 @@ 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, - } - } - } +/// 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_attempt_trigger_type.rs b/rust/src/models/message_attempt_trigger_type.rs index 928e81862..5855023fd 100644 --- a/rust/src/models/message_attempt_trigger_type.rs +++ b/rust/src/models/message_attempt_trigger_type.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,29 +12,33 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - use serde_repr::{Serialize_repr,Deserialize_repr}; - /// MessageAttemptTriggerType : The reason an attempt was made: - Scheduled = 0 - Manual = 1 - /// The reason an attempt was made: - Scheduled = 0 - Manual = 1 - #[repr(i64)] - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr)] - pub enum MessageAttemptTriggerType { - Scheduled = 0, - Manual = 1, - - } - impl std::fmt::Display for MessageAttemptTriggerType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", match self { - Self::Scheduled => "0", - Self::Manual => "1", - }) - } - } - impl Default for MessageAttemptTriggerType { - fn default() -> MessageAttemptTriggerType { - Self::Scheduled - } - } +use serde_repr::{Deserialize_repr, Serialize_repr}; +/// MessageAttemptTriggerType : The reason an attempt was made: - Scheduled = 0 +/// - Manual = 1 The reason an attempt was made: - Scheduled = 0 - Manual = 1 +#[repr(i64)] +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +pub enum MessageAttemptTriggerType { + Scheduled = 0, + Manual = 1, +} +impl std::fmt::Display for MessageAttemptTriggerType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + Self::Scheduled => "0", + Self::Manual => "1", + } + ) + } +} +impl Default for MessageAttemptTriggerType { + fn default() -> MessageAttemptTriggerType { + Self::Scheduled + } +} diff --git a/rust/src/models/message_broadcast_in.rs b/rust/src/models/message_broadcast_in.rs index a8a5b305c..44cf7a056 100644 --- a/rust/src/models/message_broadcast_in.rs +++ b/rust/src/models/message_broadcast_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,38 +12,45 @@ 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, - } - } - } +#[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 index 88bb93f2d..d26b827cd 100644 --- a/rust/src/models/message_broadcast_out.rs +++ b/rust/src/models/message_broadcast_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 486234f35..e49a3f7da 100644 --- a/rust/src/models/message_endpoint_out.rs +++ b/rust/src/models/message_endpoint_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,58 +12,65 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct MessageEndpointOut { - /// List of message channels this endpoint listens to (omit for all). - #[serde(rename = "channels", 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")] - pub disabled: Option, - #[serde(rename = "filterTypes", 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")] - pub next_attempt: Option, - #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")] - pub rate_limit: Option, - #[serde(rename = "status")] - pub status: models::MessageStatus, - /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", 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")] - pub version: i32, - } - impl MessageEndpointOut { - pub fn new(created_at: String, description: String, id: String, status: models::MessageStatus, updated_at: String, url: String, version: i32) -> MessageEndpointOut { - MessageEndpointOut { - channels: None, - created_at, - description, - disabled: None, - filter_types: None, - id, - next_attempt: None, - rate_limit: None, - status, - uid: None, - updated_at, - url, - version, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MessageEndpointOut { + /// List of message channels this endpoint listens to (omit for all). + #[serde(rename = "channels", 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")] + pub disabled: Option, + #[serde(rename = "filterTypes", 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")] + pub next_attempt: Option, + #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")] + pub rate_limit: Option, + #[serde(rename = "status")] + pub status: models::MessageStatus, + /// Optional unique identifier for the endpoint. + #[serde(rename = "uid", 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")] + pub version: i32, +} +impl MessageEndpointOut { + pub fn new( + created_at: String, + description: String, + id: String, + status: models::MessageStatus, + updated_at: String, + url: String, + version: i32, + ) -> MessageEndpointOut { + MessageEndpointOut { + channels: None, + created_at, + description, + disabled: None, + filter_types: None, + id, + next_attempt: None, + rate_limit: None, + status, + uid: None, + updated_at, + url, + version, + } + } +} diff --git a/rust/src/models/message_events_out.rs b/rust/src/models/message_events_out.rs index f4d0d8fd7..4ce579e32 100644 --- a/rust/src/models/message_events_out.rs +++ b/rust/src/models/message_events_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct MessageEventsOut { - #[serde(rename = "data")] - pub data: Vec, - #[serde(rename = "done")] - pub done: bool, - #[serde(rename = "iterator")] - pub iterator: String, - } - impl MessageEventsOut { - pub fn new(data: Vec, done: bool, iterator: String) -> MessageEventsOut { - MessageEventsOut { - data, - done, - iterator, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MessageEventsOut { + #[serde(rename = "data")] + pub data: Vec, + #[serde(rename = "done")] + pub done: bool, + #[serde(rename = "iterator")] + pub iterator: String, +} +impl MessageEventsOut { + pub fn new(data: Vec, done: bool, iterator: String) -> MessageEventsOut { + MessageEventsOut { + data, + done, + iterator, + } + } +} diff --git a/rust/src/models/message_in.rs b/rust/src/models/message_in.rs index 17a15afa2..5b79d7f76 100644 --- a/rust/src/models/message_in.rs +++ b/rust/src/models/message_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,50 +12,62 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct MessageIn { - #[serde(rename = "application", 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")] - 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, - /// 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, - /// 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, - /// List of free-form tags that can be filtered by when listing messages - #[serde(rename = "tags", 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")] - pub transformations_params: Option, - } - impl MessageIn { - pub fn new(event_type: String, payload: serde_json::Value) -> MessageIn { - MessageIn { - application: None, - channels: None, - event_id: None, - event_type, - payload, - payload_retention_hours: None, - payload_retention_period: None, - tags: None, - transformations_params: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MessageIn { + #[serde(rename = "application", 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")] + 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, + /// 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, + /// 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, + /// List of free-form tags that can be filtered by when listing messages + #[serde(rename = "tags", 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" + )] + pub transformations_params: Option, +} +impl MessageIn { + pub fn new(event_type: String, payload: serde_json::Value) -> MessageIn { + MessageIn { + application: None, + channels: None, + event_id: None, + event_type, + payload, + payload_retention_hours: None, + payload_retention_period: None, + tags: None, + transformations_params: None, + } + } +} diff --git a/rust/src/models/message_out.rs b/rust/src/models/message_out.rs index 0a7e92882..05a74cf99 100644 --- a/rust/src/models/message_out.rs +++ b/rust/src/models/message_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,40 +12,44 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct MessageOut { - /// 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, - /// 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")] - pub tags: Option>, - #[serde(rename = "timestamp")] - pub timestamp: String, - } - impl MessageOut { - pub fn new(event_type: String, id: String, payload: serde_json::Value, timestamp: String) -> MessageOut { - MessageOut { - channels: None, - event_id: None, - event_type, - id, - payload, - tags: None, - timestamp, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MessageOut { + /// 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, + /// 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")] + pub tags: Option>, + #[serde(rename = "timestamp")] + pub timestamp: String, +} +impl MessageOut { + pub fn new( + event_type: String, + id: String, + payload: serde_json::Value, + timestamp: String, + ) -> MessageOut { + MessageOut { + channels: None, + event_id: None, + event_type, + id, + payload, + tags: None, + timestamp, + } + } +} diff --git a/rust/src/models/message_raw_payload_out.rs b/rust/src/models/message_raw_payload_out.rs index 8bc2921c2..3ca400cb5 100644 --- a/rust/src/models/message_raw_payload_out.rs +++ b/rust/src/models/message_raw_payload_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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_status.rs b/rust/src/models/message_status.rs index 204467af1..bb33e4b04 100644 --- a/rust/src/models/message_status.rs +++ b/rust/src/models/message_status.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,38 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - use serde_repr::{Serialize_repr,Deserialize_repr}; - /// MessageStatus : The sending status of the message: - Success = 0 - Pending = 1 - Fail = 2 - Sending = 3 - /// The sending status of the message: - Success = 0 - Pending = 1 - Fail = 2 - Sending = 3 - #[repr(i64)] - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr)] - pub enum MessageStatus { - Success = 0, - Pending = 1, - Fail = 2, - Sending = 3, - - } - impl std::fmt::Display for MessageStatus { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", match self { - Self::Success => "0", - Self::Pending => "1", - Self::Fail => "2", - Self::Sending => "3", - }) - } - } - impl Default for MessageStatus { - fn default() -> MessageStatus { - Self::Success - } - } +use serde_repr::{Deserialize_repr, Serialize_repr}; +/// MessageStatus : The sending status of the message: - Success = 0 - Pending = +/// 1 - Fail = 2 - Sending = 3 The sending status of the message: - Success = 0 +/// - Pending = 1 - Fail = 2 - Sending = 3 +#[repr(i64)] +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +pub enum MessageStatus { + Success = 0, + Pending = 1, + Fail = 2, + Sending = 3, +} +impl std::fmt::Display for MessageStatus { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + Self::Success => "0", + Self::Pending => "1", + Self::Fail => "2", + Self::Sending => "3", + } + ) + } +} +impl Default for MessageStatus { + fn default() -> MessageStatus { + Self::Success + } +} diff --git a/rust/src/models/message_subscriber_auth_token_out.rs b/rust/src/models/message_subscriber_auth_token_out.rs index d2ab57908..ec3b1783a 100644 --- a/rust/src/models/message_subscriber_auth_token_out.rs +++ b/rust/src/models/message_subscriber_auth_token_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ 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, - } - } - } +#[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/o_auth_payload_in.rs b/rust/src/models/o_auth_payload_in.rs index dcd438c47..919893ced 100644 --- a/rust/src/models/o_auth_payload_in.rs +++ b/rust/src/models/o_auth_payload_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,17 @@ 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, - } - } - } +#[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 index d0b5ea317..60e56c781 100644 --- a/rust/src/models/o_auth_payload_out.rs +++ b/rust/src/models/o_auth_payload_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 index abe36af25..898d90c72 100644 --- a/rust/src/models/oauth2_auth_method_in.rs +++ b/rust/src/models/oauth2_auth_method_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,49 @@ 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"), - } - } - } +/// 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 Default for Oauth2AuthMethodIn { - fn default() -> Oauth2AuthMethodIn { - Self::ClientSecretJwt - } - } +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 index 34bc345b2..d39f9d19f 100644 --- a/rust/src/models/oauth2_grant_type_in.rs +++ b/rust/src/models/oauth2_grant_type_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,29 +12,27 @@ 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"), - } - } - } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Oauth2GrantTypeIn { + #[serde(rename = "clientCredentials")] + ClientCredentials, + #[serde(rename = "refreshToken")] + RefreshToken, +} - impl Default for Oauth2GrantTypeIn { - fn default() -> Oauth2GrantTypeIn { - Self::ClientCredentials - } - } +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 index 35169bf88..44dec4839 100644 --- a/rust/src/models/oauth_jws_signing_algorithm.rs +++ b/rust/src/models/oauth_jws_signing_algorithm.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,26 +12,24 @@ 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"), - } - } - } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OauthJwsSigningAlgorithm { + #[serde(rename = "RS256")] + Rs256, +} - impl Default for OauthJwsSigningAlgorithm { - fn default() -> OauthJwsSigningAlgorithm { - Self::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 index 4d98b4785..df3ce7184 100644 --- a/rust/src/models/one_time_token_in.rs +++ b/rust/src/models/one_time_token_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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 index b4f20180a..372201768 100644 --- a/rust/src/models/one_time_token_out.rs +++ b/rust/src/models/one_time_token_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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/operational_webhook_endpoint_in.rs b/rust/src/models/operational_webhook_endpoint_in.rs index 7bbf4d252..bb031f4eb 100644 --- a/rust/src/models/operational_webhook_endpoint_in.rs +++ b/rust/src/models/operational_webhook_endpoint_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,41 +12,42 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct OperationalWebhookEndpointIn { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] - pub disabled: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] - pub filter_types: Option>, - #[serde(rename = "metadata", 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")] - pub secret: Option, - /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] - pub uid: Option, - #[serde(rename = "url")] - pub url: String, - } - impl OperationalWebhookEndpointIn { - pub fn new(url: String) -> OperationalWebhookEndpointIn { - OperationalWebhookEndpointIn { - description: None, - disabled: None, - filter_types: None, - metadata: None, - rate_limit: None, - secret: None, - uid: None, - url, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OperationalWebhookEndpointIn { + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + pub filter_types: Option>, + #[serde(rename = "metadata", 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")] + pub secret: Option, + /// Optional unique identifier for the endpoint. + #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + pub uid: Option, + #[serde(rename = "url")] + pub url: String, +} +impl OperationalWebhookEndpointIn { + pub fn new(url: String) -> OperationalWebhookEndpointIn { + OperationalWebhookEndpointIn { + description: None, + disabled: None, + filter_types: None, + metadata: None, + rate_limit: None, + secret: None, + uid: None, + url, + } + } +} diff --git a/rust/src/models/operational_webhook_endpoint_out.rs b/rust/src/models/operational_webhook_endpoint_out.rs index 33e1b0d69..5b6132ed0 100644 --- a/rust/src/models/operational_webhook_endpoint_out.rs +++ b/rust/src/models/operational_webhook_endpoint_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,48 +12,54 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct OperationalWebhookEndpointOut { - #[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")] - pub disabled: Option, - #[serde(rename = "filterTypes", 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, - /// Optional unique identifier for the endpoint. - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] - pub uid: Option, - #[serde(rename = "updatedAt")] - pub updated_at: String, - #[serde(rename = "url")] - pub url: String, - } - impl OperationalWebhookEndpointOut { - pub fn new(created_at: String, description: String, id: String, metadata: std::collections::HashMap, updated_at: String, url: String) -> OperationalWebhookEndpointOut { - OperationalWebhookEndpointOut { - created_at, - description, - disabled: None, - filter_types: None, - id, - metadata, - rate_limit: None, - uid: None, - updated_at, - url, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OperationalWebhookEndpointOut { + #[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")] + pub disabled: Option, + #[serde(rename = "filterTypes", 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, + /// Optional unique identifier for the endpoint. + #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + pub uid: Option, + #[serde(rename = "updatedAt")] + pub updated_at: String, + #[serde(rename = "url")] + pub url: String, +} +impl OperationalWebhookEndpointOut { + pub fn new( + created_at: String, + description: String, + id: String, + metadata: std::collections::HashMap, + updated_at: String, + url: String, + ) -> OperationalWebhookEndpointOut { + OperationalWebhookEndpointOut { + created_at, + description, + disabled: None, + filter_types: None, + id, + metadata, + rate_limit: None, + uid: None, + updated_at, + url, + } + } +} diff --git a/rust/src/models/operational_webhook_endpoint_secret_in.rs b/rust/src/models/operational_webhook_endpoint_secret_in.rs index 1d5880b0f..ff8f2e17b 100644 --- a/rust/src/models/operational_webhook_endpoint_secret_in.rs +++ b/rust/src/models/operational_webhook_endpoint_secret_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,19 +12,18 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct OperationalWebhookEndpointSecretIn { - /// 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")] - pub key: Option, - } - impl OperationalWebhookEndpointSecretIn { - pub fn new() -> OperationalWebhookEndpointSecretIn { - OperationalWebhookEndpointSecretIn { - key: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OperationalWebhookEndpointSecretIn { + /// 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")] + pub key: Option, +} +impl OperationalWebhookEndpointSecretIn { + pub fn new() -> OperationalWebhookEndpointSecretIn { + OperationalWebhookEndpointSecretIn { key: None } + } +} diff --git a/rust/src/models/operational_webhook_endpoint_secret_out.rs b/rust/src/models/operational_webhook_endpoint_secret_out.rs index 56a31730f..d99b8b880 100644 --- a/rust/src/models/operational_webhook_endpoint_secret_out.rs +++ b/rust/src/models/operational_webhook_endpoint_secret_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,19 +12,18 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct OperationalWebhookEndpointSecretOut { - /// 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")] - pub key: String, - } - impl OperationalWebhookEndpointSecretOut { - pub fn new(key: String) -> OperationalWebhookEndpointSecretOut { - OperationalWebhookEndpointSecretOut { - key, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OperationalWebhookEndpointSecretOut { + /// 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")] + pub key: String, +} +impl OperationalWebhookEndpointSecretOut { + pub fn new(key: String) -> OperationalWebhookEndpointSecretOut { + OperationalWebhookEndpointSecretOut { key } + } +} diff --git a/rust/src/models/operational_webhook_endpoint_update.rs b/rust/src/models/operational_webhook_endpoint_update.rs index bf27c117c..62987eabc 100644 --- a/rust/src/models/operational_webhook_endpoint_update.rs +++ b/rust/src/models/operational_webhook_endpoint_update.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,37 +12,36 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct OperationalWebhookEndpointUpdate { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] - pub disabled: Option, - #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] - pub filter_types: Option>, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option>, - #[serde(rename = "rateLimit", 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")] - pub uid: Option, - #[serde(rename = "url")] - pub url: String, - } - impl OperationalWebhookEndpointUpdate { - pub fn new(url: String) -> OperationalWebhookEndpointUpdate { - OperationalWebhookEndpointUpdate { - description: None, - disabled: None, - filter_types: None, - metadata: None, - rate_limit: None, - uid: None, - url, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OperationalWebhookEndpointUpdate { + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "filterTypes", skip_serializing_if = "Option::is_none")] + pub filter_types: Option>, + #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + pub metadata: Option>, + #[serde(rename = "rateLimit", 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")] + pub uid: Option, + #[serde(rename = "url")] + pub url: String, +} +impl OperationalWebhookEndpointUpdate { + pub fn new(url: String) -> OperationalWebhookEndpointUpdate { + OperationalWebhookEndpointUpdate { + description: None, + disabled: None, + filter_types: None, + metadata: None, + rate_limit: None, + uid: None, + url, + } + } +} diff --git a/rust/src/models/ordering.rs b/rust/src/models/ordering.rs index 3d1962215..39f3fcfb4 100644 --- a/rust/src/models/ordering.rs +++ b/rust/src/models/ordering.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,28 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - /// Ordering : Defines the ordering in a listing of results. - /// Defines the ordering in a listing of results. - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] - pub enum Ordering { - #[serde(rename = "ascending")] - Ascending, - #[serde(rename = "descending")] - Descending, - - } - impl std::fmt::Display for Ordering { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Ascending => write!(f, "ascending"), - Self::Descending => write!(f, "descending"), - } - } - } +/// Ordering : Defines the ordering in a listing of results. +/// Defines the ordering in a listing of results. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Ordering { + #[serde(rename = "ascending")] + Ascending, + #[serde(rename = "descending")] + Descending, +} - impl Default for Ordering { - fn default() -> Ordering { - Self::Ascending - } - } +impl std::fmt::Display for Ordering { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Ascending => write!(f, "ascending"), + Self::Descending => write!(f, "descending"), + } + } +} +impl Default for Ordering { + fn default() -> Ordering { + Self::Ascending + } +} diff --git a/rust/src/models/recover_in.rs b/rust/src/models/recover_in.rs index 39b3fbc38..a9ee8f453 100644 --- a/rust/src/models/recover_in.rs +++ b/rust/src/models/recover_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,17 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct RecoverIn { - #[serde(rename = "since")] - pub since: String, - #[serde(rename = "until", skip_serializing_if = "Option::is_none")] - pub until: Option, - } - impl RecoverIn { - pub fn new(since: String) -> RecoverIn { - RecoverIn { - since, - until: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RecoverIn { + #[serde(rename = "since")] + pub since: String, + #[serde(rename = "until", skip_serializing_if = "Option::is_none")] + pub until: Option, +} +impl RecoverIn { + pub fn new(since: String) -> RecoverIn { + RecoverIn { since, until: None } + } +} diff --git a/rust/src/models/recover_out.rs b/rust/src/models/recover_out.rs index 332c15c59..4b720525f 100644 --- a/rust/src/models/recover_out.rs +++ b/rust/src/models/recover_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct RecoverOut { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, - } - impl RecoverOut { - pub fn new(id: String, status: models::BackgroundTaskStatus, task: models::BackgroundTaskType) -> RecoverOut { - RecoverOut { - id, - status, - task, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RecoverOut { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "status")] + pub status: models::BackgroundTaskStatus, + #[serde(rename = "task")] + pub task: models::BackgroundTaskType, +} +impl RecoverOut { + pub fn new( + id: String, + status: models::BackgroundTaskStatus, + task: models::BackgroundTaskType, + ) -> RecoverOut { + RecoverOut { id, status, task } + } +} diff --git a/rust/src/models/redshift_config.rs b/rust/src/models/redshift_config.rs index c20fd4a1e..021725861 100644 --- a/rust/src/models/redshift_config.rs +++ b/rust/src/models/redshift_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,44 +12,49 @@ 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, - } - } - } +/// 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 b191d420e..2465d6d1f 100644 --- a/rust/src/models/replay_in.rs +++ b/rust/src/models/replay_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,17 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct ReplayIn { - #[serde(rename = "since")] - pub since: String, - #[serde(rename = "until", skip_serializing_if = "Option::is_none")] - pub until: Option, - } - impl ReplayIn { - pub fn new(since: String) -> ReplayIn { - ReplayIn { - since, - until: None, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ReplayIn { + #[serde(rename = "since")] + pub since: String, + #[serde(rename = "until", skip_serializing_if = "Option::is_none")] + pub until: Option, +} +impl ReplayIn { + pub fn new(since: String) -> ReplayIn { + ReplayIn { since, until: None } + } +} diff --git a/rust/src/models/replay_out.rs b/rust/src/models/replay_out.rs index e03c17f8c..ede2ef3ba 100644 --- a/rust/src/models/replay_out.rs +++ b/rust/src/models/replay_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct ReplayOut { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "status")] - pub status: models::BackgroundTaskStatus, - #[serde(rename = "task")] - pub task: models::BackgroundTaskType, - } - impl ReplayOut { - pub fn new(id: String, status: models::BackgroundTaskStatus, task: models::BackgroundTaskType) -> ReplayOut { - ReplayOut { - id, - status, - task, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ReplayOut { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "status")] + pub status: models::BackgroundTaskStatus, + #[serde(rename = "task")] + pub task: models::BackgroundTaskType, +} +impl ReplayOut { + pub fn new( + id: String, + status: models::BackgroundTaskStatus, + task: models::BackgroundTaskType, + ) -> ReplayOut { + ReplayOut { id, status, task } + } +} diff --git a/rust/src/models/retry_schedule_in_out.rs b/rust/src/models/retry_schedule_in_out.rs index 0c4676b15..7f7850a69 100644 --- a/rust/src/models/retry_schedule_in_out.rs +++ b/rust/src/models/retry_schedule_in_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,17 @@ 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, - } - } - } +#[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 index 56351e59d..789f483d5 100644 --- a/rust/src/models/rotate_poller_token_in.rs +++ b/rust/src/models/rotate_poller_token_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,23 +12,25 @@ 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, - } - } - } +#[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 index 0c1ebac8e..7adeac271 100644 --- a/rust/src/models/rotated_url_out.rs +++ b/rust/src/models/rotated_url_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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 index baf64de9c..025a49cf9 100644 --- a/rust/src/models/s3_config.rs +++ b/rust/src/models/s3_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,27 +12,31 @@ 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, - } - } - } +#[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 index ba382240c..e5de3abb6 100644 --- a/rust/src/models/sink_http_config.rs +++ b/rust/src/models/sink_http_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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 index 65d97c32e..5df3fd53b 100644 --- a/rust/src/models/sink_in.rs +++ b/rust/src/models/sink_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,40 +12,39 @@ 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, - } +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SinkIn { + SinkInOneOf(Box), + SinkInOneOf1(Box), + SinkInOneOf2(Box), + SinkInOneOf3(Box), + SinkInOneOf4(Box), +} - impl Default for Type { - fn default() -> Type { - Self::RabbitMq - } - } +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 index 030089167..42e894de7 100644 --- a/rust/src/models/sink_in_one_of.rs +++ b/rust/src/models/sink_in_one_of.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,36 +12,35 @@ 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, - } +#[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 Default for Type { - fn default() -> Type { - Self::RabbitMq - } - } +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 index cd3705c2a..cb95d1baf 100644 --- a/rust/src/models/sink_in_one_of_1.rs +++ b/rust/src/models/sink_in_one_of_1.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,42 +12,47 @@ 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, - } +#[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 Default for Type { - fn default() -> Type { - Self::Sqs - } - } +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 index 80dc8cdde..4239ce4c4 100644 --- a/rust/src/models/sink_in_one_of_2.rs +++ b/rust/src/models/sink_in_one_of_2.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,47 +12,61 @@ 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, - } +#[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 Default for Type { - fn default() -> Type { - Self::Kafka - } - } +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 index 912ea7eea..1db372875 100644 --- a/rust/src/models/sink_in_one_of_3.rs +++ b/rust/src/models/sink_in_one_of_3.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,29 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SinkInOneOf3 { + #[serde(rename = "type")] + pub r#type: Type, + #[serde(rename = "url")] + pub url: String, +} - impl Default for Type { - fn default() -> Type { - Self::Http - } - } +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 index f8f0c1223..e276a4e29 100644 --- a/rust/src/models/sink_in_one_of_4.rs +++ b/rust/src/models/sink_in_one_of_4.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,27 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SinkInOneOf4 { + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::EventStream - } - } +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 index 4abe413de..5dc7dba23 100644 --- a/rust/src/models/sink_otel_v1_config.rs +++ b/rust/src/models/sink_otel_v1_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,18 +12,15 @@ 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, - } - } - } +#[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 index 31313a122..7a266aa58 100644 --- a/rust/src/models/sink_out.rs +++ b/rust/src/models/sink_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,40 +12,39 @@ 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, - } +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SinkOut { + SinkInOneOf(Box), + SinkInOneOf1(Box), + SinkInOneOf2(Box), + SinkInOneOf3(Box), + SinkInOneOf4(Box), +} - impl Default for Type { - fn default() -> Type { - Self::RabbitMq - } - } +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 index 8ab240ea3..5fc6706f8 100644 --- a/rust/src/models/sink_payload_format.rs +++ b/rust/src/models/sink_payload_format.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,26 +12,24 @@ 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"), - } - } - } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SinkPayloadFormat { + #[serde(rename = "json")] + Json, +} - impl Default for SinkPayloadFormat { - fn default() -> SinkPayloadFormat { - Self::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 index a177246b2..66e918517 100644 --- a/rust/src/models/sink_status.rs +++ b/rust/src/models/sink_status.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,32 +12,30 @@ 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"), - } - } - } +/// +#[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 Default for SinkStatus { - fn default() -> SinkStatus { - Self::Enabled - } - } +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 index 2168ae301..3d492b7dc 100644 --- a/rust/src/models/sink_status_in.rs +++ b/rust/src/models/sink_status_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,29 +12,27 @@ 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"), - } - } - } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SinkStatusIn { + #[serde(rename = "enabled")] + Enabled, + #[serde(rename = "paused")] + Paused, +} - impl Default for SinkStatusIn { - fn default() -> SinkStatusIn { - Self::Enabled - } - } +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 index eec2bbd00..533963f81 100644 --- a/rust/src/models/sink_transform_in.rs +++ b/rust/src/models/sink_transform_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ 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, - } - } - } +#[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 index 200541353..99b74919f 100644 --- a/rust/src/models/sink_transformation_out.rs +++ b/rust/src/models/sink_transformation_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ 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, - } - } - } +#[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 index 69cdca1c7..a927f83b3 100644 --- a/rust/src/models/snowflake_config.rs +++ b/rust/src/models/snowflake_config.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,41 +12,46 @@ 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, - } - } - } +/// 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 index 47ab74b74..008550912 100644 --- a/rust/src/models/statistics_period.rs +++ b/rust/src/models/statistics_period.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,28 @@ 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"), - } - } - } +/// 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 Default for StatisticsPeriod { - fn default() -> StatisticsPeriod { - Self::OneDay - } - } +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/status_code_class.rs b/rust/src/models/status_code_class.rs index a318f9c48..febb00cae 100644 --- a/rust/src/models/status_code_class.rs +++ b/rust/src/models/status_code_class.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,37 +12,43 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - use serde_repr::{Serialize_repr,Deserialize_repr}; - /// StatusCodeClass : The different classes of HTTP status codes: - CodeNone = 0 - Code1xx = 100 - Code2xx = 200 - Code3xx = 300 - Code4xx = 400 - Code5xx = 500 - /// The different classes of HTTP status codes: - CodeNone = 0 - Code1xx = 100 - Code2xx = 200 - Code3xx = 300 - Code4xx = 400 - Code5xx = 500 - #[repr(i64)] - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr)] - pub enum StatusCodeClass { - CodeNone = 0, - Code1xx = 100, - Code2xx = 200, - Code3xx = 300, - Code4xx = 400, - Code5xx = 500, - - } - impl std::fmt::Display for StatusCodeClass { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", match self { - Self::CodeNone => "0", - Self::Code1xx => "100", - Self::Code2xx => "200", - Self::Code3xx => "300", - Self::Code4xx => "400", - Self::Code5xx => "500", - }) - } - } - impl Default for StatusCodeClass { - fn default() -> StatusCodeClass { - Self::CodeNone - } - } +use serde_repr::{Deserialize_repr, Serialize_repr}; +/// StatusCodeClass : The different classes of HTTP status codes: - CodeNone = 0 +/// - Code1xx = 100 - Code2xx = 200 - Code3xx = 300 - Code4xx = 400 - Code5xx = +/// 500 The different classes of HTTP status codes: - CodeNone = 0 - Code1xx = +/// 100 - Code2xx = 200 - Code3xx = 300 - Code4xx = 400 - Code5xx = 500 +#[repr(i64)] +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +pub enum StatusCodeClass { + CodeNone = 0, + Code1xx = 100, + Code2xx = 200, + Code3xx = 300, + Code4xx = 400, + Code5xx = 500, +} +impl std::fmt::Display for StatusCodeClass { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + Self::CodeNone => "0", + Self::Code1xx => "100", + Self::Code2xx => "200", + Self::Code3xx => "300", + Self::Code4xx => "400", + Self::Code5xx => "500", + } + ) + } +} +impl Default for StatusCodeClass { + fn default() -> StatusCodeClass { + Self::CodeNone + } +} diff --git a/rust/src/models/stream_event_type_in.rs b/rust/src/models/stream_event_type_in.rs index da3550ff6..819bf8ca5 100644 --- a/rust/src/models/stream_event_type_in.rs +++ b/rust/src/models/stream_event_type_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,22 +12,21 @@ 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, - } - } - } +#[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 index b68415d81..ddaa4239a 100644 --- a/rust/src/models/stream_event_type_out.rs +++ b/rust/src/models/stream_event_type_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,28 +12,27 @@ 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, - } - } - } +#[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 index df0c993c7..948523707 100644 --- a/rust/src/models/stream_event_type_patch.rs +++ b/rust/src/models/stream_event_type_patch.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,22 +12,26 @@ 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, - } - } - } +#[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 index 7fff427c7..76984fadd 100644 --- a/rust/src/models/stream_in.rs +++ b/rust/src/models/stream_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ 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, - } - } - } +#[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 index 3796a9e1b..1a8bb74d6 100644 --- a/rust/src/models/stream_out.rs +++ b/rust/src/models/stream_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,30 +12,29 @@ 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, - } - } - } +#[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 index fabbb1a2f..a89704d40 100644 --- a/rust/src/models/stream_patch.rs +++ b/rust/src/models/stream_patch.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,21 +12,20 @@ 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, - } - } - } +#[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 index 70b4a1910..aa669b852 100644 --- a/rust/src/models/stream_sink_in.rs +++ b/rust/src/models/stream_sink_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,49 +12,48 @@ 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, - } +#[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 Type { - fn default() -> Type { - Self::AzureBlobStorage - } - } +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 index e24245725..20b1266eb 100644 --- a/rust/src/models/stream_sink_in_one_of.rs +++ b/rust/src/models/stream_sink_in_one_of.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,32 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StreamSinkInOneOf { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::AzureBlobStorage - } - } +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 index 821f37fa0..f09233296 100644 --- a/rust/src/models/stream_sink_in_one_of_1.rs +++ b/rust/src/models/stream_sink_in_one_of_1.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,32 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StreamSinkInOneOf1 { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::OtelV1HttpTrace - } - } +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 index e09e883dc..3fc7042d1 100644 --- a/rust/src/models/stream_sink_in_one_of_2.rs +++ b/rust/src/models/stream_sink_in_one_of_2.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,32 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StreamSinkInOneOf2 { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::Http - } - } +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 index fec738be9..756459d87 100644 --- a/rust/src/models/stream_sink_in_one_of_3.rs +++ b/rust/src/models/stream_sink_in_one_of_3.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,32 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StreamSinkInOneOf3 { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::AmazonS3 - } - } +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 index 4f346ddff..b16e47142 100644 --- a/rust/src/models/stream_sink_in_one_of_4.rs +++ b/rust/src/models/stream_sink_in_one_of_4.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,32 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StreamSinkInOneOf4 { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::Snowflake - } - } +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 index d79f54a55..caad2d8b6 100644 --- a/rust/src/models/stream_sink_in_one_of_5.rs +++ b/rust/src/models/stream_sink_in_one_of_5.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,32 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StreamSinkInOneOf5 { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::GoogleCloudStorage - } - } +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 index 8c733dc3c..1aed89956 100644 --- a/rust/src/models/stream_sink_in_one_of_6.rs +++ b/rust/src/models/stream_sink_in_one_of_6.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,32 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StreamSinkInOneOf6 { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::Redshift - } - } +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 index ac33b410d..f4313dba6 100644 --- a/rust/src/models/stream_sink_in_one_of_7.rs +++ b/rust/src/models/stream_sink_in_one_of_7.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,33 +12,32 @@ 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, - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StreamSinkInOneOf7 { + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "type")] + pub r#type: Type, +} - impl Default for Type { - fn default() -> Type { - Self::BigQuery - } - } +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 index fc2e773eb..8b0b0cb3a 100644 --- a/rust/src/models/stream_sink_out.rs +++ b/rust/src/models/stream_sink_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,49 +12,48 @@ 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, - } +#[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 Type { - fn default() -> Type { - Self::AzureBlobStorage - } - } +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 index e25d4e387..8aa7563ef 100644 --- a/rust/src/models/stream_sink_patch.rs +++ b/rust/src/models/stream_sink_patch.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,49 +12,48 @@ 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, - } +#[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 Type { - fn default() -> Type { - Self::AzureBlobStorage - } - } +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 7681abf7d..4af46a715 100644 --- a/rust/src/models/template_in.rs +++ b/rust/src/models/template_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,42 +12,41 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct TemplateIn { - #[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")] - pub name: String, - #[serde(rename = "transformation")] - pub transformation: String, - } - impl TemplateIn { - pub fn new(logo: String, name: String, transformation: String) -> TemplateIn { - TemplateIn { - description: None, - feature_flag: None, - filter_types: None, - instructions: None, - instructions_link: None, - kind: None, - logo, - name, - transformation, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TemplateIn { + #[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")] + pub name: String, + #[serde(rename = "transformation")] + pub transformation: String, +} +impl TemplateIn { + pub fn new(logo: String, name: String, transformation: String) -> TemplateIn { + TemplateIn { + description: None, + feature_flag: None, + filter_types: None, + instructions: None, + instructions_link: None, + kind: None, + logo, + name, + transformation, + } + } +} diff --git a/rust/src/models/template_out.rs b/rust/src/models/template_out.rs index 2560e4a6d..69d259596 100644 --- a/rust/src/models/template_out.rs +++ b/rust/src/models/template_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,54 +12,64 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - 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")] - pub feature_flag: Option, - #[serde(rename = "filterTypes", 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")] - pub instructions_link: Option, - #[serde(rename = "kind")] - pub kind: models::TransformationTemplateKind, - #[serde(rename = "logo")] - 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, - } - impl TemplateOut { - pub fn new(created_at: String, description: String, id: String, instructions: String, kind: models::TransformationTemplateKind, logo: String, name: String, org_id: String, transformation: String, updated_at: String) -> TemplateOut { - TemplateOut { - created_at, - description, - feature_flag: None, - filter_types: None, - id, - instructions, - instructions_link: None, - kind, - logo, - name, - org_id, - transformation, - updated_at, - } - } - } +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +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")] + pub feature_flag: Option, + #[serde(rename = "filterTypes", 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")] + pub instructions_link: Option, + #[serde(rename = "kind")] + pub kind: models::TransformationTemplateKind, + #[serde(rename = "logo")] + 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, +} +impl TemplateOut { + pub fn new( + created_at: String, + description: String, + id: String, + instructions: String, + kind: models::TransformationTemplateKind, + logo: String, + name: String, + org_id: String, + transformation: String, + updated_at: String, + ) -> TemplateOut { + TemplateOut { + created_at, + description, + feature_flag: None, + filter_types: None, + id, + instructions, + instructions_link: None, + kind, + logo, + name, + org_id, + transformation, + updated_at, + } + } +} diff --git a/rust/src/models/template_patch.rs b/rust/src/models/template_patch.rs index 6a2874ed0..47eb64a51 100644 --- a/rust/src/models/template_patch.rs +++ b/rust/src/models/template_patch.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,42 +12,56 @@ 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, - } - } - } +#[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 index 1bb960326..e97d59898 100644 --- a/rust/src/models/template_update.rs +++ b/rust/src/models/template_update.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,42 +12,41 @@ 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, - } - } - } +#[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 index 01f0dfd21..f85fedd93 100644 --- a/rust/src/models/transformation_http_method.rs +++ b/rust/src/models/transformation_http_method.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,32 +12,30 @@ 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"), - } - } - } +/// +#[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 Default for TransformationHttpMethod { - fn default() -> TransformationHttpMethod { - Self::Post - } - } +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 index a652fa6b5..c89d611d6 100644 --- a/rust/src/models/transformation_simulate_in.rs +++ b/rust/src/models/transformation_simulate_in.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,28 +12,31 @@ 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, - } - } - } +#[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 index ac439d557..bc4acc779 100644 --- a/rust/src/models/transformation_simulate_out.rs +++ b/rust/src/models/transformation_simulate_out.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,24 +12,23 @@ 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, - } - } - } +#[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/src/models/transformation_template_kind.rs b/rust/src/models/transformation_template_kind.rs index d363bfca6..fdc857147 100644 --- a/rust/src/models/transformation_template_kind.rs +++ b/rust/src/models/transformation_template_kind.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,59 +12,57 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - /// - #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] - pub enum TransformationTemplateKind { - #[serde(rename = "Custom")] - Custom, - #[serde(rename = "CustomerIO")] - CustomerIo, - #[serde(rename = "Discord")] - Discord, - #[serde(rename = "Hubspot")] - Hubspot, - #[serde(rename = "Inngest")] - Inngest, - #[serde(rename = "Salesforce")] - Salesforce, - #[serde(rename = "Segment")] - Segment, - #[serde(rename = "Slack")] - Slack, - #[serde(rename = "Teams")] - Teams, - #[serde(rename = "TriggerDev")] - TriggerDev, - #[serde(rename = "Windmill")] - Windmill, - #[serde(rename = "Zapier")] - Zapier, - - } - impl std::fmt::Display for TransformationTemplateKind { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Custom => write!(f, "Custom"), - Self::CustomerIo => write!(f, "CustomerIO"), - Self::Discord => write!(f, "Discord"), - Self::Hubspot => write!(f, "Hubspot"), - Self::Inngest => write!(f, "Inngest"), - Self::Salesforce => write!(f, "Salesforce"), - Self::Segment => write!(f, "Segment"), - Self::Slack => write!(f, "Slack"), - Self::Teams => write!(f, "Teams"), - Self::TriggerDev => write!(f, "TriggerDev"), - Self::Windmill => write!(f, "Windmill"), - Self::Zapier => write!(f, "Zapier"), - } - } - } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TransformationTemplateKind { + #[serde(rename = "Custom")] + Custom, + #[serde(rename = "CustomerIO")] + CustomerIo, + #[serde(rename = "Discord")] + Discord, + #[serde(rename = "Hubspot")] + Hubspot, + #[serde(rename = "Inngest")] + Inngest, + #[serde(rename = "Salesforce")] + Salesforce, + #[serde(rename = "Segment")] + Segment, + #[serde(rename = "Slack")] + Slack, + #[serde(rename = "Teams")] + Teams, + #[serde(rename = "TriggerDev")] + TriggerDev, + #[serde(rename = "Windmill")] + Windmill, + #[serde(rename = "Zapier")] + Zapier, +} - impl Default for TransformationTemplateKind { - fn default() -> TransformationTemplateKind { - Self::Custom - } - } +impl std::fmt::Display for TransformationTemplateKind { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Custom => write!(f, "Custom"), + Self::CustomerIo => write!(f, "CustomerIO"), + Self::Discord => write!(f, "Discord"), + Self::Hubspot => write!(f, "Hubspot"), + Self::Inngest => write!(f, "Inngest"), + Self::Salesforce => write!(f, "Salesforce"), + Self::Segment => write!(f, "Segment"), + Self::Slack => write!(f, "Slack"), + Self::Teams => write!(f, "Teams"), + Self::TriggerDev => write!(f, "TriggerDev"), + Self::Windmill => write!(f, "Windmill"), + Self::Zapier => write!(f, "Zapier"), + } + } +} +impl Default for TransformationTemplateKind { + fn default() -> TransformationTemplateKind { + Self::Custom + } +} diff --git a/rust/src/models/validation_error.rs b/rust/src/models/validation_error.rs index 55a6bd261..1201eb204 100644 --- a/rust/src/models/validation_error.rs +++ b/rust/src/models/validation_error.rs @@ -4,7 +4,7 @@ * 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 */ @@ -12,29 +12,31 @@ use crate::models; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; - - /// ValidationError : Validation errors have their own schema to provide context for invalid requests eg. mismatched types and out of bounds values. There may be any number of these per 422 UNPROCESSABLE ENTITY error. - #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] - pub struct ValidationError { - /// The location as a [`Vec`] of [`String`]s -- often in the form `[\"body\", \"field_name\"]`, `[\"query\", \"field_name\"]`, etc. They may, however, be arbitrarily deep. - #[serde(rename = "loc")] - pub loc: Vec, - /// The message accompanying the validation error item. - #[serde(rename = "msg")] - pub msg: String, - /// The type of error, often \"type_error\" or \"value_error\", but sometimes with more context like as \"value_error.number.not_ge\" - #[serde(rename = "type")] - pub r#type: String, - } - impl ValidationError { - /// Validation errors have their own schema to provide context for invalid requests eg. mismatched types and out of bounds values. There may be any number of these per 422 UNPROCESSABLE ENTITY error. - pub fn new(loc: Vec, msg: String, r#type: String) -> ValidationError { - ValidationError { - loc, - msg, - r#type, - } - } - } +/// ValidationError : Validation errors have their own schema to provide context +/// for invalid requests eg. mismatched types and out of bounds values. There +/// may be any number of these per 422 UNPROCESSABLE ENTITY error. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ValidationError { + /// The location as a [`Vec`] of [`String`]s -- often in the form + /// `[\"body\", \"field_name\"]`, `[\"query\", \"field_name\"]`, etc. They + /// may, however, be arbitrarily deep. + #[serde(rename = "loc")] + pub loc: Vec, + /// The message accompanying the validation error item. + #[serde(rename = "msg")] + pub msg: String, + /// The type of error, often \"type_error\" or \"value_error\", but + /// sometimes with more context like as \"value_error.number.not_ge\" + #[serde(rename = "type")] + pub r#type: String, +} +impl ValidationError { + /// Validation errors have their own schema to provide context for invalid + /// requests eg. mismatched types and out of bounds values. There may be any + /// number of these per 422 UNPROCESSABLE ENTITY error. + pub fn new(loc: Vec, msg: String, r#type: String) -> ValidationError { + ValidationError { loc, msg, r#type } + } +}