From 3f47ff856c46e18bfeb37e28d21d1641f3194e27 Mon Sep 17 00:00:00 2001 From: Adam Leventhal Date: Wed, 22 Mar 2023 22:56:25 -0700 Subject: [PATCH] update dropshot and typify (#383) --- Cargo.lock | 170 +- .../tests/output/buildomat-builder-tagged.out | 175 +++ .../tests/output/buildomat-builder.out | 175 +++ .../tests/output/keeper-builder-tagged.out | 99 ++ .../tests/output/keeper-builder.out | 99 ++ .../tests/output/nexus-builder-tagged.out | 1384 +++++++++++++++++ .../tests/output/nexus-builder.out | 1384 +++++++++++++++++ .../output/propolis-server-builder-tagged.out | 170 ++ .../tests/output/propolis-server-builder.out | 170 ++ .../output/test_default_params_builder.out | 21 + progenitor-impl/tests/test_specific.rs | 10 +- 11 files changed, 3795 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c6a2430..d34e3e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,19 +39,20 @@ checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "ad445822218ce64be7a341abfb0b1ea43b5c23aa83902542a4542e78309d8e5e" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" dependencies = [ "proc-macro2", "quote", @@ -60,13 +61,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.57" +version = "0.1.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" +checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.7", ] [[package]] @@ -86,12 +87,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.0" @@ -141,6 +136,15 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +[[package]] +name = "camino" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +dependencies = [ + "serde", +] + [[package]] name = "cargo-lock" version = "8.0.3" @@ -149,7 +153,7 @@ checksum = "031718ddb8f78aa5def78a09e90defe30151d1f6c672f937af4dd916429ed996" dependencies = [ "semver 1.0.16", "serde", - "toml", + "toml 0.5.9", "url", ] @@ -291,9 +295,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer", "crypto-common", @@ -322,15 +326,17 @@ dependencies = [ [[package]] name = "dropshot" -version = "0.7.1-dev" -source = "git+https://github.com/oxidecomputer/dropshot#0207056d2ac687c7db5c431f543dbd475ad16e84" +version = "0.9.1-dev" +source = "git+https://github.com/oxidecomputer/dropshot#6ecc57a8854fafe6894459788ac331809df740f1" dependencies = [ "async-stream", "async-trait", - "base64 0.13.1", + "base64", "bytes", + "camino", "chrono", "dropshot_endpoint", + "form_urlencoded", "futures", "hostname", "http", @@ -345,6 +351,7 @@ dependencies = [ "schemars", "serde", "serde_json", + "serde_path_to_error", "serde_urlencoded", "sha1", "slog", @@ -354,21 +361,21 @@ dependencies = [ "slog-term", "tokio", "tokio-rustls", - "toml", + "toml 0.7.3", "uuid", "version_check", ] [[package]] name = "dropshot_endpoint" -version = "0.7.1-dev" -source = "git+https://github.com/oxidecomputer/dropshot#0207056d2ac687c7db5c431f543dbd475ad16e84" +version = "0.9.1-dev" +source = "git+https://github.com/oxidecomputer/dropshot#6ecc57a8854fafe6894459788ac331809df740f1" dependencies = [ "proc-macro2", "quote", "serde", - "serde_tokenstream 0.1.7", - "syn 1.0.109", + "serde_tokenstream", + "syn 2.0.7", ] [[package]] @@ -417,7 +424,7 @@ dependencies = [ name = "example-build" version = "0.0.1" dependencies = [ - "base64 0.21.0", + "base64", "chrono", "progenitor", "progenitor-client", @@ -483,11 +490,10 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] @@ -1038,9 +1044,9 @@ checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" [[package]] name = "openapiv3" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b4689110fd71f196934fbdf1ad0f0a4b49ea41fbc6f19008c00dba735b544c" +checksum = "7b1a9f106eb0a780abd17ba9fca8e0843e3461630bcbe2af0ad4d5d3ba4e9aa4" dependencies = [ "indexmap", "serde", @@ -1111,9 +1117,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "percent-encoding" @@ -1192,7 +1198,7 @@ name = "progenitor" version = "0.2.1-dev" dependencies = [ "anyhow", - "base64 0.21.0", + "base64", "built", "chrono", "clap", @@ -1263,7 +1269,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "serde_tokenstream 0.2.0", + "serde_tokenstream", "serde_yaml", "syn 2.0.8", ] @@ -1374,7 +1380,7 @@ version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ba30cc2c0cd02af1222ed216ba659cdb2f879dfe3181852fe7c50b1d0005949" dependencies = [ - "base64 0.21.0", + "base64", "bytes", "encoding_rs", "futures-core", @@ -1431,7 +1437,7 @@ dependencies = [ "serde", "tempfile", "thiserror", - "toml", + "toml 0.5.9", "toolchain_find", ] @@ -1451,9 +1457,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring", @@ -1463,11 +1469,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.13.1", + "base64", ] [[package]] @@ -1636,14 +1642,21 @@ dependencies = [ ] [[package]] -name = "serde_tokenstream" -version = "0.1.7" +name = "serde_path_to_error" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" +checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" dependencies = [ - "proc-macro2", "serde", - "syn 1.0.109", ] [[package]] @@ -1685,9 +1698,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", @@ -2021,6 +2034,40 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "toolchain_find" version = "0.2.0" @@ -2074,8 +2121,8 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "typify" -version = "0.0.11-dev" -source = "git+https://github.com/oxidecomputer/typify#b35e5c06e7e67bfc350840d00bf86a19bff662a7" +version = "0.0.12-dev" +source = "git+https://github.com/oxidecomputer/typify#44f52879905a135d37ed06aaf87dbd9df5d72b2f" dependencies = [ "typify-impl", "typify-macro", @@ -2083,8 +2130,8 @@ dependencies = [ [[package]] name = "typify-impl" -version = "0.0.11-dev" -source = "git+https://github.com/oxidecomputer/typify#b35e5c06e7e67bfc350840d00bf86a19bff662a7" +version = "0.0.12-dev" +source = "git+https://github.com/oxidecomputer/typify#44f52879905a135d37ed06aaf87dbd9df5d72b2f" dependencies = [ "heck", "log", @@ -2093,23 +2140,23 @@ dependencies = [ "regress", "schemars", "serde_json", - "syn 1.0.109", + "syn 2.0.7", "thiserror", "unicode-ident", ] [[package]] name = "typify-macro" -version = "0.0.11-dev" -source = "git+https://github.com/oxidecomputer/typify#b35e5c06e7e67bfc350840d00bf86a19bff662a7" +version = "0.0.12-dev" +source = "git+https://github.com/oxidecomputer/typify#44f52879905a135d37ed06aaf87dbd9df5d72b2f" dependencies = [ "proc-macro2", "quote", "schemars", "serde", "serde_json", - "serde_tokenstream 0.1.7", - "syn 1.0.109", + "serde_tokenstream", + "syn 2.0.7", "typify-impl", ] @@ -2504,6 +2551,15 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +[[package]] +name = "winnow" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deac0939bd6e4f24ab5919fbf751c97a8cfc8543bb083a305ed5c0c10bb241d1" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" diff --git a/progenitor-impl/tests/output/buildomat-builder-tagged.out b/progenitor-impl/tests/output/buildomat-builder-tagged.out index 7e75267..30f2d26 100644 --- a/progenitor-impl/tests/output/buildomat-builder-tagged.out +++ b/progenitor-impl/tests/output/buildomat-builder-tagged.out @@ -450,6 +450,18 @@ pub mod types { } } + impl From for Task { + fn from(value: super::Task) -> Self { + Self { + id: Ok(value.id), + name: Ok(value.name), + output_rules: Ok(value.output_rules), + script: Ok(value.script), + state: Ok(value.state), + } + } + } + pub struct TaskEvent { payload: Result, seq: Result, @@ -523,6 +535,17 @@ pub mod types { } } + impl From for TaskEvent { + fn from(value: super::TaskEvent) -> Self { + Self { + payload: Ok(value.payload), + seq: Ok(value.seq), + stream: Ok(value.stream), + time: Ok(value.time), + } + } + } + pub struct TaskOutput { id: Result, path: Result, @@ -583,6 +606,16 @@ pub mod types { } } + impl From for TaskOutput { + fn from(value: super::TaskOutput) -> Self { + Self { + id: Ok(value.id), + path: Ok(value.path), + size: Ok(value.size), + } + } + } + pub struct TaskSubmit { name: Result, output_rules: Result, String>, @@ -643,6 +676,16 @@ pub mod types { } } + impl From for TaskSubmit { + fn from(value: super::TaskSubmit) -> Self { + Self { + name: Ok(value.name), + output_rules: Ok(value.output_rules), + script: Ok(value.script), + } + } + } + pub struct TaskSubmitResult { id: Result, } @@ -675,6 +718,12 @@ pub mod types { } } + impl From for TaskSubmitResult { + fn from(value: super::TaskSubmitResult) -> Self { + Self { id: Ok(value.id) } + } + } + pub struct UploadedChunk { id: Result, } @@ -707,6 +756,12 @@ pub mod types { } } + impl From for UploadedChunk { + fn from(value: super::UploadedChunk) -> Self { + Self { id: Ok(value.id) } + } + } + pub struct UserCreate { name: Result, } @@ -739,6 +794,14 @@ pub mod types { } } + impl From for UserCreate { + fn from(value: super::UserCreate) -> Self { + Self { + name: Ok(value.name), + } + } + } + pub struct UserCreateResult { id: Result, name: Result, @@ -799,6 +862,16 @@ pub mod types { } } + impl From for UserCreateResult { + fn from(value: super::UserCreateResult) -> Self { + Self { + id: Ok(value.id), + name: Ok(value.name), + token: Ok(value.token), + } + } + } + pub struct WhoamiResult { id: Result, name: Result, @@ -846,6 +919,15 @@ pub mod types { } } + impl From for WhoamiResult { + fn from(value: super::WhoamiResult) -> Self { + Self { + id: Ok(value.id), + name: Ok(value.name), + } + } + } + pub struct Worker { deleted: Result, id: Result, @@ -945,6 +1027,19 @@ pub mod types { } } + impl From for Worker { + fn from(value: super::Worker) -> Self { + Self { + deleted: Ok(value.deleted), + id: Ok(value.id), + instance_id: Ok(value.instance_id), + lastping: Ok(value.lastping), + recycle: Ok(value.recycle), + tasks: Ok(value.tasks), + } + } + } + pub struct WorkerAddOutput { chunks: Result, String>, path: Result, @@ -1005,6 +1100,16 @@ pub mod types { } } + impl From for WorkerAddOutput { + fn from(value: super::WorkerAddOutput) -> Self { + Self { + chunks: Ok(value.chunks), + path: Ok(value.path), + size: Ok(value.size), + } + } + } + pub struct WorkerAppendTask { payload: Result, stream: Result, @@ -1065,6 +1170,16 @@ pub mod types { } } + impl From for WorkerAppendTask { + fn from(value: super::WorkerAppendTask) -> Self { + Self { + payload: Ok(value.payload), + stream: Ok(value.stream), + time: Ok(value.time), + } + } + } + pub struct WorkerBootstrap { bootstrap: Result, token: Result, @@ -1112,6 +1227,15 @@ pub mod types { } } + impl From for WorkerBootstrap { + fn from(value: super::WorkerBootstrap) -> Self { + Self { + bootstrap: Ok(value.bootstrap), + token: Ok(value.token), + } + } + } + pub struct WorkerBootstrapResult { id: Result, } @@ -1144,6 +1268,12 @@ pub mod types { } } + impl From for WorkerBootstrapResult { + fn from(value: super::WorkerBootstrapResult) -> Self { + Self { id: Ok(value.id) } + } + } + pub struct WorkerCompleteTask { failed: Result, } @@ -1178,6 +1308,14 @@ pub mod types { } } + impl From for WorkerCompleteTask { + fn from(value: super::WorkerCompleteTask) -> Self { + Self { + failed: Ok(value.failed), + } + } + } + pub struct WorkerPingResult { poweroff: Result, task: Result, String>, @@ -1225,6 +1363,15 @@ pub mod types { } } + impl From for WorkerPingResult { + fn from(value: super::WorkerPingResult) -> Self { + Self { + poweroff: Ok(value.poweroff), + task: Ok(value.task), + } + } + } + pub struct WorkerPingTask { id: Result, output_rules: Result, String>, @@ -1285,6 +1432,16 @@ pub mod types { } } + impl From for WorkerPingTask { + fn from(value: super::WorkerPingTask) -> Self { + Self { + id: Ok(value.id), + output_rules: Ok(value.output_rules), + script: Ok(value.script), + } + } + } + pub struct WorkerTask { id: Result, name: Result, @@ -1345,6 +1502,16 @@ pub mod types { } } + impl From for WorkerTask { + fn from(value: super::WorkerTask) -> Self { + Self { + id: Ok(value.id), + name: Ok(value.name), + owner: Ok(value.owner), + } + } + } + pub struct WorkersResult { workers: Result, String>, } @@ -1378,6 +1545,14 @@ pub mod types { }) } } + + impl From for WorkersResult { + fn from(value: super::WorkersResult) -> Self { + Self { + workers: Ok(value.workers), + } + } + } } } diff --git a/progenitor-impl/tests/output/buildomat-builder.out b/progenitor-impl/tests/output/buildomat-builder.out index 1492562..ba7d595 100644 --- a/progenitor-impl/tests/output/buildomat-builder.out +++ b/progenitor-impl/tests/output/buildomat-builder.out @@ -450,6 +450,18 @@ pub mod types { } } + impl From for Task { + fn from(value: super::Task) -> Self { + Self { + id: Ok(value.id), + name: Ok(value.name), + output_rules: Ok(value.output_rules), + script: Ok(value.script), + state: Ok(value.state), + } + } + } + pub struct TaskEvent { payload: Result, seq: Result, @@ -523,6 +535,17 @@ pub mod types { } } + impl From for TaskEvent { + fn from(value: super::TaskEvent) -> Self { + Self { + payload: Ok(value.payload), + seq: Ok(value.seq), + stream: Ok(value.stream), + time: Ok(value.time), + } + } + } + pub struct TaskOutput { id: Result, path: Result, @@ -583,6 +606,16 @@ pub mod types { } } + impl From for TaskOutput { + fn from(value: super::TaskOutput) -> Self { + Self { + id: Ok(value.id), + path: Ok(value.path), + size: Ok(value.size), + } + } + } + pub struct TaskSubmit { name: Result, output_rules: Result, String>, @@ -643,6 +676,16 @@ pub mod types { } } + impl From for TaskSubmit { + fn from(value: super::TaskSubmit) -> Self { + Self { + name: Ok(value.name), + output_rules: Ok(value.output_rules), + script: Ok(value.script), + } + } + } + pub struct TaskSubmitResult { id: Result, } @@ -675,6 +718,12 @@ pub mod types { } } + impl From for TaskSubmitResult { + fn from(value: super::TaskSubmitResult) -> Self { + Self { id: Ok(value.id) } + } + } + pub struct UploadedChunk { id: Result, } @@ -707,6 +756,12 @@ pub mod types { } } + impl From for UploadedChunk { + fn from(value: super::UploadedChunk) -> Self { + Self { id: Ok(value.id) } + } + } + pub struct UserCreate { name: Result, } @@ -739,6 +794,14 @@ pub mod types { } } + impl From for UserCreate { + fn from(value: super::UserCreate) -> Self { + Self { + name: Ok(value.name), + } + } + } + pub struct UserCreateResult { id: Result, name: Result, @@ -799,6 +862,16 @@ pub mod types { } } + impl From for UserCreateResult { + fn from(value: super::UserCreateResult) -> Self { + Self { + id: Ok(value.id), + name: Ok(value.name), + token: Ok(value.token), + } + } + } + pub struct WhoamiResult { id: Result, name: Result, @@ -846,6 +919,15 @@ pub mod types { } } + impl From for WhoamiResult { + fn from(value: super::WhoamiResult) -> Self { + Self { + id: Ok(value.id), + name: Ok(value.name), + } + } + } + pub struct Worker { deleted: Result, id: Result, @@ -945,6 +1027,19 @@ pub mod types { } } + impl From for Worker { + fn from(value: super::Worker) -> Self { + Self { + deleted: Ok(value.deleted), + id: Ok(value.id), + instance_id: Ok(value.instance_id), + lastping: Ok(value.lastping), + recycle: Ok(value.recycle), + tasks: Ok(value.tasks), + } + } + } + pub struct WorkerAddOutput { chunks: Result, String>, path: Result, @@ -1005,6 +1100,16 @@ pub mod types { } } + impl From for WorkerAddOutput { + fn from(value: super::WorkerAddOutput) -> Self { + Self { + chunks: Ok(value.chunks), + path: Ok(value.path), + size: Ok(value.size), + } + } + } + pub struct WorkerAppendTask { payload: Result, stream: Result, @@ -1065,6 +1170,16 @@ pub mod types { } } + impl From for WorkerAppendTask { + fn from(value: super::WorkerAppendTask) -> Self { + Self { + payload: Ok(value.payload), + stream: Ok(value.stream), + time: Ok(value.time), + } + } + } + pub struct WorkerBootstrap { bootstrap: Result, token: Result, @@ -1112,6 +1227,15 @@ pub mod types { } } + impl From for WorkerBootstrap { + fn from(value: super::WorkerBootstrap) -> Self { + Self { + bootstrap: Ok(value.bootstrap), + token: Ok(value.token), + } + } + } + pub struct WorkerBootstrapResult { id: Result, } @@ -1144,6 +1268,12 @@ pub mod types { } } + impl From for WorkerBootstrapResult { + fn from(value: super::WorkerBootstrapResult) -> Self { + Self { id: Ok(value.id) } + } + } + pub struct WorkerCompleteTask { failed: Result, } @@ -1178,6 +1308,14 @@ pub mod types { } } + impl From for WorkerCompleteTask { + fn from(value: super::WorkerCompleteTask) -> Self { + Self { + failed: Ok(value.failed), + } + } + } + pub struct WorkerPingResult { poweroff: Result, task: Result, String>, @@ -1225,6 +1363,15 @@ pub mod types { } } + impl From for WorkerPingResult { + fn from(value: super::WorkerPingResult) -> Self { + Self { + poweroff: Ok(value.poweroff), + task: Ok(value.task), + } + } + } + pub struct WorkerPingTask { id: Result, output_rules: Result, String>, @@ -1285,6 +1432,16 @@ pub mod types { } } + impl From for WorkerPingTask { + fn from(value: super::WorkerPingTask) -> Self { + Self { + id: Ok(value.id), + output_rules: Ok(value.output_rules), + script: Ok(value.script), + } + } + } + pub struct WorkerTask { id: Result, name: Result, @@ -1345,6 +1502,16 @@ pub mod types { } } + impl From for WorkerTask { + fn from(value: super::WorkerTask) -> Self { + Self { + id: Ok(value.id), + name: Ok(value.name), + owner: Ok(value.owner), + } + } + } + pub struct WorkersResult { workers: Result, String>, } @@ -1378,6 +1545,14 @@ pub mod types { }) } } + + impl From for WorkersResult { + fn from(value: super::WorkersResult) -> Self { + Self { + workers: Ok(value.workers), + } + } + } } } diff --git a/progenitor-impl/tests/output/keeper-builder-tagged.out b/progenitor-impl/tests/output/keeper-builder-tagged.out index f682319..a6e59e4 100644 --- a/progenitor-impl/tests/output/keeper-builder-tagged.out +++ b/progenitor-impl/tests/output/keeper-builder-tagged.out @@ -244,6 +244,15 @@ pub mod types { } } + impl From for EnrolBody { + fn from(value: super::EnrolBody) -> Self { + Self { + host: Ok(value.host), + key: Ok(value.key), + } + } + } + pub struct GlobalJobsResult { summary: Result, String>, } @@ -278,6 +287,14 @@ pub mod types { } } + impl From for GlobalJobsResult { + fn from(value: super::GlobalJobsResult) -> Self { + Self { + summary: Ok(value.summary), + } + } + } + pub struct OutputRecord { msg: Result, stream: Result, @@ -338,6 +355,16 @@ pub mod types { } } + impl From for OutputRecord { + fn from(value: super::OutputRecord) -> Self { + Self { + msg: Ok(value.msg), + stream: Ok(value.stream), + time: Ok(value.time), + } + } + } + pub struct PingResult { host: Result, ok: Result, @@ -385,6 +412,15 @@ pub mod types { } } + impl From for PingResult { + fn from(value: super::PingResult) -> Self { + Self { + host: Ok(value.host), + ok: Ok(value.ok), + } + } + } + pub struct ReportFinishBody { duration_millis: Result, end_time: Result, String>, @@ -458,6 +494,17 @@ pub mod types { } } + impl From for ReportFinishBody { + fn from(value: super::ReportFinishBody) -> Self { + Self { + duration_millis: Ok(value.duration_millis), + end_time: Ok(value.end_time), + exit_status: Ok(value.exit_status), + id: Ok(value.id), + } + } + } + pub struct ReportId { host: Result, job: Result, @@ -544,6 +591,18 @@ pub mod types { } } + impl From for ReportId { + fn from(value: super::ReportId) -> Self { + Self { + host: Ok(value.host), + job: Ok(value.job), + pid: Ok(value.pid), + time: Ok(value.time), + uuid: Ok(value.uuid), + } + } + } + pub struct ReportOutputBody { id: Result, record: Result, @@ -591,6 +650,15 @@ pub mod types { } } + impl From for ReportOutputBody { + fn from(value: super::ReportOutputBody) -> Self { + Self { + id: Ok(value.id), + record: Ok(value.record), + } + } + } + pub struct ReportResult { existed_already: Result, } @@ -625,6 +693,14 @@ pub mod types { } } + impl From for ReportResult { + fn from(value: super::ReportResult) -> Self { + Self { + existed_already: Ok(value.existed_already), + } + } + } + pub struct ReportStartBody { id: Result, script: Result, @@ -685,6 +761,16 @@ pub mod types { } } + impl From for ReportStartBody { + fn from(value: super::ReportStartBody) -> Self { + Self { + id: Ok(value.id), + script: Ok(value.script), + start_time: Ok(value.start_time), + } + } + } + pub struct ReportSummary { age_seconds: Result, duration_seconds: Result, @@ -786,6 +872,19 @@ pub mod types { }) } } + + impl From for ReportSummary { + fn from(value: super::ReportSummary) -> Self { + Self { + age_seconds: Ok(value.age_seconds), + duration_seconds: Ok(value.duration_seconds), + host: Ok(value.host), + job: Ok(value.job), + status: Ok(value.status), + when: Ok(value.when), + } + } + } } } diff --git a/progenitor-impl/tests/output/keeper-builder.out b/progenitor-impl/tests/output/keeper-builder.out index 5e125cc..2dbca98 100644 --- a/progenitor-impl/tests/output/keeper-builder.out +++ b/progenitor-impl/tests/output/keeper-builder.out @@ -244,6 +244,15 @@ pub mod types { } } + impl From for EnrolBody { + fn from(value: super::EnrolBody) -> Self { + Self { + host: Ok(value.host), + key: Ok(value.key), + } + } + } + pub struct GlobalJobsResult { summary: Result, String>, } @@ -278,6 +287,14 @@ pub mod types { } } + impl From for GlobalJobsResult { + fn from(value: super::GlobalJobsResult) -> Self { + Self { + summary: Ok(value.summary), + } + } + } + pub struct OutputRecord { msg: Result, stream: Result, @@ -338,6 +355,16 @@ pub mod types { } } + impl From for OutputRecord { + fn from(value: super::OutputRecord) -> Self { + Self { + msg: Ok(value.msg), + stream: Ok(value.stream), + time: Ok(value.time), + } + } + } + pub struct PingResult { host: Result, ok: Result, @@ -385,6 +412,15 @@ pub mod types { } } + impl From for PingResult { + fn from(value: super::PingResult) -> Self { + Self { + host: Ok(value.host), + ok: Ok(value.ok), + } + } + } + pub struct ReportFinishBody { duration_millis: Result, end_time: Result, String>, @@ -458,6 +494,17 @@ pub mod types { } } + impl From for ReportFinishBody { + fn from(value: super::ReportFinishBody) -> Self { + Self { + duration_millis: Ok(value.duration_millis), + end_time: Ok(value.end_time), + exit_status: Ok(value.exit_status), + id: Ok(value.id), + } + } + } + pub struct ReportId { host: Result, job: Result, @@ -544,6 +591,18 @@ pub mod types { } } + impl From for ReportId { + fn from(value: super::ReportId) -> Self { + Self { + host: Ok(value.host), + job: Ok(value.job), + pid: Ok(value.pid), + time: Ok(value.time), + uuid: Ok(value.uuid), + } + } + } + pub struct ReportOutputBody { id: Result, record: Result, @@ -591,6 +650,15 @@ pub mod types { } } + impl From for ReportOutputBody { + fn from(value: super::ReportOutputBody) -> Self { + Self { + id: Ok(value.id), + record: Ok(value.record), + } + } + } + pub struct ReportResult { existed_already: Result, } @@ -625,6 +693,14 @@ pub mod types { } } + impl From for ReportResult { + fn from(value: super::ReportResult) -> Self { + Self { + existed_already: Ok(value.existed_already), + } + } + } + pub struct ReportStartBody { id: Result, script: Result, @@ -685,6 +761,16 @@ pub mod types { } } + impl From for ReportStartBody { + fn from(value: super::ReportStartBody) -> Self { + Self { + id: Ok(value.id), + script: Ok(value.script), + start_time: Ok(value.start_time), + } + } + } + pub struct ReportSummary { age_seconds: Result, duration_seconds: Result, @@ -786,6 +872,19 @@ pub mod types { }) } } + + impl From for ReportSummary { + fn from(value: super::ReportSummary) -> Self { + Self { + age_seconds: Ok(value.age_seconds), + duration_seconds: Ok(value.duration_seconds), + host: Ok(value.host), + job: Ok(value.job), + status: Ok(value.status), + when: Ok(value.when), + } + } + } } } diff --git a/progenitor-impl/tests/output/nexus-builder-tagged.out b/progenitor-impl/tests/output/nexus-builder-tagged.out index 473f430..c1b0c32 100644 --- a/progenitor-impl/tests/output/nexus-builder-tagged.out +++ b/progenitor-impl/tests/output/nexus-builder-tagged.out @@ -6693,6 +6693,16 @@ pub mod types { } } + impl From for Baseboard { + fn from(value: super::Baseboard) -> Self { + Self { + part: Ok(value.part), + revision: Ok(value.revision), + serial: Ok(value.serial), + } + } + } + pub struct Bindouble { count: Result, range: Result, @@ -6740,6 +6750,15 @@ pub mod types { } } + impl From for Bindouble { + fn from(value: super::Bindouble) -> Self { + Self { + count: Ok(value.count), + range: Ok(value.range), + } + } + } + pub struct Binint64 { count: Result, range: Result, @@ -6787,6 +6806,15 @@ pub mod types { } } + impl From for Binint64 { + fn from(value: super::Binint64) -> Self { + Self { + count: Ok(value.count), + range: Ok(value.range), + } + } + } + pub struct Certificate { description: Result, id: Result, @@ -6886,6 +6914,19 @@ pub mod types { } } + impl From for Certificate { + fn from(value: super::Certificate) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + service: Ok(value.service), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct CertificateCreate { cert: Result, String>, description: Result, @@ -6972,6 +7013,18 @@ pub mod types { } } + impl From for CertificateCreate { + fn from(value: super::CertificateCreate) -> Self { + Self { + cert: Ok(value.cert), + description: Ok(value.description), + key: Ok(value.key), + name: Ok(value.name), + service: Ok(value.service), + } + } + } + pub struct CertificateResultsPage { items: Result, String>, next_page: Result, String>, @@ -7019,6 +7072,15 @@ pub mod types { } } + impl From for CertificateResultsPage { + fn from(value: super::CertificateResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct ComponentUpdate { component_type: Result, id: Result, @@ -7105,6 +7167,18 @@ pub mod types { } } + impl From for ComponentUpdate { + fn from(value: super::ComponentUpdate) -> Self { + Self { + component_type: Ok(value.component_type), + id: Ok(value.id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + version: Ok(value.version), + } + } + } + pub struct ComponentUpdateResultsPage { items: Result, String>, next_page: Result, String>, @@ -7152,6 +7226,15 @@ pub mod types { } } + impl From for ComponentUpdateResultsPage { + fn from(value: super::ComponentUpdateResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Cumulativedouble { start_time: Result, String>, value: Result, @@ -7199,6 +7282,15 @@ pub mod types { } } + impl From for Cumulativedouble { + fn from(value: super::Cumulativedouble) -> Self { + Self { + start_time: Ok(value.start_time), + value: Ok(value.value), + } + } + } + pub struct Cumulativeint64 { start_time: Result, String>, value: Result, @@ -7246,6 +7338,15 @@ pub mod types { } } + impl From for Cumulativeint64 { + fn from(value: super::Cumulativeint64) -> Self { + Self { + start_time: Ok(value.start_time), + value: Ok(value.value), + } + } + } + pub struct DerEncodedKeyPair { private_key: Result, public_cert: Result, @@ -7293,6 +7394,15 @@ pub mod types { } } + impl From for DerEncodedKeyPair { + fn from(value: super::DerEncodedKeyPair) -> Self { + Self { + private_key: Ok(value.private_key), + public_cert: Ok(value.public_cert), + } + } + } + pub struct DeviceAccessTokenRequest { client_id: Result, device_code: Result, @@ -7353,6 +7463,16 @@ pub mod types { } } + impl From for DeviceAccessTokenRequest { + fn from(value: super::DeviceAccessTokenRequest) -> Self { + Self { + client_id: Ok(value.client_id), + device_code: Ok(value.device_code), + grant_type: Ok(value.grant_type), + } + } + } + pub struct DeviceAuthRequest { client_id: Result, } @@ -7387,6 +7507,14 @@ pub mod types { } } + impl From for DeviceAuthRequest { + fn from(value: super::DeviceAuthRequest) -> Self { + Self { + client_id: Ok(value.client_id), + } + } + } + pub struct DeviceAuthVerify { user_code: Result, } @@ -7421,6 +7549,14 @@ pub mod types { } } + impl From for DeviceAuthVerify { + fn from(value: super::DeviceAuthVerify) -> Self { + Self { + user_code: Ok(value.user_code), + } + } + } + pub struct Disk { block_size: Result, description: Result, @@ -7598,6 +7734,25 @@ pub mod types { } } + impl From for Disk { + fn from(value: super::Disk) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + device_path: Ok(value.device_path), + id: Ok(value.id), + image_id: Ok(value.image_id), + name: Ok(value.name), + project_id: Ok(value.project_id), + size: Ok(value.size), + snapshot_id: Ok(value.snapshot_id), + state: Ok(value.state), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct DiskCreate { description: Result, disk_source: Result, @@ -7671,6 +7826,17 @@ pub mod types { } } + impl From for DiskCreate { + fn from(value: super::DiskCreate) -> Self { + Self { + description: Ok(value.description), + disk_source: Ok(value.disk_source), + name: Ok(value.name), + size: Ok(value.size), + } + } + } + pub struct DiskIdentifier { name: Result, } @@ -7703,6 +7869,14 @@ pub mod types { } } + impl From for DiskIdentifier { + fn from(value: super::DiskIdentifier) -> Self { + Self { + name: Ok(value.name), + } + } + } + pub struct DiskPath { disk: Result, } @@ -7735,6 +7909,14 @@ pub mod types { } } + impl From for DiskPath { + fn from(value: super::DiskPath) -> Self { + Self { + disk: Ok(value.disk), + } + } + } + pub struct DiskResultsPage { items: Result, String>, next_page: Result, String>, @@ -7782,6 +7964,15 @@ pub mod types { } } + impl From for DiskResultsPage { + fn from(value: super::DiskResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Distribution { name: Result, version: Result, @@ -7829,6 +8020,15 @@ pub mod types { } } + impl From for Distribution { + fn from(value: super::Distribution) -> Self { + Self { + name: Ok(value.name), + version: Ok(value.version), + } + } + } + pub struct Error { error_code: Result, String>, message: Result, @@ -7889,6 +8089,16 @@ pub mod types { } } + impl From for Error { + fn from(value: super::Error) -> Self { + Self { + error_code: Ok(value.error_code), + message: Ok(value.message), + request_id: Ok(value.request_id), + } + } + } + pub struct ExternalIp { ip: Result, kind: Result, @@ -7936,6 +8146,15 @@ pub mod types { } } + impl From for ExternalIp { + fn from(value: super::ExternalIp) -> Self { + Self { + ip: Ok(value.ip), + kind: Ok(value.kind), + } + } + } + pub struct ExternalIpResultsPage { items: Result, String>, next_page: Result, String>, @@ -7983,6 +8202,15 @@ pub mod types { } } + impl From for ExternalIpResultsPage { + fn from(value: super::ExternalIpResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct FieldSchema { name: Result, source: Result, @@ -8043,6 +8271,16 @@ pub mod types { } } + impl From for FieldSchema { + fn from(value: super::FieldSchema) -> Self { + Self { + name: Ok(value.name), + source: Ok(value.source), + ty: Ok(value.ty), + } + } + } + pub struct FleetRolePolicy { role_assignments: Result, String>, } @@ -8080,6 +8318,14 @@ pub mod types { } } + impl From for FleetRolePolicy { + fn from(value: super::FleetRolePolicy) -> Self { + Self { + role_assignments: Ok(value.role_assignments), + } + } + } + pub struct FleetRoleRoleAssignment { identity_id: Result, identity_type: Result, @@ -8140,6 +8386,16 @@ pub mod types { } } + impl From for FleetRoleRoleAssignment { + fn from(value: super::FleetRoleRoleAssignment) -> Self { + Self { + identity_id: Ok(value.identity_id), + identity_type: Ok(value.identity_type), + role_name: Ok(value.role_name), + } + } + } + pub struct GlobalImage { block_size: Result, description: Result, @@ -8304,6 +8560,24 @@ pub mod types { } } + impl From for GlobalImage { + fn from(value: super::GlobalImage) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + digest: Ok(value.digest), + distribution: Ok(value.distribution), + id: Ok(value.id), + name: Ok(value.name), + size: Ok(value.size), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + url: Ok(value.url), + version: Ok(value.version), + } + } + } + pub struct GlobalImageCreate { block_size: Result, description: Result, @@ -8390,6 +8664,18 @@ pub mod types { } } + impl From for GlobalImageCreate { + fn from(value: super::GlobalImageCreate) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + distribution: Ok(value.distribution), + name: Ok(value.name), + source: Ok(value.source), + } + } + } + pub struct GlobalImageResultsPage { items: Result, String>, next_page: Result, String>, @@ -8437,6 +8723,15 @@ pub mod types { } } + impl From for GlobalImageResultsPage { + fn from(value: super::GlobalImageResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Group { display_name: Result, id: Result, @@ -8497,6 +8792,16 @@ pub mod types { } } + impl From for Group { + fn from(value: super::Group) -> Self { + Self { + display_name: Ok(value.display_name), + id: Ok(value.id), + silo_id: Ok(value.silo_id), + } + } + } + pub struct GroupResultsPage { items: Result, String>, next_page: Result, String>, @@ -8544,6 +8849,15 @@ pub mod types { } } + impl From for GroupResultsPage { + fn from(value: super::GroupResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Histogramdouble { bins: Result, String>, n_samples: Result, @@ -8604,6 +8918,16 @@ pub mod types { } } + impl From for Histogramdouble { + fn from(value: super::Histogramdouble) -> Self { + Self { + bins: Ok(value.bins), + n_samples: Ok(value.n_samples), + start_time: Ok(value.start_time), + } + } + } + pub struct Histogramint64 { bins: Result, String>, n_samples: Result, @@ -8664,6 +8988,16 @@ pub mod types { } } + impl From for Histogramint64 { + fn from(value: super::Histogramint64) -> Self { + Self { + bins: Ok(value.bins), + n_samples: Ok(value.n_samples), + start_time: Ok(value.start_time), + } + } + } + pub struct IdentityProvider { description: Result, id: Result, @@ -8763,6 +9097,19 @@ pub mod types { } } + impl From for IdentityProvider { + fn from(value: super::IdentityProvider) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + provider_type: Ok(value.provider_type), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct IdentityProviderResultsPage { items: Result, String>, next_page: Result, String>, @@ -8810,6 +9157,15 @@ pub mod types { } } + impl From for IdentityProviderResultsPage { + fn from(value: super::IdentityProviderResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Image { block_size: Result, description: Result, @@ -8974,6 +9330,24 @@ pub mod types { } } + impl From for Image { + fn from(value: super::Image) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + digest: Ok(value.digest), + id: Ok(value.id), + name: Ok(value.name), + project_id: Ok(value.project_id), + size: Ok(value.size), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + url: Ok(value.url), + version: Ok(value.version), + } + } + } + pub struct ImageCreate { block_size: Result, description: Result, @@ -9047,6 +9421,17 @@ pub mod types { } } + impl From for ImageCreate { + fn from(value: super::ImageCreate) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + name: Ok(value.name), + source: Ok(value.source), + } + } + } + pub struct ImageResultsPage { items: Result, String>, next_page: Result, String>, @@ -9094,6 +9479,15 @@ pub mod types { } } + impl From for ImageResultsPage { + fn from(value: super::ImageResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Instance { description: Result, hostname: Result, @@ -9263,6 +9657,24 @@ pub mod types { } } + impl From for Instance { + fn from(value: super::Instance) -> Self { + Self { + description: Ok(value.description), + hostname: Ok(value.hostname), + id: Ok(value.id), + memory: Ok(value.memory), + name: Ok(value.name), + ncpus: Ok(value.ncpus), + project_id: Ok(value.project_id), + run_state: Ok(value.run_state), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + time_run_state_updated: Ok(value.time_run_state_updated), + } + } + } + pub struct InstanceCreate { description: Result, disks: Result, String>, @@ -9417,6 +9829,23 @@ pub mod types { } } + impl From for InstanceCreate { + fn from(value: super::InstanceCreate) -> Self { + Self { + description: Ok(value.description), + disks: Ok(value.disks), + external_ips: Ok(value.external_ips), + hostname: Ok(value.hostname), + memory: Ok(value.memory), + name: Ok(value.name), + ncpus: Ok(value.ncpus), + network_interfaces: Ok(value.network_interfaces), + start: Ok(value.start), + user_data: Ok(value.user_data), + } + } + } + pub struct InstanceMigrate { dst_sled_id: Result, } @@ -9451,6 +9880,14 @@ pub mod types { } } + impl From for InstanceMigrate { + fn from(value: super::InstanceMigrate) -> Self { + Self { + dst_sled_id: Ok(value.dst_sled_id), + } + } + } + pub struct InstanceResultsPage { items: Result, String>, next_page: Result, String>, @@ -9498,6 +9935,15 @@ pub mod types { } } + impl From for InstanceResultsPage { + fn from(value: super::InstanceResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct InstanceSerialConsoleData { data: Result, String>, last_byte_offset: Result, @@ -9548,6 +9994,15 @@ pub mod types { } } + impl From for InstanceSerialConsoleData { + fn from(value: super::InstanceSerialConsoleData) -> Self { + Self { + data: Ok(value.data), + last_byte_offset: Ok(value.last_byte_offset), + } + } + } + pub struct IpPool { description: Result, id: Result, @@ -9634,6 +10089,18 @@ pub mod types { } } + impl From for IpPool { + fn from(value: super::IpPool) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct IpPoolCreate { description: Result, name: Result, @@ -9681,6 +10148,15 @@ pub mod types { } } + impl From for IpPoolCreate { + fn from(value: super::IpPoolCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct IpPoolRange { id: Result, range: Result, @@ -9741,6 +10217,16 @@ pub mod types { } } + impl From for IpPoolRange { + fn from(value: super::IpPoolRange) -> Self { + Self { + id: Ok(value.id), + range: Ok(value.range), + time_created: Ok(value.time_created), + } + } + } + pub struct IpPoolRangeResultsPage { items: Result, String>, next_page: Result, String>, @@ -9788,6 +10274,15 @@ pub mod types { } } + impl From for IpPoolRangeResultsPage { + fn from(value: super::IpPoolRangeResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct IpPoolResultsPage { items: Result, String>, next_page: Result, String>, @@ -9835,6 +10330,15 @@ pub mod types { } } + impl From for IpPoolResultsPage { + fn from(value: super::IpPoolResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct IpPoolUpdate { description: Result, String>, name: Result, String>, @@ -9882,6 +10386,15 @@ pub mod types { } } + impl From for IpPoolUpdate { + fn from(value: super::IpPoolUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct Ipv4Range { first: Result, last: Result, @@ -9929,6 +10442,15 @@ pub mod types { } } + impl From for Ipv4Range { + fn from(value: super::Ipv4Range) -> Self { + Self { + first: Ok(value.first), + last: Ok(value.last), + } + } + } + pub struct Ipv6Range { first: Result, last: Result, @@ -9976,6 +10498,15 @@ pub mod types { } } + impl From for Ipv6Range { + fn from(value: super::Ipv6Range) -> Self { + Self { + first: Ok(value.first), + last: Ok(value.last), + } + } + } + pub struct Measurement { datum: Result, timestamp: Result, String>, @@ -10023,6 +10554,15 @@ pub mod types { } } + impl From for Measurement { + fn from(value: super::Measurement) -> Self { + Self { + datum: Ok(value.datum), + timestamp: Ok(value.timestamp), + } + } + } + pub struct MeasurementResultsPage { items: Result, String>, next_page: Result, String>, @@ -10070,6 +10610,15 @@ pub mod types { } } + impl From for MeasurementResultsPage { + fn from(value: super::MeasurementResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct NetworkInterface { description: Result, id: Result, @@ -10234,6 +10783,24 @@ pub mod types { } } + impl From for NetworkInterface { + fn from(value: super::NetworkInterface) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + instance_id: Ok(value.instance_id), + ip: Ok(value.ip), + mac: Ok(value.mac), + name: Ok(value.name), + primary: Ok(value.primary), + subnet_id: Ok(value.subnet_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_id: Ok(value.vpc_id), + } + } + } + pub struct NetworkInterfaceCreate { description: Result, ip: Result, String>, @@ -10320,6 +10887,18 @@ pub mod types { } } + impl From for NetworkInterfaceCreate { + fn from(value: super::NetworkInterfaceCreate) -> Self { + Self { + description: Ok(value.description), + ip: Ok(value.ip), + name: Ok(value.name), + subnet_name: Ok(value.subnet_name), + vpc_name: Ok(value.vpc_name), + } + } + } + pub struct NetworkInterfaceResultsPage { items: Result, String>, next_page: Result, String>, @@ -10367,6 +10946,15 @@ pub mod types { } } + impl From for NetworkInterfaceResultsPage { + fn from(value: super::NetworkInterfaceResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct NetworkInterfaceUpdate { description: Result, String>, name: Result, String>, @@ -10427,6 +11015,16 @@ pub mod types { } } + impl From for NetworkInterfaceUpdate { + fn from(value: super::NetworkInterfaceUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + primary: Ok(value.primary), + } + } + } + pub struct Organization { description: Result, id: Result, @@ -10513,6 +11111,18 @@ pub mod types { } } + impl From for Organization { + fn from(value: super::Organization) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct OrganizationCreate { description: Result, name: Result, @@ -10560,6 +11170,15 @@ pub mod types { } } + impl From for OrganizationCreate { + fn from(value: super::OrganizationCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct OrganizationResultsPage { items: Result, String>, next_page: Result, String>, @@ -10607,6 +11226,15 @@ pub mod types { } } + impl From for OrganizationResultsPage { + fn from(value: super::OrganizationResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct OrganizationRolePolicy { role_assignments: Result, String>, } @@ -10644,6 +11272,14 @@ pub mod types { } } + impl From for OrganizationRolePolicy { + fn from(value: super::OrganizationRolePolicy) -> Self { + Self { + role_assignments: Ok(value.role_assignments), + } + } + } + pub struct OrganizationRoleRoleAssignment { identity_id: Result, identity_type: Result, @@ -10706,6 +11342,16 @@ pub mod types { } } + impl From for OrganizationRoleRoleAssignment { + fn from(value: super::OrganizationRoleRoleAssignment) -> Self { + Self { + identity_id: Ok(value.identity_id), + identity_type: Ok(value.identity_type), + role_name: Ok(value.role_name), + } + } + } + pub struct OrganizationUpdate { description: Result, String>, name: Result, String>, @@ -10753,6 +11399,15 @@ pub mod types { } } + impl From for OrganizationUpdate { + fn from(value: super::OrganizationUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct PhysicalDisk { disk_type: Result, id: Result, @@ -10878,6 +11533,21 @@ pub mod types { } } + impl From for PhysicalDisk { + fn from(value: super::PhysicalDisk) -> Self { + Self { + disk_type: Ok(value.disk_type), + id: Ok(value.id), + model: Ok(value.model), + serial: Ok(value.serial), + sled_id: Ok(value.sled_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vendor: Ok(value.vendor), + } + } + } + pub struct PhysicalDiskResultsPage { items: Result, String>, next_page: Result, String>, @@ -10925,6 +11595,15 @@ pub mod types { } } + impl From for PhysicalDiskResultsPage { + fn from(value: super::PhysicalDiskResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Project { description: Result, id: Result, @@ -11024,6 +11703,19 @@ pub mod types { } } + impl From for Project { + fn from(value: super::Project) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + organization_id: Ok(value.organization_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct ProjectCreate { description: Result, name: Result, @@ -11071,6 +11763,15 @@ pub mod types { } } + impl From for ProjectCreate { + fn from(value: super::ProjectCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct ProjectResultsPage { items: Result, String>, next_page: Result, String>, @@ -11118,6 +11819,15 @@ pub mod types { } } + impl From for ProjectResultsPage { + fn from(value: super::ProjectResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct ProjectRolePolicy { role_assignments: Result, String>, } @@ -11155,6 +11865,14 @@ pub mod types { } } + impl From for ProjectRolePolicy { + fn from(value: super::ProjectRolePolicy) -> Self { + Self { + role_assignments: Ok(value.role_assignments), + } + } + } + pub struct ProjectRoleRoleAssignment { identity_id: Result, identity_type: Result, @@ -11215,6 +11933,16 @@ pub mod types { } } + impl From for ProjectRoleRoleAssignment { + fn from(value: super::ProjectRoleRoleAssignment) -> Self { + Self { + identity_id: Ok(value.identity_id), + identity_type: Ok(value.identity_type), + role_name: Ok(value.role_name), + } + } + } + pub struct ProjectUpdate { description: Result, String>, name: Result, String>, @@ -11262,6 +11990,15 @@ pub mod types { } } + impl From for ProjectUpdate { + fn from(value: super::ProjectUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct Rack { id: Result, time_created: Result, String>, @@ -11322,6 +12059,16 @@ pub mod types { } } + impl From for Rack { + fn from(value: super::Rack) -> Self { + Self { + id: Ok(value.id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct RackResultsPage { items: Result, String>, next_page: Result, String>, @@ -11369,6 +12116,15 @@ pub mod types { } } + impl From for RackResultsPage { + fn from(value: super::RackResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Role { description: Result, name: Result, @@ -11416,6 +12172,15 @@ pub mod types { } } + impl From for Role { + fn from(value: super::Role) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct RoleResultsPage { items: Result, String>, next_page: Result, String>, @@ -11463,6 +12228,15 @@ pub mod types { } } + impl From for RoleResultsPage { + fn from(value: super::RoleResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct RouterRoute { description: Result, destination: Result, @@ -11601,6 +12375,22 @@ pub mod types { } } + impl From for RouterRoute { + fn from(value: super::RouterRoute) -> Self { + Self { + description: Ok(value.description), + destination: Ok(value.destination), + id: Ok(value.id), + kind: Ok(value.kind), + name: Ok(value.name), + target: Ok(value.target), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_router_id: Ok(value.vpc_router_id), + } + } + } + pub struct RouterRouteCreateParams { description: Result, destination: Result, @@ -11674,6 +12464,17 @@ pub mod types { } } + impl From for RouterRouteCreateParams { + fn from(value: super::RouterRouteCreateParams) -> Self { + Self { + description: Ok(value.description), + destination: Ok(value.destination), + name: Ok(value.name), + target: Ok(value.target), + } + } + } + pub struct RouterRouteResultsPage { items: Result, String>, next_page: Result, String>, @@ -11721,6 +12522,15 @@ pub mod types { } } + impl From for RouterRouteResultsPage { + fn from(value: super::RouterRouteResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct RouterRouteUpdateParams { description: Result, String>, destination: Result, @@ -11794,6 +12604,17 @@ pub mod types { } } + impl From for RouterRouteUpdateParams { + fn from(value: super::RouterRouteUpdateParams) -> Self { + Self { + description: Ok(value.description), + destination: Ok(value.destination), + name: Ok(value.name), + target: Ok(value.target), + } + } + } + pub struct Saga { id: Result, state: Result, @@ -11841,6 +12662,15 @@ pub mod types { } } + impl From for Saga { + fn from(value: super::Saga) -> Self { + Self { + id: Ok(value.id), + state: Ok(value.state), + } + } + } + pub struct SagaResultsPage { items: Result, String>, next_page: Result, String>, @@ -11888,6 +12718,15 @@ pub mod types { } } + impl From for SagaResultsPage { + fn from(value: super::SagaResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SamlIdentityProvider { acs_url: Result, description: Result, @@ -12057,6 +12896,24 @@ pub mod types { } } + impl From for SamlIdentityProvider { + fn from(value: super::SamlIdentityProvider) -> Self { + Self { + acs_url: Ok(value.acs_url), + description: Ok(value.description), + id: Ok(value.id), + idp_entity_id: Ok(value.idp_entity_id), + name: Ok(value.name), + public_cert: Ok(value.public_cert), + slo_url: Ok(value.slo_url), + sp_client_id: Ok(value.sp_client_id), + technical_contact_email: Ok(value.technical_contact_email), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SamlIdentityProviderCreate { acs_url: Result, description: Result, @@ -12221,6 +13078,23 @@ pub mod types { } } + impl From for SamlIdentityProviderCreate { + fn from(value: super::SamlIdentityProviderCreate) -> Self { + Self { + acs_url: Ok(value.acs_url), + description: Ok(value.description), + group_attribute_name: Ok(value.group_attribute_name), + idp_entity_id: Ok(value.idp_entity_id), + idp_metadata_source: Ok(value.idp_metadata_source), + name: Ok(value.name), + signing_keypair: Ok(value.signing_keypair), + slo_url: Ok(value.slo_url), + sp_client_id: Ok(value.sp_client_id), + technical_contact_email: Ok(value.technical_contact_email), + } + } + } + pub struct Silo { description: Result, discoverable: Result, @@ -12333,6 +13207,20 @@ pub mod types { } } + impl From for Silo { + fn from(value: super::Silo) -> Self { + Self { + description: Ok(value.description), + discoverable: Ok(value.discoverable), + id: Ok(value.id), + identity_mode: Ok(value.identity_mode), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SiloCreate { admin_group_name: Result, String>, description: Result, @@ -12422,6 +13310,18 @@ pub mod types { } } + impl From for SiloCreate { + fn from(value: super::SiloCreate) -> Self { + Self { + admin_group_name: Ok(value.admin_group_name), + description: Ok(value.description), + discoverable: Ok(value.discoverable), + identity_mode: Ok(value.identity_mode), + name: Ok(value.name), + } + } + } + pub struct SiloResultsPage { items: Result, String>, next_page: Result, String>, @@ -12469,6 +13369,15 @@ pub mod types { } } + impl From for SiloResultsPage { + fn from(value: super::SiloResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SiloRolePolicy { role_assignments: Result, String>, } @@ -12506,6 +13415,14 @@ pub mod types { } } + impl From for SiloRolePolicy { + fn from(value: super::SiloRolePolicy) -> Self { + Self { + role_assignments: Ok(value.role_assignments), + } + } + } + pub struct SiloRoleRoleAssignment { identity_id: Result, identity_type: Result, @@ -12566,6 +13483,16 @@ pub mod types { } } + impl From for SiloRoleRoleAssignment { + fn from(value: super::SiloRoleRoleAssignment) -> Self { + Self { + identity_id: Ok(value.identity_id), + identity_type: Ok(value.identity_type), + role_name: Ok(value.role_name), + } + } + } + pub struct Sled { baseboard: Result, id: Result, @@ -12652,6 +13579,18 @@ pub mod types { } } + impl From for Sled { + fn from(value: super::Sled) -> Self { + Self { + baseboard: Ok(value.baseboard), + id: Ok(value.id), + service_address: Ok(value.service_address), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SledResultsPage { items: Result, String>, next_page: Result, String>, @@ -12699,6 +13638,15 @@ pub mod types { } } + impl From for SledResultsPage { + fn from(value: super::SledResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Snapshot { description: Result, disk_id: Result, @@ -12837,6 +13785,22 @@ pub mod types { } } + impl From for Snapshot { + fn from(value: super::Snapshot) -> Self { + Self { + description: Ok(value.description), + disk_id: Ok(value.disk_id), + id: Ok(value.id), + name: Ok(value.name), + project_id: Ok(value.project_id), + size: Ok(value.size), + state: Ok(value.state), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SnapshotCreate { description: Result, disk: Result, @@ -12897,6 +13861,16 @@ pub mod types { } } + impl From for SnapshotCreate { + fn from(value: super::SnapshotCreate) -> Self { + Self { + description: Ok(value.description), + disk: Ok(value.disk), + name: Ok(value.name), + } + } + } + pub struct SnapshotResultsPage { items: Result, String>, next_page: Result, String>, @@ -12944,6 +13918,15 @@ pub mod types { } } + impl From for SnapshotResultsPage { + fn from(value: super::SnapshotResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SpoofLoginBody { username: Result, } @@ -12978,6 +13961,14 @@ pub mod types { } } + impl From for SpoofLoginBody { + fn from(value: super::SpoofLoginBody) -> Self { + Self { + username: Ok(value.username), + } + } + } + pub struct SshKey { description: Result, id: Result, @@ -13090,6 +14081,20 @@ pub mod types { } } + impl From for SshKey { + fn from(value: super::SshKey) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + public_key: Ok(value.public_key), + silo_user_id: Ok(value.silo_user_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SshKeyCreate { description: Result, name: Result, @@ -13150,6 +14155,16 @@ pub mod types { } } + impl From for SshKeyCreate { + fn from(value: super::SshKeyCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + public_key: Ok(value.public_key), + } + } + } + pub struct SshKeyResultsPage { items: Result, String>, next_page: Result, String>, @@ -13197,6 +14212,15 @@ pub mod types { } } + impl From for SshKeyResultsPage { + fn from(value: super::SshKeyResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SystemUpdate { id: Result, time_created: Result, String>, @@ -13270,6 +14294,17 @@ pub mod types { } } + impl From for SystemUpdate { + fn from(value: super::SystemUpdate) -> Self { + Self { + id: Ok(value.id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + version: Ok(value.version), + } + } + } + pub struct SystemUpdateResultsPage { items: Result, String>, next_page: Result, String>, @@ -13317,6 +14352,15 @@ pub mod types { } } + impl From for SystemUpdateResultsPage { + fn from(value: super::SystemUpdateResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SystemUpdateStart { version: Result, } @@ -13351,6 +14395,14 @@ pub mod types { } } + impl From for SystemUpdateStart { + fn from(value: super::SystemUpdateStart) -> Self { + Self { + version: Ok(value.version), + } + } + } + pub struct SystemVersion { status: Result, version_range: Result, @@ -13398,6 +14450,15 @@ pub mod types { } } + impl From for SystemVersion { + fn from(value: super::SystemVersion) -> Self { + Self { + status: Ok(value.status), + version_range: Ok(value.version_range), + } + } + } + pub struct TimeseriesSchema { created: Result, String>, datum_type: Result, @@ -13471,6 +14532,17 @@ pub mod types { } } + impl From for TimeseriesSchema { + fn from(value: super::TimeseriesSchema) -> Self { + Self { + created: Ok(value.created), + datum_type: Ok(value.datum_type), + field_schema: Ok(value.field_schema), + timeseries_name: Ok(value.timeseries_name), + } + } + } + pub struct TimeseriesSchemaResultsPage { items: Result, String>, next_page: Result, String>, @@ -13518,6 +14590,15 @@ pub mod types { } } + impl From for TimeseriesSchemaResultsPage { + fn from(value: super::TimeseriesSchemaResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct UpdateDeployment { id: Result, status: Result, @@ -13604,6 +14685,18 @@ pub mod types { } } + impl From for UpdateDeployment { + fn from(value: super::UpdateDeployment) -> Self { + Self { + id: Ok(value.id), + status: Ok(value.status), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + version: Ok(value.version), + } + } + } + pub struct UpdateDeploymentResultsPage { items: Result, String>, next_page: Result, String>, @@ -13651,6 +14744,15 @@ pub mod types { } } + impl From for UpdateDeploymentResultsPage { + fn from(value: super::UpdateDeploymentResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct UpdateableComponent { component_type: Result, device_id: Result, @@ -13776,6 +14878,21 @@ pub mod types { } } + impl From for UpdateableComponent { + fn from(value: super::UpdateableComponent) -> Self { + Self { + component_type: Ok(value.component_type), + device_id: Ok(value.device_id), + id: Ok(value.id), + status: Ok(value.status), + system_version: Ok(value.system_version), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + version: Ok(value.version), + } + } + } + pub struct UpdateableComponentResultsPage { items: Result, String>, next_page: Result, String>, @@ -13825,6 +14942,15 @@ pub mod types { } } + impl From for UpdateableComponentResultsPage { + fn from(value: super::UpdateableComponentResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct User { display_name: Result, id: Result, @@ -13885,6 +15011,16 @@ pub mod types { } } + impl From for User { + fn from(value: super::User) -> Self { + Self { + display_name: Ok(value.display_name), + id: Ok(value.id), + silo_id: Ok(value.silo_id), + } + } + } + pub struct UserBuiltin { description: Result, id: Result, @@ -13971,6 +15107,18 @@ pub mod types { } } + impl From for UserBuiltin { + fn from(value: super::UserBuiltin) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct UserBuiltinResultsPage { items: Result, String>, next_page: Result, String>, @@ -14018,6 +15166,15 @@ pub mod types { } } + impl From for UserBuiltinResultsPage { + fn from(value: super::UserBuiltinResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct UserCreate { external_id: Result, password: Result, @@ -14065,6 +15222,15 @@ pub mod types { } } + impl From for UserCreate { + fn from(value: super::UserCreate) -> Self { + Self { + external_id: Ok(value.external_id), + password: Ok(value.password), + } + } + } + pub struct UserResultsPage { items: Result, String>, next_page: Result, String>, @@ -14112,6 +15278,15 @@ pub mod types { } } + impl From for UserResultsPage { + fn from(value: super::UserResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct UsernamePasswordCredentials { password: Result, username: Result, @@ -14159,6 +15334,15 @@ pub mod types { } } + impl From for UsernamePasswordCredentials { + fn from(value: super::UsernamePasswordCredentials) -> Self { + Self { + password: Ok(value.password), + username: Ok(value.username), + } + } + } + pub struct VersionRange { high: Result, low: Result, @@ -14206,6 +15390,15 @@ pub mod types { } } + impl From for VersionRange { + fn from(value: super::VersionRange) -> Self { + Self { + high: Ok(value.high), + low: Ok(value.low), + } + } + } + pub struct Vpc { description: Result, dns_name: Result, @@ -14347,6 +15540,22 @@ pub mod types { } } + impl From for Vpc { + fn from(value: super::Vpc) -> Self { + Self { + description: Ok(value.description), + dns_name: Ok(value.dns_name), + id: Ok(value.id), + ipv6_prefix: Ok(value.ipv6_prefix), + name: Ok(value.name), + project_id: Ok(value.project_id), + system_router_id: Ok(value.system_router_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct VpcCreate { description: Result, dns_name: Result, @@ -14420,6 +15629,17 @@ pub mod types { } } + impl From for VpcCreate { + fn from(value: super::VpcCreate) -> Self { + Self { + description: Ok(value.description), + dns_name: Ok(value.dns_name), + ipv6_prefix: Ok(value.ipv6_prefix), + name: Ok(value.name), + } + } + } + pub struct VpcFirewallRule { action: Result, description: Result, @@ -14597,6 +15817,25 @@ pub mod types { } } + impl From for VpcFirewallRule { + fn from(value: super::VpcFirewallRule) -> Self { + Self { + action: Ok(value.action), + description: Ok(value.description), + direction: Ok(value.direction), + filters: Ok(value.filters), + id: Ok(value.id), + name: Ok(value.name), + priority: Ok(value.priority), + status: Ok(value.status), + targets: Ok(value.targets), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_id: Ok(value.vpc_id), + } + } + } + pub struct VpcFirewallRuleFilter { hosts: Result>, String>, ports: Result>, String>, @@ -14657,6 +15896,16 @@ pub mod types { } } + impl From for VpcFirewallRuleFilter { + fn from(value: super::VpcFirewallRuleFilter) -> Self { + Self { + hosts: Ok(value.hosts), + ports: Ok(value.ports), + protocols: Ok(value.protocols), + } + } + } + pub struct VpcFirewallRuleUpdate { action: Result, description: Result, @@ -14782,6 +16031,21 @@ pub mod types { } } + impl From for VpcFirewallRuleUpdate { + fn from(value: super::VpcFirewallRuleUpdate) -> Self { + Self { + action: Ok(value.action), + description: Ok(value.description), + direction: Ok(value.direction), + filters: Ok(value.filters), + name: Ok(value.name), + priority: Ok(value.priority), + status: Ok(value.status), + targets: Ok(value.targets), + } + } + } + pub struct VpcFirewallRuleUpdateParams { rules: Result, String>, } @@ -14816,6 +16080,14 @@ pub mod types { } } + impl From for VpcFirewallRuleUpdateParams { + fn from(value: super::VpcFirewallRuleUpdateParams) -> Self { + Self { + rules: Ok(value.rules), + } + } + } + pub struct VpcFirewallRules { rules: Result, String>, } @@ -14850,6 +16122,14 @@ pub mod types { } } + impl From for VpcFirewallRules { + fn from(value: super::VpcFirewallRules) -> Self { + Self { + rules: Ok(value.rules), + } + } + } + pub struct VpcResultsPage { items: Result, String>, next_page: Result, String>, @@ -14897,6 +16177,15 @@ pub mod types { } } + impl From for VpcResultsPage { + fn from(value: super::VpcResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct VpcRouter { description: Result, id: Result, @@ -15009,6 +16298,20 @@ pub mod types { } } + impl From for VpcRouter { + fn from(value: super::VpcRouter) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + kind: Ok(value.kind), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_id: Ok(value.vpc_id), + } + } + } + pub struct VpcRouterCreate { description: Result, name: Result, @@ -15056,6 +16359,15 @@ pub mod types { } } + impl From for VpcRouterCreate { + fn from(value: super::VpcRouterCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct VpcRouterResultsPage { items: Result, String>, next_page: Result, String>, @@ -15103,6 +16415,15 @@ pub mod types { } } + impl From for VpcRouterResultsPage { + fn from(value: super::VpcRouterResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct VpcRouterUpdate { description: Result, String>, name: Result, String>, @@ -15150,6 +16471,15 @@ pub mod types { } } + impl From for VpcRouterUpdate { + fn from(value: super::VpcRouterUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct VpcSubnet { description: Result, id: Result, @@ -15275,6 +16605,21 @@ pub mod types { } } + impl From for VpcSubnet { + fn from(value: super::VpcSubnet) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + ipv4_block: Ok(value.ipv4_block), + ipv6_block: Ok(value.ipv6_block), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_id: Ok(value.vpc_id), + } + } + } + pub struct VpcSubnetCreate { description: Result, ipv4_block: Result, @@ -15348,6 +16693,17 @@ pub mod types { } } + impl From for VpcSubnetCreate { + fn from(value: super::VpcSubnetCreate) -> Self { + Self { + description: Ok(value.description), + ipv4_block: Ok(value.ipv4_block), + ipv6_block: Ok(value.ipv6_block), + name: Ok(value.name), + } + } + } + pub struct VpcSubnetResultsPage { items: Result, String>, next_page: Result, String>, @@ -15395,6 +16751,15 @@ pub mod types { } } + impl From for VpcSubnetResultsPage { + fn from(value: super::VpcSubnetResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct VpcSubnetUpdate { description: Result, String>, name: Result, String>, @@ -15442,6 +16807,15 @@ pub mod types { } } + impl From for VpcSubnetUpdate { + fn from(value: super::VpcSubnetUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct VpcUpdate { description: Result, String>, dns_name: Result, String>, @@ -15501,6 +16875,16 @@ pub mod types { }) } } + + impl From for VpcUpdate { + fn from(value: super::VpcUpdate) -> Self { + Self { + description: Ok(value.description), + dns_name: Ok(value.dns_name), + name: Ok(value.name), + } + } + } } mod defaults { diff --git a/progenitor-impl/tests/output/nexus-builder.out b/progenitor-impl/tests/output/nexus-builder.out index e8a393c..3624c81 100644 --- a/progenitor-impl/tests/output/nexus-builder.out +++ b/progenitor-impl/tests/output/nexus-builder.out @@ -6749,6 +6749,16 @@ pub mod types { } } + impl From for Baseboard { + fn from(value: super::Baseboard) -> Self { + Self { + part: Ok(value.part), + revision: Ok(value.revision), + serial: Ok(value.serial), + } + } + } + pub struct Bindouble { count: Result, range: Result, @@ -6796,6 +6806,15 @@ pub mod types { } } + impl From for Bindouble { + fn from(value: super::Bindouble) -> Self { + Self { + count: Ok(value.count), + range: Ok(value.range), + } + } + } + pub struct Binint64 { count: Result, range: Result, @@ -6843,6 +6862,15 @@ pub mod types { } } + impl From for Binint64 { + fn from(value: super::Binint64) -> Self { + Self { + count: Ok(value.count), + range: Ok(value.range), + } + } + } + pub struct Certificate { description: Result, id: Result, @@ -6942,6 +6970,19 @@ pub mod types { } } + impl From for Certificate { + fn from(value: super::Certificate) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + service: Ok(value.service), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct CertificateCreate { cert: Result, String>, description: Result, @@ -7028,6 +7069,18 @@ pub mod types { } } + impl From for CertificateCreate { + fn from(value: super::CertificateCreate) -> Self { + Self { + cert: Ok(value.cert), + description: Ok(value.description), + key: Ok(value.key), + name: Ok(value.name), + service: Ok(value.service), + } + } + } + pub struct CertificateResultsPage { items: Result, String>, next_page: Result, String>, @@ -7075,6 +7128,15 @@ pub mod types { } } + impl From for CertificateResultsPage { + fn from(value: super::CertificateResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct ComponentUpdate { component_type: Result, id: Result, @@ -7161,6 +7223,18 @@ pub mod types { } } + impl From for ComponentUpdate { + fn from(value: super::ComponentUpdate) -> Self { + Self { + component_type: Ok(value.component_type), + id: Ok(value.id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + version: Ok(value.version), + } + } + } + pub struct ComponentUpdateResultsPage { items: Result, String>, next_page: Result, String>, @@ -7208,6 +7282,15 @@ pub mod types { } } + impl From for ComponentUpdateResultsPage { + fn from(value: super::ComponentUpdateResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Cumulativedouble { start_time: Result, String>, value: Result, @@ -7255,6 +7338,15 @@ pub mod types { } } + impl From for Cumulativedouble { + fn from(value: super::Cumulativedouble) -> Self { + Self { + start_time: Ok(value.start_time), + value: Ok(value.value), + } + } + } + pub struct Cumulativeint64 { start_time: Result, String>, value: Result, @@ -7302,6 +7394,15 @@ pub mod types { } } + impl From for Cumulativeint64 { + fn from(value: super::Cumulativeint64) -> Self { + Self { + start_time: Ok(value.start_time), + value: Ok(value.value), + } + } + } + pub struct DerEncodedKeyPair { private_key: Result, public_cert: Result, @@ -7349,6 +7450,15 @@ pub mod types { } } + impl From for DerEncodedKeyPair { + fn from(value: super::DerEncodedKeyPair) -> Self { + Self { + private_key: Ok(value.private_key), + public_cert: Ok(value.public_cert), + } + } + } + pub struct DeviceAccessTokenRequest { client_id: Result, device_code: Result, @@ -7409,6 +7519,16 @@ pub mod types { } } + impl From for DeviceAccessTokenRequest { + fn from(value: super::DeviceAccessTokenRequest) -> Self { + Self { + client_id: Ok(value.client_id), + device_code: Ok(value.device_code), + grant_type: Ok(value.grant_type), + } + } + } + pub struct DeviceAuthRequest { client_id: Result, } @@ -7443,6 +7563,14 @@ pub mod types { } } + impl From for DeviceAuthRequest { + fn from(value: super::DeviceAuthRequest) -> Self { + Self { + client_id: Ok(value.client_id), + } + } + } + pub struct DeviceAuthVerify { user_code: Result, } @@ -7477,6 +7605,14 @@ pub mod types { } } + impl From for DeviceAuthVerify { + fn from(value: super::DeviceAuthVerify) -> Self { + Self { + user_code: Ok(value.user_code), + } + } + } + pub struct Disk { block_size: Result, description: Result, @@ -7654,6 +7790,25 @@ pub mod types { } } + impl From for Disk { + fn from(value: super::Disk) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + device_path: Ok(value.device_path), + id: Ok(value.id), + image_id: Ok(value.image_id), + name: Ok(value.name), + project_id: Ok(value.project_id), + size: Ok(value.size), + snapshot_id: Ok(value.snapshot_id), + state: Ok(value.state), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct DiskCreate { description: Result, disk_source: Result, @@ -7727,6 +7882,17 @@ pub mod types { } } + impl From for DiskCreate { + fn from(value: super::DiskCreate) -> Self { + Self { + description: Ok(value.description), + disk_source: Ok(value.disk_source), + name: Ok(value.name), + size: Ok(value.size), + } + } + } + pub struct DiskIdentifier { name: Result, } @@ -7759,6 +7925,14 @@ pub mod types { } } + impl From for DiskIdentifier { + fn from(value: super::DiskIdentifier) -> Self { + Self { + name: Ok(value.name), + } + } + } + pub struct DiskPath { disk: Result, } @@ -7791,6 +7965,14 @@ pub mod types { } } + impl From for DiskPath { + fn from(value: super::DiskPath) -> Self { + Self { + disk: Ok(value.disk), + } + } + } + pub struct DiskResultsPage { items: Result, String>, next_page: Result, String>, @@ -7838,6 +8020,15 @@ pub mod types { } } + impl From for DiskResultsPage { + fn from(value: super::DiskResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Distribution { name: Result, version: Result, @@ -7885,6 +8076,15 @@ pub mod types { } } + impl From for Distribution { + fn from(value: super::Distribution) -> Self { + Self { + name: Ok(value.name), + version: Ok(value.version), + } + } + } + pub struct Error { error_code: Result, String>, message: Result, @@ -7945,6 +8145,16 @@ pub mod types { } } + impl From for Error { + fn from(value: super::Error) -> Self { + Self { + error_code: Ok(value.error_code), + message: Ok(value.message), + request_id: Ok(value.request_id), + } + } + } + pub struct ExternalIp { ip: Result, kind: Result, @@ -7992,6 +8202,15 @@ pub mod types { } } + impl From for ExternalIp { + fn from(value: super::ExternalIp) -> Self { + Self { + ip: Ok(value.ip), + kind: Ok(value.kind), + } + } + } + pub struct ExternalIpResultsPage { items: Result, String>, next_page: Result, String>, @@ -8039,6 +8258,15 @@ pub mod types { } } + impl From for ExternalIpResultsPage { + fn from(value: super::ExternalIpResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct FieldSchema { name: Result, source: Result, @@ -8099,6 +8327,16 @@ pub mod types { } } + impl From for FieldSchema { + fn from(value: super::FieldSchema) -> Self { + Self { + name: Ok(value.name), + source: Ok(value.source), + ty: Ok(value.ty), + } + } + } + pub struct FleetRolePolicy { role_assignments: Result, String>, } @@ -8136,6 +8374,14 @@ pub mod types { } } + impl From for FleetRolePolicy { + fn from(value: super::FleetRolePolicy) -> Self { + Self { + role_assignments: Ok(value.role_assignments), + } + } + } + pub struct FleetRoleRoleAssignment { identity_id: Result, identity_type: Result, @@ -8196,6 +8442,16 @@ pub mod types { } } + impl From for FleetRoleRoleAssignment { + fn from(value: super::FleetRoleRoleAssignment) -> Self { + Self { + identity_id: Ok(value.identity_id), + identity_type: Ok(value.identity_type), + role_name: Ok(value.role_name), + } + } + } + pub struct GlobalImage { block_size: Result, description: Result, @@ -8360,6 +8616,24 @@ pub mod types { } } + impl From for GlobalImage { + fn from(value: super::GlobalImage) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + digest: Ok(value.digest), + distribution: Ok(value.distribution), + id: Ok(value.id), + name: Ok(value.name), + size: Ok(value.size), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + url: Ok(value.url), + version: Ok(value.version), + } + } + } + pub struct GlobalImageCreate { block_size: Result, description: Result, @@ -8446,6 +8720,18 @@ pub mod types { } } + impl From for GlobalImageCreate { + fn from(value: super::GlobalImageCreate) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + distribution: Ok(value.distribution), + name: Ok(value.name), + source: Ok(value.source), + } + } + } + pub struct GlobalImageResultsPage { items: Result, String>, next_page: Result, String>, @@ -8493,6 +8779,15 @@ pub mod types { } } + impl From for GlobalImageResultsPage { + fn from(value: super::GlobalImageResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Group { display_name: Result, id: Result, @@ -8553,6 +8848,16 @@ pub mod types { } } + impl From for Group { + fn from(value: super::Group) -> Self { + Self { + display_name: Ok(value.display_name), + id: Ok(value.id), + silo_id: Ok(value.silo_id), + } + } + } + pub struct GroupResultsPage { items: Result, String>, next_page: Result, String>, @@ -8600,6 +8905,15 @@ pub mod types { } } + impl From for GroupResultsPage { + fn from(value: super::GroupResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Histogramdouble { bins: Result, String>, n_samples: Result, @@ -8660,6 +8974,16 @@ pub mod types { } } + impl From for Histogramdouble { + fn from(value: super::Histogramdouble) -> Self { + Self { + bins: Ok(value.bins), + n_samples: Ok(value.n_samples), + start_time: Ok(value.start_time), + } + } + } + pub struct Histogramint64 { bins: Result, String>, n_samples: Result, @@ -8720,6 +9044,16 @@ pub mod types { } } + impl From for Histogramint64 { + fn from(value: super::Histogramint64) -> Self { + Self { + bins: Ok(value.bins), + n_samples: Ok(value.n_samples), + start_time: Ok(value.start_time), + } + } + } + pub struct IdentityProvider { description: Result, id: Result, @@ -8819,6 +9153,19 @@ pub mod types { } } + impl From for IdentityProvider { + fn from(value: super::IdentityProvider) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + provider_type: Ok(value.provider_type), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct IdentityProviderResultsPage { items: Result, String>, next_page: Result, String>, @@ -8866,6 +9213,15 @@ pub mod types { } } + impl From for IdentityProviderResultsPage { + fn from(value: super::IdentityProviderResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Image { block_size: Result, description: Result, @@ -9030,6 +9386,24 @@ pub mod types { } } + impl From for Image { + fn from(value: super::Image) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + digest: Ok(value.digest), + id: Ok(value.id), + name: Ok(value.name), + project_id: Ok(value.project_id), + size: Ok(value.size), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + url: Ok(value.url), + version: Ok(value.version), + } + } + } + pub struct ImageCreate { block_size: Result, description: Result, @@ -9103,6 +9477,17 @@ pub mod types { } } + impl From for ImageCreate { + fn from(value: super::ImageCreate) -> Self { + Self { + block_size: Ok(value.block_size), + description: Ok(value.description), + name: Ok(value.name), + source: Ok(value.source), + } + } + } + pub struct ImageResultsPage { items: Result, String>, next_page: Result, String>, @@ -9150,6 +9535,15 @@ pub mod types { } } + impl From for ImageResultsPage { + fn from(value: super::ImageResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Instance { description: Result, hostname: Result, @@ -9319,6 +9713,24 @@ pub mod types { } } + impl From for Instance { + fn from(value: super::Instance) -> Self { + Self { + description: Ok(value.description), + hostname: Ok(value.hostname), + id: Ok(value.id), + memory: Ok(value.memory), + name: Ok(value.name), + ncpus: Ok(value.ncpus), + project_id: Ok(value.project_id), + run_state: Ok(value.run_state), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + time_run_state_updated: Ok(value.time_run_state_updated), + } + } + } + pub struct InstanceCreate { description: Result, disks: Result, String>, @@ -9473,6 +9885,23 @@ pub mod types { } } + impl From for InstanceCreate { + fn from(value: super::InstanceCreate) -> Self { + Self { + description: Ok(value.description), + disks: Ok(value.disks), + external_ips: Ok(value.external_ips), + hostname: Ok(value.hostname), + memory: Ok(value.memory), + name: Ok(value.name), + ncpus: Ok(value.ncpus), + network_interfaces: Ok(value.network_interfaces), + start: Ok(value.start), + user_data: Ok(value.user_data), + } + } + } + pub struct InstanceMigrate { dst_sled_id: Result, } @@ -9507,6 +9936,14 @@ pub mod types { } } + impl From for InstanceMigrate { + fn from(value: super::InstanceMigrate) -> Self { + Self { + dst_sled_id: Ok(value.dst_sled_id), + } + } + } + pub struct InstanceResultsPage { items: Result, String>, next_page: Result, String>, @@ -9554,6 +9991,15 @@ pub mod types { } } + impl From for InstanceResultsPage { + fn from(value: super::InstanceResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct InstanceSerialConsoleData { data: Result, String>, last_byte_offset: Result, @@ -9604,6 +10050,15 @@ pub mod types { } } + impl From for InstanceSerialConsoleData { + fn from(value: super::InstanceSerialConsoleData) -> Self { + Self { + data: Ok(value.data), + last_byte_offset: Ok(value.last_byte_offset), + } + } + } + pub struct IpPool { description: Result, id: Result, @@ -9690,6 +10145,18 @@ pub mod types { } } + impl From for IpPool { + fn from(value: super::IpPool) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct IpPoolCreate { description: Result, name: Result, @@ -9737,6 +10204,15 @@ pub mod types { } } + impl From for IpPoolCreate { + fn from(value: super::IpPoolCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct IpPoolRange { id: Result, range: Result, @@ -9797,6 +10273,16 @@ pub mod types { } } + impl From for IpPoolRange { + fn from(value: super::IpPoolRange) -> Self { + Self { + id: Ok(value.id), + range: Ok(value.range), + time_created: Ok(value.time_created), + } + } + } + pub struct IpPoolRangeResultsPage { items: Result, String>, next_page: Result, String>, @@ -9844,6 +10330,15 @@ pub mod types { } } + impl From for IpPoolRangeResultsPage { + fn from(value: super::IpPoolRangeResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct IpPoolResultsPage { items: Result, String>, next_page: Result, String>, @@ -9891,6 +10386,15 @@ pub mod types { } } + impl From for IpPoolResultsPage { + fn from(value: super::IpPoolResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct IpPoolUpdate { description: Result, String>, name: Result, String>, @@ -9938,6 +10442,15 @@ pub mod types { } } + impl From for IpPoolUpdate { + fn from(value: super::IpPoolUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct Ipv4Range { first: Result, last: Result, @@ -9985,6 +10498,15 @@ pub mod types { } } + impl From for Ipv4Range { + fn from(value: super::Ipv4Range) -> Self { + Self { + first: Ok(value.first), + last: Ok(value.last), + } + } + } + pub struct Ipv6Range { first: Result, last: Result, @@ -10032,6 +10554,15 @@ pub mod types { } } + impl From for Ipv6Range { + fn from(value: super::Ipv6Range) -> Self { + Self { + first: Ok(value.first), + last: Ok(value.last), + } + } + } + pub struct Measurement { datum: Result, timestamp: Result, String>, @@ -10079,6 +10610,15 @@ pub mod types { } } + impl From for Measurement { + fn from(value: super::Measurement) -> Self { + Self { + datum: Ok(value.datum), + timestamp: Ok(value.timestamp), + } + } + } + pub struct MeasurementResultsPage { items: Result, String>, next_page: Result, String>, @@ -10126,6 +10666,15 @@ pub mod types { } } + impl From for MeasurementResultsPage { + fn from(value: super::MeasurementResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct NetworkInterface { description: Result, id: Result, @@ -10290,6 +10839,24 @@ pub mod types { } } + impl From for NetworkInterface { + fn from(value: super::NetworkInterface) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + instance_id: Ok(value.instance_id), + ip: Ok(value.ip), + mac: Ok(value.mac), + name: Ok(value.name), + primary: Ok(value.primary), + subnet_id: Ok(value.subnet_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_id: Ok(value.vpc_id), + } + } + } + pub struct NetworkInterfaceCreate { description: Result, ip: Result, String>, @@ -10376,6 +10943,18 @@ pub mod types { } } + impl From for NetworkInterfaceCreate { + fn from(value: super::NetworkInterfaceCreate) -> Self { + Self { + description: Ok(value.description), + ip: Ok(value.ip), + name: Ok(value.name), + subnet_name: Ok(value.subnet_name), + vpc_name: Ok(value.vpc_name), + } + } + } + pub struct NetworkInterfaceResultsPage { items: Result, String>, next_page: Result, String>, @@ -10423,6 +11002,15 @@ pub mod types { } } + impl From for NetworkInterfaceResultsPage { + fn from(value: super::NetworkInterfaceResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct NetworkInterfaceUpdate { description: Result, String>, name: Result, String>, @@ -10483,6 +11071,16 @@ pub mod types { } } + impl From for NetworkInterfaceUpdate { + fn from(value: super::NetworkInterfaceUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + primary: Ok(value.primary), + } + } + } + pub struct Organization { description: Result, id: Result, @@ -10569,6 +11167,18 @@ pub mod types { } } + impl From for Organization { + fn from(value: super::Organization) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct OrganizationCreate { description: Result, name: Result, @@ -10616,6 +11226,15 @@ pub mod types { } } + impl From for OrganizationCreate { + fn from(value: super::OrganizationCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct OrganizationResultsPage { items: Result, String>, next_page: Result, String>, @@ -10663,6 +11282,15 @@ pub mod types { } } + impl From for OrganizationResultsPage { + fn from(value: super::OrganizationResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct OrganizationRolePolicy { role_assignments: Result, String>, } @@ -10700,6 +11328,14 @@ pub mod types { } } + impl From for OrganizationRolePolicy { + fn from(value: super::OrganizationRolePolicy) -> Self { + Self { + role_assignments: Ok(value.role_assignments), + } + } + } + pub struct OrganizationRoleRoleAssignment { identity_id: Result, identity_type: Result, @@ -10762,6 +11398,16 @@ pub mod types { } } + impl From for OrganizationRoleRoleAssignment { + fn from(value: super::OrganizationRoleRoleAssignment) -> Self { + Self { + identity_id: Ok(value.identity_id), + identity_type: Ok(value.identity_type), + role_name: Ok(value.role_name), + } + } + } + pub struct OrganizationUpdate { description: Result, String>, name: Result, String>, @@ -10809,6 +11455,15 @@ pub mod types { } } + impl From for OrganizationUpdate { + fn from(value: super::OrganizationUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct PhysicalDisk { disk_type: Result, id: Result, @@ -10934,6 +11589,21 @@ pub mod types { } } + impl From for PhysicalDisk { + fn from(value: super::PhysicalDisk) -> Self { + Self { + disk_type: Ok(value.disk_type), + id: Ok(value.id), + model: Ok(value.model), + serial: Ok(value.serial), + sled_id: Ok(value.sled_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vendor: Ok(value.vendor), + } + } + } + pub struct PhysicalDiskResultsPage { items: Result, String>, next_page: Result, String>, @@ -10981,6 +11651,15 @@ pub mod types { } } + impl From for PhysicalDiskResultsPage { + fn from(value: super::PhysicalDiskResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Project { description: Result, id: Result, @@ -11080,6 +11759,19 @@ pub mod types { } } + impl From for Project { + fn from(value: super::Project) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + organization_id: Ok(value.organization_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct ProjectCreate { description: Result, name: Result, @@ -11127,6 +11819,15 @@ pub mod types { } } + impl From for ProjectCreate { + fn from(value: super::ProjectCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct ProjectResultsPage { items: Result, String>, next_page: Result, String>, @@ -11174,6 +11875,15 @@ pub mod types { } } + impl From for ProjectResultsPage { + fn from(value: super::ProjectResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct ProjectRolePolicy { role_assignments: Result, String>, } @@ -11211,6 +11921,14 @@ pub mod types { } } + impl From for ProjectRolePolicy { + fn from(value: super::ProjectRolePolicy) -> Self { + Self { + role_assignments: Ok(value.role_assignments), + } + } + } + pub struct ProjectRoleRoleAssignment { identity_id: Result, identity_type: Result, @@ -11271,6 +11989,16 @@ pub mod types { } } + impl From for ProjectRoleRoleAssignment { + fn from(value: super::ProjectRoleRoleAssignment) -> Self { + Self { + identity_id: Ok(value.identity_id), + identity_type: Ok(value.identity_type), + role_name: Ok(value.role_name), + } + } + } + pub struct ProjectUpdate { description: Result, String>, name: Result, String>, @@ -11318,6 +12046,15 @@ pub mod types { } } + impl From for ProjectUpdate { + fn from(value: super::ProjectUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct Rack { id: Result, time_created: Result, String>, @@ -11378,6 +12115,16 @@ pub mod types { } } + impl From for Rack { + fn from(value: super::Rack) -> Self { + Self { + id: Ok(value.id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct RackResultsPage { items: Result, String>, next_page: Result, String>, @@ -11425,6 +12172,15 @@ pub mod types { } } + impl From for RackResultsPage { + fn from(value: super::RackResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Role { description: Result, name: Result, @@ -11472,6 +12228,15 @@ pub mod types { } } + impl From for Role { + fn from(value: super::Role) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct RoleResultsPage { items: Result, String>, next_page: Result, String>, @@ -11519,6 +12284,15 @@ pub mod types { } } + impl From for RoleResultsPage { + fn from(value: super::RoleResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct RouterRoute { description: Result, destination: Result, @@ -11657,6 +12431,22 @@ pub mod types { } } + impl From for RouterRoute { + fn from(value: super::RouterRoute) -> Self { + Self { + description: Ok(value.description), + destination: Ok(value.destination), + id: Ok(value.id), + kind: Ok(value.kind), + name: Ok(value.name), + target: Ok(value.target), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_router_id: Ok(value.vpc_router_id), + } + } + } + pub struct RouterRouteCreateParams { description: Result, destination: Result, @@ -11730,6 +12520,17 @@ pub mod types { } } + impl From for RouterRouteCreateParams { + fn from(value: super::RouterRouteCreateParams) -> Self { + Self { + description: Ok(value.description), + destination: Ok(value.destination), + name: Ok(value.name), + target: Ok(value.target), + } + } + } + pub struct RouterRouteResultsPage { items: Result, String>, next_page: Result, String>, @@ -11777,6 +12578,15 @@ pub mod types { } } + impl From for RouterRouteResultsPage { + fn from(value: super::RouterRouteResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct RouterRouteUpdateParams { description: Result, String>, destination: Result, @@ -11850,6 +12660,17 @@ pub mod types { } } + impl From for RouterRouteUpdateParams { + fn from(value: super::RouterRouteUpdateParams) -> Self { + Self { + description: Ok(value.description), + destination: Ok(value.destination), + name: Ok(value.name), + target: Ok(value.target), + } + } + } + pub struct Saga { id: Result, state: Result, @@ -11897,6 +12718,15 @@ pub mod types { } } + impl From for Saga { + fn from(value: super::Saga) -> Self { + Self { + id: Ok(value.id), + state: Ok(value.state), + } + } + } + pub struct SagaResultsPage { items: Result, String>, next_page: Result, String>, @@ -11944,6 +12774,15 @@ pub mod types { } } + impl From for SagaResultsPage { + fn from(value: super::SagaResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SamlIdentityProvider { acs_url: Result, description: Result, @@ -12113,6 +12952,24 @@ pub mod types { } } + impl From for SamlIdentityProvider { + fn from(value: super::SamlIdentityProvider) -> Self { + Self { + acs_url: Ok(value.acs_url), + description: Ok(value.description), + id: Ok(value.id), + idp_entity_id: Ok(value.idp_entity_id), + name: Ok(value.name), + public_cert: Ok(value.public_cert), + slo_url: Ok(value.slo_url), + sp_client_id: Ok(value.sp_client_id), + technical_contact_email: Ok(value.technical_contact_email), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SamlIdentityProviderCreate { acs_url: Result, description: Result, @@ -12277,6 +13134,23 @@ pub mod types { } } + impl From for SamlIdentityProviderCreate { + fn from(value: super::SamlIdentityProviderCreate) -> Self { + Self { + acs_url: Ok(value.acs_url), + description: Ok(value.description), + group_attribute_name: Ok(value.group_attribute_name), + idp_entity_id: Ok(value.idp_entity_id), + idp_metadata_source: Ok(value.idp_metadata_source), + name: Ok(value.name), + signing_keypair: Ok(value.signing_keypair), + slo_url: Ok(value.slo_url), + sp_client_id: Ok(value.sp_client_id), + technical_contact_email: Ok(value.technical_contact_email), + } + } + } + pub struct Silo { description: Result, discoverable: Result, @@ -12389,6 +13263,20 @@ pub mod types { } } + impl From for Silo { + fn from(value: super::Silo) -> Self { + Self { + description: Ok(value.description), + discoverable: Ok(value.discoverable), + id: Ok(value.id), + identity_mode: Ok(value.identity_mode), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SiloCreate { admin_group_name: Result, String>, description: Result, @@ -12478,6 +13366,18 @@ pub mod types { } } + impl From for SiloCreate { + fn from(value: super::SiloCreate) -> Self { + Self { + admin_group_name: Ok(value.admin_group_name), + description: Ok(value.description), + discoverable: Ok(value.discoverable), + identity_mode: Ok(value.identity_mode), + name: Ok(value.name), + } + } + } + pub struct SiloResultsPage { items: Result, String>, next_page: Result, String>, @@ -12525,6 +13425,15 @@ pub mod types { } } + impl From for SiloResultsPage { + fn from(value: super::SiloResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SiloRolePolicy { role_assignments: Result, String>, } @@ -12562,6 +13471,14 @@ pub mod types { } } + impl From for SiloRolePolicy { + fn from(value: super::SiloRolePolicy) -> Self { + Self { + role_assignments: Ok(value.role_assignments), + } + } + } + pub struct SiloRoleRoleAssignment { identity_id: Result, identity_type: Result, @@ -12622,6 +13539,16 @@ pub mod types { } } + impl From for SiloRoleRoleAssignment { + fn from(value: super::SiloRoleRoleAssignment) -> Self { + Self { + identity_id: Ok(value.identity_id), + identity_type: Ok(value.identity_type), + role_name: Ok(value.role_name), + } + } + } + pub struct Sled { baseboard: Result, id: Result, @@ -12708,6 +13635,18 @@ pub mod types { } } + impl From for Sled { + fn from(value: super::Sled) -> Self { + Self { + baseboard: Ok(value.baseboard), + id: Ok(value.id), + service_address: Ok(value.service_address), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SledResultsPage { items: Result, String>, next_page: Result, String>, @@ -12755,6 +13694,15 @@ pub mod types { } } + impl From for SledResultsPage { + fn from(value: super::SledResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct Snapshot { description: Result, disk_id: Result, @@ -12893,6 +13841,22 @@ pub mod types { } } + impl From for Snapshot { + fn from(value: super::Snapshot) -> Self { + Self { + description: Ok(value.description), + disk_id: Ok(value.disk_id), + id: Ok(value.id), + name: Ok(value.name), + project_id: Ok(value.project_id), + size: Ok(value.size), + state: Ok(value.state), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SnapshotCreate { description: Result, disk: Result, @@ -12953,6 +13917,16 @@ pub mod types { } } + impl From for SnapshotCreate { + fn from(value: super::SnapshotCreate) -> Self { + Self { + description: Ok(value.description), + disk: Ok(value.disk), + name: Ok(value.name), + } + } + } + pub struct SnapshotResultsPage { items: Result, String>, next_page: Result, String>, @@ -13000,6 +13974,15 @@ pub mod types { } } + impl From for SnapshotResultsPage { + fn from(value: super::SnapshotResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SpoofLoginBody { username: Result, } @@ -13034,6 +14017,14 @@ pub mod types { } } + impl From for SpoofLoginBody { + fn from(value: super::SpoofLoginBody) -> Self { + Self { + username: Ok(value.username), + } + } + } + pub struct SshKey { description: Result, id: Result, @@ -13146,6 +14137,20 @@ pub mod types { } } + impl From for SshKey { + fn from(value: super::SshKey) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + public_key: Ok(value.public_key), + silo_user_id: Ok(value.silo_user_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct SshKeyCreate { description: Result, name: Result, @@ -13206,6 +14211,16 @@ pub mod types { } } + impl From for SshKeyCreate { + fn from(value: super::SshKeyCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + public_key: Ok(value.public_key), + } + } + } + pub struct SshKeyResultsPage { items: Result, String>, next_page: Result, String>, @@ -13253,6 +14268,15 @@ pub mod types { } } + impl From for SshKeyResultsPage { + fn from(value: super::SshKeyResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SystemUpdate { id: Result, time_created: Result, String>, @@ -13326,6 +14350,17 @@ pub mod types { } } + impl From for SystemUpdate { + fn from(value: super::SystemUpdate) -> Self { + Self { + id: Ok(value.id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + version: Ok(value.version), + } + } + } + pub struct SystemUpdateResultsPage { items: Result, String>, next_page: Result, String>, @@ -13373,6 +14408,15 @@ pub mod types { } } + impl From for SystemUpdateResultsPage { + fn from(value: super::SystemUpdateResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct SystemUpdateStart { version: Result, } @@ -13407,6 +14451,14 @@ pub mod types { } } + impl From for SystemUpdateStart { + fn from(value: super::SystemUpdateStart) -> Self { + Self { + version: Ok(value.version), + } + } + } + pub struct SystemVersion { status: Result, version_range: Result, @@ -13454,6 +14506,15 @@ pub mod types { } } + impl From for SystemVersion { + fn from(value: super::SystemVersion) -> Self { + Self { + status: Ok(value.status), + version_range: Ok(value.version_range), + } + } + } + pub struct TimeseriesSchema { created: Result, String>, datum_type: Result, @@ -13527,6 +14588,17 @@ pub mod types { } } + impl From for TimeseriesSchema { + fn from(value: super::TimeseriesSchema) -> Self { + Self { + created: Ok(value.created), + datum_type: Ok(value.datum_type), + field_schema: Ok(value.field_schema), + timeseries_name: Ok(value.timeseries_name), + } + } + } + pub struct TimeseriesSchemaResultsPage { items: Result, String>, next_page: Result, String>, @@ -13574,6 +14646,15 @@ pub mod types { } } + impl From for TimeseriesSchemaResultsPage { + fn from(value: super::TimeseriesSchemaResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct UpdateDeployment { id: Result, status: Result, @@ -13660,6 +14741,18 @@ pub mod types { } } + impl From for UpdateDeployment { + fn from(value: super::UpdateDeployment) -> Self { + Self { + id: Ok(value.id), + status: Ok(value.status), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + version: Ok(value.version), + } + } + } + pub struct UpdateDeploymentResultsPage { items: Result, String>, next_page: Result, String>, @@ -13707,6 +14800,15 @@ pub mod types { } } + impl From for UpdateDeploymentResultsPage { + fn from(value: super::UpdateDeploymentResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct UpdateableComponent { component_type: Result, device_id: Result, @@ -13832,6 +14934,21 @@ pub mod types { } } + impl From for UpdateableComponent { + fn from(value: super::UpdateableComponent) -> Self { + Self { + component_type: Ok(value.component_type), + device_id: Ok(value.device_id), + id: Ok(value.id), + status: Ok(value.status), + system_version: Ok(value.system_version), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + version: Ok(value.version), + } + } + } + pub struct UpdateableComponentResultsPage { items: Result, String>, next_page: Result, String>, @@ -13881,6 +14998,15 @@ pub mod types { } } + impl From for UpdateableComponentResultsPage { + fn from(value: super::UpdateableComponentResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct User { display_name: Result, id: Result, @@ -13941,6 +15067,16 @@ pub mod types { } } + impl From for User { + fn from(value: super::User) -> Self { + Self { + display_name: Ok(value.display_name), + id: Ok(value.id), + silo_id: Ok(value.silo_id), + } + } + } + pub struct UserBuiltin { description: Result, id: Result, @@ -14027,6 +15163,18 @@ pub mod types { } } + impl From for UserBuiltin { + fn from(value: super::UserBuiltin) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct UserBuiltinResultsPage { items: Result, String>, next_page: Result, String>, @@ -14074,6 +15222,15 @@ pub mod types { } } + impl From for UserBuiltinResultsPage { + fn from(value: super::UserBuiltinResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct UserCreate { external_id: Result, password: Result, @@ -14121,6 +15278,15 @@ pub mod types { } } + impl From for UserCreate { + fn from(value: super::UserCreate) -> Self { + Self { + external_id: Ok(value.external_id), + password: Ok(value.password), + } + } + } + pub struct UserResultsPage { items: Result, String>, next_page: Result, String>, @@ -14168,6 +15334,15 @@ pub mod types { } } + impl From for UserResultsPage { + fn from(value: super::UserResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct UsernamePasswordCredentials { password: Result, username: Result, @@ -14215,6 +15390,15 @@ pub mod types { } } + impl From for UsernamePasswordCredentials { + fn from(value: super::UsernamePasswordCredentials) -> Self { + Self { + password: Ok(value.password), + username: Ok(value.username), + } + } + } + pub struct VersionRange { high: Result, low: Result, @@ -14262,6 +15446,15 @@ pub mod types { } } + impl From for VersionRange { + fn from(value: super::VersionRange) -> Self { + Self { + high: Ok(value.high), + low: Ok(value.low), + } + } + } + pub struct Vpc { description: Result, dns_name: Result, @@ -14403,6 +15596,22 @@ pub mod types { } } + impl From for Vpc { + fn from(value: super::Vpc) -> Self { + Self { + description: Ok(value.description), + dns_name: Ok(value.dns_name), + id: Ok(value.id), + ipv6_prefix: Ok(value.ipv6_prefix), + name: Ok(value.name), + project_id: Ok(value.project_id), + system_router_id: Ok(value.system_router_id), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + } + } + } + pub struct VpcCreate { description: Result, dns_name: Result, @@ -14476,6 +15685,17 @@ pub mod types { } } + impl From for VpcCreate { + fn from(value: super::VpcCreate) -> Self { + Self { + description: Ok(value.description), + dns_name: Ok(value.dns_name), + ipv6_prefix: Ok(value.ipv6_prefix), + name: Ok(value.name), + } + } + } + pub struct VpcFirewallRule { action: Result, description: Result, @@ -14653,6 +15873,25 @@ pub mod types { } } + impl From for VpcFirewallRule { + fn from(value: super::VpcFirewallRule) -> Self { + Self { + action: Ok(value.action), + description: Ok(value.description), + direction: Ok(value.direction), + filters: Ok(value.filters), + id: Ok(value.id), + name: Ok(value.name), + priority: Ok(value.priority), + status: Ok(value.status), + targets: Ok(value.targets), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_id: Ok(value.vpc_id), + } + } + } + pub struct VpcFirewallRuleFilter { hosts: Result>, String>, ports: Result>, String>, @@ -14713,6 +15952,16 @@ pub mod types { } } + impl From for VpcFirewallRuleFilter { + fn from(value: super::VpcFirewallRuleFilter) -> Self { + Self { + hosts: Ok(value.hosts), + ports: Ok(value.ports), + protocols: Ok(value.protocols), + } + } + } + pub struct VpcFirewallRuleUpdate { action: Result, description: Result, @@ -14838,6 +16087,21 @@ pub mod types { } } + impl From for VpcFirewallRuleUpdate { + fn from(value: super::VpcFirewallRuleUpdate) -> Self { + Self { + action: Ok(value.action), + description: Ok(value.description), + direction: Ok(value.direction), + filters: Ok(value.filters), + name: Ok(value.name), + priority: Ok(value.priority), + status: Ok(value.status), + targets: Ok(value.targets), + } + } + } + pub struct VpcFirewallRuleUpdateParams { rules: Result, String>, } @@ -14872,6 +16136,14 @@ pub mod types { } } + impl From for VpcFirewallRuleUpdateParams { + fn from(value: super::VpcFirewallRuleUpdateParams) -> Self { + Self { + rules: Ok(value.rules), + } + } + } + pub struct VpcFirewallRules { rules: Result, String>, } @@ -14906,6 +16178,14 @@ pub mod types { } } + impl From for VpcFirewallRules { + fn from(value: super::VpcFirewallRules) -> Self { + Self { + rules: Ok(value.rules), + } + } + } + pub struct VpcResultsPage { items: Result, String>, next_page: Result, String>, @@ -14953,6 +16233,15 @@ pub mod types { } } + impl From for VpcResultsPage { + fn from(value: super::VpcResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct VpcRouter { description: Result, id: Result, @@ -15065,6 +16354,20 @@ pub mod types { } } + impl From for VpcRouter { + fn from(value: super::VpcRouter) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + kind: Ok(value.kind), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_id: Ok(value.vpc_id), + } + } + } + pub struct VpcRouterCreate { description: Result, name: Result, @@ -15112,6 +16415,15 @@ pub mod types { } } + impl From for VpcRouterCreate { + fn from(value: super::VpcRouterCreate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct VpcRouterResultsPage { items: Result, String>, next_page: Result, String>, @@ -15159,6 +16471,15 @@ pub mod types { } } + impl From for VpcRouterResultsPage { + fn from(value: super::VpcRouterResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct VpcRouterUpdate { description: Result, String>, name: Result, String>, @@ -15206,6 +16527,15 @@ pub mod types { } } + impl From for VpcRouterUpdate { + fn from(value: super::VpcRouterUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct VpcSubnet { description: Result, id: Result, @@ -15331,6 +16661,21 @@ pub mod types { } } + impl From for VpcSubnet { + fn from(value: super::VpcSubnet) -> Self { + Self { + description: Ok(value.description), + id: Ok(value.id), + ipv4_block: Ok(value.ipv4_block), + ipv6_block: Ok(value.ipv6_block), + name: Ok(value.name), + time_created: Ok(value.time_created), + time_modified: Ok(value.time_modified), + vpc_id: Ok(value.vpc_id), + } + } + } + pub struct VpcSubnetCreate { description: Result, ipv4_block: Result, @@ -15404,6 +16749,17 @@ pub mod types { } } + impl From for VpcSubnetCreate { + fn from(value: super::VpcSubnetCreate) -> Self { + Self { + description: Ok(value.description), + ipv4_block: Ok(value.ipv4_block), + ipv6_block: Ok(value.ipv6_block), + name: Ok(value.name), + } + } + } + pub struct VpcSubnetResultsPage { items: Result, String>, next_page: Result, String>, @@ -15451,6 +16807,15 @@ pub mod types { } } + impl From for VpcSubnetResultsPage { + fn from(value: super::VpcSubnetResultsPage) -> Self { + Self { + items: Ok(value.items), + next_page: Ok(value.next_page), + } + } + } + pub struct VpcSubnetUpdate { description: Result, String>, name: Result, String>, @@ -15498,6 +16863,15 @@ pub mod types { } } + impl From for VpcSubnetUpdate { + fn from(value: super::VpcSubnetUpdate) -> Self { + Self { + description: Ok(value.description), + name: Ok(value.name), + } + } + } + pub struct VpcUpdate { description: Result, String>, dns_name: Result, String>, @@ -15557,6 +16931,16 @@ pub mod types { }) } } + + impl From for VpcUpdate { + fn from(value: super::VpcUpdate) -> Self { + Self { + description: Ok(value.description), + dns_name: Ok(value.dns_name), + name: Ok(value.name), + } + } + } } mod defaults { diff --git a/progenitor-impl/tests/output/propolis-server-builder-tagged.out b/progenitor-impl/tests/output/propolis-server-builder-tagged.out index 0acc1b5..4cfb01d 100644 --- a/progenitor-impl/tests/output/propolis-server-builder-tagged.out +++ b/progenitor-impl/tests/output/propolis-server-builder-tagged.out @@ -857,6 +857,23 @@ pub mod types { } } + impl From for CrucibleOpts { + fn from(value: super::CrucibleOpts) -> Self { + Self { + cert_pem: Ok(value.cert_pem), + control: Ok(value.control), + flush_timeout: Ok(value.flush_timeout), + id: Ok(value.id), + key: Ok(value.key), + key_pem: Ok(value.key_pem), + lossy: Ok(value.lossy), + read_only: Ok(value.read_only), + root_cert_pem: Ok(value.root_cert_pem), + target: Ok(value.target), + } + } + } + pub struct DiskAttachment { disk_id: Result, generation_id: Result, @@ -917,6 +934,16 @@ pub mod types { } } + impl From for DiskAttachment { + fn from(value: super::DiskAttachment) -> Self { + Self { + disk_id: Ok(value.disk_id), + generation_id: Ok(value.generation_id), + state: Ok(value.state), + } + } + } + pub struct DiskRequest { device: Result, gen: Result, @@ -1021,6 +1048,19 @@ pub mod types { } } + impl From for DiskRequest { + fn from(value: super::DiskRequest) -> Self { + Self { + device: Ok(value.device), + gen: Ok(value.gen), + name: Ok(value.name), + read_only: Ok(value.read_only), + slot: Ok(value.slot), + volume_construction_request: Ok(value.volume_construction_request), + } + } + } + pub struct Error { error_code: Result, String>, message: Result, @@ -1081,6 +1121,16 @@ pub mod types { } } + impl From for Error { + fn from(value: super::Error) -> Self { + Self { + error_code: Ok(value.error_code), + message: Ok(value.message), + request_id: Ok(value.request_id), + } + } + } + pub struct Instance { disks: Result, String>, nics: Result, String>, @@ -1154,6 +1204,17 @@ pub mod types { } } + impl From for Instance { + fn from(value: super::Instance) -> Self { + Self { + disks: Ok(value.disks), + nics: Ok(value.nics), + properties: Ok(value.properties), + state: Ok(value.state), + } + } + } + pub struct InstanceEnsureRequest { cloud_init_bytes: Result, String>, disks: Result, String>, @@ -1243,6 +1304,18 @@ pub mod types { } } + impl From for InstanceEnsureRequest { + fn from(value: super::InstanceEnsureRequest) -> Self { + Self { + cloud_init_bytes: Ok(value.cloud_init_bytes), + disks: Ok(value.disks), + migrate: Ok(value.migrate), + nics: Ok(value.nics), + properties: Ok(value.properties), + } + } + } + pub struct InstanceEnsureResponse { migrate: Result, String>, } @@ -1277,6 +1350,14 @@ pub mod types { } } + impl From for InstanceEnsureResponse { + fn from(value: super::InstanceEnsureResponse) -> Self { + Self { + migrate: Ok(value.migrate), + } + } + } + pub struct InstanceGetResponse { instance: Result, } @@ -1311,6 +1392,14 @@ pub mod types { } } + impl From for InstanceGetResponse { + fn from(value: super::InstanceGetResponse) -> Self { + Self { + instance: Ok(value.instance), + } + } + } + pub struct InstanceMigrateInitiateRequest { migration_id: Result, src_addr: Result, @@ -1373,6 +1462,16 @@ pub mod types { } } + impl From for InstanceMigrateInitiateRequest { + fn from(value: super::InstanceMigrateInitiateRequest) -> Self { + Self { + migration_id: Ok(value.migration_id), + src_addr: Ok(value.src_addr), + src_uuid: Ok(value.src_uuid), + } + } + } + pub struct InstanceMigrateInitiateResponse { migration_id: Result, } @@ -1409,6 +1508,14 @@ pub mod types { } } + impl From for InstanceMigrateInitiateResponse { + fn from(value: super::InstanceMigrateInitiateResponse) -> Self { + Self { + migration_id: Ok(value.migration_id), + } + } + } + pub struct InstanceMigrateStatusRequest { migration_id: Result, } @@ -1443,6 +1550,14 @@ pub mod types { } } + impl From for InstanceMigrateStatusRequest { + fn from(value: super::InstanceMigrateStatusRequest) -> Self { + Self { + migration_id: Ok(value.migration_id), + } + } + } + pub struct InstanceMigrateStatusResponse { state: Result, } @@ -1477,6 +1592,14 @@ pub mod types { } } + impl From for InstanceMigrateStatusResponse { + fn from(value: super::InstanceMigrateStatusResponse) -> Self { + Self { + state: Ok(value.state), + } + } + } + pub struct InstanceProperties { bootrom_id: Result, description: Result, @@ -1589,6 +1712,20 @@ pub mod types { } } + impl From for InstanceProperties { + fn from(value: super::InstanceProperties) -> Self { + Self { + bootrom_id: Ok(value.bootrom_id), + description: Ok(value.description), + id: Ok(value.id), + image_id: Ok(value.image_id), + memory: Ok(value.memory), + name: Ok(value.name), + vcpus: Ok(value.vcpus), + } + } + } + pub struct InstanceStateMonitorRequest { gen: Result, } @@ -1621,6 +1758,12 @@ pub mod types { } } + impl From for InstanceStateMonitorRequest { + fn from(value: super::InstanceStateMonitorRequest) -> Self { + Self { gen: Ok(value.gen) } + } + } + pub struct InstanceStateMonitorResponse { gen: Result, state: Result, @@ -1668,6 +1811,15 @@ pub mod types { } } + impl From for InstanceStateMonitorResponse { + fn from(value: super::InstanceStateMonitorResponse) -> Self { + Self { + gen: Ok(value.gen), + state: Ok(value.state), + } + } + } + pub struct NetworkInterface { attachment: Result, name: Result, @@ -1715,6 +1867,15 @@ pub mod types { } } + impl From for NetworkInterface { + fn from(value: super::NetworkInterface) -> Self { + Self { + attachment: Ok(value.attachment), + name: Ok(value.name), + } + } + } + pub struct NetworkInterfaceRequest { name: Result, slot: Result, @@ -1761,6 +1922,15 @@ pub mod types { }) } } + + impl From for NetworkInterfaceRequest { + fn from(value: super::NetworkInterfaceRequest) -> Self { + Self { + name: Ok(value.name), + slot: Ok(value.slot), + } + } + } } } diff --git a/progenitor-impl/tests/output/propolis-server-builder.out b/progenitor-impl/tests/output/propolis-server-builder.out index cfc046f..88ae926 100644 --- a/progenitor-impl/tests/output/propolis-server-builder.out +++ b/progenitor-impl/tests/output/propolis-server-builder.out @@ -863,6 +863,23 @@ pub mod types { } } + impl From for CrucibleOpts { + fn from(value: super::CrucibleOpts) -> Self { + Self { + cert_pem: Ok(value.cert_pem), + control: Ok(value.control), + flush_timeout: Ok(value.flush_timeout), + id: Ok(value.id), + key: Ok(value.key), + key_pem: Ok(value.key_pem), + lossy: Ok(value.lossy), + read_only: Ok(value.read_only), + root_cert_pem: Ok(value.root_cert_pem), + target: Ok(value.target), + } + } + } + pub struct DiskAttachment { disk_id: Result, generation_id: Result, @@ -923,6 +940,16 @@ pub mod types { } } + impl From for DiskAttachment { + fn from(value: super::DiskAttachment) -> Self { + Self { + disk_id: Ok(value.disk_id), + generation_id: Ok(value.generation_id), + state: Ok(value.state), + } + } + } + pub struct DiskRequest { device: Result, gen: Result, @@ -1027,6 +1054,19 @@ pub mod types { } } + impl From for DiskRequest { + fn from(value: super::DiskRequest) -> Self { + Self { + device: Ok(value.device), + gen: Ok(value.gen), + name: Ok(value.name), + read_only: Ok(value.read_only), + slot: Ok(value.slot), + volume_construction_request: Ok(value.volume_construction_request), + } + } + } + pub struct Error { error_code: Result, String>, message: Result, @@ -1087,6 +1127,16 @@ pub mod types { } } + impl From for Error { + fn from(value: super::Error) -> Self { + Self { + error_code: Ok(value.error_code), + message: Ok(value.message), + request_id: Ok(value.request_id), + } + } + } + pub struct Instance { disks: Result, String>, nics: Result, String>, @@ -1160,6 +1210,17 @@ pub mod types { } } + impl From for Instance { + fn from(value: super::Instance) -> Self { + Self { + disks: Ok(value.disks), + nics: Ok(value.nics), + properties: Ok(value.properties), + state: Ok(value.state), + } + } + } + pub struct InstanceEnsureRequest { cloud_init_bytes: Result, String>, disks: Result, String>, @@ -1249,6 +1310,18 @@ pub mod types { } } + impl From for InstanceEnsureRequest { + fn from(value: super::InstanceEnsureRequest) -> Self { + Self { + cloud_init_bytes: Ok(value.cloud_init_bytes), + disks: Ok(value.disks), + migrate: Ok(value.migrate), + nics: Ok(value.nics), + properties: Ok(value.properties), + } + } + } + pub struct InstanceEnsureResponse { migrate: Result, String>, } @@ -1283,6 +1356,14 @@ pub mod types { } } + impl From for InstanceEnsureResponse { + fn from(value: super::InstanceEnsureResponse) -> Self { + Self { + migrate: Ok(value.migrate), + } + } + } + pub struct InstanceGetResponse { instance: Result, } @@ -1317,6 +1398,14 @@ pub mod types { } } + impl From for InstanceGetResponse { + fn from(value: super::InstanceGetResponse) -> Self { + Self { + instance: Ok(value.instance), + } + } + } + pub struct InstanceMigrateInitiateRequest { migration_id: Result, src_addr: Result, @@ -1379,6 +1468,16 @@ pub mod types { } } + impl From for InstanceMigrateInitiateRequest { + fn from(value: super::InstanceMigrateInitiateRequest) -> Self { + Self { + migration_id: Ok(value.migration_id), + src_addr: Ok(value.src_addr), + src_uuid: Ok(value.src_uuid), + } + } + } + pub struct InstanceMigrateInitiateResponse { migration_id: Result, } @@ -1415,6 +1514,14 @@ pub mod types { } } + impl From for InstanceMigrateInitiateResponse { + fn from(value: super::InstanceMigrateInitiateResponse) -> Self { + Self { + migration_id: Ok(value.migration_id), + } + } + } + pub struct InstanceMigrateStatusRequest { migration_id: Result, } @@ -1449,6 +1556,14 @@ pub mod types { } } + impl From for InstanceMigrateStatusRequest { + fn from(value: super::InstanceMigrateStatusRequest) -> Self { + Self { + migration_id: Ok(value.migration_id), + } + } + } + pub struct InstanceMigrateStatusResponse { state: Result, } @@ -1483,6 +1598,14 @@ pub mod types { } } + impl From for InstanceMigrateStatusResponse { + fn from(value: super::InstanceMigrateStatusResponse) -> Self { + Self { + state: Ok(value.state), + } + } + } + pub struct InstanceProperties { bootrom_id: Result, description: Result, @@ -1595,6 +1718,20 @@ pub mod types { } } + impl From for InstanceProperties { + fn from(value: super::InstanceProperties) -> Self { + Self { + bootrom_id: Ok(value.bootrom_id), + description: Ok(value.description), + id: Ok(value.id), + image_id: Ok(value.image_id), + memory: Ok(value.memory), + name: Ok(value.name), + vcpus: Ok(value.vcpus), + } + } + } + pub struct InstanceStateMonitorRequest { gen: Result, } @@ -1627,6 +1764,12 @@ pub mod types { } } + impl From for InstanceStateMonitorRequest { + fn from(value: super::InstanceStateMonitorRequest) -> Self { + Self { gen: Ok(value.gen) } + } + } + pub struct InstanceStateMonitorResponse { gen: Result, state: Result, @@ -1674,6 +1817,15 @@ pub mod types { } } + impl From for InstanceStateMonitorResponse { + fn from(value: super::InstanceStateMonitorResponse) -> Self { + Self { + gen: Ok(value.gen), + state: Ok(value.state), + } + } + } + pub struct NetworkInterface { attachment: Result, name: Result, @@ -1721,6 +1873,15 @@ pub mod types { } } + impl From for NetworkInterface { + fn from(value: super::NetworkInterface) -> Self { + Self { + attachment: Ok(value.attachment), + name: Ok(value.name), + } + } + } + pub struct NetworkInterfaceRequest { name: Result, slot: Result, @@ -1767,6 +1928,15 @@ pub mod types { }) } } + + impl From for NetworkInterfaceRequest { + fn from(value: super::NetworkInterfaceRequest) -> Self { + Self { + name: Ok(value.name), + slot: Ok(value.slot), + } + } + } } } diff --git a/progenitor-impl/tests/output/test_default_params_builder.out b/progenitor-impl/tests/output/test_default_params_builder.out index a255399..c5c6439 100644 --- a/progenitor-impl/tests/output/test_default_params_builder.out +++ b/progenitor-impl/tests/output/test_default_params_builder.out @@ -125,6 +125,17 @@ pub mod types { } } + impl From for BodyWithDefaults { + fn from(value: super::BodyWithDefaults) -> Self { + Self { + forty_two: Ok(value.forty_two), + s: Ok(value.s), + something: Ok(value.something), + yes: Ok(value.yes), + } + } + } + pub struct Error { error_code: Result, String>, message: Result, @@ -184,6 +195,16 @@ pub mod types { }) } } + + impl From for Error { + fn from(value: super::Error) -> Self { + Self { + error_code: Ok(value.error_code), + message: Ok(value.message), + request_id: Ok(value.request_id), + } + } + } } mod defaults { diff --git a/progenitor-impl/tests/test_specific.rs b/progenitor-impl/tests/test_specific.rs index 3ca7667..5f794dc 100644 --- a/progenitor-impl/tests/test_specific.rs +++ b/progenitor-impl/tests/test_specific.rs @@ -1,6 +1,6 @@ -// Copyright 2022 Oxide Computer Company +// Copyright 2023 Oxide Computer Company -use std::{str::from_utf8, sync::Arc}; +use std::str::from_utf8; use dropshot::{ endpoint, ApiDescription, HttpError, HttpResponseUpdatedNoContent, Path, @@ -40,7 +40,7 @@ struct CursedQuery { path = "/{ref}/{type}/{trait}", }] async fn renamed_parameters( - _rqctx: Arc>, + _rqctx: RequestContext<()>, _path: Path, _query: Query, ) -> Result { @@ -77,7 +77,7 @@ fn test_renamed_parameters() { path = "/", }] async fn freeform_response( - _rqctx: Arc>, + _rqctx: RequestContext<()>, ) -> Result, HttpError> { unreachable!(); } @@ -130,7 +130,7 @@ fn yes_yes() -> Option { path = "/", }] async fn default_params( - _rqctx: Arc>, + _rqctx: RequestContext<()>, _body: TypedBody, ) -> Result, HttpError> { unreachable!();