diff --git a/.gitignore b/.gitignore index ec1f61a20935aeb36cc21d440863d1e690ae8a0b..94b4deaaffa92e69cb069c03d7e7ff6e1749431a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,10 +30,10 @@ target/ /data # model results -runs/ +/runs # model checkpoints -models/ +/models .env # Python diff --git a/tests/integration-tests/client/src/models/add_image_layer_response.rs b/tests/integration-tests/client/src/models/add_image_layer_response.rs new file mode 100644 index 0000000000000000000000000000000000000000..bd4fde2a50ee2e80f8aa60b11766b7514fb1781f --- /dev/null +++ b/tests/integration-tests/client/src/models/add_image_layer_response.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AddImageLayerResponse { + #[serde(rename = "node")] + pub node: uuid::Uuid, +} + +impl AddImageLayerResponse { + pub fn new(node: uuid::Uuid) -> AddImageLayerResponse { + AddImageLayerResponse { node } + } +} diff --git a/tests/integration-tests/client/src/models/app_config.rs b/tests/integration-tests/client/src/models/app_config.rs new file mode 100644 index 0000000000000000000000000000000000000000..31781d297b5d2e4df4b96bba739b352e9370e6c0 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_config.rs @@ -0,0 +1,35 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppConfig { + #[serde(rename = "data", skip_serializing_if = "Option::is_none")] + pub data: Option>, + #[serde(rename = "http", skip_serializing_if = "Option::is_none")] + pub http: Option>, + #[serde(rename = "pipeline", skip_serializing_if = "Option::is_none")] + pub pipeline: Option>, + #[serde(rename = "providers", skip_serializing_if = "Option::is_none")] + pub providers: Option>, +} + +impl AppConfig { + pub fn new() -> AppConfig { + AppConfig { + data: None, + http: None, + pipeline: None, + providers: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/app_event.rs b/tests/integration-tests/client/src/models/app_event.rs new file mode 100644 index 0000000000000000000000000000000000000000..42ac0ff1136eb7401782bab7c7f90017639dfa73 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event.rs @@ -0,0 +1,49 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AppEvent { + AppEventOneOf(Box), + AppEventOneOf1(Box), + AppEventOneOf2(Box), + AppEventOneOf3(Box), + AppEventOneOf4(Box), + AppEventOneOf5(Box), + AppEventOneOf6(Box), + AppEventOneOf7(Box), + AppEventOneOf8(Box), + AppEventOneOf9(Box), + AppEventOneOf10(Box), + AppEventOneOf11(Box), + AppEventOneOf12(Box), + AppEventOneOf13(Box), +} + +impl Default for AppEvent { + fn default() -> Self { + Self::AppEventOneOf(Default::default()) + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "error")] + Error, +} + +impl Default for Event { + fn default() -> Event { + Self::Error + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of.rs b/tests/integration-tests/client/src/models/app_event_one_of.rs new file mode 100644 index 0000000000000000000000000000000000000000..c7f1dc2ee427f06f26b374c32e4d660ba24bf6d2 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of.rs @@ -0,0 +1,44 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf { + #[serde(rename = "epoch")] + pub epoch: u64, + #[serde(rename = "event")] + pub event: Event, + #[serde(rename = "op")] + pub op: Box, +} + +impl AppEventOneOf { + pub fn new(epoch: u64, event: Event, op: models::Op) -> AppEventOneOf { + AppEventOneOf { + epoch, + event, + op: Box::new(op), + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "opApplied")] + OpApplied, +} + +impl Default for Event { + fn default() -> Event { + Self::OpApplied + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_1.rs b/tests/integration-tests/client/src/models/app_event_one_of_1.rs new file mode 100644 index 0000000000000000000000000000000000000000..2cafd0c9be1b8a00d2282d7b395655aa17d3d79e --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_1.rs @@ -0,0 +1,44 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf1 { + #[serde(rename = "epoch")] + pub epoch: u64, + #[serde(rename = "event")] + pub event: Event, + #[serde(rename = "op")] + pub op: Box, +} + +impl AppEventOneOf1 { + pub fn new(epoch: u64, event: Event, op: models::Op) -> AppEventOneOf1 { + AppEventOneOf1 { + epoch, + event, + op: Box::new(op), + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "opUndone")] + OpUndone, +} + +impl Default for Event { + fn default() -> Event { + Self::OpUndone + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_10.rs b/tests/integration-tests/client/src/models/app_event_one_of_10.rs new file mode 100644 index 0000000000000000000000000000000000000000..7976104d07df05d8a3ee2c24f6f5972906cf7331 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_10.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf10 { + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf10 { + pub fn new(event: Event) -> AppEventOneOf10 { + AppEventOneOf10 { event } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "llmUnloaded")] + LlmUnloaded, +} + +impl Default for Event { + fn default() -> Event { + Self::LlmUnloaded + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_11.rs b/tests/integration-tests/client/src/models/app_event_one_of_11.rs new file mode 100644 index 0000000000000000000000000000000000000000..31d51d8a9fee7b197e1601c986e5ce764565c3f9 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_11.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf11 { + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf11 { + pub fn new(event: Event) -> AppEventOneOf11 { + AppEventOneOf11 { event } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "configChanged")] + ConfigChanged, +} + +impl Default for Event { + fn default() -> Event { + Self::ConfigChanged + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_12.rs b/tests/integration-tests/client/src/models/app_event_one_of_12.rs new file mode 100644 index 0000000000000000000000000000000000000000..b635c7983302fd07da20f93d78f31bb4157bfc57 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_12.rs @@ -0,0 +1,48 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf12 { + #[serde(rename = "downloads")] + pub downloads: Vec, + #[serde(rename = "jobs")] + pub jobs: Vec, + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf12 { + pub fn new( + downloads: Vec, + jobs: Vec, + event: Event, + ) -> AppEventOneOf12 { + AppEventOneOf12 { + downloads, + jobs, + event, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "snapshot")] + Snapshot, +} + +impl Default for Event { + fn default() -> Event { + Self::Snapshot + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_13.rs b/tests/integration-tests/client/src/models/app_event_one_of_13.rs new file mode 100644 index 0000000000000000000000000000000000000000..d5f301c0e6cf7a9f71c93196dad3628f2f9d1fb7 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_13.rs @@ -0,0 +1,44 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf13 { + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "scope")] + pub scope: String, + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf13 { + pub fn new(message: String, scope: String, event: Event) -> AppEventOneOf13 { + AppEventOneOf13 { + message, + scope, + event, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "error")] + Error, +} + +impl Default for Event { + fn default() -> Event { + Self::Error + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_2.rs b/tests/integration-tests/client/src/models/app_event_one_of_2.rs new file mode 100644 index 0000000000000000000000000000000000000000..3f0ab5915e1ba2efe414d1adef1708452987c554 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_2.rs @@ -0,0 +1,44 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf2 { + #[serde(rename = "epoch")] + pub epoch: u64, + #[serde(rename = "event")] + pub event: Event, + #[serde(rename = "op")] + pub op: Box, +} + +impl AppEventOneOf2 { + pub fn new(epoch: u64, event: Event, op: models::Op) -> AppEventOneOf2 { + AppEventOneOf2 { + epoch, + event, + op: Box::new(op), + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "opRedone")] + OpRedone, +} + +impl Default for Event { + fn default() -> Event { + Self::OpRedone + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_3.rs b/tests/integration-tests/client/src/models/app_event_one_of_3.rs new file mode 100644 index 0000000000000000000000000000000000000000..b6568d1693dc9d699972a5cdbdd38f4c11bce222 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_3.rs @@ -0,0 +1,40 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf3 { + #[serde(rename = "event")] + pub event: Event, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "kind")] + pub kind: String, +} + +impl AppEventOneOf3 { + pub fn new(event: Event, id: String, kind: String) -> AppEventOneOf3 { + AppEventOneOf3 { event, id, kind } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "jobStarted")] + JobStarted, +} + +impl Default for Event { + fn default() -> Event { + Self::JobStarted + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_4.rs b/tests/integration-tests/client/src/models/app_event_one_of_4.rs new file mode 100644 index 0000000000000000000000000000000000000000..a7cbe00a801c06f41857e99df8f21c868fafd5e7 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_4.rs @@ -0,0 +1,71 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf4 { + #[serde(rename = "currentPage")] + pub current_page: i32, + #[serde(rename = "currentStepIndex")] + pub current_step_index: i32, + #[serde(rename = "jobId")] + pub job_id: String, + #[serde(rename = "overallPercent")] + pub overall_percent: i32, + #[serde(rename = "status")] + pub status: Box, + #[serde(rename = "step", skip_serializing_if = "Option::is_none")] + pub step: Option, + #[serde(rename = "totalPages")] + pub total_pages: i32, + #[serde(rename = "totalSteps")] + pub total_steps: i32, + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf4 { + pub fn new( + current_page: i32, + current_step_index: i32, + job_id: String, + overall_percent: i32, + status: models::PipelineStatus, + total_pages: i32, + total_steps: i32, + event: Event, + ) -> AppEventOneOf4 { + AppEventOneOf4 { + current_page, + current_step_index, + job_id, + overall_percent, + status: Box::new(status), + step: None, + total_pages, + total_steps, + event, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "jobProgress")] + JobProgress, +} + +impl Default for Event { + fn default() -> Event { + Self::JobProgress + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_5.rs b/tests/integration-tests/client/src/models/app_event_one_of_5.rs new file mode 100644 index 0000000000000000000000000000000000000000..1c54b0fcb2356886227704ac816da96290910e7c --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_5.rs @@ -0,0 +1,47 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf5 { + #[serde(rename = "error", skip_serializing_if = "Option::is_none")] + pub error: Option, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "status")] + pub status: models::JobStatus, + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf5 { + pub fn new(id: String, status: models::JobStatus, event: Event) -> AppEventOneOf5 { + AppEventOneOf5 { + error: None, + id, + status, + event, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "jobFinished")] + JobFinished, +} + +impl Default for Event { + fn default() -> Event { + Self::JobFinished + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_6.rs b/tests/integration-tests/client/src/models/app_event_one_of_6.rs new file mode 100644 index 0000000000000000000000000000000000000000..0b7f90a5f901779bcae5f15419a03a20c6e45c42 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_6.rs @@ -0,0 +1,59 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf6 { + #[serde(rename = "downloaded")] + pub downloaded: i64, + #[serde(rename = "filename")] + pub filename: String, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "status")] + pub status: Box, + #[serde(rename = "total", skip_serializing_if = "Option::is_none")] + pub total: Option, + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf6 { + pub fn new( + downloaded: i64, + filename: String, + id: String, + status: models::DownloadStatus, + event: Event, + ) -> AppEventOneOf6 { + AppEventOneOf6 { + downloaded, + filename, + id, + status: Box::new(status), + total: None, + event, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "downloadProgress")] + DownloadProgress, +} + +impl Default for Event { + fn default() -> Event { + Self::DownloadProgress + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_7.rs b/tests/integration-tests/client/src/models/app_event_one_of_7.rs new file mode 100644 index 0000000000000000000000000000000000000000..7b71575a97ab2b5c0dbb6fc95dd3ea44585c5566 --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_7.rs @@ -0,0 +1,53 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf7 { + /// Stable identifier — the `.khrproj` directory basename (without the extension). Clients address projects by this. + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// Absolute filesystem path. Informational; clients never need to pass it back in — they use `id`. + #[serde(rename = "path")] + pub path: String, + /// Last modification time of the project directory on disk (ms since UNIX epoch). Used for \"recent projects\" ordering. + #[serde(rename = "updatedAtMs", skip_serializing_if = "Option::is_none")] + pub updated_at_ms: Option, + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf7 { + pub fn new(id: String, name: String, path: String, event: Event) -> AppEventOneOf7 { + AppEventOneOf7 { + id, + name, + path, + updated_at_ms: None, + event, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "projectOpened")] + ProjectOpened, +} + +impl Default for Event { + fn default() -> Event { + Self::ProjectOpened + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_8.rs b/tests/integration-tests/client/src/models/app_event_one_of_8.rs new file mode 100644 index 0000000000000000000000000000000000000000..e213044bc31f6fb42dc8585bc0c5020774cebcbb --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_8.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf8 { + #[serde(rename = "event")] + pub event: Event, +} + +impl AppEventOneOf8 { + pub fn new(event: Event) -> AppEventOneOf8 { + AppEventOneOf8 { event } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "projectClosed")] + ProjectClosed, +} + +impl Default for Event { + fn default() -> Event { + Self::ProjectClosed + } +} diff --git a/tests/integration-tests/client/src/models/app_event_one_of_9.rs b/tests/integration-tests/client/src/models/app_event_one_of_9.rs new file mode 100644 index 0000000000000000000000000000000000000000..1d2f3d78919e62956cca3a4d0afaeb0f9641d4bb --- /dev/null +++ b/tests/integration-tests/client/src/models/app_event_one_of_9.rs @@ -0,0 +1,41 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppEventOneOf9 { + #[serde(rename = "event")] + pub event: Event, + #[serde(rename = "target")] + pub target: Box, +} + +impl AppEventOneOf9 { + pub fn new(event: Event, target: models::LlmTarget) -> AppEventOneOf9 { + AppEventOneOf9 { + event, + target: Box::new(target), + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Event { + #[serde(rename = "llmLoaded")] + LlmLoaded, +} + +impl Default for Event { + fn default() -> Event { + Self::LlmLoaded + } +} diff --git a/tests/integration-tests/client/src/models/apply_result.rs b/tests/integration-tests/client/src/models/apply_result.rs new file mode 100644 index 0000000000000000000000000000000000000000..2db096a856797d26b8cf60d95358ee808f801d7e --- /dev/null +++ b/tests/integration-tests/client/src/models/apply_result.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplyResult { + #[serde(rename = "epoch")] + pub epoch: i64, +} + +impl ApplyResult { + pub fn new(epoch: i64) -> ApplyResult { + ApplyResult { epoch } + } +} diff --git a/tests/integration-tests/client/src/models/config_patch.rs b/tests/integration-tests/client/src/models/config_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..9b66a7ea7cb2c9768d6001b4e7ae087639043e8e --- /dev/null +++ b/tests/integration-tests/client/src/models/config_patch.rs @@ -0,0 +1,50 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ConfigPatch : Sparse patch for `koharu_app::AppConfig`. Missing fields mean \"leave as-is\". The `providers` field, if present, replaces the whole provider list — we do not merge by id because ordering is meaningful. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ConfigPatch { + #[serde( + rename = "http", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub http: Option>>, + #[serde( + rename = "pipeline", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub pipeline: Option>>, + /// If present, replaces the entire list. Api_key values of `\"[REDACTED]\"` are interpreted as \"leave the existing secret alone\". + #[serde( + rename = "providers", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub providers: Option>>, +} + +impl ConfigPatch { + /// Sparse patch for `koharu_app::AppConfig`. Missing fields mean \"leave as-is\". The `providers` field, if present, replaces the whole provider list — we do not merge by id because ordering is meaningful. + pub fn new() -> ConfigPatch { + ConfigPatch { + http: None, + pipeline: None, + providers: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/create_pages_response.rs b/tests/integration-tests/client/src/models/create_pages_response.rs new file mode 100644 index 0000000000000000000000000000000000000000..047d91c255f3e88fb629d6187ef513efd9a99f48 --- /dev/null +++ b/tests/integration-tests/client/src/models/create_pages_response.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreatePagesResponse { + #[serde(rename = "pages")] + pub pages: Vec, +} + +impl CreatePagesResponse { + pub fn new(pages: Vec) -> CreatePagesResponse { + CreatePagesResponse { pages } + } +} diff --git a/tests/integration-tests/client/src/models/create_project_request.rs b/tests/integration-tests/client/src/models/create_project_request.rs new file mode 100644 index 0000000000000000000000000000000000000000..9c6f9706526e20883c3e990e9cceebcb64a1057e --- /dev/null +++ b/tests/integration-tests/client/src/models/create_project_request.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateProjectRequest { + #[serde(rename = "name")] + pub name: String, +} + +impl CreateProjectRequest { + pub fn new(name: String) -> CreateProjectRequest { + CreateProjectRequest { name } + } +} diff --git a/tests/integration-tests/client/src/models/data_config.rs b/tests/integration-tests/client/src/models/data_config.rs new file mode 100644 index 0000000000000000000000000000000000000000..208afc6e3737f8317c1793e4200c2373b1f970e3 --- /dev/null +++ b/tests/integration-tests/client/src/models/data_config.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DataConfig { + #[serde(rename = "path")] + pub path: String, +} + +impl DataConfig { + pub fn new(path: String) -> DataConfig { + DataConfig { path } + } +} diff --git a/tests/integration-tests/client/src/models/download_progress.rs b/tests/integration-tests/client/src/models/download_progress.rs new file mode 100644 index 0000000000000000000000000000000000000000..f04ca7103a0b044eb336757b593099fb1a4bc4c1 --- /dev/null +++ b/tests/integration-tests/client/src/models/download_progress.rs @@ -0,0 +1,48 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DownloadProgress { + #[serde(rename = "downloaded")] + pub downloaded: u64, + #[serde(rename = "filename")] + pub filename: String, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "status")] + pub status: Box, + #[serde( + rename = "total", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub total: Option>, +} + +impl DownloadProgress { + pub fn new( + downloaded: u64, + filename: String, + id: String, + status: models::DownloadStatus, + ) -> DownloadProgress { + DownloadProgress { + downloaded, + filename, + id, + status: Box::new(status), + total: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/download_status.rs b/tests/integration-tests/client/src/models/download_status.rs new file mode 100644 index 0000000000000000000000000000000000000000..b6b3b6414d356420150cb7ff3587c7f2148ba5f6 --- /dev/null +++ b/tests/integration-tests/client/src/models/download_status.rs @@ -0,0 +1,39 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DownloadStatus { + DownloadStatusOneOf(Box), + DownloadStatusOneOf1(Box), + DownloadStatusOneOf2(Box), + DownloadStatusOneOf3(Box), +} + +impl Default for DownloadStatus { + fn default() -> Self { + Self::DownloadStatusOneOf(Default::default()) + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "failed")] + Failed, +} + +impl Default for Status { + fn default() -> Status { + Self::Failed + } +} diff --git a/tests/integration-tests/client/src/models/download_status_one_of.rs b/tests/integration-tests/client/src/models/download_status_one_of.rs new file mode 100644 index 0000000000000000000000000000000000000000..e01dcd4f582afc0887f33c52f40b433bd6f15117 --- /dev/null +++ b/tests/integration-tests/client/src/models/download_status_one_of.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DownloadStatusOneOf { + #[serde(rename = "status")] + pub status: Status, +} + +impl DownloadStatusOneOf { + pub fn new(status: Status) -> DownloadStatusOneOf { + DownloadStatusOneOf { status } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "started")] + Started, +} + +impl Default for Status { + fn default() -> Status { + Self::Started + } +} diff --git a/tests/integration-tests/client/src/models/download_status_one_of_1.rs b/tests/integration-tests/client/src/models/download_status_one_of_1.rs new file mode 100644 index 0000000000000000000000000000000000000000..c263ee416c031dce90e21796bf75d61e5895e1bc --- /dev/null +++ b/tests/integration-tests/client/src/models/download_status_one_of_1.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DownloadStatusOneOf1 { + #[serde(rename = "status")] + pub status: Status, +} + +impl DownloadStatusOneOf1 { + pub fn new(status: Status) -> DownloadStatusOneOf1 { + DownloadStatusOneOf1 { status } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "downloading")] + Downloading, +} + +impl Default for Status { + fn default() -> Status { + Self::Downloading + } +} diff --git a/tests/integration-tests/client/src/models/download_status_one_of_2.rs b/tests/integration-tests/client/src/models/download_status_one_of_2.rs new file mode 100644 index 0000000000000000000000000000000000000000..f1cd70dfb672417e73149e3e64556129205022bf --- /dev/null +++ b/tests/integration-tests/client/src/models/download_status_one_of_2.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DownloadStatusOneOf2 { + #[serde(rename = "status")] + pub status: Status, +} + +impl DownloadStatusOneOf2 { + pub fn new(status: Status) -> DownloadStatusOneOf2 { + DownloadStatusOneOf2 { status } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "completed")] + Completed, +} + +impl Default for Status { + fn default() -> Status { + Self::Completed + } +} diff --git a/tests/integration-tests/client/src/models/download_status_one_of_3.rs b/tests/integration-tests/client/src/models/download_status_one_of_3.rs new file mode 100644 index 0000000000000000000000000000000000000000..619f10b89d34e2f9d62cb623e39b13bc80d6e17d --- /dev/null +++ b/tests/integration-tests/client/src/models/download_status_one_of_3.rs @@ -0,0 +1,38 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DownloadStatusOneOf3 { + #[serde(rename = "reason")] + pub reason: String, + #[serde(rename = "status")] + pub status: Status, +} + +impl DownloadStatusOneOf3 { + pub fn new(reason: String, status: Status) -> DownloadStatusOneOf3 { + DownloadStatusOneOf3 { reason, status } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "failed")] + Failed, +} + +impl Default for Status { + fn default() -> Status { + Self::Failed + } +} diff --git a/tests/integration-tests/client/src/models/engine_catalog.rs b/tests/integration-tests/client/src/models/engine_catalog.rs new file mode 100644 index 0000000000000000000000000000000000000000..7f0326f90effeb78fb0ffff807cddcc196bc76df --- /dev/null +++ b/tests/integration-tests/client/src/models/engine_catalog.rs @@ -0,0 +1,52 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EngineCatalog { + #[serde(rename = "detectors")] + pub detectors: Vec, + #[serde(rename = "fontDetectors")] + pub font_detectors: Vec, + #[serde(rename = "inpainters")] + pub inpainters: Vec, + #[serde(rename = "ocr")] + pub ocr: Vec, + #[serde(rename = "renderers")] + pub renderers: Vec, + #[serde(rename = "segmenters")] + pub segmenters: Vec, + #[serde(rename = "translators")] + pub translators: Vec, +} + +impl EngineCatalog { + pub fn new( + detectors: Vec, + font_detectors: Vec, + inpainters: Vec, + ocr: Vec, + renderers: Vec, + segmenters: Vec, + translators: Vec, + ) -> EngineCatalog { + EngineCatalog { + detectors, + font_detectors, + inpainters, + ocr, + renderers, + segmenters, + translators, + } + } +} diff --git a/tests/integration-tests/client/src/models/engine_catalog_entry.rs b/tests/integration-tests/client/src/models/engine_catalog_entry.rs new file mode 100644 index 0000000000000000000000000000000000000000..76708bbd3d229eafad9e0f112948ffee5444b69b --- /dev/null +++ b/tests/integration-tests/client/src/models/engine_catalog_entry.rs @@ -0,0 +1,28 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EngineCatalogEntry { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "produces")] + pub produces: Vec, +} + +impl EngineCatalogEntry { + pub fn new(id: String, name: String, produces: Vec) -> EngineCatalogEntry { + EngineCatalogEntry { id, name, produces } + } +} diff --git a/tests/integration-tests/client/src/models/error_event.rs b/tests/integration-tests/client/src/models/error_event.rs new file mode 100644 index 0000000000000000000000000000000000000000..53e0a241081714d5b5d2c54ea7ac0a99e70a09fc --- /dev/null +++ b/tests/integration-tests/client/src/models/error_event.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ErrorEvent { + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "scope")] + pub scope: String, +} + +impl ErrorEvent { + pub fn new(message: String, scope: String) -> ErrorEvent { + ErrorEvent { message, scope } + } +} diff --git a/tests/integration-tests/client/src/models/export_format.rs b/tests/integration-tests/client/src/models/export_format.rs new file mode 100644 index 0000000000000000000000000000000000000000..1ba89556773a8b7a5fdb3800b46b4ae3ac91bcab --- /dev/null +++ b/tests/integration-tests/client/src/models/export_format.rs @@ -0,0 +1,42 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ExportFormat { + #[serde(rename = "khr")] + Khr, + #[serde(rename = "psd")] + Psd, + #[serde(rename = "rendered")] + Rendered, + #[serde(rename = "inpainted")] + Inpainted, +} + +impl std::fmt::Display for ExportFormat { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Khr => write!(f, "khr"), + Self::Psd => write!(f, "psd"), + Self::Rendered => write!(f, "rendered"), + Self::Inpainted => write!(f, "inpainted"), + } + } +} + +impl Default for ExportFormat { + fn default() -> ExportFormat { + Self::Khr + } +} diff --git a/tests/integration-tests/client/src/models/export_project_request.rs b/tests/integration-tests/client/src/models/export_project_request.rs new file mode 100644 index 0000000000000000000000000000000000000000..74fd7eefafa62206b2183ee22e8c52cd515ef9c7 --- /dev/null +++ b/tests/integration-tests/client/src/models/export_project_request.rs @@ -0,0 +1,35 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExportProjectRequest { + #[serde(rename = "format")] + pub format: models::ExportFormat, + /// Optional subset of pages; defaults to every page. + #[serde( + rename = "pages", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub pages: Option>>, +} + +impl ExportProjectRequest { + pub fn new(format: models::ExportFormat) -> ExportProjectRequest { + ExportProjectRequest { + format, + pages: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/export_project_response.rs b/tests/integration-tests/client/src/models/export_project_response.rs new file mode 100644 index 0000000000000000000000000000000000000000..0a9babe902f36bc95a36a367d9d28748e11950ac --- /dev/null +++ b/tests/integration-tests/client/src/models/export_project_response.rs @@ -0,0 +1,30 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExportProjectResponse { + #[serde(rename = "count")] + pub count: u32, + #[serde(rename = "path")] + pub path: String, +} + +impl ExportProjectResponse { + pub fn new(count: u32, path: String) -> ExportProjectResponse { + ExportProjectResponse { + count, + path, + } + } +} + diff --git a/tests/integration-tests/client/src/models/font_face_info.rs b/tests/integration-tests/client/src/models/font_face_info.rs new file mode 100644 index 0000000000000000000000000000000000000000..6e49345227cb50770bc55c8aaeccc73019b49ff6 --- /dev/null +++ b/tests/integration-tests/client/src/models/font_face_info.rs @@ -0,0 +1,48 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FontFaceInfo { + #[serde(rename = "cached")] + pub cached: bool, + #[serde( + rename = "category", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub category: Option>, + #[serde(rename = "familyName")] + pub family_name: String, + #[serde(rename = "postScriptName")] + pub post_script_name: String, + #[serde(rename = "source")] + pub source: models::FontSource, +} + +impl FontFaceInfo { + pub fn new( + cached: bool, + family_name: String, + post_script_name: String, + source: models::FontSource, + ) -> FontFaceInfo { + FontFaceInfo { + cached, + category: None, + family_name, + post_script_name, + source, + } + } +} diff --git a/tests/integration-tests/client/src/models/font_prediction.rs b/tests/integration-tests/client/src/models/font_prediction.rs new file mode 100644 index 0000000000000000000000000000000000000000..e67fae918a77e768919c5611e7370418ad1804ea --- /dev/null +++ b/tests/integration-tests/client/src/models/font_prediction.rs @@ -0,0 +1,60 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FontPrediction { + #[serde(rename = "angleDeg")] + pub angle_deg: f32, + #[serde(rename = "direction")] + pub direction: models::TextDirection, + #[serde(rename = "fontSizePx")] + pub font_size_px: f32, + #[serde(rename = "lineHeight")] + pub line_height: f32, + #[serde(rename = "namedFonts")] + pub named_fonts: Vec, + #[serde(rename = "strokeColor")] + pub stroke_color: Vec, + #[serde(rename = "strokeWidthPx")] + pub stroke_width_px: f32, + #[serde(rename = "textColor")] + pub text_color: Vec, + #[serde(rename = "topFonts")] + pub top_fonts: Vec, +} + +impl FontPrediction { + pub fn new( + angle_deg: f32, + direction: models::TextDirection, + font_size_px: f32, + line_height: f32, + named_fonts: Vec, + stroke_color: Vec, + stroke_width_px: f32, + text_color: Vec, + top_fonts: Vec, + ) -> FontPrediction { + FontPrediction { + angle_deg, + direction, + font_size_px, + line_height, + named_fonts, + stroke_color, + stroke_width_px, + text_color, + top_fonts, + } + } +} diff --git a/tests/integration-tests/client/src/models/font_source.rs b/tests/integration-tests/client/src/models/font_source.rs new file mode 100644 index 0000000000000000000000000000000000000000..e87e72b3e4abfb55ea38599fee48c30b4fce929f --- /dev/null +++ b/tests/integration-tests/client/src/models/font_source.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FontSource { + #[serde(rename = "system")] + System, + #[serde(rename = "google")] + Google, +} + +impl std::fmt::Display for FontSource { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::System => write!(f, "system"), + Self::Google => write!(f, "google"), + } + } +} + +impl Default for FontSource { + fn default() -> FontSource { + Self::System + } +} diff --git a/tests/integration-tests/client/src/models/google_font_catalog.rs b/tests/integration-tests/client/src/models/google_font_catalog.rs new file mode 100644 index 0000000000000000000000000000000000000000..ce0bd21f6ca442facc330d65340cf8f00f5474c5 --- /dev/null +++ b/tests/integration-tests/client/src/models/google_font_catalog.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GoogleFontCatalog { + #[serde(rename = "fonts")] + pub fonts: Vec, +} + +impl GoogleFontCatalog { + pub fn new(fonts: Vec) -> GoogleFontCatalog { + GoogleFontCatalog { fonts } + } +} diff --git a/tests/integration-tests/client/src/models/google_font_entry.rs b/tests/integration-tests/client/src/models/google_font_entry.rs new file mode 100644 index 0000000000000000000000000000000000000000..1856ae3d908784f5638150ac8376930073c5b7a7 --- /dev/null +++ b/tests/integration-tests/client/src/models/google_font_entry.rs @@ -0,0 +1,40 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GoogleFontEntry { + #[serde(rename = "category")] + pub category: String, + #[serde(rename = "family")] + pub family: String, + #[serde(rename = "subsets")] + pub subsets: Vec, + #[serde(rename = "variants")] + pub variants: Vec, +} + +impl GoogleFontEntry { + pub fn new( + category: String, + family: String, + subsets: Vec, + variants: Vec, + ) -> GoogleFontEntry { + GoogleFontEntry { + category, + family, + subsets, + variants, + } + } +} diff --git a/tests/integration-tests/client/src/models/google_font_variant.rs b/tests/integration-tests/client/src/models/google_font_variant.rs new file mode 100644 index 0000000000000000000000000000000000000000..b778f8d0a107a566c9e828e5bb2b319c7cdf537f --- /dev/null +++ b/tests/integration-tests/client/src/models/google_font_variant.rs @@ -0,0 +1,32 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GoogleFontVariant { + #[serde(rename = "filename")] + pub filename: String, + #[serde(rename = "style")] + pub style: String, + #[serde(rename = "weight")] + pub weight: u32, +} + +impl GoogleFontVariant { + pub fn new(filename: String, style: String, weight: u32) -> GoogleFontVariant { + GoogleFontVariant { + filename, + style, + weight, + } + } +} diff --git a/tests/integration-tests/client/src/models/history_result.rs b/tests/integration-tests/client/src/models/history_result.rs new file mode 100644 index 0000000000000000000000000000000000000000..9739523e9fca53d86f7f0c22ed6dab3d97daf23c --- /dev/null +++ b/tests/integration-tests/client/src/models/history_result.rs @@ -0,0 +1,30 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct HistoryResult { + /// New epoch. `None` only for a no-op undo/redo at the stack boundary. + #[serde( + rename = "epoch", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub epoch: Option>, +} + +impl HistoryResult { + pub fn new() -> HistoryResult { + HistoryResult { epoch: None } + } +} diff --git a/tests/integration-tests/client/src/models/http_config.rs b/tests/integration-tests/client/src/models/http_config.rs new file mode 100644 index 0000000000000000000000000000000000000000..2a33db1a8b5b0e635dff0675fa054e8d1ec11c14 --- /dev/null +++ b/tests/integration-tests/client/src/models/http_config.rs @@ -0,0 +1,32 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct HttpConfig { + #[serde(rename = "connect_timeout", skip_serializing_if = "Option::is_none")] + pub connect_timeout: Option, + #[serde(rename = "max_retries", skip_serializing_if = "Option::is_none")] + pub max_retries: Option, + #[serde(rename = "read_timeout", skip_serializing_if = "Option::is_none")] + pub read_timeout: Option, +} + +impl HttpConfig { + pub fn new() -> HttpConfig { + HttpConfig { + connect_timeout: None, + max_retries: None, + read_timeout: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/http_config_patch.rs b/tests/integration-tests/client/src/models/http_config_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..4eaca4e8b529ed9f0b29f73bd5b684f69dcc8d8e --- /dev/null +++ b/tests/integration-tests/client/src/models/http_config_patch.rs @@ -0,0 +1,47 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct HttpConfigPatch { + #[serde( + rename = "connectTimeout", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub connect_timeout: Option>, + #[serde( + rename = "maxRetries", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub max_retries: Option>, + #[serde( + rename = "readTimeout", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub read_timeout: Option>, +} + +impl HttpConfigPatch { + pub fn new() -> HttpConfigPatch { + HttpConfigPatch { + connect_timeout: None, + max_retries: None, + read_timeout: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/image_data.rs b/tests/integration-tests/client/src/models/image_data.rs new file mode 100644 index 0000000000000000000000000000000000000000..f532c6b5c12be8e28cf7eb059b5ef0b7ab20833f --- /dev/null +++ b/tests/integration-tests/client/src/models/image_data.rs @@ -0,0 +1,53 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ImageData { + /// Hex-encoded blake3 hash of an immutable blob. + #[serde(rename = "blob")] + pub blob: String, + #[serde( + rename = "name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub name: Option>, + #[serde(rename = "naturalHeight")] + pub natural_height: u32, + #[serde(rename = "naturalWidth")] + pub natural_width: u32, + #[serde(rename = "opacity", skip_serializing_if = "Option::is_none")] + pub opacity: Option, + /// Role tags differentiate source / inpainted / rendered / user-imported images. Role is immutable on an existing node — switching roles = delete + add. + #[serde(rename = "role")] + pub role: models::ImageRole, +} + +impl ImageData { + pub fn new( + blob: String, + natural_height: u32, + natural_width: u32, + role: models::ImageRole, + ) -> ImageData { + ImageData { + blob, + name: None, + natural_height, + natural_width, + opacity: None, + role, + } + } +} diff --git a/tests/integration-tests/client/src/models/image_data_patch.rs b/tests/integration-tests/client/src/models/image_data_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..97b1c270fc7f50a299c01a8d801fefb5215bef04 --- /dev/null +++ b/tests/integration-tests/client/src/models/image_data_patch.rs @@ -0,0 +1,64 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ImageDataPatch { + /// Hex-encoded blake3 hash of an immutable blob. + #[serde( + rename = "blob", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub blob: Option>, + #[serde( + rename = "name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub name: Option>, + #[serde( + rename = "naturalHeight", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub natural_height: Option>, + #[serde( + rename = "naturalWidth", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub natural_width: Option>, + #[serde( + rename = "opacity", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub opacity: Option>, +} + +impl ImageDataPatch { + pub fn new() -> ImageDataPatch { + ImageDataPatch { + blob: None, + name: None, + natural_height: None, + natural_width: None, + opacity: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/image_role.rs b/tests/integration-tests/client/src/models/image_role.rs new file mode 100644 index 0000000000000000000000000000000000000000..daf0283260ce72c7606021c8313acca537575fa2 --- /dev/null +++ b/tests/integration-tests/client/src/models/image_role.rs @@ -0,0 +1,42 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ImageRole { + #[serde(rename = "source")] + Source, + #[serde(rename = "inpainted")] + Inpainted, + #[serde(rename = "rendered")] + Rendered, + #[serde(rename = "custom")] + Custom, +} + +impl std::fmt::Display for ImageRole { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Source => write!(f, "source"), + Self::Inpainted => write!(f, "inpainted"), + Self::Rendered => write!(f, "rendered"), + Self::Custom => write!(f, "custom"), + } + } +} + +impl Default for ImageRole { + fn default() -> ImageRole { + Self::Source + } +} diff --git a/tests/integration-tests/client/src/models/import_pages_response.rs b/tests/integration-tests/client/src/models/import_pages_response.rs new file mode 100644 index 0000000000000000000000000000000000000000..c51aa7b8216078627c9921ae5b1b24b07a06de3f --- /dev/null +++ b/tests/integration-tests/client/src/models/import_pages_response.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ImportPagesResponse { + #[serde(rename = "pages")] + pub pages: Vec, +} + +impl ImportPagesResponse { + pub fn new(pages: Vec) -> ImportPagesResponse { + ImportPagesResponse { pages } + } +} diff --git a/tests/integration-tests/client/src/models/job_finished_event.rs b/tests/integration-tests/client/src/models/job_finished_event.rs new file mode 100644 index 0000000000000000000000000000000000000000..0c89c8a60332dda2203ccded5adced2b7a08fb4e --- /dev/null +++ b/tests/integration-tests/client/src/models/job_finished_event.rs @@ -0,0 +1,37 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct JobFinishedEvent { + #[serde( + rename = "error", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error: Option>, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "status")] + pub status: models::JobStatus, +} + +impl JobFinishedEvent { + pub fn new(id: String, status: models::JobStatus) -> JobFinishedEvent { + JobFinishedEvent { + error: None, + id, + status, + } + } +} diff --git a/tests/integration-tests/client/src/models/job_status.rs b/tests/integration-tests/client/src/models/job_status.rs new file mode 100644 index 0000000000000000000000000000000000000000..1eb7347a2d27a3220662b52ae4c188d7e78cfc3c --- /dev/null +++ b/tests/integration-tests/client/src/models/job_status.rs @@ -0,0 +1,45 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum JobStatus { + #[serde(rename = "running")] + Running, + #[serde(rename = "completed")] + Completed, + #[serde(rename = "completed_with_errors")] + CompletedWithErrors, + #[serde(rename = "cancelled")] + Cancelled, + #[serde(rename = "failed")] + Failed, +} + +impl std::fmt::Display for JobStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Running => write!(f, "running"), + Self::Completed => write!(f, "completed"), + Self::CompletedWithErrors => write!(f, "completed_with_errors"), + Self::Cancelled => write!(f, "cancelled"), + Self::Failed => write!(f, "failed"), + } + } +} + +impl Default for JobStatus { + fn default() -> JobStatus { + Self::Running + } +} diff --git a/tests/integration-tests/client/src/models/job_summary.rs b/tests/integration-tests/client/src/models/job_summary.rs new file mode 100644 index 0000000000000000000000000000000000000000..62d3e3a9482080f9c135ee10f57ee08f7c6ae980 --- /dev/null +++ b/tests/integration-tests/client/src/models/job_summary.rs @@ -0,0 +1,40 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct JobSummary { + #[serde( + rename = "error", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error: Option>, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "kind")] + pub kind: String, + #[serde(rename = "status")] + pub status: models::JobStatus, +} + +impl JobSummary { + pub fn new(id: String, kind: String, status: models::JobStatus) -> JobSummary { + JobSummary { + error: None, + id, + kind, + status, + } + } +} diff --git a/tests/integration-tests/client/src/models/list_projects_response.rs b/tests/integration-tests/client/src/models/list_projects_response.rs new file mode 100644 index 0000000000000000000000000000000000000000..e6dc0bc5ff6ecc28f180d358558b100cd4390349 --- /dev/null +++ b/tests/integration-tests/client/src/models/list_projects_response.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListProjectsResponse { + #[serde(rename = "projects")] + pub projects: Vec, +} + +impl ListProjectsResponse { + pub fn new(projects: Vec) -> ListProjectsResponse { + ListProjectsResponse { projects } + } +} diff --git a/tests/integration-tests/client/src/models/llm_catalog.rs b/tests/integration-tests/client/src/models/llm_catalog.rs new file mode 100644 index 0000000000000000000000000000000000000000..fb5fc2880d5200a7174288b6c31b0c9f90830403 --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_catalog.rs @@ -0,0 +1,32 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LlmCatalog { + #[serde(rename = "localModels")] + pub local_models: Vec, + #[serde(rename = "providers")] + pub providers: Vec, +} + +impl LlmCatalog { + pub fn new( + local_models: Vec, + providers: Vec, + ) -> LlmCatalog { + LlmCatalog { + local_models, + providers, + } + } +} diff --git a/tests/integration-tests/client/src/models/llm_catalog_model.rs b/tests/integration-tests/client/src/models/llm_catalog_model.rs new file mode 100644 index 0000000000000000000000000000000000000000..821150bf575b18fa094dcdb817a264494257588c --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_catalog_model.rs @@ -0,0 +1,32 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LlmCatalogModel { + #[serde(rename = "languages")] + pub languages: Vec, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "target")] + pub target: Box, +} + +impl LlmCatalogModel { + pub fn new(languages: Vec, name: String, target: models::LlmTarget) -> LlmCatalogModel { + LlmCatalogModel { + languages, + name, + target: Box::new(target), + } + } +} diff --git a/tests/integration-tests/client/src/models/llm_generation_options.rs b/tests/integration-tests/client/src/models/llm_generation_options.rs new file mode 100644 index 0000000000000000000000000000000000000000..dd16a212cda0e09adcac81bd1ea09ac474179a9c --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_generation_options.rs @@ -0,0 +1,47 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LlmGenerationOptions { + #[serde( + rename = "customSystemPrompt", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub custom_system_prompt: Option>, + #[serde( + rename = "maxTokens", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub max_tokens: Option>, + #[serde( + rename = "temperature", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub temperature: Option>, +} + +impl LlmGenerationOptions { + pub fn new() -> LlmGenerationOptions { + LlmGenerationOptions { + custom_system_prompt: None, + max_tokens: None, + temperature: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/llm_load_request.rs b/tests/integration-tests/client/src/models/llm_load_request.rs new file mode 100644 index 0000000000000000000000000000000000000000..bc3b2d4c7e096e174e7d7f95f9f5fe60e991c273 --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_load_request.rs @@ -0,0 +1,34 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LlmLoadRequest { + #[serde( + rename = "options", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub options: Option>>, + #[serde(rename = "target")] + pub target: Box, +} + +impl LlmLoadRequest { + pub fn new(target: models::LlmTarget) -> LlmLoadRequest { + LlmLoadRequest { + options: None, + target: Box::new(target), + } + } +} diff --git a/tests/integration-tests/client/src/models/llm_provider_catalog.rs b/tests/integration-tests/client/src/models/llm_provider_catalog.rs new file mode 100644 index 0000000000000000000000000000000000000000..43f6bd15d51ca2f00adf12d7a0e9c4cd3edd6750 --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_provider_catalog.rs @@ -0,0 +1,68 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LlmProviderCatalog { + #[serde( + rename = "baseUrl", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub base_url: Option>, + #[serde( + rename = "error", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error: Option>, + #[serde(rename = "hasApiKey")] + pub has_api_key: bool, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "models")] + pub models: Vec, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "requiresApiKey")] + pub requires_api_key: bool, + #[serde(rename = "requiresBaseUrl")] + pub requires_base_url: bool, + #[serde(rename = "status")] + pub status: models::LlmProviderCatalogStatus, +} + +impl LlmProviderCatalog { + pub fn new( + has_api_key: bool, + id: String, + models: Vec, + name: String, + requires_api_key: bool, + requires_base_url: bool, + status: models::LlmProviderCatalogStatus, + ) -> LlmProviderCatalog { + LlmProviderCatalog { + base_url: None, + error: None, + has_api_key, + id, + models, + name, + requires_api_key, + requires_base_url, + status, + } + } +} diff --git a/tests/integration-tests/client/src/models/llm_provider_catalog_status.rs b/tests/integration-tests/client/src/models/llm_provider_catalog_status.rs new file mode 100644 index 0000000000000000000000000000000000000000..64fe00624db42d7bb22ae93bb85e1ea4e78aa600 --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_provider_catalog_status.rs @@ -0,0 +1,39 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LlmProviderCatalogStatus { + #[serde(rename = "ready")] + Ready, + #[serde(rename = "missing_configuration")] + MissingConfiguration, + #[serde(rename = "discovery_failed")] + DiscoveryFailed, +} + +impl std::fmt::Display for LlmProviderCatalogStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Ready => write!(f, "ready"), + Self::MissingConfiguration => write!(f, "missing_configuration"), + Self::DiscoveryFailed => write!(f, "discovery_failed"), + } + } +} + +impl Default for LlmProviderCatalogStatus { + fn default() -> LlmProviderCatalogStatus { + Self::Ready + } +} diff --git a/tests/integration-tests/client/src/models/llm_state.rs b/tests/integration-tests/client/src/models/llm_state.rs new file mode 100644 index 0000000000000000000000000000000000000000..8b81c1dffda17379ec42e9a64004cb720d34b325 --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_state.rs @@ -0,0 +1,42 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LlmState { + #[serde( + rename = "error", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub error: Option>, + #[serde(rename = "status")] + pub status: models::LlmStateStatus, + #[serde( + rename = "target", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub target: Option>>, +} + +impl LlmState { + pub fn new(status: models::LlmStateStatus) -> LlmState { + LlmState { + error: None, + status, + target: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/llm_state_status.rs b/tests/integration-tests/client/src/models/llm_state_status.rs new file mode 100644 index 0000000000000000000000000000000000000000..f31ca1627a97449a4d813755407916fdecf2868a --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_state_status.rs @@ -0,0 +1,42 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LlmStateStatus { + #[serde(rename = "empty")] + Empty, + #[serde(rename = "loading")] + Loading, + #[serde(rename = "ready")] + Ready, + #[serde(rename = "failed")] + Failed, +} + +impl std::fmt::Display for LlmStateStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Empty => write!(f, "empty"), + Self::Loading => write!(f, "loading"), + Self::Ready => write!(f, "ready"), + Self::Failed => write!(f, "failed"), + } + } +} + +impl Default for LlmStateStatus { + fn default() -> LlmStateStatus { + Self::Empty + } +} diff --git a/tests/integration-tests/client/src/models/llm_target.rs b/tests/integration-tests/client/src/models/llm_target.rs new file mode 100644 index 0000000000000000000000000000000000000000..5e504478bb3298ec8a76d3f28ea8b08148dbed46 --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_target.rs @@ -0,0 +1,37 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LlmTarget { + #[serde(rename = "kind")] + pub kind: models::LlmTargetKind, + #[serde(rename = "modelId")] + pub model_id: String, + #[serde( + rename = "providerId", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub provider_id: Option>, +} + +impl LlmTarget { + pub fn new(kind: models::LlmTargetKind, model_id: String) -> LlmTarget { + LlmTarget { + kind, + model_id, + provider_id: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/llm_target_kind.rs b/tests/integration-tests/client/src/models/llm_target_kind.rs new file mode 100644 index 0000000000000000000000000000000000000000..51bc5aa867317ce54896be22ee52d71030f2ed91 --- /dev/null +++ b/tests/integration-tests/client/src/models/llm_target_kind.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LlmTargetKind { + #[serde(rename = "local")] + Local, + #[serde(rename = "provider")] + Provider, +} + +impl std::fmt::Display for LlmTargetKind { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Local => write!(f, "local"), + Self::Provider => write!(f, "provider"), + } + } +} + +impl Default for LlmTargetKind { + fn default() -> LlmTargetKind { + Self::Local + } +} diff --git a/tests/integration-tests/client/src/models/mask_data.rs b/tests/integration-tests/client/src/models/mask_data.rs new file mode 100644 index 0000000000000000000000000000000000000000..589a3f0c57fa7790d52246e8ee55dcf8496905e0 --- /dev/null +++ b/tests/integration-tests/client/src/models/mask_data.rs @@ -0,0 +1,27 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MaskData { + /// Hex-encoded blake3 hash of an immutable blob. + #[serde(rename = "blob")] + pub blob: String, + #[serde(rename = "role")] + pub role: models::MaskRole, +} + +impl MaskData { + pub fn new(blob: String, role: models::MaskRole) -> MaskData { + MaskData { blob, role } + } +} diff --git a/tests/integration-tests/client/src/models/mask_data_patch.rs b/tests/integration-tests/client/src/models/mask_data_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..251b4347a48c0854bae8131131999b3f285e3d81 --- /dev/null +++ b/tests/integration-tests/client/src/models/mask_data_patch.rs @@ -0,0 +1,30 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MaskDataPatch { + /// Hex-encoded blake3 hash of an immutable blob. + #[serde( + rename = "blob", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub blob: Option>, +} + +impl MaskDataPatch { + pub fn new() -> MaskDataPatch { + MaskDataPatch { blob: None } + } +} diff --git a/tests/integration-tests/client/src/models/mask_role.rs b/tests/integration-tests/client/src/models/mask_role.rs new file mode 100644 index 0000000000000000000000000000000000000000..4a6544704a9ac8a277ae2155b8ee640c62fdbc2a --- /dev/null +++ b/tests/integration-tests/client/src/models/mask_role.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MaskRole { + #[serde(rename = "brushInpaint")] + BrushInpaint, + #[serde(rename = "segment")] + Segment, +} + +impl std::fmt::Display for MaskRole { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::BrushInpaint => write!(f, "brushInpaint"), + Self::Segment => write!(f, "segment"), + } + } +} + +impl Default for MaskRole { + fn default() -> MaskRole { + Self::BrushInpaint + } +} diff --git a/tests/integration-tests/client/src/models/meta_info.rs b/tests/integration-tests/client/src/models/meta_info.rs new file mode 100644 index 0000000000000000000000000000000000000000..e467ee879f81e9dea5d6a109637e549f9375e077 --- /dev/null +++ b/tests/integration-tests/client/src/models/meta_info.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetaInfo { + #[serde(rename = "mlDevice")] + pub ml_device: String, + #[serde(rename = "version")] + pub version: String, +} + +impl MetaInfo { + pub fn new(ml_device: String, version: String) -> MetaInfo { + MetaInfo { ml_device, version } + } +} diff --git a/tests/integration-tests/client/src/models/mod.rs b/tests/integration-tests/client/src/models/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..d13aff0cee00b43e1f9135d609e6e17b45c0397f --- /dev/null +++ b/tests/integration-tests/client/src/models/mod.rs @@ -0,0 +1,258 @@ +pub mod add_image_layer_response; +pub use self::add_image_layer_response::AddImageLayerResponse; +pub mod app_config; +pub use self::app_config::AppConfig; +pub mod app_event; +pub use self::app_event::AppEvent; +pub mod app_event_one_of; +pub use self::app_event_one_of::AppEventOneOf; +pub mod app_event_one_of_1; +pub use self::app_event_one_of_1::AppEventOneOf1; +pub mod app_event_one_of_10; +pub use self::app_event_one_of_10::AppEventOneOf10; +pub mod app_event_one_of_11; +pub use self::app_event_one_of_11::AppEventOneOf11; +pub mod app_event_one_of_12; +pub use self::app_event_one_of_12::AppEventOneOf12; +pub mod app_event_one_of_13; +pub use self::app_event_one_of_13::AppEventOneOf13; +pub mod app_event_one_of_2; +pub use self::app_event_one_of_2::AppEventOneOf2; +pub mod app_event_one_of_3; +pub use self::app_event_one_of_3::AppEventOneOf3; +pub mod app_event_one_of_4; +pub use self::app_event_one_of_4::AppEventOneOf4; +pub mod app_event_one_of_5; +pub use self::app_event_one_of_5::AppEventOneOf5; +pub mod app_event_one_of_6; +pub use self::app_event_one_of_6::AppEventOneOf6; +pub mod app_event_one_of_7; +pub use self::app_event_one_of_7::AppEventOneOf7; +pub mod app_event_one_of_8; +pub use self::app_event_one_of_8::AppEventOneOf8; +pub mod app_event_one_of_9; +pub use self::app_event_one_of_9::AppEventOneOf9; +pub mod config_patch; +pub use self::config_patch::ConfigPatch; +pub mod create_pages_response; +pub use self::create_pages_response::CreatePagesResponse; +pub mod create_project_request; +pub use self::create_project_request::CreateProjectRequest; +pub mod data_config; +pub use self::data_config::DataConfig; +pub mod download_progress; +pub use self::download_progress::DownloadProgress; +pub mod download_status; +pub use self::download_status::DownloadStatus; +pub mod download_status_one_of; +pub use self::download_status_one_of::DownloadStatusOneOf; +pub mod download_status_one_of_1; +pub use self::download_status_one_of_1::DownloadStatusOneOf1; +pub mod download_status_one_of_2; +pub use self::download_status_one_of_2::DownloadStatusOneOf2; +pub mod download_status_one_of_3; +pub use self::download_status_one_of_3::DownloadStatusOneOf3; +pub mod engine_catalog; +pub use self::engine_catalog::EngineCatalog; +pub mod engine_catalog_entry; +pub use self::engine_catalog_entry::EngineCatalogEntry; +pub mod error_event; +pub use self::error_event::ErrorEvent; +pub mod export_format; +pub use self::export_format::ExportFormat; +pub mod export_project_request; +pub use self::export_project_request::ExportProjectRequest; +pub mod font_face_info; +pub use self::font_face_info::FontFaceInfo; +pub mod font_prediction; +pub use self::font_prediction::FontPrediction; +pub mod font_source; +pub use self::font_source::FontSource; +pub mod google_font_catalog; +pub use self::google_font_catalog::GoogleFontCatalog; +pub mod google_font_entry; +pub use self::google_font_entry::GoogleFontEntry; +pub mod google_font_variant; +pub use self::google_font_variant::GoogleFontVariant; +pub mod history_result; +pub use self::history_result::HistoryResult; +pub mod http_config; +pub use self::http_config::HttpConfig; +pub mod http_config_patch; +pub use self::http_config_patch::HttpConfigPatch; +pub mod image_data; +pub use self::image_data::ImageData; +pub mod image_data_patch; +pub use self::image_data_patch::ImageDataPatch; +pub mod image_role; +pub use self::image_role::ImageRole; +pub mod job_finished_event; +pub use self::job_finished_event::JobFinishedEvent; +pub mod job_status; +pub use self::job_status::JobStatus; +pub mod job_summary; +pub use self::job_summary::JobSummary; +pub mod list_projects_response; +pub use self::list_projects_response::ListProjectsResponse; +pub mod llm_catalog; +pub use self::llm_catalog::LlmCatalog; +pub mod llm_catalog_model; +pub use self::llm_catalog_model::LlmCatalogModel; +pub mod llm_generation_options; +pub use self::llm_generation_options::LlmGenerationOptions; +pub mod llm_load_request; +pub use self::llm_load_request::LlmLoadRequest; +pub mod llm_provider_catalog; +pub use self::llm_provider_catalog::LlmProviderCatalog; +pub mod llm_provider_catalog_status; +pub use self::llm_provider_catalog_status::LlmProviderCatalogStatus; +pub mod llm_state; +pub use self::llm_state::LlmState; +pub mod llm_state_status; +pub use self::llm_state_status::LlmStateStatus; +pub mod llm_target; +pub use self::llm_target::LlmTarget; +pub mod llm_target_kind; +pub use self::llm_target_kind::LlmTargetKind; +pub mod mask_data; +pub use self::mask_data::MaskData; +pub mod mask_data_patch; +pub use self::mask_data_patch::MaskDataPatch; +pub mod mask_role; +pub use self::mask_role::MaskRole; +pub mod meta_info; +pub use self::meta_info::MetaInfo; +pub mod named_font_prediction; +pub use self::named_font_prediction::NamedFontPrediction; +pub mod node; +pub use self::node::Node; +pub mod node_data_patch; +pub use self::node_data_patch::NodeDataPatch; +pub mod node_data_patch_one_of; +pub use self::node_data_patch_one_of::NodeDataPatchOneOf; +pub mod node_data_patch_one_of_1; +pub use self::node_data_patch_one_of_1::NodeDataPatchOneOf1; +pub mod node_data_patch_one_of_2; +pub use self::node_data_patch_one_of_2::NodeDataPatchOneOf2; +pub mod node_kind; +pub use self::node_kind::NodeKind; +pub mod node_kind_one_of; +pub use self::node_kind_one_of::NodeKindOneOf; +pub mod node_kind_one_of_1; +pub use self::node_kind_one_of_1::NodeKindOneOf1; +pub mod node_kind_one_of_2; +pub use self::node_kind_one_of_2::NodeKindOneOf2; +pub mod node_patch; +pub use self::node_patch::NodePatch; +pub mod op; +pub use self::op::Op; +pub mod op_one_of; +pub use self::op_one_of::OpOneOf; +pub mod op_one_of_1; +pub use self::op_one_of_1::OpOneOf1; +pub mod op_one_of_1_add_page; +pub use self::op_one_of_1_add_page::OpOneOf1AddPage; +pub mod op_one_of_2; +pub use self::op_one_of_2::OpOneOf2; +pub mod op_one_of_2_remove_page; +pub use self::op_one_of_2_remove_page::OpOneOf2RemovePage; +pub mod op_one_of_3; +pub use self::op_one_of_3::OpOneOf3; +pub mod op_one_of_3_update_page; +pub use self::op_one_of_3_update_page::OpOneOf3UpdatePage; +pub mod op_one_of_4; +pub use self::op_one_of_4::OpOneOf4; +pub mod op_one_of_4_reorder_pages; +pub use self::op_one_of_4_reorder_pages::OpOneOf4ReorderPages; +pub mod op_one_of_5; +pub use self::op_one_of_5::OpOneOf5; +pub mod op_one_of_5_add_node; +pub use self::op_one_of_5_add_node::OpOneOf5AddNode; +pub mod op_one_of_6; +pub use self::op_one_of_6::OpOneOf6; +pub mod op_one_of_6_remove_node; +pub use self::op_one_of_6_remove_node::OpOneOf6RemoveNode; +pub mod op_one_of_7; +pub use self::op_one_of_7::OpOneOf7; +pub mod op_one_of_7_update_node; +pub use self::op_one_of_7_update_node::OpOneOf7UpdateNode; +pub mod op_one_of_8; +pub use self::op_one_of_8::OpOneOf8; +pub mod op_one_of_8_reorder_nodes; +pub use self::op_one_of_8_reorder_nodes::OpOneOf8ReorderNodes; +pub mod op_one_of_9; +pub use self::op_one_of_9::OpOneOf9; +pub mod op_one_of_9_batch; +pub use self::op_one_of_9_batch::OpOneOf9Batch; +pub mod op_one_of_update_project_meta; +pub use self::op_one_of_update_project_meta::OpOneOfUpdateProjectMeta; +pub mod open_project_request; +pub use self::open_project_request::OpenProjectRequest; +pub mod page; +pub use self::page::Page; +pub mod page_patch; +pub use self::page_patch::PagePatch; +pub mod pipeline_config; +pub use self::pipeline_config::PipelineConfig; +pub mod pipeline_config_patch; +pub use self::pipeline_config_patch::PipelineConfigPatch; +pub mod pipeline_progress; +pub use self::pipeline_progress::PipelineProgress; +pub mod pipeline_status; +pub use self::pipeline_status::PipelineStatus; +pub mod pipeline_status_one_of; +pub use self::pipeline_status_one_of::PipelineStatusOneOf; +pub mod pipeline_status_one_of_1; +pub use self::pipeline_status_one_of_1::PipelineStatusOneOf1; +pub mod pipeline_step; +pub use self::pipeline_step::PipelineStep; +pub mod project_meta; +pub use self::project_meta::ProjectMeta; +pub mod project_meta_patch; +pub use self::project_meta_patch::ProjectMetaPatch; +pub mod project_style; +pub use self::project_style::ProjectStyle; +pub mod project_summary; +pub use self::project_summary::ProjectSummary; +pub mod provider_config; +pub use self::provider_config::ProviderConfig; +pub mod provider_patch; +pub use self::provider_patch::ProviderPatch; +pub mod provider_secret_request; +pub use self::provider_secret_request::ProviderSecretRequest; +pub mod put_mask_response; +pub use self::put_mask_response::PutMaskResponse; +pub mod region; +pub use self::region::Region; +pub mod scene; +pub use self::scene::Scene; +pub mod scene_snapshot; +pub use self::scene_snapshot::SceneSnapshot; +pub mod snapshot_event; +pub use self::snapshot_event::SnapshotEvent; +pub mod start_download_request; +pub use self::start_download_request::StartDownloadRequest; +pub mod start_download_response; +pub use self::start_download_response::StartDownloadResponse; +pub mod start_pipeline_request; +pub use self::start_pipeline_request::StartPipelineRequest; +pub mod start_pipeline_response; +pub use self::start_pipeline_response::StartPipelineResponse; +pub mod text_align; +pub use self::text_align::TextAlign; +pub mod text_data; +pub use self::text_data::TextData; +pub mod text_data_patch; +pub use self::text_data_patch::TextDataPatch; +pub mod text_direction; +pub use self::text_direction::TextDirection; +pub mod text_shader_effect; +pub use self::text_shader_effect::TextShaderEffect; +pub mod text_stroke_style; +pub use self::text_stroke_style::TextStrokeStyle; +pub mod text_style; +pub use self::text_style::TextStyle; +pub mod top_font; +pub use self::top_font::TopFont; +pub mod transform; +pub use self::transform::Transform; diff --git a/tests/integration-tests/client/src/models/named_font_prediction.rs b/tests/integration-tests/client/src/models/named_font_prediction.rs new file mode 100644 index 0000000000000000000000000000000000000000..11858f0c5a68621366599fc4bb16258dac986bee --- /dev/null +++ b/tests/integration-tests/client/src/models/named_font_prediction.rs @@ -0,0 +1,43 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NamedFontPrediction { + #[serde(rename = "index")] + pub index: u32, + #[serde( + rename = "language", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub language: Option>, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "probability")] + pub probability: f32, + #[serde(rename = "serif")] + pub serif: bool, +} + +impl NamedFontPrediction { + pub fn new(index: u32, name: String, probability: f32, serif: bool) -> NamedFontPrediction { + NamedFontPrediction { + index, + language: None, + name, + probability, + serif, + } + } +} diff --git a/tests/integration-tests/client/src/models/node.rs b/tests/integration-tests/client/src/models/node.rs new file mode 100644 index 0000000000000000000000000000000000000000..a7f728b1ec60ec65a4e5be852aef7b0a1500d313 --- /dev/null +++ b/tests/integration-tests/client/src/models/node.rs @@ -0,0 +1,35 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Node { + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "kind")] + pub kind: Box, + #[serde(rename = "transform", skip_serializing_if = "Option::is_none")] + pub transform: Option>, + #[serde(rename = "visible")] + pub visible: bool, +} + +impl Node { + pub fn new(id: uuid::Uuid, kind: models::NodeKind, visible: bool) -> Node { + Node { + id, + kind: Box::new(kind), + transform: None, + visible, + } + } +} diff --git a/tests/integration-tests/client/src/models/node_data_patch.rs b/tests/integration-tests/client/src/models/node_data_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..3344e73cc5bb5f03d5d3461cef2c5db0524f2c04 --- /dev/null +++ b/tests/integration-tests/client/src/models/node_data_patch.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NodeDataPatch { + NodeDataPatchOneOf(Box), + NodeDataPatchOneOf1(Box), + NodeDataPatchOneOf2(Box), +} + +impl Default for NodeDataPatch { + fn default() -> Self { + Self::NodeDataPatchOneOf(Default::default()) + } +} diff --git a/tests/integration-tests/client/src/models/node_data_patch_one_of.rs b/tests/integration-tests/client/src/models/node_data_patch_one_of.rs new file mode 100644 index 0000000000000000000000000000000000000000..7163f136f50d34fe7d633917b2f0927a623066ce --- /dev/null +++ b/tests/integration-tests/client/src/models/node_data_patch_one_of.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeDataPatchOneOf { + #[serde(rename = "text")] + pub text: Box, +} + +impl NodeDataPatchOneOf { + pub fn new(text: models::TextDataPatch) -> NodeDataPatchOneOf { + NodeDataPatchOneOf { + text: Box::new(text), + } + } +} diff --git a/tests/integration-tests/client/src/models/node_data_patch_one_of_1.rs b/tests/integration-tests/client/src/models/node_data_patch_one_of_1.rs new file mode 100644 index 0000000000000000000000000000000000000000..bbc2d659bd372b6ee79983dfdb97758b7819e05a --- /dev/null +++ b/tests/integration-tests/client/src/models/node_data_patch_one_of_1.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeDataPatchOneOf1 { + #[serde(rename = "image")] + pub image: Box, +} + +impl NodeDataPatchOneOf1 { + pub fn new(image: models::ImageDataPatch) -> NodeDataPatchOneOf1 { + NodeDataPatchOneOf1 { + image: Box::new(image), + } + } +} diff --git a/tests/integration-tests/client/src/models/node_data_patch_one_of_2.rs b/tests/integration-tests/client/src/models/node_data_patch_one_of_2.rs new file mode 100644 index 0000000000000000000000000000000000000000..3022262b28a0cda4f0ac3e38e888190aae433a23 --- /dev/null +++ b/tests/integration-tests/client/src/models/node_data_patch_one_of_2.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeDataPatchOneOf2 { + #[serde(rename = "mask")] + pub mask: Box, +} + +impl NodeDataPatchOneOf2 { + pub fn new(mask: models::MaskDataPatch) -> NodeDataPatchOneOf2 { + NodeDataPatchOneOf2 { + mask: Box::new(mask), + } + } +} diff --git a/tests/integration-tests/client/src/models/node_kind.rs b/tests/integration-tests/client/src/models/node_kind.rs new file mode 100644 index 0000000000000000000000000000000000000000..3f64733d4b137761aa8eb209ee6a00611ad45d02 --- /dev/null +++ b/tests/integration-tests/client/src/models/node_kind.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NodeKind { + NodeKindOneOf(Box), + NodeKindOneOf1(Box), + NodeKindOneOf2(Box), +} + +impl Default for NodeKind { + fn default() -> Self { + Self::NodeKindOneOf(Default::default()) + } +} diff --git a/tests/integration-tests/client/src/models/node_kind_one_of.rs b/tests/integration-tests/client/src/models/node_kind_one_of.rs new file mode 100644 index 0000000000000000000000000000000000000000..3ba59a4671ad7fe738255ebeaf147711c41857a5 --- /dev/null +++ b/tests/integration-tests/client/src/models/node_kind_one_of.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeKindOneOf { + #[serde(rename = "image")] + pub image: Box, +} + +impl NodeKindOneOf { + pub fn new(image: models::ImageData) -> NodeKindOneOf { + NodeKindOneOf { + image: Box::new(image), + } + } +} diff --git a/tests/integration-tests/client/src/models/node_kind_one_of_1.rs b/tests/integration-tests/client/src/models/node_kind_one_of_1.rs new file mode 100644 index 0000000000000000000000000000000000000000..06c9b515b2cf9e50cb6ac4dc383484270a8ff2b4 --- /dev/null +++ b/tests/integration-tests/client/src/models/node_kind_one_of_1.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeKindOneOf1 { + #[serde(rename = "text")] + pub text: Box, +} + +impl NodeKindOneOf1 { + pub fn new(text: models::TextData) -> NodeKindOneOf1 { + NodeKindOneOf1 { + text: Box::new(text), + } + } +} diff --git a/tests/integration-tests/client/src/models/node_kind_one_of_2.rs b/tests/integration-tests/client/src/models/node_kind_one_of_2.rs new file mode 100644 index 0000000000000000000000000000000000000000..d35eb405355bffd3b9facfa8d6cc16852f038599 --- /dev/null +++ b/tests/integration-tests/client/src/models/node_kind_one_of_2.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeKindOneOf2 { + #[serde(rename = "mask")] + pub mask: Box, +} + +impl NodeKindOneOf2 { + pub fn new(mask: models::MaskData) -> NodeKindOneOf2 { + NodeKindOneOf2 { + mask: Box::new(mask), + } + } +} diff --git a/tests/integration-tests/client/src/models/node_patch.rs b/tests/integration-tests/client/src/models/node_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..3e548c3837e059b099921c6ccca6bb7ed5eb5331 --- /dev/null +++ b/tests/integration-tests/client/src/models/node_patch.rs @@ -0,0 +1,47 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodePatch { + #[serde( + rename = "data", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub data: Option>>, + #[serde( + rename = "transform", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub transform: Option>>, + #[serde( + rename = "visible", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub visible: Option>, +} + +impl NodePatch { + pub fn new() -> NodePatch { + NodePatch { + data: None, + transform: None, + visible: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/op.rs b/tests/integration-tests/client/src/models/op.rs new file mode 100644 index 0000000000000000000000000000000000000000..1ba5504a19ab9b2158d38defe082122570bca898 --- /dev/null +++ b/tests/integration-tests/client/src/models/op.rs @@ -0,0 +1,33 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum Op { + OpOneOf(Box), + OpOneOf1(Box), + OpOneOf2(Box), + OpOneOf3(Box), + OpOneOf4(Box), + OpOneOf5(Box), + OpOneOf6(Box), + OpOneOf7(Box), + OpOneOf8(Box), + OpOneOf9(Box), +} + +impl Default for Op { + fn default() -> Self { + Self::OpOneOf(Default::default()) + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of.rs b/tests/integration-tests/client/src/models/op_one_of.rs new file mode 100644 index 0000000000000000000000000000000000000000..0448546d875c7767b9bd9e9ccf70144be2367c5b --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf { + #[serde(rename = "updateProjectMeta")] + pub update_project_meta: Box, +} + +impl OpOneOf { + pub fn new(update_project_meta: models::OpOneOfUpdateProjectMeta) -> OpOneOf { + OpOneOf { + update_project_meta: Box::new(update_project_meta), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_1.rs b/tests/integration-tests/client/src/models/op_one_of_1.rs new file mode 100644 index 0000000000000000000000000000000000000000..a117e58c3dffca6b8110525b34c7e3a97ae3ba0b --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_1.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf1 { + #[serde(rename = "addPage")] + pub add_page: Box, +} + +impl OpOneOf1 { + pub fn new(add_page: models::OpOneOf1AddPage) -> OpOneOf1 { + OpOneOf1 { + add_page: Box::new(add_page), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_1_add_page.rs b/tests/integration-tests/client/src/models/op_one_of_1_add_page.rs new file mode 100644 index 0000000000000000000000000000000000000000..5ba63bf52f02b97fb2b3c681d00e480a01b09fd0 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_1_add_page.rs @@ -0,0 +1,29 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf1AddPage { + #[serde(rename = "at")] + pub at: u32, + #[serde(rename = "page")] + pub page: Box, +} + +impl OpOneOf1AddPage { + pub fn new(at: u32, page: models::Page) -> OpOneOf1AddPage { + OpOneOf1AddPage { + at, + page: Box::new(page), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_2.rs b/tests/integration-tests/client/src/models/op_one_of_2.rs new file mode 100644 index 0000000000000000000000000000000000000000..2dee943c2bb128db764611f8662c72f99cd940c2 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_2.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf2 { + #[serde(rename = "removePage")] + pub remove_page: Box, +} + +impl OpOneOf2 { + pub fn new(remove_page: models::OpOneOf2RemovePage) -> OpOneOf2 { + OpOneOf2 { + remove_page: Box::new(remove_page), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_2_remove_page.rs b/tests/integration-tests/client/src/models/op_one_of_2_remove_page.rs new file mode 100644 index 0000000000000000000000000000000000000000..ed2a202622c4a4c2fce68e44271f59065e25a84b --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_2_remove_page.rs @@ -0,0 +1,32 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf2RemovePage { + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "prev_index")] + pub prev_index: u32, + #[serde(rename = "prev_page")] + pub prev_page: Box, +} + +impl OpOneOf2RemovePage { + pub fn new(id: uuid::Uuid, prev_index: u32, prev_page: models::Page) -> OpOneOf2RemovePage { + OpOneOf2RemovePage { + id, + prev_index, + prev_page: Box::new(prev_page), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_3.rs b/tests/integration-tests/client/src/models/op_one_of_3.rs new file mode 100644 index 0000000000000000000000000000000000000000..5db5db70fcf1d4d84451eb2819ee8310a0061b14 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_3.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf3 { + #[serde(rename = "updatePage")] + pub update_page: Box, +} + +impl OpOneOf3 { + pub fn new(update_page: models::OpOneOf3UpdatePage) -> OpOneOf3 { + OpOneOf3 { + update_page: Box::new(update_page), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_3_update_page.rs b/tests/integration-tests/client/src/models/op_one_of_3_update_page.rs new file mode 100644 index 0000000000000000000000000000000000000000..b8a802feb42db7478382adf6384d53dcc469107f --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_3_update_page.rs @@ -0,0 +1,32 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf3UpdatePage { + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "patch")] + pub patch: Box, + #[serde(rename = "prev", skip_serializing_if = "Option::is_none")] + pub prev: Option>, +} + +impl OpOneOf3UpdatePage { + pub fn new(id: uuid::Uuid, patch: models::PagePatch) -> OpOneOf3UpdatePage { + OpOneOf3UpdatePage { + id, + patch: Box::new(patch), + prev: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_4.rs b/tests/integration-tests/client/src/models/op_one_of_4.rs new file mode 100644 index 0000000000000000000000000000000000000000..6616faea2a9f888c603e4f92f4783b3a994c2690 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_4.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf4 { + #[serde(rename = "reorderPages")] + pub reorder_pages: Box, +} + +impl OpOneOf4 { + pub fn new(reorder_pages: models::OpOneOf4ReorderPages) -> OpOneOf4 { + OpOneOf4 { + reorder_pages: Box::new(reorder_pages), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_4_reorder_pages.rs b/tests/integration-tests/client/src/models/op_one_of_4_reorder_pages.rs new file mode 100644 index 0000000000000000000000000000000000000000..5f0831fa1c88e38975c1ce5288013c61b4c9b5c1 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_4_reorder_pages.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf4ReorderPages { + #[serde(rename = "order")] + pub order: Vec, + #[serde(rename = "prev_order")] + pub prev_order: Vec, +} + +impl OpOneOf4ReorderPages { + pub fn new(order: Vec, prev_order: Vec) -> OpOneOf4ReorderPages { + OpOneOf4ReorderPages { order, prev_order } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_5.rs b/tests/integration-tests/client/src/models/op_one_of_5.rs new file mode 100644 index 0000000000000000000000000000000000000000..c782ee6a6379d8502bf7fd8ddf2018f7c41a05f9 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_5.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf5 { + #[serde(rename = "addNode")] + pub add_node: Box, +} + +impl OpOneOf5 { + pub fn new(add_node: models::OpOneOf5AddNode) -> OpOneOf5 { + OpOneOf5 { + add_node: Box::new(add_node), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_5_add_node.rs b/tests/integration-tests/client/src/models/op_one_of_5_add_node.rs new file mode 100644 index 0000000000000000000000000000000000000000..2b5a6f9c07de660ccfa66acb5dae2157620c50f4 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_5_add_node.rs @@ -0,0 +1,32 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf5AddNode { + #[serde(rename = "at")] + pub at: u32, + #[serde(rename = "node")] + pub node: Box, + #[serde(rename = "page")] + pub page: uuid::Uuid, +} + +impl OpOneOf5AddNode { + pub fn new(at: u32, node: models::Node, page: uuid::Uuid) -> OpOneOf5AddNode { + OpOneOf5AddNode { + at, + node: Box::new(node), + page, + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_6.rs b/tests/integration-tests/client/src/models/op_one_of_6.rs new file mode 100644 index 0000000000000000000000000000000000000000..9be41e2cdc611a4b63649d05accdd1884ed8e872 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_6.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf6 { + #[serde(rename = "removeNode")] + pub remove_node: Box, +} + +impl OpOneOf6 { + pub fn new(remove_node: models::OpOneOf6RemoveNode) -> OpOneOf6 { + OpOneOf6 { + remove_node: Box::new(remove_node), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_6_remove_node.rs b/tests/integration-tests/client/src/models/op_one_of_6_remove_node.rs new file mode 100644 index 0000000000000000000000000000000000000000..40c7aa0b5cde5d239a5332a5dd8692830abcdf99 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_6_remove_node.rs @@ -0,0 +1,40 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf6RemoveNode { + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "page")] + pub page: uuid::Uuid, + #[serde(rename = "prev_index")] + pub prev_index: u32, + #[serde(rename = "prev_node")] + pub prev_node: Box, +} + +impl OpOneOf6RemoveNode { + pub fn new( + id: uuid::Uuid, + page: uuid::Uuid, + prev_index: u32, + prev_node: models::Node, + ) -> OpOneOf6RemoveNode { + OpOneOf6RemoveNode { + id, + page, + prev_index, + prev_node: Box::new(prev_node), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_7.rs b/tests/integration-tests/client/src/models/op_one_of_7.rs new file mode 100644 index 0000000000000000000000000000000000000000..65601bab35039318c41990dfe1c4a138b8ad539f --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_7.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf7 { + #[serde(rename = "updateNode")] + pub update_node: Box, +} + +impl OpOneOf7 { + pub fn new(update_node: models::OpOneOf7UpdateNode) -> OpOneOf7 { + OpOneOf7 { + update_node: Box::new(update_node), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_7_update_node.rs b/tests/integration-tests/client/src/models/op_one_of_7_update_node.rs new file mode 100644 index 0000000000000000000000000000000000000000..f2770a8562c7e089aaa95d038e9c6efbb754dd16 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_7_update_node.rs @@ -0,0 +1,35 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf7UpdateNode { + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "page")] + pub page: uuid::Uuid, + #[serde(rename = "patch")] + pub patch: Box, + #[serde(rename = "prev", skip_serializing_if = "Option::is_none")] + pub prev: Option>, +} + +impl OpOneOf7UpdateNode { + pub fn new(id: uuid::Uuid, page: uuid::Uuid, patch: models::NodePatch) -> OpOneOf7UpdateNode { + OpOneOf7UpdateNode { + id, + page, + patch: Box::new(patch), + prev: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_8.rs b/tests/integration-tests/client/src/models/op_one_of_8.rs new file mode 100644 index 0000000000000000000000000000000000000000..7ca935ce8bc3c2ee163e7c24e52addc5f9776e30 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_8.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf8 { + #[serde(rename = "reorderNodes")] + pub reorder_nodes: Box, +} + +impl OpOneOf8 { + pub fn new(reorder_nodes: models::OpOneOf8ReorderNodes) -> OpOneOf8 { + OpOneOf8 { + reorder_nodes: Box::new(reorder_nodes), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_8_reorder_nodes.rs b/tests/integration-tests/client/src/models/op_one_of_8_reorder_nodes.rs new file mode 100644 index 0000000000000000000000000000000000000000..924b4f4b54d0593750ae51b71175ee2aa6d7d622 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_8_reorder_nodes.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf8ReorderNodes { + #[serde(rename = "order")] + pub order: Vec, + #[serde(rename = "page")] + pub page: uuid::Uuid, + #[serde(rename = "prev_order")] + pub prev_order: Vec, +} + +impl OpOneOf8ReorderNodes { + pub fn new( + order: Vec, + page: uuid::Uuid, + prev_order: Vec, + ) -> OpOneOf8ReorderNodes { + OpOneOf8ReorderNodes { + order, + page, + prev_order, + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_9.rs b/tests/integration-tests/client/src/models/op_one_of_9.rs new file mode 100644 index 0000000000000000000000000000000000000000..2d93bd03fa2ddeb2397cb19f8f1a7f7a6dd5fcb4 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_9.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf9 { + #[serde(rename = "batch")] + pub batch: Box, +} + +impl OpOneOf9 { + pub fn new(batch: models::OpOneOf9Batch) -> OpOneOf9 { + OpOneOf9 { + batch: Box::new(batch), + } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_9_batch.rs b/tests/integration-tests/client/src/models/op_one_of_9_batch.rs new file mode 100644 index 0000000000000000000000000000000000000000..81cdeee64f0ae38ba96a17ac7467fe29ce69d6cd --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_9_batch.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOf9Batch { + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "ops")] + pub ops: Vec, +} + +impl OpOneOf9Batch { + pub fn new(label: String, ops: Vec) -> OpOneOf9Batch { + OpOneOf9Batch { label, ops } + } +} diff --git a/tests/integration-tests/client/src/models/op_one_of_update_project_meta.rs b/tests/integration-tests/client/src/models/op_one_of_update_project_meta.rs new file mode 100644 index 0000000000000000000000000000000000000000..1152b3631458dc85c86ec1b95e7a8ebda573fbb3 --- /dev/null +++ b/tests/integration-tests/client/src/models/op_one_of_update_project_meta.rs @@ -0,0 +1,29 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpOneOfUpdateProjectMeta { + #[serde(rename = "patch")] + pub patch: Box, + #[serde(rename = "prev", skip_serializing_if = "Option::is_none")] + pub prev: Option>, +} + +impl OpOneOfUpdateProjectMeta { + pub fn new(patch: models::ProjectMetaPatch) -> OpOneOfUpdateProjectMeta { + OpOneOfUpdateProjectMeta { + patch: Box::new(patch), + prev: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/open_project_request.rs b/tests/integration-tests/client/src/models/open_project_request.rs new file mode 100644 index 0000000000000000000000000000000000000000..c2ecf4a7e562aaad0be59d5803492dbb98e92c30 --- /dev/null +++ b/tests/integration-tests/client/src/models/open_project_request.rs @@ -0,0 +1,25 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OpenProjectRequest { + /// `.khrproj/` directory basename (no extension). Must exist under the managed projects directory. + #[serde(rename = "id")] + pub id: String, +} + +impl OpenProjectRequest { + pub fn new(id: String) -> OpenProjectRequest { + OpenProjectRequest { id } + } +} diff --git a/tests/integration-tests/client/src/models/page.rs b/tests/integration-tests/client/src/models/page.rs new file mode 100644 index 0000000000000000000000000000000000000000..4b21a6e71d4a4d15ba74b250bf163c7a47e45c6b --- /dev/null +++ b/tests/integration-tests/client/src/models/page.rs @@ -0,0 +1,45 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Page { + #[serde(rename = "height")] + pub height: u32, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "name")] + pub name: String, + /// Stacking = insertion order. Bottom-first: `source` is typically first, `rendered` typically last. + #[serde(rename = "nodes")] + pub nodes: std::collections::HashMap, + #[serde(rename = "width")] + pub width: u32, +} + +impl Page { + pub fn new( + height: u32, + id: uuid::Uuid, + name: String, + nodes: std::collections::HashMap, + width: u32, + ) -> Page { + Page { + height, + id, + name, + nodes, + width, + } + } +} diff --git a/tests/integration-tests/client/src/models/page_patch.rs b/tests/integration-tests/client/src/models/page_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..a3767b5728f9d59399fb903c25a84b3076d0b0e6 --- /dev/null +++ b/tests/integration-tests/client/src/models/page_patch.rs @@ -0,0 +1,47 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PagePatch { + #[serde( + rename = "height", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub height: Option>, + #[serde( + rename = "name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub name: Option>, + #[serde( + rename = "width", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub width: Option>, +} + +impl PagePatch { + pub fn new() -> PagePatch { + PagePatch { + height: None, + name: None, + width: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/pipeline_config.rs b/tests/integration-tests/client/src/models/pipeline_config.rs new file mode 100644 index 0000000000000000000000000000000000000000..4414b5643b15caabfb08dd35217d85a56021b282 --- /dev/null +++ b/tests/integration-tests/client/src/models/pipeline_config.rs @@ -0,0 +1,46 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PipelineConfig : Engine selection for each pipeline stage. Values are engine IDs (e.g. \"pp-doclayout-v3\", \"comic-text-detector\"). Empty string means use default. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PipelineConfig { + #[serde(rename = "detector", skip_serializing_if = "Option::is_none")] + pub detector: Option, + #[serde(rename = "font_detector", skip_serializing_if = "Option::is_none")] + pub font_detector: Option, + #[serde(rename = "inpainter", skip_serializing_if = "Option::is_none")] + pub inpainter: Option, + #[serde(rename = "ocr", skip_serializing_if = "Option::is_none")] + pub ocr: Option, + #[serde(rename = "renderer", skip_serializing_if = "Option::is_none")] + pub renderer: Option, + #[serde(rename = "segmenter", skip_serializing_if = "Option::is_none")] + pub segmenter: Option, + #[serde(rename = "translator", skip_serializing_if = "Option::is_none")] + pub translator: Option, +} + +impl PipelineConfig { + /// Engine selection for each pipeline stage. Values are engine IDs (e.g. \"pp-doclayout-v3\", \"comic-text-detector\"). Empty string means use default. + pub fn new() -> PipelineConfig { + PipelineConfig { + detector: None, + font_detector: None, + inpainter: None, + ocr: None, + renderer: None, + segmenter: None, + translator: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/pipeline_config_patch.rs b/tests/integration-tests/client/src/models/pipeline_config_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..0b406b6af159a476c9b67d42152cb313aa725444 --- /dev/null +++ b/tests/integration-tests/client/src/models/pipeline_config_patch.rs @@ -0,0 +1,79 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PipelineConfigPatch { + #[serde( + rename = "detector", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detector: Option>, + #[serde( + rename = "fontDetector", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub font_detector: Option>, + #[serde( + rename = "inpainter", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub inpainter: Option>, + #[serde( + rename = "ocr", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub ocr: Option>, + #[serde( + rename = "renderer", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub renderer: Option>, + #[serde( + rename = "segmenter", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub segmenter: Option>, + #[serde( + rename = "translator", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub translator: Option>, +} + +impl PipelineConfigPatch { + pub fn new() -> PipelineConfigPatch { + PipelineConfigPatch { + detector: None, + font_detector: None, + inpainter: None, + ocr: None, + renderer: None, + segmenter: None, + translator: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/pipeline_progress.rs b/tests/integration-tests/client/src/models/pipeline_progress.rs new file mode 100644 index 0000000000000000000000000000000000000000..95d40a1fae9998f69104d71eea677fc9ccb03b0c --- /dev/null +++ b/tests/integration-tests/client/src/models/pipeline_progress.rs @@ -0,0 +1,60 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PipelineProgress { + #[serde(rename = "currentPage")] + pub current_page: u32, + #[serde(rename = "currentStepIndex")] + pub current_step_index: u32, + #[serde(rename = "jobId")] + pub job_id: String, + #[serde(rename = "overallPercent")] + pub overall_percent: u32, + #[serde(rename = "status")] + pub status: Box, + #[serde( + rename = "step", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub step: Option>, + #[serde(rename = "totalPages")] + pub total_pages: u32, + #[serde(rename = "totalSteps")] + pub total_steps: u32, +} + +impl PipelineProgress { + pub fn new( + current_page: u32, + current_step_index: u32, + job_id: String, + overall_percent: u32, + status: models::PipelineStatus, + total_pages: u32, + total_steps: u32, + ) -> PipelineProgress { + PipelineProgress { + current_page, + current_step_index, + job_id, + overall_percent, + status: Box::new(status), + step: None, + total_pages, + total_steps, + } + } +} diff --git a/tests/integration-tests/client/src/models/pipeline_status.rs b/tests/integration-tests/client/src/models/pipeline_status.rs new file mode 100644 index 0000000000000000000000000000000000000000..df3f34a2dde9c54a1eef81907ac8d646a1405499 --- /dev/null +++ b/tests/integration-tests/client/src/models/pipeline_status.rs @@ -0,0 +1,39 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PipelineStatus { + PipelineStatusOneOf(Box), + DownloadStatusOneOf2(Box), + PipelineStatusOneOf1(Box), + DownloadStatusOneOf3(Box), +} + +impl Default for PipelineStatus { + fn default() -> Self { + Self::PipelineStatusOneOf(Default::default()) + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "failed")] + Failed, +} + +impl Default for Status { + fn default() -> Status { + Self::Failed + } +} diff --git a/tests/integration-tests/client/src/models/pipeline_status_one_of.rs b/tests/integration-tests/client/src/models/pipeline_status_one_of.rs new file mode 100644 index 0000000000000000000000000000000000000000..c825cc3eb59eb8589e6041deea58ebef6b7cbe4c --- /dev/null +++ b/tests/integration-tests/client/src/models/pipeline_status_one_of.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PipelineStatusOneOf { + #[serde(rename = "status")] + pub status: Status, +} + +impl PipelineStatusOneOf { + pub fn new(status: Status) -> PipelineStatusOneOf { + PipelineStatusOneOf { status } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "running")] + Running, +} + +impl Default for Status { + fn default() -> Status { + Self::Running + } +} diff --git a/tests/integration-tests/client/src/models/pipeline_status_one_of_1.rs b/tests/integration-tests/client/src/models/pipeline_status_one_of_1.rs new file mode 100644 index 0000000000000000000000000000000000000000..15c459e7e02c7802f356bf4054847b647a78e4e2 --- /dev/null +++ b/tests/integration-tests/client/src/models/pipeline_status_one_of_1.rs @@ -0,0 +1,36 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PipelineStatusOneOf1 { + #[serde(rename = "status")] + pub status: Status, +} + +impl PipelineStatusOneOf1 { + pub fn new(status: Status) -> PipelineStatusOneOf1 { + PipelineStatusOneOf1 { status } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "cancelled")] + Cancelled, +} + +impl Default for Status { + fn default() -> Status { + Self::Cancelled + } +} diff --git a/tests/integration-tests/client/src/models/pipeline_step.rs b/tests/integration-tests/client/src/models/pipeline_step.rs new file mode 100644 index 0000000000000000000000000000000000000000..812b72fec538c770c9572b7fda8b344fbf5b7b89 --- /dev/null +++ b/tests/integration-tests/client/src/models/pipeline_step.rs @@ -0,0 +1,45 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum PipelineStep { + #[serde(rename = "detect")] + Detect, + #[serde(rename = "ocr")] + Ocr, + #[serde(rename = "inpaint")] + Inpaint, + #[serde(rename = "llmGenerate")] + LlmGenerate, + #[serde(rename = "render")] + Render, +} + +impl std::fmt::Display for PipelineStep { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Detect => write!(f, "detect"), + Self::Ocr => write!(f, "ocr"), + Self::Inpaint => write!(f, "inpaint"), + Self::LlmGenerate => write!(f, "llmGenerate"), + Self::Render => write!(f, "render"), + } + } +} + +impl Default for PipelineStep { + fn default() -> PipelineStep { + Self::Detect + } +} diff --git a/tests/integration-tests/client/src/models/project_meta.rs b/tests/integration-tests/client/src/models/project_meta.rs new file mode 100644 index 0000000000000000000000000000000000000000..89537967b35cb5dee6c42c42be5eced78a36c8f8 --- /dev/null +++ b/tests/integration-tests/client/src/models/project_meta.rs @@ -0,0 +1,35 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProjectMeta { + #[serde(rename = "createdAt")] + pub created_at: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "style", skip_serializing_if = "Option::is_none")] + pub style: Option>, + #[serde(rename = "updatedAt")] + pub updated_at: String, +} + +impl ProjectMeta { + pub fn new(created_at: String, name: String, updated_at: String) -> ProjectMeta { + ProjectMeta { + created_at, + name, + style: None, + updated_at, + } + } +} diff --git a/tests/integration-tests/client/src/models/project_meta_patch.rs b/tests/integration-tests/client/src/models/project_meta_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..1bc692628aab92cc74d85cbaa30f9547ad11155c --- /dev/null +++ b/tests/integration-tests/client/src/models/project_meta_patch.rs @@ -0,0 +1,47 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProjectMetaPatch { + #[serde( + rename = "name", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub name: Option>, + #[serde( + rename = "style", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub style: Option>>, + #[serde( + rename = "updatedAt", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub updated_at: Option>, +} + +impl ProjectMetaPatch { + pub fn new() -> ProjectMetaPatch { + ProjectMetaPatch { + name: None, + style: None, + updated_at: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/project_style.rs b/tests/integration-tests/client/src/models/project_style.rs new file mode 100644 index 0000000000000000000000000000000000000000..a90ef65225966ddac7c3779e70746f219d09aa55 --- /dev/null +++ b/tests/integration-tests/client/src/models/project_style.rs @@ -0,0 +1,29 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProjectStyle { + #[serde( + rename = "defaultFont", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub default_font: Option>, +} + +impl ProjectStyle { + pub fn new() -> ProjectStyle { + ProjectStyle { default_font: None } + } +} diff --git a/tests/integration-tests/client/src/models/project_summary.rs b/tests/integration-tests/client/src/models/project_summary.rs new file mode 100644 index 0000000000000000000000000000000000000000..4208b34ebb99b9521231b4768fd23fc63f3ebae8 --- /dev/null +++ b/tests/integration-tests/client/src/models/project_summary.rs @@ -0,0 +1,38 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProjectSummary { + /// Stable identifier — the `.khrproj` directory basename (without the extension). Clients address projects by this. + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// Absolute filesystem path. Informational; clients never need to pass it back in — they use `id`. + #[serde(rename = "path")] + pub path: String, + /// Last modification time of the project directory on disk (ms since UNIX epoch). Used for \"recent projects\" ordering. + #[serde(rename = "updatedAtMs", skip_serializing_if = "Option::is_none")] + pub updated_at_ms: Option, +} + +impl ProjectSummary { + pub fn new(id: String, name: String, path: String) -> ProjectSummary { + ProjectSummary { + id, + name, + path, + updated_at_ms: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/provider_config.rs b/tests/integration-tests/client/src/models/provider_config.rs new file mode 100644 index 0000000000000000000000000000000000000000..c6fc87d56590152798d20047f8cc14eb87710aef --- /dev/null +++ b/tests/integration-tests/client/src/models/provider_config.rs @@ -0,0 +1,43 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProviderConfig { + /// Populated from the keyring on `load()`, never written to config.toml. Serializes as `\"[REDACTED]\"` in API responses. Populated from keyring on `load()`. Serializes as `\"[REDACTED]\"`. + #[serde( + rename = "api_key", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub api_key: Option>, + #[serde( + rename = "base_url", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub base_url: Option>, + #[serde(rename = "id")] + pub id: String, +} + +impl ProviderConfig { + pub fn new(id: String) -> ProviderConfig { + ProviderConfig { + api_key: None, + base_url: None, + id, + } + } +} diff --git a/tests/integration-tests/client/src/models/provider_patch.rs b/tests/integration-tests/client/src/models/provider_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..c8b40a4a37cac984fade92b296c265d90c8dd79d --- /dev/null +++ b/tests/integration-tests/client/src/models/provider_patch.rs @@ -0,0 +1,43 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProviderPatch { + /// `\"[REDACTED]\"` → keep existing keyring secret; empty → clear; otherwise save. + #[serde( + rename = "apiKey", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub api_key: Option>, + #[serde( + rename = "baseUrl", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub base_url: Option>, + #[serde(rename = "id")] + pub id: String, +} + +impl ProviderPatch { + pub fn new(id: String) -> ProviderPatch { + ProviderPatch { + api_key: None, + base_url: None, + id, + } + } +} diff --git a/tests/integration-tests/client/src/models/provider_secret_request.rs b/tests/integration-tests/client/src/models/provider_secret_request.rs new file mode 100644 index 0000000000000000000000000000000000000000..cf2a5e84a4555c821a7d955373f520d6dc99f35b --- /dev/null +++ b/tests/integration-tests/client/src/models/provider_secret_request.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProviderSecretRequest { + #[serde(rename = "secret")] + pub secret: String, +} + +impl ProviderSecretRequest { + pub fn new(secret: String) -> ProviderSecretRequest { + ProviderSecretRequest { secret } + } +} diff --git a/tests/integration-tests/client/src/models/put_mask_response.rs b/tests/integration-tests/client/src/models/put_mask_response.rs new file mode 100644 index 0000000000000000000000000000000000000000..fc2e6a1554719bf92482930ebd7203991b062bf1 --- /dev/null +++ b/tests/integration-tests/client/src/models/put_mask_response.rs @@ -0,0 +1,27 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PutMaskResponse { + /// Hex-encoded blake3 hash of an immutable blob. + #[serde(rename = "blob")] + pub blob: String, + #[serde(rename = "node")] + pub node: uuid::Uuid, +} + +impl PutMaskResponse { + pub fn new(blob: String, node: uuid::Uuid) -> PutMaskResponse { + PutMaskResponse { blob, node } + } +} diff --git a/tests/integration-tests/client/src/models/region.rs b/tests/integration-tests/client/src/models/region.rs new file mode 100644 index 0000000000000000000000000000000000000000..a0a81f07433d02ad71ed5af163008cfe75aca199 --- /dev/null +++ b/tests/integration-tests/client/src/models/region.rs @@ -0,0 +1,35 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Region { + #[serde(rename = "height")] + pub height: u32, + #[serde(rename = "width")] + pub width: u32, + #[serde(rename = "x")] + pub x: u32, + #[serde(rename = "y")] + pub y: u32, +} + +impl Region { + pub fn new(height: u32, width: u32, x: u32, y: u32) -> Region { + Region { + height, + width, + x, + y, + } + } +} diff --git a/tests/integration-tests/client/src/models/scene.rs b/tests/integration-tests/client/src/models/scene.rs new file mode 100644 index 0000000000000000000000000000000000000000..a5ae951f9450ba5d26c4ac28ddbd92e3c9061a4f --- /dev/null +++ b/tests/integration-tests/client/src/models/scene.rs @@ -0,0 +1,33 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Scene { + /// Pages in insertion order; `IndexMap` ordering *is* the page order. + #[serde(rename = "pages")] + pub pages: std::collections::HashMap, + #[serde(rename = "project")] + pub project: Box, +} + +impl Scene { + pub fn new( + pages: std::collections::HashMap, + project: models::ProjectMeta, + ) -> Scene { + Scene { + pages, + project: Box::new(project), + } + } +} diff --git a/tests/integration-tests/client/src/models/scene_snapshot.rs b/tests/integration-tests/client/src/models/scene_snapshot.rs new file mode 100644 index 0000000000000000000000000000000000000000..641a1019c39d0f732783f41b7b493b2fbbcac7c2 --- /dev/null +++ b/tests/integration-tests/client/src/models/scene_snapshot.rs @@ -0,0 +1,31 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// SceneSnapshot : JSON-shaped scene snapshot for the UI (no postcard decoder in JS). +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SceneSnapshot { + #[serde(rename = "epoch")] + pub epoch: u64, + #[serde(rename = "scene")] + pub scene: Box, +} + +impl SceneSnapshot { + /// JSON-shaped scene snapshot for the UI (no postcard decoder in JS). + pub fn new(epoch: u64, scene: models::Scene) -> SceneSnapshot { + SceneSnapshot { + epoch, + scene: Box::new(scene), + } + } +} diff --git a/tests/integration-tests/client/src/models/snapshot_event.rs b/tests/integration-tests/client/src/models/snapshot_event.rs new file mode 100644 index 0000000000000000000000000000000000000000..b1f982422853246d2f06bcd1ae61e6308c83a752 --- /dev/null +++ b/tests/integration-tests/client/src/models/snapshot_event.rs @@ -0,0 +1,29 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotEvent { + #[serde(rename = "downloads")] + pub downloads: Vec, + #[serde(rename = "jobs")] + pub jobs: Vec, +} + +impl SnapshotEvent { + pub fn new( + downloads: Vec, + jobs: Vec, + ) -> SnapshotEvent { + SnapshotEvent { downloads, jobs } + } +} diff --git a/tests/integration-tests/client/src/models/start_download_request.rs b/tests/integration-tests/client/src/models/start_download_request.rs new file mode 100644 index 0000000000000000000000000000000000000000..c99c550f9aa02b3ed7d5639cd5332417f1d6891b --- /dev/null +++ b/tests/integration-tests/client/src/models/start_download_request.rs @@ -0,0 +1,25 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StartDownloadRequest { + /// Package id, as declared via `declare_hf_model_package!` (e.g. `\"model:comic-text-detector:yolo-v5\"`). + #[serde(rename = "modelId")] + pub model_id: String, +} + +impl StartDownloadRequest { + pub fn new(model_id: String) -> StartDownloadRequest { + StartDownloadRequest { model_id } + } +} diff --git a/tests/integration-tests/client/src/models/start_download_response.rs b/tests/integration-tests/client/src/models/start_download_response.rs new file mode 100644 index 0000000000000000000000000000000000000000..04fe9d01f7f8315508e043b05e3a44c1749c62de --- /dev/null +++ b/tests/integration-tests/client/src/models/start_download_response.rs @@ -0,0 +1,25 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StartDownloadResponse { + /// Operation id. Reusing the package id keeps ids meaningful for clients watching progress events. + #[serde(rename = "operationId")] + pub operation_id: String, +} + +impl StartDownloadResponse { + pub fn new(operation_id: String) -> StartDownloadResponse { + StartDownloadResponse { operation_id } + } +} diff --git a/tests/integration-tests/client/src/models/start_pipeline_request.rs b/tests/integration-tests/client/src/models/start_pipeline_request.rs new file mode 100644 index 0000000000000000000000000000000000000000..a6a5e80a053914b776f283fd400b86f0ed5bc658 --- /dev/null +++ b/tests/integration-tests/client/src/models/start_pipeline_request.rs @@ -0,0 +1,69 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StartPipelineRequest { + #[serde( + rename = "defaultFont", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub default_font: Option>, + /// `None` → whole project, `Some(pages)` → just those pages. + #[serde( + rename = "pages", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub pages: Option>>, + /// Optional bounding-box hint for inpainter engines (repair-brush). + #[serde( + rename = "region", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub region: Option>>, + /// Engine ids (`inventory::submit!` ids) to run in order. + #[serde(rename = "steps")] + pub steps: Vec, + #[serde( + rename = "systemPrompt", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub system_prompt: Option>, + #[serde( + rename = "targetLanguage", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub target_language: Option>, +} + +impl StartPipelineRequest { + pub fn new(steps: Vec) -> StartPipelineRequest { + StartPipelineRequest { + default_font: None, + pages: None, + region: None, + steps, + system_prompt: None, + target_language: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/start_pipeline_response.rs b/tests/integration-tests/client/src/models/start_pipeline_response.rs new file mode 100644 index 0000000000000000000000000000000000000000..145d28051376fe1738d706859df701bc1ad0e3b6 --- /dev/null +++ b/tests/integration-tests/client/src/models/start_pipeline_response.rs @@ -0,0 +1,24 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StartPipelineResponse { + #[serde(rename = "operationId")] + pub operation_id: String, +} + +impl StartPipelineResponse { + pub fn new(operation_id: String) -> StartPipelineResponse { + StartPipelineResponse { operation_id } + } +} diff --git a/tests/integration-tests/client/src/models/text_align.rs b/tests/integration-tests/client/src/models/text_align.rs new file mode 100644 index 0000000000000000000000000000000000000000..58719659bd2e98ce71c2ae75a6911bfd58d94f28 --- /dev/null +++ b/tests/integration-tests/client/src/models/text_align.rs @@ -0,0 +1,39 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TextAlign { + #[serde(rename = "left")] + Left, + #[serde(rename = "center")] + Center, + #[serde(rename = "right")] + Right, +} + +impl std::fmt::Display for TextAlign { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Left => write!(f, "left"), + Self::Center => write!(f, "center"), + Self::Right => write!(f, "right"), + } + } +} + +impl Default for TextAlign { + fn default() -> TextAlign { + Self::Left + } +} diff --git a/tests/integration-tests/client/src/models/text_data.rs b/tests/integration-tests/client/src/models/text_data.rs new file mode 100644 index 0000000000000000000000000000000000000000..67b921db4e018b3010460e23481597ef4bd01b15 --- /dev/null +++ b/tests/integration-tests/client/src/models/text_data.rs @@ -0,0 +1,135 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TextData { + #[serde(rename = "confidence", skip_serializing_if = "Option::is_none")] + pub confidence: Option, + #[serde( + rename = "detectedFontSizePx", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detected_font_size_px: Option>, + #[serde( + rename = "detector", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detector: Option>, + #[serde( + rename = "fontPrediction", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub font_prediction: Option>>, + #[serde( + rename = "linePolygons", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub line_polygons: Option>>>>, + #[serde(rename = "lockLayoutBox", skip_serializing_if = "Option::is_none")] + pub lock_layout_box: Option, + #[serde( + rename = "renderedDirection", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub rendered_direction: Option>, + #[serde( + rename = "rotationDeg", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub rotation_deg: Option>, + #[serde( + rename = "sourceDirection", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub source_direction: Option>, + #[serde( + rename = "sourceLang", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub source_lang: Option>, + /// Renderer-produced sprite for this block. + #[serde( + rename = "sprite", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub sprite: Option>, + /// Sprite placement when the renderer expands past the bubble geometry. + #[serde( + rename = "spriteTransform", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub sprite_transform: Option>>, + #[serde( + rename = "style", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub style: Option>>, + #[serde( + rename = "text", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub text: Option>, + #[serde( + rename = "translation", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub translation: Option>, +} + +impl TextData { + pub fn new() -> TextData { + TextData { + confidence: None, + detected_font_size_px: None, + detector: None, + font_prediction: None, + line_polygons: None, + lock_layout_box: None, + rendered_direction: None, + rotation_deg: None, + source_direction: None, + source_lang: None, + sprite: None, + sprite_transform: None, + style: None, + text: None, + translation: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/text_data_patch.rs b/tests/integration-tests/client/src/models/text_data_patch.rs new file mode 100644 index 0000000000000000000000000000000000000000..6491671a9671817b26651912448c868657a33a3d --- /dev/null +++ b/tests/integration-tests/client/src/models/text_data_patch.rs @@ -0,0 +1,146 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TextDataPatch : For fields where \"set to None\" is meaningful (e.g. clearing a translation), the outer `Option` is \"patch present\", the inner is \"value present\". +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TextDataPatch { + #[serde( + rename = "confidence", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub confidence: Option>, + #[serde( + rename = "detectedFontSizePx", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detected_font_size_px: Option>, + #[serde( + rename = "detector", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub detector: Option>, + #[serde( + rename = "fontPrediction", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub font_prediction: Option>>, + #[serde( + rename = "linePolygons", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub line_polygons: Option>>>>, + #[serde( + rename = "lockLayoutBox", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub lock_layout_box: Option>, + #[serde( + rename = "renderedDirection", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub rendered_direction: Option>, + #[serde( + rename = "rotationDeg", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub rotation_deg: Option>, + #[serde( + rename = "sourceDirection", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub source_direction: Option>, + #[serde( + rename = "sourceLang", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub source_lang: Option>, + /// Hex-encoded blake3 hash of an immutable blob. + #[serde( + rename = "sprite", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub sprite: Option>, + #[serde( + rename = "spriteTransform", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub sprite_transform: Option>>, + #[serde( + rename = "style", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub style: Option>>, + #[serde( + rename = "text", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub text: Option>, + #[serde( + rename = "translation", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub translation: Option>, +} + +impl TextDataPatch { + /// For fields where \"set to None\" is meaningful (e.g. clearing a translation), the outer `Option` is \"patch present\", the inner is \"value present\". + pub fn new() -> TextDataPatch { + TextDataPatch { + confidence: None, + detected_font_size_px: None, + detector: None, + font_prediction: None, + line_polygons: None, + lock_layout_box: None, + rendered_direction: None, + rotation_deg: None, + source_direction: None, + source_lang: None, + sprite: None, + sprite_transform: None, + style: None, + text: None, + translation: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/text_direction.rs b/tests/integration-tests/client/src/models/text_direction.rs new file mode 100644 index 0000000000000000000000000000000000000000..982e8cce7ddf1709a8ef3d54d0ac377737594357 --- /dev/null +++ b/tests/integration-tests/client/src/models/text_direction.rs @@ -0,0 +1,37 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TextDirection : Reading axis of a text block. +/// Reading axis of a text block. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TextDirection { + #[serde(rename = "horizontal")] + Horizontal, + #[serde(rename = "vertical")] + Vertical, +} + +impl std::fmt::Display for TextDirection { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Horizontal => write!(f, "horizontal"), + Self::Vertical => write!(f, "vertical"), + } + } +} + +impl Default for TextDirection { + fn default() -> TextDirection { + Self::Horizontal + } +} diff --git a/tests/integration-tests/client/src/models/text_shader_effect.rs b/tests/integration-tests/client/src/models/text_shader_effect.rs new file mode 100644 index 0000000000000000000000000000000000000000..93dc59d365fdb0bc2afb2ea9eb49bd7e76de64b5 --- /dev/null +++ b/tests/integration-tests/client/src/models/text_shader_effect.rs @@ -0,0 +1,29 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TextShaderEffect { + #[serde(rename = "bold", skip_serializing_if = "Option::is_none")] + pub bold: Option, + #[serde(rename = "italic", skip_serializing_if = "Option::is_none")] + pub italic: Option, +} + +impl TextShaderEffect { + pub fn new() -> TextShaderEffect { + TextShaderEffect { + bold: None, + italic: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/text_stroke_style.rs b/tests/integration-tests/client/src/models/text_stroke_style.rs new file mode 100644 index 0000000000000000000000000000000000000000..6ec35147be2aff2880f64319779bada4fbc76c9b --- /dev/null +++ b/tests/integration-tests/client/src/models/text_stroke_style.rs @@ -0,0 +1,37 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TextStrokeStyle { + #[serde(rename = "color", skip_serializing_if = "Option::is_none")] + pub color: Option>, + #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] + pub enabled: Option, + #[serde( + rename = "widthPx", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub width_px: Option>, +} + +impl TextStrokeStyle { + pub fn new() -> TextStrokeStyle { + TextStrokeStyle { + color: None, + enabled: None, + width_px: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/text_style.rs b/tests/integration-tests/client/src/models/text_style.rs new file mode 100644 index 0000000000000000000000000000000000000000..1483819c2f6f83f8c3863c77233476d296dcbcf2 --- /dev/null +++ b/tests/integration-tests/client/src/models/text_style.rs @@ -0,0 +1,61 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TextStyle { + #[serde(rename = "color")] + pub color: Vec, + #[serde( + rename = "effect", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub effect: Option>>, + #[serde(rename = "fontFamilies")] + pub font_families: Vec, + #[serde( + rename = "fontSize", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub font_size: Option>, + #[serde( + rename = "stroke", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub stroke: Option>>, + #[serde( + rename = "textAlign", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub text_align: Option>, +} + +impl TextStyle { + pub fn new(color: Vec, font_families: Vec) -> TextStyle { + TextStyle { + color, + effect: None, + font_families, + font_size: None, + stroke: None, + text_align: None, + } + } +} diff --git a/tests/integration-tests/client/src/models/top_font.rs b/tests/integration-tests/client/src/models/top_font.rs new file mode 100644 index 0000000000000000000000000000000000000000..801c25b38a81a92fbb8faae6c975b9dc8f909af7 --- /dev/null +++ b/tests/integration-tests/client/src/models/top_font.rs @@ -0,0 +1,26 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TopFont { + #[serde(rename = "index")] + pub index: u32, + #[serde(rename = "score")] + pub score: f32, +} + +impl TopFont { + pub fn new(index: u32, score: f32) -> TopFont { + TopFont { index, score } + } +} diff --git a/tests/integration-tests/client/src/models/transform.rs b/tests/integration-tests/client/src/models/transform.rs new file mode 100644 index 0000000000000000000000000000000000000000..ab1562a1e463029623c8b1972c880b1986c9e1e8 --- /dev/null +++ b/tests/integration-tests/client/src/models/transform.rs @@ -0,0 +1,38 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Transform { + #[serde(rename = "height")] + pub height: f32, + #[serde(rename = "rotationDeg", skip_serializing_if = "Option::is_none")] + pub rotation_deg: Option, + #[serde(rename = "width")] + pub width: f32, + #[serde(rename = "x")] + pub x: f32, + #[serde(rename = "y")] + pub y: f32, +} + +impl Transform { + pub fn new(height: f32, width: f32, x: f32, y: f32) -> Transform { + Transform { + height, + rotation_deg: None, + width, + x, + y, + } + } +} diff --git a/tests/integration-tests/client/src/models/undo_result.rs b/tests/integration-tests/client/src/models/undo_result.rs new file mode 100644 index 0000000000000000000000000000000000000000..d9f2356282950b4a4d7912eae6f36a291dd9e5ef --- /dev/null +++ b/tests/integration-tests/client/src/models/undo_result.rs @@ -0,0 +1,29 @@ +/* + * + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UndoResult { + #[serde( + rename = "epoch", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub epoch: Option>, +} + +impl UndoResult { + pub fn new() -> UndoResult { + UndoResult { epoch: None } + } +}