diff --git a/Cargo.lock b/Cargo.lock index f100ea4..cca1620 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2341,7 +2341,7 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "typify" version = "0.0.14" -source = "git+https://github.com/oxidecomputer/typify#d6d85998d29825cfcf07072423f567a085db3ee0" +source = "git+https://github.com/oxidecomputer/typify#b0df7aa37ae13b61705161075146250224df24f2" dependencies = [ "typify-impl", "typify-macro", @@ -2350,7 +2350,7 @@ dependencies = [ [[package]] name = "typify-impl" version = "0.0.14" -source = "git+https://github.com/oxidecomputer/typify#d6d85998d29825cfcf07072423f567a085db3ee0" +source = "git+https://github.com/oxidecomputer/typify#b0df7aa37ae13b61705161075146250224df24f2" dependencies = [ "heck", "log", @@ -2367,7 +2367,7 @@ dependencies = [ [[package]] name = "typify-macro" version = "0.0.14" -source = "git+https://github.com/oxidecomputer/typify#d6d85998d29825cfcf07072423f567a085db3ee0" +source = "git+https://github.com/oxidecomputer/typify#b0df7aa37ae13b61705161075146250224df24f2" dependencies = [ "proc-macro2", "quote", diff --git a/progenitor-impl/src/lib.rs b/progenitor-impl/src/lib.rs index fb85396..adea626 100644 --- a/progenitor-impl/src/lib.rs +++ b/progenitor-impl/src/lib.rs @@ -526,10 +526,10 @@ impl Generator { pub fn space_out_items(content: String) -> Result { // Add newlines after end-braces at <= two levels of indentation. Ok(if cfg!(not(windows)) { - let regex = regex::Regex::new(r#"(})(\n\s{0,8}[^} ])"#).unwrap(); + let regex = regex::Regex::new(r#"(\n\s*})(\n\s{0,8}[^} ])"#).unwrap(); regex.replace_all(&content, "$1\n$2").to_string() } else { - let regex = regex::Regex::new(r#"(})(\r\n\s{0,8}[^} ])"#).unwrap(); + let regex = regex::Regex::new(r#"(\n\s*})(\r\n\s{0,8}[^} ])"#).unwrap(); regex.replace_all(&content, "$1\r\n$2").to_string() }) } diff --git a/progenitor-impl/tests/output/buildomat-builder-tagged.out b/progenitor-impl/tests/output/buildomat-builder-tagged.out index e145962..0ede3dc 100644 --- a/progenitor-impl/tests/output/buildomat-builder-tagged.out +++ b/progenitor-impl/tests/output/buildomat-builder-tagged.out @@ -7,6 +7,43 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///Task + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "output_rules", + /// "script", + /// "state" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// }, + /// "state": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Task { pub id: String, @@ -28,6 +65,39 @@ pub mod types { } } + ///TaskEvent + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "payload", + /// "seq", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "payload": { + /// "type": "string" + /// }, + /// "seq": { + /// "type": "integer", + /// "format": "uint", + /// "minimum": 0.0 + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskEvent { pub payload: String, @@ -48,6 +118,34 @@ pub mod types { } } + ///TaskOutput + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "path", + /// "size" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskOutput { pub id: String, @@ -67,6 +165,34 @@ pub mod types { } } + ///TaskSubmit + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name", + /// "script" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskSubmit { pub name: String, @@ -87,6 +213,24 @@ pub mod types { } } + ///TaskSubmitResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskSubmitResult { pub id: String, @@ -104,6 +248,24 @@ pub mod types { } } + ///UploadedChunk + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UploadedChunk { pub id: String, @@ -121,6 +283,24 @@ pub mod types { } } + ///UserCreate + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreate { pub name: String, @@ -138,6 +318,32 @@ pub mod types { } } + ///UserCreateResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "token" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "token": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreateResult { pub id: String, @@ -157,6 +363,28 @@ pub mod types { } } + ///WhoamiResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WhoamiResult { pub id: String, @@ -175,6 +403,46 @@ pub mod types { } } + ///Worker + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "deleted", + /// "id", + /// "recycle", + /// "tasks" + /// ], + /// "properties": { + /// "deleted": { + /// "type": "boolean" + /// }, + /// "id": { + /// "type": "string" + /// }, + /// "instance_id": { + /// "type": "string" + /// }, + /// "lastping": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "recycle": { + /// "type": "boolean" + /// }, + /// "tasks": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/WorkerTask" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Worker { pub deleted: bool, @@ -199,6 +467,36 @@ pub mod types { } } + ///WorkerAddOutput + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "chunks", + /// "path", + /// "size" + /// ], + /// "properties": { + /// "chunks": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "size": { + /// "type": "integer", + /// "format": "int64" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerAddOutput { pub chunks: Vec, @@ -218,6 +516,33 @@ pub mod types { } } + ///WorkerAppendTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "payload", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "payload": { + /// "type": "string" + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerAppendTask { pub payload: String, @@ -237,6 +562,28 @@ pub mod types { } } + ///WorkerBootstrap + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "bootstrap", + /// "token" + /// ], + /// "properties": { + /// "bootstrap": { + /// "type": "string" + /// }, + /// "token": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerBootstrap { pub bootstrap: String, @@ -255,6 +602,24 @@ pub mod types { } } + ///WorkerBootstrapResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerBootstrapResult { pub id: String, @@ -272,6 +637,24 @@ pub mod types { } } + ///WorkerCompleteTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "failed" + /// ], + /// "properties": { + /// "failed": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerCompleteTask { pub failed: bool, @@ -289,6 +672,27 @@ pub mod types { } } + ///WorkerPingResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "poweroff" + /// ], + /// "properties": { + /// "poweroff": { + /// "type": "boolean" + /// }, + /// "task": { + /// "$ref": "#/components/schemas/WorkerPingTask" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerPingResult { pub poweroff: bool, @@ -308,6 +712,35 @@ pub mod types { } } + ///WorkerPingTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "output_rules", + /// "script" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerPingTask { pub id: String, @@ -327,6 +760,32 @@ pub mod types { } } + ///WorkerTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "owner" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "owner": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerTask { pub id: String, @@ -346,6 +805,27 @@ pub mod types { } } + ///WorkersResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "workers" + /// ], + /// "properties": { + /// "workers": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Worker" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkersResult { pub workers: Vec, diff --git a/progenitor-impl/tests/output/buildomat-builder.out b/progenitor-impl/tests/output/buildomat-builder.out index efa37da..45c1ba1 100644 --- a/progenitor-impl/tests/output/buildomat-builder.out +++ b/progenitor-impl/tests/output/buildomat-builder.out @@ -7,6 +7,43 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///Task + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "output_rules", + /// "script", + /// "state" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// }, + /// "state": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Task { pub id: String, @@ -28,6 +65,39 @@ pub mod types { } } + ///TaskEvent + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "payload", + /// "seq", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "payload": { + /// "type": "string" + /// }, + /// "seq": { + /// "type": "integer", + /// "format": "uint", + /// "minimum": 0.0 + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct TaskEvent { pub payload: String, @@ -48,6 +118,34 @@ pub mod types { } } + ///TaskOutput + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "path", + /// "size" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct TaskOutput { pub id: String, @@ -67,6 +165,34 @@ pub mod types { } } + ///TaskSubmit + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name", + /// "script" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct TaskSubmit { pub name: String, @@ -87,6 +213,24 @@ pub mod types { } } + ///TaskSubmitResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct TaskSubmitResult { pub id: String, @@ -104,6 +248,24 @@ pub mod types { } } + ///UploadedChunk + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UploadedChunk { pub id: String, @@ -121,6 +283,24 @@ pub mod types { } } + ///UserCreate + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UserCreate { pub name: String, @@ -138,6 +318,32 @@ pub mod types { } } + ///UserCreateResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "token" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "token": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UserCreateResult { pub id: String, @@ -157,6 +363,28 @@ pub mod types { } } + ///WhoamiResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WhoamiResult { pub id: String, @@ -175,6 +403,46 @@ pub mod types { } } + ///Worker + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "deleted", + /// "id", + /// "recycle", + /// "tasks" + /// ], + /// "properties": { + /// "deleted": { + /// "type": "boolean" + /// }, + /// "id": { + /// "type": "string" + /// }, + /// "instance_id": { + /// "type": "string" + /// }, + /// "lastping": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "recycle": { + /// "type": "boolean" + /// }, + /// "tasks": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/WorkerTask" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Worker { pub deleted: bool, @@ -199,6 +467,36 @@ pub mod types { } } + ///WorkerAddOutput + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "chunks", + /// "path", + /// "size" + /// ], + /// "properties": { + /// "chunks": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "size": { + /// "type": "integer", + /// "format": "int64" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkerAddOutput { pub chunks: Vec, @@ -218,6 +516,33 @@ pub mod types { } } + ///WorkerAppendTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "payload", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "payload": { + /// "type": "string" + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkerAppendTask { pub payload: String, @@ -237,6 +562,28 @@ pub mod types { } } + ///WorkerBootstrap + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "bootstrap", + /// "token" + /// ], + /// "properties": { + /// "bootstrap": { + /// "type": "string" + /// }, + /// "token": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkerBootstrap { pub bootstrap: String, @@ -255,6 +602,24 @@ pub mod types { } } + ///WorkerBootstrapResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkerBootstrapResult { pub id: String, @@ -272,6 +637,24 @@ pub mod types { } } + ///WorkerCompleteTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "failed" + /// ], + /// "properties": { + /// "failed": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkerCompleteTask { pub failed: bool, @@ -289,6 +672,27 @@ pub mod types { } } + ///WorkerPingResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "poweroff" + /// ], + /// "properties": { + /// "poweroff": { + /// "type": "boolean" + /// }, + /// "task": { + /// "$ref": "#/components/schemas/WorkerPingTask" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkerPingResult { pub poweroff: bool, @@ -308,6 +712,35 @@ pub mod types { } } + ///WorkerPingTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "output_rules", + /// "script" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkerPingTask { pub id: String, @@ -327,6 +760,32 @@ pub mod types { } } + ///WorkerTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "owner" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "owner": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkerTask { pub id: String, @@ -346,6 +805,27 @@ pub mod types { } } + ///WorkersResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "workers" + /// ], + /// "properties": { + /// "workers": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Worker" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct WorkersResult { pub workers: Vec, diff --git a/progenitor-impl/tests/output/buildomat-cli.out b/progenitor-impl/tests/output/buildomat-cli.out index 02c3a6a..1292e67 100644 --- a/progenitor-impl/tests/output/buildomat-cli.out +++ b/progenitor-impl/tests/output/buildomat-cli.out @@ -957,7 +957,6 @@ pub trait CliOverride { } impl CliOverride for () {} - #[derive(Copy, Clone, Debug)] pub enum CliCommand { ControlHold, diff --git a/progenitor-impl/tests/output/buildomat-positional.out b/progenitor-impl/tests/output/buildomat-positional.out index 1713415..981d900 100644 --- a/progenitor-impl/tests/output/buildomat-positional.out +++ b/progenitor-impl/tests/output/buildomat-positional.out @@ -7,6 +7,43 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///Task + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "output_rules", + /// "script", + /// "state" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// }, + /// "state": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Task { pub id: String, @@ -22,6 +59,39 @@ pub mod types { } } + ///TaskEvent + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "payload", + /// "seq", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "payload": { + /// "type": "string" + /// }, + /// "seq": { + /// "type": "integer", + /// "format": "uint", + /// "minimum": 0.0 + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskEvent { pub payload: String, @@ -36,6 +106,34 @@ pub mod types { } } + ///TaskOutput + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "path", + /// "size" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskOutput { pub id: String, @@ -49,6 +147,34 @@ pub mod types { } } + ///TaskSubmit + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name", + /// "script" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskSubmit { pub name: String, @@ -63,6 +189,24 @@ pub mod types { } } + ///TaskSubmitResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskSubmitResult { pub id: String, @@ -74,6 +218,24 @@ pub mod types { } } + ///UploadedChunk + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UploadedChunk { pub id: String, @@ -85,6 +247,24 @@ pub mod types { } } + ///UserCreate + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreate { pub name: String, @@ -96,6 +276,32 @@ pub mod types { } } + ///UserCreateResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "token" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "token": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreateResult { pub id: String, @@ -109,6 +315,28 @@ pub mod types { } } + ///WhoamiResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WhoamiResult { pub id: String, @@ -121,6 +349,46 @@ pub mod types { } } + ///Worker + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "deleted", + /// "id", + /// "recycle", + /// "tasks" + /// ], + /// "properties": { + /// "deleted": { + /// "type": "boolean" + /// }, + /// "id": { + /// "type": "string" + /// }, + /// "instance_id": { + /// "type": "string" + /// }, + /// "lastping": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "recycle": { + /// "type": "boolean" + /// }, + /// "tasks": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/WorkerTask" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Worker { pub deleted: bool, @@ -139,6 +407,36 @@ pub mod types { } } + ///WorkerAddOutput + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "chunks", + /// "path", + /// "size" + /// ], + /// "properties": { + /// "chunks": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "size": { + /// "type": "integer", + /// "format": "int64" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerAddOutput { pub chunks: Vec, @@ -152,6 +450,33 @@ pub mod types { } } + ///WorkerAppendTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "payload", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "payload": { + /// "type": "string" + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerAppendTask { pub payload: String, @@ -165,6 +490,28 @@ pub mod types { } } + ///WorkerBootstrap + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "bootstrap", + /// "token" + /// ], + /// "properties": { + /// "bootstrap": { + /// "type": "string" + /// }, + /// "token": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerBootstrap { pub bootstrap: String, @@ -177,6 +524,24 @@ pub mod types { } } + ///WorkerBootstrapResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerBootstrapResult { pub id: String, @@ -188,6 +553,24 @@ pub mod types { } } + ///WorkerCompleteTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "failed" + /// ], + /// "properties": { + /// "failed": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerCompleteTask { pub failed: bool, @@ -199,6 +582,27 @@ pub mod types { } } + ///WorkerPingResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "poweroff" + /// ], + /// "properties": { + /// "poweroff": { + /// "type": "boolean" + /// }, + /// "task": { + /// "$ref": "#/components/schemas/WorkerPingTask" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerPingResult { pub poweroff: bool, @@ -212,6 +616,35 @@ pub mod types { } } + ///WorkerPingTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "output_rules", + /// "script" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "output_rules": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// }, + /// "script": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerPingTask { pub id: String, @@ -225,6 +658,32 @@ pub mod types { } } + ///WorkerTask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "name", + /// "owner" + /// ], + /// "properties": { + /// "id": { + /// "type": "string" + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "owner": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerTask { pub id: String, @@ -238,6 +697,27 @@ pub mod types { } } + ///WorkersResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "workers" + /// ], + /// "properties": { + /// "workers": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Worker" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkersResult { pub workers: Vec, diff --git a/progenitor-impl/tests/output/keeper-builder-tagged.out b/progenitor-impl/tests/output/keeper-builder-tagged.out index 7618efd..5b94704 100644 --- a/progenitor-impl/tests/output/keeper-builder-tagged.out +++ b/progenitor-impl/tests/output/keeper-builder-tagged.out @@ -7,6 +7,29 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///EnrolBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "EnrolBody", + /// "type": "object", + /// "required": [ + /// "host", + /// "key" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "key": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct EnrolBody { pub host: String, @@ -25,6 +48,28 @@ pub mod types { } } + ///GlobalJobsResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "GlobalJobsResult", + /// "type": "object", + /// "required": [ + /// "summary" + /// ], + /// "properties": { + /// "summary": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ReportSummary" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalJobsResult { pub summary: Vec, @@ -42,6 +87,33 @@ pub mod types { } } + ///OutputRecord + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "msg", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "msg": { + /// "type": "string" + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OutputRecord { pub msg: String, @@ -61,6 +133,29 @@ pub mod types { } } + ///PingResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "PingResult", + /// "type": "object", + /// "required": [ + /// "host", + /// "ok" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "ok": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct PingResult { pub host: String, @@ -79,6 +174,40 @@ pub mod types { } } + ///ReportFinishBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportFinishBody", + /// "type": "object", + /// "required": [ + /// "duration_millis", + /// "end_time", + /// "exit_status", + /// "id" + /// ], + /// "properties": { + /// "duration_millis": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "end_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "exit_status": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportFinishBody { pub duration_millis: i32, @@ -99,6 +228,43 @@ pub mod types { } } + ///ReportId + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "host", + /// "job", + /// "pid", + /// "time", + /// "uuid" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "job": { + /// "type": "string" + /// }, + /// "pid": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "uuid": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportId { pub host: String, @@ -120,6 +286,29 @@ pub mod types { } } + ///ReportOutputBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportOutputBody", + /// "type": "object", + /// "required": [ + /// "id", + /// "record" + /// ], + /// "properties": { + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// }, + /// "record": { + /// "$ref": "#/components/schemas/OutputRecord" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportOutputBody { pub id: ReportId, @@ -138,6 +327,25 @@ pub mod types { } } + ///ReportResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportResult", + /// "type": "object", + /// "required": [ + /// "existed_already" + /// ], + /// "properties": { + /// "existed_already": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportResult { pub existed_already: bool, @@ -155,6 +363,34 @@ pub mod types { } } + ///ReportStartBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportStartBody", + /// "type": "object", + /// "required": [ + /// "id", + /// "script", + /// "start_time" + /// ], + /// "properties": { + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// }, + /// "script": { + /// "type": "string" + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportStartBody { pub id: ReportId, @@ -174,6 +410,48 @@ pub mod types { } } + ///ReportSummary + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "age_seconds", + /// "duration_seconds", + /// "host", + /// "job", + /// "status", + /// "when" + /// ], + /// "properties": { + /// "age_seconds": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "duration_seconds": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "host": { + /// "type": "string" + /// }, + /// "job": { + /// "type": "string" + /// }, + /// "status": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "when": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportSummary { pub age_seconds: i32, diff --git a/progenitor-impl/tests/output/keeper-builder.out b/progenitor-impl/tests/output/keeper-builder.out index 97706cd..8ac2a0b 100644 --- a/progenitor-impl/tests/output/keeper-builder.out +++ b/progenitor-impl/tests/output/keeper-builder.out @@ -7,6 +7,29 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///EnrolBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "EnrolBody", + /// "type": "object", + /// "required": [ + /// "host", + /// "key" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "key": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct EnrolBody { pub host: String, @@ -25,6 +48,28 @@ pub mod types { } } + ///GlobalJobsResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "GlobalJobsResult", + /// "type": "object", + /// "required": [ + /// "summary" + /// ], + /// "properties": { + /// "summary": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ReportSummary" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct GlobalJobsResult { pub summary: Vec, @@ -42,6 +87,33 @@ pub mod types { } } + ///OutputRecord + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "msg", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "msg": { + /// "type": "string" + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct OutputRecord { pub msg: String, @@ -61,6 +133,29 @@ pub mod types { } } + ///PingResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "PingResult", + /// "type": "object", + /// "required": [ + /// "host", + /// "ok" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "ok": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct PingResult { pub host: String, @@ -79,6 +174,40 @@ pub mod types { } } + ///ReportFinishBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportFinishBody", + /// "type": "object", + /// "required": [ + /// "duration_millis", + /// "end_time", + /// "exit_status", + /// "id" + /// ], + /// "properties": { + /// "duration_millis": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "end_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "exit_status": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ReportFinishBody { pub duration_millis: usize, @@ -99,6 +228,43 @@ pub mod types { } } + ///ReportId + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "host", + /// "job", + /// "pid", + /// "time", + /// "uuid" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "job": { + /// "type": "string" + /// }, + /// "pid": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "uuid": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ReportId { pub host: String, @@ -120,6 +286,29 @@ pub mod types { } } + ///ReportOutputBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportOutputBody", + /// "type": "object", + /// "required": [ + /// "id", + /// "record" + /// ], + /// "properties": { + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// }, + /// "record": { + /// "$ref": "#/components/schemas/OutputRecord" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ReportOutputBody { pub id: ReportId, @@ -138,6 +327,25 @@ pub mod types { } } + ///ReportResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportResult", + /// "type": "object", + /// "required": [ + /// "existed_already" + /// ], + /// "properties": { + /// "existed_already": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ReportResult { pub existed_already: bool, @@ -155,6 +363,34 @@ pub mod types { } } + ///ReportStartBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportStartBody", + /// "type": "object", + /// "required": [ + /// "id", + /// "script", + /// "start_time" + /// ], + /// "properties": { + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// }, + /// "script": { + /// "type": "string" + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ReportStartBody { pub id: ReportId, @@ -174,6 +410,48 @@ pub mod types { } } + ///ReportSummary + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "age_seconds", + /// "duration_seconds", + /// "host", + /// "job", + /// "status", + /// "when" + /// ], + /// "properties": { + /// "age_seconds": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "duration_seconds": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "host": { + /// "type": "string" + /// }, + /// "job": { + /// "type": "string" + /// }, + /// "status": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "when": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ReportSummary { pub age_seconds: usize, diff --git a/progenitor-impl/tests/output/keeper-cli.out b/progenitor-impl/tests/output/keeper-cli.out index fc3e41b..69a5f07 100644 --- a/progenitor-impl/tests/output/keeper-cli.out +++ b/progenitor-impl/tests/output/keeper-cli.out @@ -431,7 +431,6 @@ pub trait CliOverride { } impl CliOverride for () {} - #[derive(Copy, Clone, Debug)] pub enum CliCommand { Enrol, diff --git a/progenitor-impl/tests/output/keeper-positional.out b/progenitor-impl/tests/output/keeper-positional.out index 280b3ed..216e6ed 100644 --- a/progenitor-impl/tests/output/keeper-positional.out +++ b/progenitor-impl/tests/output/keeper-positional.out @@ -7,6 +7,29 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///EnrolBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "EnrolBody", + /// "type": "object", + /// "required": [ + /// "host", + /// "key" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "key": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct EnrolBody { pub host: String, @@ -19,6 +42,28 @@ pub mod types { } } + ///GlobalJobsResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "GlobalJobsResult", + /// "type": "object", + /// "required": [ + /// "summary" + /// ], + /// "properties": { + /// "summary": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ReportSummary" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalJobsResult { pub summary: Vec, @@ -30,6 +75,33 @@ pub mod types { } } + ///OutputRecord + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "msg", + /// "stream", + /// "time" + /// ], + /// "properties": { + /// "msg": { + /// "type": "string" + /// }, + /// "stream": { + /// "type": "string" + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OutputRecord { pub msg: String, @@ -43,6 +115,29 @@ pub mod types { } } + ///PingResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "PingResult", + /// "type": "object", + /// "required": [ + /// "host", + /// "ok" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "ok": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct PingResult { pub host: String, @@ -55,6 +150,40 @@ pub mod types { } } + ///ReportFinishBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportFinishBody", + /// "type": "object", + /// "required": [ + /// "duration_millis", + /// "end_time", + /// "exit_status", + /// "id" + /// ], + /// "properties": { + /// "duration_millis": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "end_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "exit_status": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportFinishBody { pub duration_millis: i32, @@ -69,6 +198,43 @@ pub mod types { } } + ///ReportId + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "host", + /// "job", + /// "pid", + /// "time", + /// "uuid" + /// ], + /// "properties": { + /// "host": { + /// "type": "string" + /// }, + /// "job": { + /// "type": "string" + /// }, + /// "pid": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "uuid": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportId { pub host: String, @@ -84,6 +250,29 @@ pub mod types { } } + ///ReportOutputBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportOutputBody", + /// "type": "object", + /// "required": [ + /// "id", + /// "record" + /// ], + /// "properties": { + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// }, + /// "record": { + /// "$ref": "#/components/schemas/OutputRecord" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportOutputBody { pub id: ReportId, @@ -96,6 +285,25 @@ pub mod types { } } + ///ReportResult + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportResult", + /// "type": "object", + /// "required": [ + /// "existed_already" + /// ], + /// "properties": { + /// "existed_already": { + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportResult { pub existed_already: bool, @@ -107,6 +315,34 @@ pub mod types { } } + ///ReportStartBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "ReportStartBody", + /// "type": "object", + /// "required": [ + /// "id", + /// "script", + /// "start_time" + /// ], + /// "properties": { + /// "id": { + /// "$ref": "#/components/schemas/ReportId" + /// }, + /// "script": { + /// "type": "string" + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportStartBody { pub id: ReportId, @@ -120,6 +356,48 @@ pub mod types { } } + ///ReportSummary + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "age_seconds", + /// "duration_seconds", + /// "host", + /// "job", + /// "status", + /// "when" + /// ], + /// "properties": { + /// "age_seconds": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "duration_seconds": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "host": { + /// "type": "string" + /// }, + /// "job": { + /// "type": "string" + /// }, + /// "status": { + /// "type": "integer", + /// "format": "int32" + /// }, + /// "when": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportSummary { pub age_seconds: i32, diff --git a/progenitor-impl/tests/output/nexus-builder-tagged.out b/progenitor-impl/tests/output/nexus-builder-tagged.out index ef1bc50..e62ee3a 100644 --- a/progenitor-impl/tests/output/nexus-builder-tagged.out +++ b/progenitor-impl/tests/output/nexus-builder-tagged.out @@ -8,6 +8,33 @@ pub mod types { #[allow(unused_imports)] use std::convert::TryFrom; ///Describes properties that should uniquely identify a Gimlet. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes properties that should uniquely identify a + /// Gimlet.", "type": "object", + /// "required": [ + /// "part", + /// "revision", + /// "serial" + /// ], + /// "properties": { + /// "part": { + /// "type": "string" + /// }, + /// "revision": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "serial": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Baseboard { pub part: String, @@ -32,6 +59,84 @@ pub mod types { ///This type supports ranges similar to the `RangeTo`, `Range` and /// `RangeFrom` types in the standard library. Those cover `(..end)`, /// `(start..end)`, and `(start..)` respectively. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A type storing a range over `T`.\n\nThis type supports + /// ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the + /// standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` + /// respectively.", "oneOf": [ + /// { + /// "description": "A range unbounded below and exclusively above, + /// `..end`.", "type": "object", + /// "required": [ + /// "end", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_to" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and exclusively + /// above, `start..end`.", "type": "object", + /// "required": [ + /// "end", + /// "start", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "number", + /// "format": "double" + /// }, + /// "start": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and unbounded + /// above, `start..`.", "type": "object", + /// "required": [ + /// "start", + /// "type" + /// ], + /// "properties": { + /// "start": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_from" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum BinRangedouble { @@ -58,6 +163,84 @@ pub mod types { ///This type supports ranges similar to the `RangeTo`, `Range` and /// `RangeFrom` types in the standard library. Those cover `(..end)`, /// `(start..end)`, and `(start..)` respectively. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A type storing a range over `T`.\n\nThis type supports + /// ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the + /// standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` + /// respectively.", "oneOf": [ + /// { + /// "description": "A range unbounded below and exclusively above, + /// `..end`.", "type": "object", + /// "required": [ + /// "end", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_to" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and exclusively + /// above, `start..end`.", "type": "object", + /// "required": [ + /// "end", + /// "start", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "start": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and unbounded + /// above, `start..`.", "type": "object", + /// "required": [ + /// "start", + /// "type" + /// ], + /// "properties": { + /// "start": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_from" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum BinRangeint64 { @@ -80,6 +263,36 @@ pub mod types { } ///Type storing bin edges and a count of samples within it. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Type storing bin edges and a count of samples within + /// it.", "type": "object", + /// "required": [ + /// "count", + /// "range" + /// ], + /// "properties": { + /// "count": { + /// "description": "The total count of samples in this bin.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "range": { + /// "description": "The range of the support covered by this bin.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BinRangedouble" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Bindouble { ///The total count of samples in this bin. @@ -101,6 +314,36 @@ pub mod types { } ///Type storing bin edges and a count of samples within it. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Type storing bin edges and a count of samples within + /// it.", "type": "object", + /// "required": [ + /// "count", + /// "range" + /// ], + /// "properties": { + /// "count": { + /// "description": "The total count of samples in this bin.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "range": { + /// "description": "The range of the support covered by this bin.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BinRangeint64" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Binint64 { ///The total count of samples in this bin. @@ -121,6 +364,22 @@ pub mod types { } } + ///BlockSize + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "disk block size in bytes", + /// "type": "integer", + /// "enum": [ + /// 512, + /// 2048, + /// 4096 + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Serialize)] pub struct BlockSize(i64); impl std::ops::Deref for BlockSize { @@ -170,6 +429,23 @@ pub mod types { /// infallible, but an i64 constructor can fail (if the value is negative) /// and a u64 constructor can fail (if the value is larger than i64::MAX). /// We provide all of these for consumers' convenience. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A count of bytes, typically used either for memory or + /// storage capacity\n\nThe maximum supported byte count is [`i64::MAX`]. + /// This makes it somewhat inconvenient to define constructors: a u32 + /// constructor can be infallible, but an i64 constructor can fail (if the + /// value is negative) and a u64 constructor can fail (if the value is + /// larger than i64::MAX). We provide all of these for consumers' + /// convenience.", "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ByteCount(pub u64); impl std::ops::Deref for ByteCount { @@ -232,6 +508,56 @@ pub mod types { } ///Client view of a [`Certificate`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Certificate`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "service", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "service": { + /// "$ref": "#/components/schemas/ServiceUsingCertificate" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Certificate { ///human-readable free-form text about a resource @@ -261,6 +587,58 @@ pub mod types { ///Create-time parameters for a /// [`Certificate`](crate::external_api::views::Certificate) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Certificate`](crate::external_api::views::Certificate)", + /// "type": "object", + /// "required": [ + /// "cert", + /// "description", + /// "key", + /// "name", + /// "service" + /// ], + /// "properties": { + /// "cert": { + /// "description": "PEM file containing public certificate chain", + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "key": { + /// "description": "PEM file containing private key", + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "service": { + /// "description": "The service using this certificate", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ServiceUsingCertificate" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct CertificateCreate { ///PEM file containing public certificate chain @@ -286,6 +664,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Certificate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct CertificateResultsPage { ///list of items on this page of results @@ -309,6 +716,47 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "component_type", + /// "id", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "component_type": { + /// "$ref": "#/components/schemas/UpdateableComponentType" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ComponentUpdate { pub component_type: UpdateableComponentType, @@ -334,6 +782,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ComponentUpdate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ComponentUpdateResultsPage { ///list of items on this page of results @@ -356,6 +833,30 @@ pub mod types { } ///A cumulative or counter data type. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A cumulative or counter data type.", + /// "type": "object", + /// "required": [ + /// "start_time", + /// "value" + /// ], + /// "properties": { + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "value": { + /// "type": "number", + /// "format": "double" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cumulativedouble { pub start_time: chrono::DateTime, @@ -375,6 +876,30 @@ pub mod types { } ///A cumulative or counter data type. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A cumulative or counter data type.", + /// "type": "object", + /// "required": [ + /// "start_time", + /// "value" + /// ], + /// "properties": { + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "value": { + /// "type": "integer", + /// "format": "int64" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cumulativeint64 { pub start_time: chrono::DateTime, @@ -394,6 +919,186 @@ pub mod types { } ///A `Datum` is a single sampled data point from a metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `Datum` is a single sampled data point from a + /// metric.", "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "boolean" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "bool" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "f64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "string" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "bytes" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Cumulativeint64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "cumulative_i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Cumulativedouble" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "cumulative_f64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Histogramint64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "histogram_i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Histogramdouble" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "histogram_f64" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "datum")] pub enum Datum { @@ -472,6 +1177,27 @@ pub mod types { } ///The type of an individual datum of a metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The type of an individual datum of a metric.", + /// "type": "string", + /// "enum": [ + /// "bool", + /// "i64", + /// "f64", + /// "string", + /// "bytes", + /// "cumulative_i64", + /// "cumulative_f64", + /// "histogram_i64", + /// "histogram_f64" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum DatumType { #[serde(rename = "bool")] @@ -555,6 +1281,30 @@ pub mod types { } } + ///DerEncodedKeyPair + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "private_key", + /// "public_cert" + /// ], + /// "properties": { + /// "private_key": { + /// "description": "request signing private key (base64 encoded der + /// file)", "type": "string" + /// }, + /// "public_cert": { + /// "description": "request signing public certificate (base64 encoded + /// der file)", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DerEncodedKeyPair { ///request signing private key (base64 encoded der file) @@ -575,6 +1325,33 @@ pub mod types { } } + ///DeviceAccessTokenRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "client_id", + /// "device_code", + /// "grant_type" + /// ], + /// "properties": { + /// "client_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "device_code": { + /// "type": "string" + /// }, + /// "grant_type": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAccessTokenRequest { pub client_id: uuid::Uuid, @@ -594,6 +1371,25 @@ pub mod types { } } + ///DeviceAuthRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "client_id" + /// ], + /// "properties": { + /// "client_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAuthRequest { pub client_id: uuid::Uuid, @@ -611,6 +1407,24 @@ pub mod types { } } + ///DeviceAuthVerify + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "user_code" + /// ], + /// "properties": { + /// "user_code": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAuthVerify { pub user_code: String, @@ -628,6 +1442,35 @@ pub mod types { } } + ///Digest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "sha256" + /// ] + /// }, + /// "value": { + /// "type": "string" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum Digest { @@ -642,6 +1485,87 @@ pub mod types { } ///Client view of a [`Disk`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Disk`]", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "device_path", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "state", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "block_size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "device_path": { + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "image_id": { + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "snapshot_id": { + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/DiskState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Disk { pub block_size: ByteCount, @@ -679,6 +1603,46 @@ pub mod types { ///Create-time parameters for a /// [`Disk`](omicron_common::api::external::Disk) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Disk`](omicron_common::api::external::Disk)", "type": "object", + /// "required": [ + /// "description", + /// "disk_source", + /// "name", + /// "size" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk_source": { + /// "description": "initial source for this disk", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DiskSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "size": { + /// "description": "total size of the Disk in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskCreate { pub description: String, @@ -704,6 +1668,25 @@ pub mod types { ///TODO-v1: Delete this Parameters for the /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached /// to an instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "TODO-v1: Delete this Parameters for the + /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached + /// to an instance", "type": "object", + /// "required": [ + /// "name" + /// ], + /// "properties": { + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskIdentifier { pub name: Name, @@ -721,6 +1704,24 @@ pub mod types { } } + ///DiskMetricName + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "activated", + /// "flush", + /// "read", + /// "read_bytes", + /// "write", + /// "write_bytes" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum DiskMetricName { #[serde(rename = "activated")] @@ -792,6 +1793,24 @@ pub mod types { } } + ///DiskPath + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disk" + /// ], + /// "properties": { + /// "disk": { + /// "$ref": "#/components/schemas/NameOrId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskPath { pub disk: NameOrId, @@ -810,6 +1829,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Disk" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskResultsPage { ///list of items on this page of results @@ -832,6 +1880,101 @@ pub mod types { } ///Different sources for a disk + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Different sources for a disk", + /// "oneOf": [ + /// { + /// "description": "Create a blank disk", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks for this Disk. valid values are: + /// 512, 2048, or 4096", "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "blank" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a disk snapshot", + /// "type": "object", + /// "required": [ + /// "snapshot_id", + /// "type" + /// ], + /// "properties": { + /// "snapshot_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "snapshot" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a project image", + /// "type": "object", + /// "required": [ + /// "image_id", + /// "type" + /// ], + /// "properties": { + /// "image_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "image" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a global image", + /// "type": "object", + /// "required": [ + /// "image_id", + /// "type" + /// ], + /// "properties": { + /// "image_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "global_image" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum DiskSource { @@ -860,6 +2003,137 @@ pub mod types { } ///State of a Disk (primarily: attached or not) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "State of a Disk (primarily: attached or not)", + /// "oneOf": [ + /// { + /// "description": "Disk is being initialized", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "creating" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is ready but detached from any Instance", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "detached" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is being attached to the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "attaching" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is attached to the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "attached" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is being detached from the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "detaching" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk has been destroyed", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "destroyed" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is unavailable", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "faulted" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "state", content = "instance")] pub enum DiskState { @@ -889,6 +2163,34 @@ pub mod types { } ///OS image distribution + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "OS image distribution", + /// "type": "object", + /// "required": [ + /// "name", + /// "version" + /// ], + /// "properties": { + /// "name": { + /// "description": "The name of the distribution (e.g. \"alpine\" or + /// \"ubuntu\")", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "version": { + /// "description": "The version of the distribution (e.g. \"3.10\" or + /// \"18.04\")", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Distribution { ///The name of the distribution (e.g. "alpine" or "ubuntu") @@ -910,6 +2212,31 @@ pub mod types { } ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -930,6 +2257,29 @@ pub mod types { } } + ///ExternalIp + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "ip", + /// "kind" + /// ], + /// "properties": { + /// "ip": { + /// "type": "string", + /// "format": "ip" + /// }, + /// "kind": { + /// "$ref": "#/components/schemas/IpKind" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ExternalIp { pub ip: std::net::IpAddr, @@ -949,6 +2299,40 @@ pub mod types { } ///Parameters for creating an external IP address for instances. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for creating an external IP address for + /// instances.", "oneOf": [ + /// { + /// "description": "An IP address providing both inbound and outbound + /// access. The address is automatically-assigned from the provided IP Pool, + /// or all available pools if not specified.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "pool_name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ephemeral" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum ExternalIpCreate { @@ -969,6 +2353,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ExternalIp" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ExternalIpResultsPage { ///list of items on this page of results @@ -991,6 +2404,32 @@ pub mod types { } ///The name and type information for a field of a timeseries schema. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name and type information for a field of a + /// timeseries schema.", "type": "object", + /// "required": [ + /// "name", + /// "source", + /// "ty" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "source": { + /// "$ref": "#/components/schemas/FieldSource" + /// }, + /// "ty": { + /// "$ref": "#/components/schemas/FieldType" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct FieldSchema { pub name: String, @@ -1011,6 +2450,20 @@ pub mod types { } ///The source from which a field is derived, the target or metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The source from which a field is derived, the target or + /// metric.", "type": "string", + /// "enum": [ + /// "target", + /// "metric" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FieldSource { #[serde(rename = "target")] @@ -1067,6 +2520,23 @@ pub mod types { } ///The `FieldType` identifies the data type of a target or metric field. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The `FieldType` identifies the data type of a target or + /// metric field.", "type": "string", + /// "enum": [ + /// "string", + /// "i64", + /// "ip_addr", + /// "uuid", + /// "bool" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FieldType { #[serde(rename = "string")] @@ -1134,6 +2604,21 @@ pub mod types { } } + ///FleetRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FleetRole { #[serde(rename = "admin")] @@ -1199,6 +2684,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FleetRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct FleetRolePolicy { ///Roles directly assigned on this resource @@ -1223,6 +2733,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/FleetRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct FleetRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -1243,6 +2783,95 @@ pub mod types { } ///Client view of global Images + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of global Images", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "distribution", + /// "id", + /// "name", + /// "size", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "digest": { + /// "description": "Hash of the image contents, if applicable", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Digest" + /// } + /// ] + /// }, + /// "distribution": { + /// "description": "Image distribution", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "size": { + /// "description": "total size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "url": { + /// "description": "URL source of this image, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "version": { + /// "description": "Image version", + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImage { ///size of blocks in bytes @@ -1285,6 +2914,56 @@ pub mod types { ///Create-time parameters for an /// [`GlobalImage`](crate::external_api::views::GlobalImage) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`GlobalImage`](crate::external_api::views::GlobalImage)", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "distribution", + /// "name", + /// "source" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "block size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "distribution": { + /// "description": "OS image distribution", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Distribution" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "source": { + /// "description": "The source of the image's contents.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ImageSource" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImageCreate { ///block size in bytes @@ -1310,6 +2989,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/GlobalImage" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImageResultsPage { ///list of items on this page of results @@ -1332,6 +3040,36 @@ pub mod types { } ///Client view of a [`Group`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Group`]", + /// "type": "object", + /// "required": [ + /// "display_name", + /// "id", + /// "silo_id" + /// ], + /// "properties": { + /// "display_name": { + /// "description": "Human-readable name that can identify the group", + /// "type": "string" + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "silo_id": { + /// "description": "Uuid of the silo to which this group belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Group { ///Human-readable name that can identify the group @@ -1354,6 +3092,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Group" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GroupResultsPage { ///list of items on this page of results @@ -1417,6 +3184,68 @@ pub mod types { /// _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In /// fact, every bin is one of those variants, the `BinRange::RangeTo` is /// only provided as a convenience during construction. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A simple type for managing a histogram metric.\n\nA + /// histogram maintains the count of any number of samples, over a set of + /// bins. Bins are specified on construction via their _left_ edges, + /// inclusive. There can't be any \"gaps\" in the bins, and an additional + /// bin may be added to the left, right, or both so that the bins extend to + /// the entire range of the support.\n\nNote that any gaps, unsorted bins, + /// or non-finite values will result in an error.\n\nExample ------- ```rust + /// use oximeter::histogram::{BinRange, Histogram};\n\nlet edges = [0i64, + /// 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); + /// assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) + /// assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); + /// assert_eq!(hist.n_samples(), 2);\n\nlet data = + /// hist.iter().collect::>(); assert_eq!(data[0].range, + /// BinRange::range(i64::MIN, 0)); // An additional bin for `..0` + /// assert_eq!(data[0].count, 0); // Nothing is in this + /// bin\n\nassert_eq!(data[1].range, BinRange::range(0, 10)); // The range + /// `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin + /// ```\n\nNotes -----\n\nHistograms may be constructed either from their + /// left bin edges, or from a sequence of ranges. In either case, the + /// left-most bin may be converted upon construction. In particular, if the + /// left-most value is not equal to the minimum of the support, a new bin + /// will be added from the minimum to that provided value. If the left-most + /// value _is_ the support's minimum, because the provided bin was unbounded + /// below, such as `(..0)`, then that bin will be converted into one bounded + /// below, `(MIN..0)` in this case.\n\nThe short of this is that, most of + /// the time, it shouldn't matter. If one specifies the extremes of the + /// support as their bins, be aware that the left-most may be converted from + /// a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the + /// first bin of a histogram is _always_ a `Bin::Range` or a + /// `Bin::RangeFrom` after construction. In fact, every bin is one of those + /// variants, the `BinRange::RangeTo` is only provided as a convenience + /// during construction.", "type": "object", + /// "required": [ + /// "bins", + /// "n_samples", + /// "start_time" + /// ], + /// "properties": { + /// "bins": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Bindouble" + /// } + /// }, + /// "n_samples": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Histogramdouble { pub bins: Vec, @@ -1478,6 +3307,68 @@ pub mod types { /// _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In /// fact, every bin is one of those variants, the `BinRange::RangeTo` is /// only provided as a convenience during construction. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A simple type for managing a histogram metric.\n\nA + /// histogram maintains the count of any number of samples, over a set of + /// bins. Bins are specified on construction via their _left_ edges, + /// inclusive. There can't be any \"gaps\" in the bins, and an additional + /// bin may be added to the left, right, or both so that the bins extend to + /// the entire range of the support.\n\nNote that any gaps, unsorted bins, + /// or non-finite values will result in an error.\n\nExample ------- ```rust + /// use oximeter::histogram::{BinRange, Histogram};\n\nlet edges = [0i64, + /// 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); + /// assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) + /// assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); + /// assert_eq!(hist.n_samples(), 2);\n\nlet data = + /// hist.iter().collect::>(); assert_eq!(data[0].range, + /// BinRange::range(i64::MIN, 0)); // An additional bin for `..0` + /// assert_eq!(data[0].count, 0); // Nothing is in this + /// bin\n\nassert_eq!(data[1].range, BinRange::range(0, 10)); // The range + /// `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin + /// ```\n\nNotes -----\n\nHistograms may be constructed either from their + /// left bin edges, or from a sequence of ranges. In either case, the + /// left-most bin may be converted upon construction. In particular, if the + /// left-most value is not equal to the minimum of the support, a new bin + /// will be added from the minimum to that provided value. If the left-most + /// value _is_ the support's minimum, because the provided bin was unbounded + /// below, such as `(..0)`, then that bin will be converted into one bounded + /// below, `(MIN..0)` in this case.\n\nThe short of this is that, most of + /// the time, it shouldn't matter. If one specifies the extremes of the + /// support as their bins, be aware that the left-most may be converted from + /// a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the + /// first bin of a histogram is _always_ a `Bin::Range` or a + /// `Bin::RangeFrom` after construction. In fact, every bin is one of those + /// variants, the `BinRange::RangeTo` is only provided as a convenience + /// during construction.", "type": "object", + /// "required": [ + /// "bins", + /// "n_samples", + /// "start_time" + /// ], + /// "properties": { + /// "bins": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Binint64" + /// } + /// }, + /// "n_samples": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Histogramint64 { pub bins: Vec, @@ -1500,6 +3391,25 @@ pub mod types { ///Supported set of sort modes for scanning by id only. /// ///Currently, we only support scanning in ascending order. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by id + /// only.\n\nCurrently, we only support scanning in ascending order.", + /// "oneOf": [ + /// { + /// "description": "sort in increasing order of \"id\"", + /// "type": "string", + /// "enum": [ + /// "id_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdSortMode { ///sort in increasing order of "id" @@ -1553,6 +3463,61 @@ pub mod types { } ///Client view of an [`IdentityProvider`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`IdentityProvider`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "provider_type", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "provider_type": { + /// "description": "Identity provider type", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/IdentityProviderType" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProvider { ///human-readable free-form text about a resource @@ -1582,6 +3547,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IdentityProvider" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProviderResultsPage { ///list of items on this page of results @@ -1603,6 +3597,24 @@ pub mod types { } } + ///IdentityProviderType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "description": "SAML identity provider", + /// "type": "string", + /// "enum": [ + /// "saml" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdentityProviderType { ///SAML identity provider @@ -1656,6 +3668,20 @@ pub mod types { } ///Describes what kind of identity is described by an id + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes what kind of identity is described by an id", + /// "type": "string", + /// "enum": [ + /// "silo_user", + /// "silo_group" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdentityType { #[serde(rename = "silo_user")] @@ -1711,6 +3737,53 @@ pub mod types { } } + ///IdpMetadataSource + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "url" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "data", + /// "type" + /// ], + /// "properties": { + /// "data": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "base64_encoded_xml" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum IdpMetadataSource { @@ -1727,6 +3800,98 @@ pub mod types { } ///Client view of project Images + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of project Images", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "digest": { + /// "description": "Hash of the image contents, if applicable", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Digest" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "The project the disk belongs to", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "description": "total size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "url": { + /// "description": "URL source of this image, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "version": { + /// "description": "Version of this, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Image { ///size of blocks in bytes @@ -1770,6 +3935,46 @@ pub mod types { ///Create-time parameters for an /// [`Image`](crate::external_api::views::Image) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Image`](crate::external_api::views::Image)", "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "name", + /// "source" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "block size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "source": { + /// "description": "The source of the image's contents.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ImageSource" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ImageCreate { ///block size in bytes @@ -1793,6 +3998,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Image" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ImageResultsPage { ///list of items on this page of results @@ -1815,6 +4049,69 @@ pub mod types { } ///The source of the underlying image. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The source of the underlying image.", + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "url" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "id", + /// "type" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "snapshot" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Boot the Alpine ISO that ships with the Propolis + /// zone. Intended for development purposes only.", "type": + /// "object", "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "you_can_boot_anything_as_long_as_its_alpine" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum ImageSource { @@ -1833,6 +4130,90 @@ pub mod types { } ///Client view of an [`Instance`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Instance`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "hostname", + /// "id", + /// "memory", + /// "name", + /// "ncpus", + /// "project_id", + /// "run_state", + /// "time_created", + /// "time_modified", + /// "time_run_state_updated" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "hostname": { + /// "description": "RFC1035-compliant hostname for the Instance.", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "memory": { + /// "description": "memory allocated for this Instance", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "ncpus": { + /// "description": "number of CPUs allocated for this Instance", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceCpuCount" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "id for the project containing this Instance", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "run_state": { + /// "$ref": "#/components/schemas/InstanceState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_run_state_updated": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Instance { ///human-readable free-form text about a resource @@ -1870,6 +4251,18 @@ pub mod types { } ///The number of CPUs in an Instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The number of CPUs in an Instance", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceCpuCount(pub u16); impl std::ops::Deref for InstanceCpuCount { @@ -1933,6 +4326,84 @@ pub mod types { ///Create-time parameters for an /// [`Instance`](omicron_common::api::external::Instance) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Instance`](omicron_common::api::external::Instance)", + /// "type": "object", + /// "required": [ + /// "description", + /// "hostname", + /// "memory", + /// "name", + /// "ncpus" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disks": { + /// "description": "The disks to be created or attached for this + /// instance.", "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/InstanceDiskAttachment" + /// } + /// }, + /// "external_ips": { + /// "description": "The external IP addresses provided to this + /// instance.\n\nBy default, all instances have outbound connectivity, but + /// no inbound connectivity. These external addresses can be used to provide + /// a fixed, known IP address for making inbound connections to the + /// instance.", "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ExternalIpCreate" + /// } + /// }, + /// "hostname": { + /// "type": "string" + /// }, + /// "memory": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "ncpus": { + /// "$ref": "#/components/schemas/InstanceCpuCount" + /// }, + /// "network_interfaces": { + /// "description": "The network interfaces to be created for this + /// instance.", "default": { + /// "type": "default" + /// }, + /// "allOf": [ + /// { + /// "$ref": + /// "#/components/schemas/InstanceNetworkInterfaceAttachment" } + /// ] + /// }, + /// "start": { + /// "description": "Should this instance be started upon creation; true + /// by default.", "default": true, + /// "type": "boolean" + /// }, + /// "user_data": { + /// "description": "User data for instance initialization systems (such + /// as cloud-init). Must be a Base64-encoded string, as specified in RFC + /// 4648 § 4 (+ and / characters with padding). Maximum 32 KiB unencoded + /// data.", "default": "", + /// "type": "string", + /// "format": "byte" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceCreate { pub description: String, @@ -1977,6 +4448,82 @@ pub mod types { } ///Describe the instance's disks at creation time + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describe the instance's disks at creation time", + /// "oneOf": [ + /// { + /// "description": "During instance creation, create and attach disks", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk_source", + /// "name", + /// "size", + /// "type" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk_source": { + /// "description": "initial source for this disk", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DiskSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "size": { + /// "description": "total size of the Disk in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "create" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "During instance creation, attach this disk", + /// "type": "object", + /// "required": [ + /// "name", + /// "type" + /// ], + /// "properties": { + /// "name": { + /// "description": "A disk name to attach", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "attach" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum InstanceDiskAttachment { @@ -2006,6 +4553,26 @@ pub mod types { ///Migration parameters for an /// [`Instance`](omicron_common::api::external::Instance) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Migration parameters for an + /// [`Instance`](omicron_common::api::external::Instance)", + /// "type": "object", + /// "required": [ + /// "dst_sled_id" + /// ], + /// "properties": { + /// "dst_sled_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrate { pub dst_sled_id: uuid::Uuid, @@ -2025,6 +4592,73 @@ pub mod types { ///Describes an attachment of a `NetworkInterface` to an `Instance`, at the /// time the instance is created. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes an attachment of a `NetworkInterface` to an + /// `Instance`, at the time the instance is created.", "oneOf": [ + /// { + /// "description": "Create one or more `NetworkInterface`s for the + /// `Instance`.\n\nIf more than one interface is provided, then the first + /// will be designated the primary interface for the instance.", + /// "type": "object", + /// "required": [ + /// "params", + /// "type" + /// ], + /// "properties": { + /// "params": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterfaceCreate" + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "create" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "The default networking configuration for an + /// instance is to create a single primary interface with an + /// automatically-assigned IP address. The IP will be pulled from the + /// Project's default VPC / VPC Subnet.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "default" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "No network interfaces at all will be created for + /// the instance.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "none" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "params")] pub enum InstanceNetworkInterfaceAttachment { @@ -2053,6 +4687,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Instance" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceResultsPage { ///list of items on this page of results @@ -2075,6 +4738,39 @@ pub mod types { } ///Contents of an Instance's serial console buffer. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Contents of an Instance's serial console buffer.", + /// "type": "object", + /// "required": [ + /// "data", + /// "last_byte_offset" + /// ], + /// "properties": { + /// "data": { + /// "description": "The bytes starting from the requested offset up to + /// either the end of the buffer or the request's `max_bytes`. Provided as a + /// u8 array rather than a string, as it may not be UTF-8.", "type" + /// : "array", "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "last_byte_offset": { + /// "description": "The absolute offset since boot (suitable for use as + /// `byte_offset` in a subsequent request) of the last byte returned in + /// `data`.", "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceSerialConsoleData { ///The bytes starting from the requested offset up to either the end of @@ -2102,6 +4798,90 @@ pub mod types { /// ///This typically reflects whether it's starting, running, stopping, or /// stopped, but also includes states related to the Instance's lifecycle + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Running state of an Instance (primarily: booted or + /// stopped)\n\nThis typically reflects whether it's starting, running, + /// stopping, or stopped, but also includes states related to the Instance's + /// lifecycle", "oneOf": [ + /// { + /// "description": "The instance is being created.", + /// "type": "string", + /// "enum": [ + /// "creating" + /// ] + /// }, + /// { + /// "description": "The instance is currently starting up.", + /// "type": "string", + /// "enum": [ + /// "starting" + /// ] + /// }, + /// { + /// "description": "The instance is currently running.", + /// "type": "string", + /// "enum": [ + /// "running" + /// ] + /// }, + /// { + /// "description": "The instance has been requested to stop and a + /// transition to \"Stopped\" is imminent.", "type": "string", + /// "enum": [ + /// "stopping" + /// ] + /// }, + /// { + /// "description": "The instance is currently stopped.", + /// "type": "string", + /// "enum": [ + /// "stopped" + /// ] + /// }, + /// { + /// "description": "The instance is in the process of rebooting - it + /// will remain in the \"rebooting\" state until the VM is starting once + /// more.", "type": "string", + /// "enum": [ + /// "rebooting" + /// ] + /// }, + /// { + /// "description": "The instance is in the process of migrating - it will remain in the \"migrating\" state until the migration process is complete and the destination propolis is ready to continue execution.", + /// "type": "string", + /// "enum": [ + /// "migrating" + /// ] + /// }, + /// { + /// "description": "The instance is attempting to recover from a + /// failure.", "type": "string", + /// "enum": [ + /// "repairing" + /// ] + /// }, + /// { + /// "description": "The instance has encountered a failure.", + /// "type": "string", + /// "enum": [ + /// "failed" + /// ] + /// }, + /// { + /// "description": "The instance has been deleted.", + /// "type": "string", + /// "enum": [ + /// "destroyed" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceState { ///The instance is being created. @@ -2204,6 +4984,20 @@ pub mod types { } ///The kind of an external IP address for an instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The kind of an external IP address for an instance", + /// "type": "string", + /// "enum": [ + /// "ephemeral", + /// "floating" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IpKind { #[serde(rename = "ephemeral")] @@ -2259,6 +5053,33 @@ pub mod types { } } + ///IpNet + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "v4", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// { + /// "title": "v6", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum IpNet { @@ -2329,6 +5150,52 @@ pub mod types { ///Identity-related metadata that's included in nearly all public API /// objects + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in nearly all + /// public API objects", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPool { ///human-readable free-form text about a resource @@ -2358,6 +5225,28 @@ pub mod types { ///Create-time parameters for an IP Pool. /// ///See [`IpPool`](crate::external_api::views::IpPool) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an IP Pool.\n\nSee + /// [`IpPool`](crate::external_api::views::IpPool)", "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolCreate { pub description: String, @@ -2376,6 +5265,34 @@ pub mod types { } } + ///IpPoolRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "range", + /// "time_created" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "range": { + /// "$ref": "#/components/schemas/IpRange" + /// }, + /// "time_created": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolRange { pub id: uuid::Uuid, @@ -2396,6 +5313,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IpPoolRange" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolRangeResultsPage { ///list of items on this page of results @@ -2418,6 +5364,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IpPool" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolResultsPage { ///list of items on this page of results @@ -2440,6 +5415,31 @@ pub mod types { } ///Parameters for updating an IP Pool + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for updating an IP Pool", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -2460,6 +5460,33 @@ pub mod types { } } + ///IpRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "v4", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Range" + /// } + /// ] + /// }, + /// { + /// "title": "v6", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Range" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum IpRange { @@ -2486,6 +5513,23 @@ pub mod types { } ///An IPv4 subnet, including prefix and subnet mask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "An IPv4 subnet", + /// "description": "An IPv4 subnet, including prefix and subnet mask", + /// "examples": [ + /// "192.168.1.0/24" + /// ], + /// "type": "string", + /// "pattern": + /// "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\. + /// ){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/ + /// ([8-9]|1[0-9]|2[0-9]|3[0-2])$" } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct Ipv4Net(String); impl std::ops::Deref for Ipv4Net { @@ -2563,6 +5607,31 @@ pub mod types { ///A non-decreasing IPv4 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A non-decreasing IPv4 address range, inclusive of both + /// ends.\n\nThe first address must be less than or equal to the last + /// address.", "type": "object", + /// "required": [ + /// "first", + /// "last" + /// ], + /// "properties": { + /// "first": { + /// "type": "string", + /// "format": "ipv4" + /// }, + /// "last": { + /// "type": "string", + /// "format": "ipv4" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Ipv4Range { pub first: std::net::Ipv4Addr, @@ -2582,6 +5651,23 @@ pub mod types { } ///An IPv6 subnet, including prefix and subnet mask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "An IPv6 subnet", + /// "description": "An IPv6 subnet, including prefix and subnet mask", + /// "examples": [ + /// "fd12:3456::/64" + /// ], + /// "type": "string", + /// "pattern": + /// "^([fF][dD])[0-9a-fA-F]{2}:(([0-9a-fA-F]{1,4}:){6}[0-9a-fA-F]{1, + /// 4}|([0-9a-fA-F]{1,4}:){1,6}:)\\/([1-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$" + /// } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct Ipv6Net(String); impl std::ops::Deref for Ipv6Net { @@ -2658,6 +5744,31 @@ pub mod types { ///A non-decreasing IPv6 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A non-decreasing IPv6 address range, inclusive of both + /// ends.\n\nThe first address must be less than or equal to the last + /// address.", "type": "object", + /// "required": [ + /// "first", + /// "last" + /// ], + /// "properties": { + /// "first": { + /// "type": "string", + /// "format": "ipv6" + /// }, + /// "last": { + /// "type": "string", + /// "format": "ipv6" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Ipv6Range { pub first: std::net::Ipv6Addr, @@ -2678,6 +5789,23 @@ pub mod types { ///An inclusive-inclusive range of IP ports. The second port may be omitted /// to represent a single port + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A range of IP ports", + /// "description": "An inclusive-inclusive range of IP ports. The second + /// port may be omitted to represent a single port", "examples": [ + /// "22" + /// ], + /// "type": "string", + /// "maxLength": 11, + /// "minLength": 1, + /// "pattern": "^[0-9]{1,5}(-[0-9]{1,5})?$" + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct L4PortRange(String); impl std::ops::Deref for L4PortRange { @@ -2752,6 +5880,23 @@ pub mod types { } ///A Media Access Control address, in EUI-48 format + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A MAC address", + /// "description": "A Media Access Control address, in EUI-48 format", + /// "examples": [ + /// "ff:ff:ff:ff:ff:ff" + /// ], + /// "type": "string", + /// "maxLength": 17, + /// "minLength": 17, + /// "pattern": "^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$" + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct MacAddr(String); impl std::ops::Deref for MacAddr { @@ -2826,6 +5971,29 @@ pub mod types { } ///A `Measurement` is a timestamped datum from a single metric + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `Measurement` is a timestamped datum from a single + /// metric", "type": "object", + /// "required": [ + /// "datum", + /// "timestamp" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Datum" + /// }, + /// "timestamp": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Measurement { pub datum: Datum, @@ -2845,6 +6013,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Measurement" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct MeasurementResultsPage { ///list of items on this page of results @@ -2869,6 +6066,22 @@ pub mod types { ///Names must begin with a lower case ASCII letter, be composed exclusively /// of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end /// with a '-'. Names cannot be a UUID though they may contain a UUID. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name unique within the parent collection", + /// "description": "Names must begin with a lower case ASCII letter, be + /// composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and + /// '-', and may not end with a '-'. Names cannot be a UUID though they may + /// contain a UUID.", "type": "string", + /// "maxLength": 63, + /// "pattern": + /// "^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z][a-z0-9-]* + /// [a-zA-Z0-9]$" } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct Name(String); impl std::ops::Deref for Name { @@ -2933,6 +6146,34 @@ pub mod types { } } + ///NameOrId + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "id", + /// "allOf": [ + /// { + /// "type": "string", + /// "format": "uuid" + /// } + /// ] + /// }, + /// { + /// "title": "name", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum NameOrId { @@ -3002,6 +6243,38 @@ pub mod types { } ///Supported set of sort modes for scanning by name or id + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by name or + /// id", "oneOf": [ + /// { + /// "description": "sort in increasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_ascending" + /// ] + /// }, + /// { + /// "description": "sort in decreasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_descending" + /// ] + /// }, + /// { + /// "description": "sort in increasing order of \"id\"", + /// "type": "string", + /// "enum": [ + /// "id_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum NameOrIdSortMode { ///sort in increasing order of "name" @@ -3067,6 +6340,25 @@ pub mod types { ///Supported set of sort modes for scanning by name only /// ///Currently, we only support scanning in ascending order. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by name + /// only\n\nCurrently, we only support scanning in ascending order.", + /// "oneOf": [ + /// { + /// "description": "sort in increasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum NameSortMode { ///sort in increasing order of "name" @@ -3120,6 +6412,90 @@ pub mod types { } ///A `NetworkInterface` represents a virtual network interface device. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `NetworkInterface` represents a virtual network + /// interface device.", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "instance_id", + /// "ip", + /// "mac", + /// "name", + /// "primary", + /// "subnet_id", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "instance_id": { + /// "description": "The Instance to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "ip": { + /// "description": "The IP address assigned to this interface.", + /// "type": "string", + /// "format": "ip" + /// }, + /// "mac": { + /// "description": "The MAC address assigned to this interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/MacAddr" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "primary": { + /// "description": "True if this interface is the primary for the + /// instance to which it's attached.", "type": "boolean" + /// }, + /// "subnet_id": { + /// "description": "The subnet to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterface { ///human-readable free-form text about a resource @@ -3161,6 +6537,54 @@ pub mod types { ///Create-time parameters for a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a [`NetworkInterface`](omicron_common::api::external::NetworkInterface)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name", + /// "subnet_name", + /// "vpc_name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "ip": { + /// "description": "The IP address for the interface. One will be + /// auto-assigned if not provided.", "type": [ + /// "string", + /// "null" + /// ], + /// "format": "ip" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "subnet_name": { + /// "description": "The VPC Subnet in which to create the interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "vpc_name": { + /// "description": "The VPC in which to create the interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceCreate { pub description: String, @@ -3188,6 +6612,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterface" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceResultsPage { ///list of items on this page of results @@ -3214,6 +6667,45 @@ pub mod types { /// ///Note that modifying IP addresses for an interface is not yet supported, /// a new interface must be created instead. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for updating a + /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface).\ + /// n\nNote that modifying IP addresses for an interface is not yet + /// supported, a new interface must be created instead.", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "primary": { + /// "description": "Make a secondary interface the instance's primary + /// interface.\n\nIf applied to a secondary interface, that interface will + /// become the primary on the next reboot of the instance. Note that this + /// may have implications for routing between instances, as the new primary + /// interface will be on a distinct subnet from the previous primary + /// interface.\n\nNote that this can only be used to select a new primary + /// interface for an instance. Requests to change the primary interface into + /// a secondary will return an error.", "default": false, + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3253,6 +6745,19 @@ pub mod types { /// is used to identify its output. Nodes that depend on a given node /// (either directly or indirectly) can access the node's output using its /// name. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Unique name for a saga [`Node`]\n\nEach node requires a + /// string name that's unique within its DAG. The name is used to identify + /// its output. Nodes that depend on a given node (either directly or + /// indirectly) can access the node's output using its name.", + /// "type": "string" + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct NodeName(pub String); impl std::ops::Deref for NodeName { @@ -3294,6 +6799,52 @@ pub mod types { } ///Client view of an [`Organization`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Organization`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Organization { ///human-readable free-form text about a resource @@ -3322,6 +6873,29 @@ pub mod types { ///Create-time parameters for an /// [`Organization`](crate::external_api::views::Organization) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Organization`](crate::external_api::views::Organization)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationCreate { pub description: String, @@ -3341,6 +6915,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Organization" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationResultsPage { ///list of items on this page of results @@ -3362,6 +6965,21 @@ pub mod types { } } + ///OrganizationRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum OrganizationRole { #[serde(rename = "admin")] @@ -3427,6 +7045,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/OrganizationRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationRolePolicy { ///Roles directly assigned on this resource @@ -3451,6 +7094,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/OrganizationRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -3472,6 +7145,32 @@ pub mod types { ///Updateable properties of an /// [`Organization`](crate::external_api::views::Organization) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of an + /// [`Organization`](crate::external_api::views::Organization)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3493,6 +7192,18 @@ pub mod types { } ///Passwords may be subject to additional constraints. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A password used to authenticate a user", + /// "description": "Passwords may be subject to additional constraints.", + /// "type": "string", + /// "maxLength": 512 + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct Password(String); impl std::ops::Deref for Password { @@ -3557,6 +7268,62 @@ pub mod types { } ///Client view of a [`PhysicalDisk`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`PhysicalDisk`]", + /// "type": "object", + /// "required": [ + /// "disk_type", + /// "id", + /// "model", + /// "serial", + /// "time_created", + /// "time_modified", + /// "vendor" + /// ], + /// "properties": { + /// "disk_type": { + /// "$ref": "#/components/schemas/PhysicalDiskType" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "model": { + /// "type": "string" + /// }, + /// "serial": { + /// "type": "string" + /// }, + /// "sled_id": { + /// "description": "The sled to which this disk is attached, if any.", + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vendor": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhysicalDisk { pub disk_type: PhysicalDiskType, @@ -3587,6 +7354,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/PhysicalDisk" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhysicalDiskResultsPage { ///list of items on this page of results @@ -3608,6 +7404,20 @@ pub mod types { } } + ///PhysicalDiskType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "internal", + /// "external" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum PhysicalDiskType { #[serde(rename = "internal")] @@ -3664,6 +7474,57 @@ pub mod types { } ///Client view of a [`Project`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Project`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "organization_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "organization_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Project { ///human-readable free-form text about a resource @@ -3693,6 +7554,28 @@ pub mod types { ///Create-time parameters for a /// [`Project`](crate::external_api::views::Project) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Project`](crate::external_api::views::Project)", "type": "object" + /// , "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectCreate { pub description: String, @@ -3712,6 +7595,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Project" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectResultsPage { ///list of items on this page of results @@ -3733,6 +7645,21 @@ pub mod types { } } + ///ProjectRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum ProjectRole { #[serde(rename = "admin")] @@ -3798,6 +7725,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ProjectRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectRolePolicy { ///Roles directly assigned on this resource @@ -3822,6 +7774,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/ProjectRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -3843,6 +7825,31 @@ pub mod types { ///Updateable properties of a /// [`Project`](crate::external_api::views::Project) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`Project`](crate::external_api::views::Project)", "type": "object" + /// , "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3864,6 +7871,38 @@ pub mod types { } ///Client view of an [`Rack`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Rack`]", + /// "type": "object", + /// "required": [ + /// "id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Rack { ///unique, immutable, system-controlled identifier for each resource @@ -3887,6 +7926,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Rack" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RackResultsPage { ///list of items on this page of results @@ -3909,6 +7977,28 @@ pub mod types { } ///Client view of a [`Role`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Role`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/RoleName" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Role { pub description: String, @@ -3928,6 +8018,19 @@ pub mod types { } ///Role names consist of two string components separated by dot ("."). + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name for a built-in role", + /// "description": "Role names consist of two string components separated + /// by dot (\".\").", "type": "string", + /// "maxLength": 63, + /// "pattern": "[a-z-]+\\.[a-z-]+" + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct RoleName(String); impl std::ops::Deref for RoleName { @@ -3999,6 +8102,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Role" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RoleResultsPage { ///list of items on this page of results @@ -4026,6 +8158,97 @@ pub mod types { ///When traffic is to be sent to a destination that is within a given /// `RouteDestination`, the corresponding [`RouterRoute`] applies, and /// traffic will be forward to the [`RouteTarget`] for that rule. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `RouteDestination` is used to match traffic with a + /// routing rule, on the destination of that traffic.\n\nWhen traffic is to + /// be sent to a destination that is within a given `RouteDestination`, the + /// corresponding [`RouterRoute`] applies, and traffic will be forward to + /// the [`RouteTarget`] for that rule.", "oneOf": [ + /// { + /// "description": "Route applies to traffic destined for a specific IP + /// address", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic destined for a specific IP + /// subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic destined for the given + /// VPC.", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum RouteDestination { @@ -4063,6 +8286,113 @@ pub mod types { ///A `RouteTarget` describes the possible locations that traffic matching a /// route destination can be sent. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `RouteTarget` describes the possible locations that + /// traffic matching a route destination can be sent.", "oneOf": [ + /// { + /// "description": "Forward traffic to a particular IP address.", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a VPC", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a VPC Subnet", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a specific instance", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to an internet gateway", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "internet_gateway" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum RouteTarget { @@ -4097,6 +8427,75 @@ pub mod types { ///A route defines a rule that governs where traffic should be sent based /// on its destination. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A route defines a rule that governs where traffic + /// should be sent based on its destination.", "type": "object", + /// "required": [ + /// "description", + /// "destination", + /// "id", + /// "kind", + /// "name", + /// "target", + /// "time_created", + /// "time_modified", + /// "vpc_router_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "kind": { + /// "description": "Describes the kind of router. Set at creation. + /// `read-only`", "allOf": [ + /// { + /// "$ref": "#/components/schemas/RouterRouteKind" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_router_id": { + /// "description": "The VPC Router to which the route belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRoute { ///human-readable free-form text about a resource @@ -4130,6 +8529,36 @@ pub mod types { } ///Create-time parameters for a [`RouterRoute`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a [`RouterRoute`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "destination", + /// "name", + /// "target" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteCreateParams { pub description: String, @@ -4155,6 +8584,48 @@ pub mod types { /// and describes how or where the route was created. /// ///See [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The classification of a [`RouterRoute`] as defined by the system. The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created.\n\nSee [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context", + /// "oneOf": [ + /// { + /// "description": "Determines the default destination of traffic, such + /// as whether it goes to the internet or not.\n\n`Destination: An Internet + /// Gateway` `Modifiable: true`", "type": "string", + /// "enum": [ + /// "default" + /// ] + /// }, + /// { + /// "description": "Automatically added for each VPC Subnet in the + /// VPC\n\n`Destination: A VPC Subnet` `Modifiable: false`", "type" + /// : "string", "enum": [ + /// "vpc_subnet" + /// ] + /// }, + /// { + /// "description": "Automatically added when VPC peering is + /// established\n\n`Destination: A different VPC` `Modifiable: false`", + /// "type": "string", + /// "enum": [ + /// "vpc_peering" + /// ] + /// }, + /// { + /// "description": "Created by a user See + /// [`RouteTarget`]\n\n`Destination: User defined` `Modifiable: true`", + /// "type": "string", + /// "enum": [ + /// "custom" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum RouterRouteKind { ///Determines the default destination of traffic, such as whether it @@ -4232,6 +8703,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/RouterRoute" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteResultsPage { ///list of items on this page of results @@ -4254,6 +8754,41 @@ pub mod types { } ///Updateable properties of a [`RouterRoute`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a [`RouterRoute`]", + /// "type": "object", + /// "required": [ + /// "destination", + /// "target" + /// ], + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteUpdateParams { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -4276,6 +8811,29 @@ pub mod types { } } + ///Saga + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "state" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/SagaState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Saga { pub id: uuid::Uuid, @@ -4294,6 +8852,101 @@ pub mod types { } } + ///SagaErrorInfo + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "source_error" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "action_failed" + /// ] + /// }, + /// "source_error": {} + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "deserialize_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "injected_error" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "serialize_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "subsaga_create_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "error")] pub enum SagaErrorInfo { @@ -4316,6 +8969,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Saga" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SagaResultsPage { ///list of items on this page of results @@ -4337,6 +9019,67 @@ pub mod types { } } + ///SagaState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "running" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "succeeded" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error_info", + /// "error_node_name", + /// "state" + /// ], + /// "properties": { + /// "error_info": { + /// "$ref": "#/components/schemas/SagaErrorInfo" + /// }, + /// "error_node_name": { + /// "$ref": "#/components/schemas/NodeName" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "failed" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "state")] pub enum SagaState { @@ -4359,6 +9102,84 @@ pub mod types { ///Identity-related metadata that's included in nearly all public API /// objects + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in nearly all + /// public API objects", "type": "object", + /// "required": [ + /// "acs_url", + /// "description", + /// "id", + /// "idp_entity_id", + /// "name", + /// "slo_url", + /// "sp_client_id", + /// "technical_contact_email", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "acs_url": { + /// "description": "service provider endpoint where the response will + /// be sent", "type": "string" + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "idp_entity_id": { + /// "description": "idp's entity id", + /// "type": "string" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "public_cert": { + /// "description": "optional request signing public certificate (base64 + /// encoded der file)", "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "slo_url": { + /// "description": "service provider endpoint where the idp should send + /// log out requests", "type": "string" + /// }, + /// "sp_client_id": { + /// "description": "sp's client id", + /// "type": "string" + /// }, + /// "technical_contact_email": { + /// "description": "customer's technical contact for saml + /// configuration", "type": "string" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SamlIdentityProvider { ///service provider endpoint where the response will be sent @@ -4400,6 +9221,79 @@ pub mod types { } ///Create-time identity-related parameters + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time identity-related parameters", + /// "type": "object", + /// "required": [ + /// "acs_url", + /// "description", + /// "idp_entity_id", + /// "idp_metadata_source", + /// "name", + /// "slo_url", + /// "sp_client_id", + /// "technical_contact_email" + /// ], + /// "properties": { + /// "acs_url": { + /// "description": "service provider endpoint where the response will + /// be sent", "type": "string" + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "group_attribute_name": { + /// "description": "If set, SAML attributes with this name will be + /// considered to denote a user's group membership, where the attribute + /// value(s) should be a comma-separated list of group names.", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "idp_entity_id": { + /// "description": "idp's entity id", + /// "type": "string" + /// }, + /// "idp_metadata_source": { + /// "description": "the source of an identity provider metadata + /// descriptor", "allOf": [ + /// { + /// "$ref": "#/components/schemas/IdpMetadataSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "signing_keypair": { + /// "description": "optional request signing key pair", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DerEncodedKeyPair" + /// } + /// ] + /// }, + /// "slo_url": { + /// "description": "service provider endpoint where the idp should send + /// log out requests", "type": "string" + /// }, + /// "sp_client_id": { + /// "description": "sp's client id", + /// "type": "string" + /// }, + /// "technical_contact_email": { + /// "description": "customer's technical contact for saml + /// configuration", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SamlIdentityProviderCreate { ///service provider endpoint where the response will be sent @@ -4438,6 +9332,17 @@ pub mod types { } } + ///SemverVersion + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "pattern": "^\\d+\\.\\d+\\.\\d+([\\-\\+].+)?$" + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct SemverVersion(String); impl std::ops::Deref for SemverVersion { @@ -4506,6 +9411,24 @@ pub mod types { } ///The service intended to use this certificate. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The service intended to use this certificate.", + /// "oneOf": [ + /// { + /// "description": "This certificate is intended for access to the + /// external API.", "type": "string", + /// "enum": [ + /// "external_api" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum ServiceUsingCertificate { ///This certificate is intended for access to the external API. @@ -4559,6 +9482,66 @@ pub mod types { } ///Client view of a ['Silo'] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a ['Silo']", + /// "type": "object", + /// "required": [ + /// "description", + /// "discoverable", + /// "id", + /// "identity_mode", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "discoverable": { + /// "description": "A silo where discoverable is false can be retrieved only by its id - it will not be part of the \"list all silos\" output.", + /// "type": "boolean" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "identity_mode": { + /// "description": "How users and groups are managed in this Silo", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SiloIdentityMode" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Silo { ///human-readable free-form text about a resource @@ -4591,6 +9574,48 @@ pub mod types { } ///Create-time parameters for a [`Silo`](crate::external_api::views::Silo) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Silo`](crate::external_api::views::Silo)", "type": "object", + /// "required": [ + /// "description", + /// "discoverable", + /// "identity_mode", + /// "name" + /// ], + /// "properties": { + /// "admin_group_name": { + /// "description": "If set, this group will be created during Silo + /// creation and granted the \"Silo Admin\" role. Identity providers can + /// assert that users belong to this group and those users can log in and + /// further initialize the Silo.\n\nNote that if configuring a SAML based + /// identity provider, group_attribute_name must be set for users to be + /// considered part of a group. See [`SamlIdentityProviderCreate`] for more + /// information.", "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "discoverable": { + /// "type": "boolean" + /// }, + /// "identity_mode": { + /// "$ref": "#/components/schemas/SiloIdentityMode" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloCreate { ///If set, this group will be created during Silo creation and granted @@ -4623,6 +9648,34 @@ pub mod types { ///Describes how identities are managed and users are authenticated in this /// Silo + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes how identities are managed and users are + /// authenticated in this Silo", "oneOf": [ + /// { + /// "description": "Users are authenticated with SAML using an external + /// authentication provider. The system updates information about users and + /// groups only during successful authentication (i.e,. \"JIT provisioning\" + /// of users and groups).", "type": "string", + /// "enum": [ + /// "saml_jit" + /// ] + /// }, + /// { + /// "description": "The system is the source of truth about users. + /// There is no linkage to an external authentication provider or identity + /// provider.", "type": "string", + /// "enum": [ + /// "local_only" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SiloIdentityMode { ///Users are authenticated with SAML using an external authentication @@ -4685,6 +9738,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Silo" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloResultsPage { ///list of items on this page of results @@ -4706,6 +9788,21 @@ pub mod types { } } + ///SiloRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SiloRole { #[serde(rename = "admin")] @@ -4771,6 +9868,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SiloRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloRolePolicy { ///Roles directly assigned on this resource @@ -4795,6 +9917,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/SiloRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -4815,6 +9967,46 @@ pub mod types { } ///Client view of a [`Sled`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Sled`]", + /// "type": "object", + /// "required": [ + /// "baseboard", + /// "id", + /// "service_address", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "baseboard": { + /// "$ref": "#/components/schemas/Baseboard" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "service_address": { + /// "type": "string" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Sled { pub baseboard: Baseboard, @@ -4840,6 +10032,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Sled" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SledResultsPage { ///list of items on this page of results @@ -4862,6 +10083,70 @@ pub mod types { } ///Client view of a Snapshot + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a Snapshot", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk_id", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "state", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "disk_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/SnapshotState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Snapshot { ///human-readable free-form text about a resource @@ -4894,6 +10179,38 @@ pub mod types { ///Create-time parameters for a /// [`Snapshot`](crate::external_api::views::Snapshot) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Snapshot`](crate::external_api::views::Snapshot)", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk": { + /// "description": "The name of the disk to be snapshotted", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SnapshotCreate { pub description: String, @@ -4915,6 +10232,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Snapshot" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SnapshotResultsPage { ///list of items on this page of results @@ -4936,6 +10282,22 @@ pub mod types { } } + ///SnapshotState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "creating", + /// "ready", + /// "faulted", + /// "destroyed" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SnapshotState { #[serde(rename = "creating")] @@ -4999,6 +10361,24 @@ pub mod types { } } + ///SpoofLoginBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "username" + /// ], + /// "properties": { + /// "username": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SpoofLoginBody { pub username: String, @@ -5017,6 +10397,63 @@ pub mod types { } ///Client view of a [`SshKey`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`SshKey`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "public_key", + /// "silo_user_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "public_key": { + /// "description": "SSH public key, e.g., `\"ssh-ed25519 + /// AAAAC3NzaC...\"`", "type": "string" + /// }, + /// "silo_user_id": { + /// "description": "The user to whom this key belongs", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKey { ///human-readable free-form text about a resource @@ -5049,6 +10486,33 @@ pub mod types { ///Create-time parameters for an /// [`SshKey`](crate::external_api::views::SshKey) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`SshKey`](crate::external_api::views::SshKey)", "type": "object", + /// "required": [ + /// "description", + /// "name", + /// "public_key" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "public_key": { + /// "description": "SSH public key, e.g., `\"ssh-ed25519 + /// AAAAC3NzaC...\"`", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKeyCreate { pub description: String, @@ -5070,6 +10534,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SshKey" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKeyResultsPage { ///list of items on this page of results @@ -5091,6 +10584,21 @@ pub mod types { } } + ///SystemMetricName + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "virtual_disk_space_provisioned", + /// "cpus_provisioned", + /// "ram_provisioned" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SystemMetricName { #[serde(rename = "virtual_disk_space_provisioned")] @@ -5152,6 +10660,43 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "id", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdate { ///unique, immutable, system-controlled identifier for each resource @@ -5176,6 +10721,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SystemUpdate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdateResultsPage { ///list of items on this page of results @@ -5197,6 +10771,24 @@ pub mod types { } } + ///SystemUpdateStart + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "version" + /// ], + /// "properties": { + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdateStart { pub version: SemverVersion, @@ -5214,6 +10806,28 @@ pub mod types { } } + ///SystemVersion + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "status", + /// "version_range" + /// ], + /// "properties": { + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "version_range": { + /// "$ref": "#/components/schemas/VersionRange" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemVersion { pub status: UpdateStatus, @@ -5235,6 +10849,21 @@ pub mod types { ///Names are constructed by concatenating the target and metric names with /// ':'. Target and metric names must be lowercase alphanumeric characters /// with '_' separating words. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "The name of a timeseries", + /// "description": "Names are constructed by concatenating the target and + /// metric names with ':'. Target and metric names must be lowercase + /// alphanumeric characters with '_' separating words.", + /// "type": "string", + /// "pattern": + /// "(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*):(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*)" + /// } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct TimeseriesName(String); impl std::ops::Deref for TimeseriesName { @@ -5310,6 +10939,41 @@ pub mod types { /// ///This includes the name of the timeseries, as well as the datum type of /// its metric and the schema for each field. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The schema for a timeseries.\n\nThis includes the name + /// of the timeseries, as well as the datum type of its metric and the + /// schema for each field.", "type": "object", + /// "required": [ + /// "created", + /// "datum_type", + /// "field_schema", + /// "timeseries_name" + /// ], + /// "properties": { + /// "created": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "datum_type": { + /// "$ref": "#/components/schemas/DatumType" + /// }, + /// "field_schema": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FieldSchema" + /// } + /// }, + /// "timeseries_name": { + /// "$ref": "#/components/schemas/TimeseriesName" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TimeseriesSchema { pub created: chrono::DateTime, @@ -5331,6 +10995,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/TimeseriesSchema" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TimeseriesSchemaResultsPage { ///list of items on this page of results @@ -5354,6 +11047,47 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "id", + /// "status", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateDeployment { ///unique, immutable, system-controlled identifier for each resource @@ -5379,6 +11113,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UpdateDeployment" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateDeploymentResultsPage { ///list of items on this page of results @@ -5400,6 +11163,45 @@ pub mod types { } } + ///UpdateStatus + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "status" + /// ], + /// "properties": { + /// "status": { + /// "type": "string", + /// "enum": [ + /// "updating" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "status" + /// ], + /// "properties": { + /// "status": { + /// "type": "string", + /// "enum": [ + /// "steady" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] #[serde(tag = "status")] pub enum UpdateStatus { @@ -5458,6 +11260,59 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "component_type", + /// "device_id", + /// "id", + /// "status", + /// "system_version", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "component_type": { + /// "$ref": "#/components/schemas/UpdateableComponentType" + /// }, + /// "device_id": { + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "system_version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateableComponent { pub component_type: UpdateableComponentType, @@ -5486,6 +11341,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UpdateableComponent" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateableComponentResultsPage { ///list of items on this page of results @@ -5507,6 +11391,30 @@ pub mod types { } } + ///UpdateableComponentType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "bootloader_for_rot", + /// "bootloader_for_sp", + /// "bootloader_for_host_proc", + /// "hubris_for_psc_rot", + /// "hubris_for_psc_sp", + /// "hubris_for_sidecar_rot", + /// "hubris_for_sidecar_sp", + /// "hubris_for_gimlet_rot", + /// "hubris_for_gimlet_sp", + /// "helios_host_phase1", + /// "helios_host_phase2", + /// "host_omicron" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum UpdateableComponentType { #[serde(rename = "bootloader_for_rot")] @@ -5603,6 +11511,36 @@ pub mod types { } ///Client view of a [`User`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`User`]", + /// "type": "object", + /// "required": [ + /// "display_name", + /// "id", + /// "silo_id" + /// ], + /// "properties": { + /// "display_name": { + /// "description": "Human-readable name that can identify the user", + /// "type": "string" + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "silo_id": { + /// "description": "Uuid of the silo to which this user belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct User { ///Human-readable name that can identify the user @@ -5625,6 +11563,52 @@ pub mod types { } ///Client view of a [`UserBuiltin`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`UserBuiltin`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserBuiltin { ///human-readable free-form text about a resource @@ -5652,6 +11636,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UserBuiltin" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserBuiltinResultsPage { ///list of items on this page of results @@ -5674,6 +11687,38 @@ pub mod types { } ///Create-time parameters for a [`User`](crate::external_api::views::User) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`User`](crate::external_api::views::User)", "type": "object", + /// "required": [ + /// "external_id", + /// "password" + /// ], + /// "properties": { + /// "external_id": { + /// "description": "username used to log in", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/UserId" + /// } + /// ] + /// }, + /// "password": { + /// "description": "password used to log in", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/UserPassword" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreate { ///username used to log in @@ -5697,6 +11742,22 @@ pub mod types { ///Names must begin with a lower case ASCII letter, be composed exclusively /// of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end /// with a '-'. Names cannot be a UUID though they may contain a UUID. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name unique within the parent collection", + /// "description": "Names must begin with a lower case ASCII letter, be + /// composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and + /// '-', and may not end with a '-'. Names cannot be a UUID though they may + /// contain a UUID.", "type": "string", + /// "maxLength": 63, + /// "pattern": + /// "^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z][a-z0-9-]* + /// [a-zA-Z0-9]$" } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct UserId(String); impl std::ops::Deref for UserId { @@ -5762,6 +11823,51 @@ pub mod types { } ///Parameters for setting a user's password + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for setting a user's password", + /// "oneOf": [ + /// { + /// "description": "Sets the user's password to the provided value", + /// "type": "object", + /// "required": [ + /// "details", + /// "user_password_value" + /// ], + /// "properties": { + /// "details": { + /// "$ref": "#/components/schemas/Password" + /// }, + /// "user_password_value": { + /// "type": "string", + /// "enum": [ + /// "password" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Invalidates any current password (disabling + /// password authentication)", "type": "object", + /// "required": [ + /// "user_password_value" + /// ], + /// "properties": { + /// "user_password_value": { + /// "type": "string", + /// "enum": [ + /// "invalid_password" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "user_password_value", content = "details")] pub enum UserPassword { @@ -5785,6 +11891,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/User" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserResultsPage { ///list of items on this page of results @@ -5807,6 +11942,28 @@ pub mod types { } ///Credentials for local user login + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Credentials for local user login", + /// "type": "object", + /// "required": [ + /// "password", + /// "username" + /// ], + /// "properties": { + /// "password": { + /// "$ref": "#/components/schemas/Password" + /// }, + /// "username": { + /// "$ref": "#/components/schemas/UserId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UsernamePasswordCredentials { pub password: Password, @@ -5825,6 +11982,28 @@ pub mod types { } } + ///VersionRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "high", + /// "low" + /// ], + /// "properties": { + /// "high": { + /// "$ref": "#/components/schemas/SemverVersion" + /// }, + /// "low": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VersionRange { pub high: SemverVersion, @@ -5844,6 +12023,82 @@ pub mod types { } ///Client view of a [`Vpc`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Vpc`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "dns_name", + /// "id", + /// "ipv6_prefix", + /// "name", + /// "project_id", + /// "system_router_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "dns_name": { + /// "description": "The name used for the VPC in DNS.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "ipv6_prefix": { + /// "description": "The unique local IPv6 address range for subnets in + /// this VPC", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "id for the project containing this VPC", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "system_router_id": { + /// "description": "id for the system router where subnet default + /// routes are registered", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Vpc { ///human-readable free-form text about a resource @@ -5879,6 +12134,42 @@ pub mod types { } ///Create-time parameters for a [`Vpc`](crate::external_api::views::Vpc) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Vpc`](crate::external_api::views::Vpc)", "type": "object", + /// "required": [ + /// "description", + /// "dns_name", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "dns_name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "ipv6_prefix": { + /// "description": "The IPv6 prefix for this VPC.\n\nAll IPv6 subnets + /// created from this VPC must be taken from this range, which sould be a + /// Unique Local Address in the range `fd00::/48`. The default VPC Subnet + /// will have the first `/64` range from this prefix.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcCreate { pub description: String, @@ -5907,6 +12198,109 @@ pub mod types { } ///A single rule in a VPC firewall + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single rule in a VPC firewall", + /// "type": "object", + /// "required": [ + /// "action", + /// "description", + /// "direction", + /// "filters", + /// "id", + /// "name", + /// "priority", + /// "status", + /// "targets", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "action": { + /// "description": "whether traffic matching the rule should be allowed + /// or dropped", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleAction" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "direction": { + /// "description": "whether this rule is for incoming or outgoing + /// traffic", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleDirection" + /// } + /// ] + /// }, + /// "filters": { + /// "description": "reductions on the scope of the rule", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleFilter" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "priority": { + /// "description": "the relative priority of this rule", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// }, + /// "status": { + /// "description": "whether this rule is in effect", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleStatus" + /// } + /// ] + /// }, + /// "targets": { + /// "description": "list of sets of instances that the rule applies + /// to", "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleTarget" + /// } + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "the VPC to which this rule belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRule { ///whether traffic matching the rule should be allowed or dropped @@ -5947,6 +12341,20 @@ pub mod types { } } + ///VpcFirewallRuleAction + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "allow", + /// "deny" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleAction { #[serde(rename = "allow")] @@ -6002,6 +12410,20 @@ pub mod types { } } + ///VpcFirewallRuleDirection + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "inbound", + /// "outbound" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleDirection { #[serde(rename = "inbound")] @@ -6060,6 +12482,50 @@ pub mod types { ///Filter for a firewall rule. A given packet must match every field that /// is present for the rule to apply to it. A packet matches a field if any /// entry in that field matches the packet. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Filter for a firewall rule. A given packet must match + /// every field that is present for the rule to apply to it. A packet + /// matches a field if any entry in that field matches the packet.", + /// "type": "object", + /// "properties": { + /// "hosts": { + /// "description": "If present, the sources (if incoming) or + /// destinations (if outgoing) this rule applies to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleHostFilter" + /// } + /// }, + /// "ports": { + /// "description": "If present, the destination ports this rule applies + /// to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/L4PortRange" + /// } + /// }, + /// "protocols": { + /// "description": "If present, the networking protocols this rule + /// applies to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleProtocol" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRuleFilter { ///If present, the sources (if incoming) or destinations (if outgoing) @@ -6088,6 +12554,114 @@ pub mod types { ///The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis /// of its source or destination host. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The `VpcFirewallRuleHostFilter` is used to filter + /// traffic on the basis of its source or destination host.", + /// "oneOf": [ + /// { + /// "description": "The rule applies to traffic from/to all instances + /// in the VPC", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to all instances + /// in the VPC Subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to this specific + /// instance", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to a specific IP + /// address", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to a specific IP + /// subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum VpcFirewallRuleHostFilter { @@ -6127,6 +12701,21 @@ pub mod types { } ///The protocols that may be specified in a firewall rule's filter + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The protocols that may be specified in a firewall + /// rule's filter", "type": "string", + /// "enum": [ + /// "TCP", + /// "UDP", + /// "ICMP" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleProtocol { #[serde(rename = "TCP")] @@ -6186,6 +12775,20 @@ pub mod types { } } + ///VpcFirewallRuleStatus + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "disabled", + /// "enabled" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleStatus { #[serde(rename = "disabled")] @@ -6243,6 +12846,113 @@ pub mod types { ///A `VpcFirewallRuleTarget` is used to specify the set of [`Instance`]s to /// which a firewall rule applies. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `VpcFirewallRuleTarget` is used to specify the set of + /// [`Instance`]s to which a firewall rule applies.", "oneOf": [ + /// { + /// "description": "The rule applies to all instances in the VPC", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to all instances in the VPC + /// Subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to this specific instance", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to a specific IP address", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to a specific IP subnet", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum VpcFirewallRuleTarget { @@ -6282,6 +12992,85 @@ pub mod types { } ///A single rule in a VPC firewall + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single rule in a VPC firewall", + /// "type": "object", + /// "required": [ + /// "action", + /// "description", + /// "direction", + /// "filters", + /// "name", + /// "priority", + /// "status", + /// "targets" + /// ], + /// "properties": { + /// "action": { + /// "description": "whether traffic matching the rule should be allowed + /// or dropped", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleAction" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "direction": { + /// "description": "whether this rule is for incoming or outgoing + /// traffic", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleDirection" + /// } + /// ] + /// }, + /// "filters": { + /// "description": "reductions on the scope of the rule", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleFilter" + /// } + /// ] + /// }, + /// "name": { + /// "description": "name of the rule, unique to this VPC", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "priority": { + /// "description": "the relative priority of this rule", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// }, + /// "status": { + /// "description": "whether this rule is in effect", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleStatus" + /// } + /// ] + /// }, + /// "targets": { + /// "description": "list of sets of instances that the rule applies + /// to", "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleTarget" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRuleUpdate { ///whether traffic matching the rule should be allowed or dropped @@ -6317,6 +13106,28 @@ pub mod types { ///Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules /// are implicitly created along with a Vpc, so there is no explicit /// creation. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a `Vpc`'s firewall Note that + /// VpcFirewallRules are implicitly created along with a Vpc, so there is no + /// explicit creation.", "type": "object", + /// "required": [ + /// "rules" + /// ], + /// "properties": { + /// "rules": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleUpdate" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRuleUpdateParams { pub rules: Vec, @@ -6335,6 +13146,27 @@ pub mod types { } ///Collection of a Vpc's firewall rules + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Collection of a Vpc's firewall rules", + /// "type": "object", + /// "required": [ + /// "rules" + /// ], + /// "properties": { + /// "rules": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRule" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRules { pub rules: Vec, @@ -6353,6 +13185,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Vpc" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcResultsPage { ///list of items on this page of results @@ -6376,6 +13237,63 @@ pub mod types { ///A VPC router defines a series of rules that indicate where traffic /// should be sent depending on its destination. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A VPC router defines a series of rules that indicate + /// where traffic should be sent depending on its destination.", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "kind", + /// "name", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "kind": { + /// "$ref": "#/components/schemas/VpcRouterKind" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the router belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouter { ///human-readable free-form text about a resource @@ -6407,6 +13325,29 @@ pub mod types { ///Create-time parameters for a /// [`VpcRouter`](crate::external_api::views::VpcRouter) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`VpcRouter`](crate::external_api::views::VpcRouter)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouterCreate { pub description: String, @@ -6425,6 +13366,20 @@ pub mod types { } } + ///VpcRouterKind + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "system", + /// "custom" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcRouterKind { #[serde(rename = "system")] @@ -6481,6 +13436,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcRouter" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouterResultsPage { ///list of items on this page of results @@ -6504,6 +13488,32 @@ pub mod types { ///Updateable properties of a /// [`VpcRouter`](crate::external_api::views::VpcRouter) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`VpcRouter`](crate::external_api::views::VpcRouter)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouterUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -6527,6 +13537,77 @@ pub mod types { ///A VPC subnet represents a logical grouping for instances that allows /// network traffic between them, within a IPv4 subnetwork or optionall an /// IPv6 subnetwork. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A VPC subnet represents a logical grouping for + /// instances that allows network traffic between them, within a IPv4 + /// subnetwork or optionall an IPv6 subnetwork.", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "ipv4_block", + /// "ipv6_block", + /// "name", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "ipv4_block": { + /// "description": "The IPv4 subnet CIDR block.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// "ipv6_block": { + /// "description": "The IPv6 subnet CIDR block.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the subnet belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnet { ///human-readable free-form text about a resource @@ -6561,6 +13642,50 @@ pub mod types { ///Create-time parameters for a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`VpcSubnet`](crate::external_api::views::VpcSubnet)", + /// "type": "object", + /// "required": [ + /// "description", + /// "ipv4_block", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "ipv4_block": { + /// "description": "The IPv4 address range for this subnet.\n\nIt must + /// be allocated from an RFC 1918 private address range, and must not + /// overlap with any other existing subnet in the VPC.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// "ipv6_block": { + /// "description": "The IPv6 address range for this subnet.\n\nIt must + /// be allocated from the RFC 4193 Unique Local Address range, with the + /// prefix equal to the parent VPC's prefix. A random `/64` block will be + /// assigned if one is not provided. It must not overlap with any existing + /// subnet in the VPC.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnetCreate { pub description: String, @@ -6593,6 +13718,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcSubnet" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnetResultsPage { ///list of items on this page of results @@ -6616,6 +13770,32 @@ pub mod types { ///Updateable properties of a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`VpcSubnet`](crate::external_api::views::VpcSubnet)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnetUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -6637,6 +13817,38 @@ pub mod types { } ///Updateable properties of a [`Vpc`](crate::external_api::views::Vpc) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`Vpc`](crate::external_api::views::Vpc)", "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "dns_name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/progenitor-impl/tests/output/nexus-builder.out b/progenitor-impl/tests/output/nexus-builder.out index 9ab544e..94b3ad1 100644 --- a/progenitor-impl/tests/output/nexus-builder.out +++ b/progenitor-impl/tests/output/nexus-builder.out @@ -8,6 +8,33 @@ pub mod types { #[allow(unused_imports)] use std::convert::TryFrom; ///Describes properties that should uniquely identify a Gimlet. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes properties that should uniquely identify a + /// Gimlet.", "type": "object", + /// "required": [ + /// "part", + /// "revision", + /// "serial" + /// ], + /// "properties": { + /// "part": { + /// "type": "string" + /// }, + /// "revision": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "serial": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Baseboard { pub part: String, @@ -32,6 +59,84 @@ pub mod types { ///This type supports ranges similar to the `RangeTo`, `Range` and /// `RangeFrom` types in the standard library. Those cover `(..end)`, /// `(start..end)`, and `(start..)` respectively. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A type storing a range over `T`.\n\nThis type supports + /// ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the + /// standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` + /// respectively.", "oneOf": [ + /// { + /// "description": "A range unbounded below and exclusively above, + /// `..end`.", "type": "object", + /// "required": [ + /// "end", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_to" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and exclusively + /// above, `start..end`.", "type": "object", + /// "required": [ + /// "end", + /// "start", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "number", + /// "format": "double" + /// }, + /// "start": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and unbounded + /// above, `start..`.", "type": "object", + /// "required": [ + /// "start", + /// "type" + /// ], + /// "properties": { + /// "start": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_from" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type")] pub enum BinRangedouble { @@ -58,6 +163,84 @@ pub mod types { ///This type supports ranges similar to the `RangeTo`, `Range` and /// `RangeFrom` types in the standard library. Those cover `(..end)`, /// `(start..end)`, and `(start..)` respectively. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A type storing a range over `T`.\n\nThis type supports + /// ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the + /// standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` + /// respectively.", "oneOf": [ + /// { + /// "description": "A range unbounded below and exclusively above, + /// `..end`.", "type": "object", + /// "required": [ + /// "end", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_to" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and exclusively + /// above, `start..end`.", "type": "object", + /// "required": [ + /// "end", + /// "start", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "start": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and unbounded + /// above, `start..`.", "type": "object", + /// "required": [ + /// "start", + /// "type" + /// ], + /// "properties": { + /// "start": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_from" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type")] pub enum BinRangeint64 { @@ -80,6 +263,36 @@ pub mod types { } ///Type storing bin edges and a count of samples within it. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Type storing bin edges and a count of samples within + /// it.", "type": "object", + /// "required": [ + /// "count", + /// "range" + /// ], + /// "properties": { + /// "count": { + /// "description": "The total count of samples in this bin.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "range": { + /// "description": "The range of the support covered by this bin.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BinRangedouble" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Bindouble { ///The total count of samples in this bin. @@ -101,6 +314,36 @@ pub mod types { } ///Type storing bin edges and a count of samples within it. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Type storing bin edges and a count of samples within + /// it.", "type": "object", + /// "required": [ + /// "count", + /// "range" + /// ], + /// "properties": { + /// "count": { + /// "description": "The total count of samples in this bin.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "range": { + /// "description": "The range of the support covered by this bin.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BinRangeint64" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Binint64 { ///The total count of samples in this bin. @@ -121,6 +364,22 @@ pub mod types { } } + ///BlockSize + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "disk block size in bytes", + /// "type": "integer", + /// "enum": [ + /// 512, + /// 2048, + /// 4096 + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Serialize, schemars :: JsonSchema)] pub struct BlockSize(i64); impl std::ops::Deref for BlockSize { @@ -170,6 +429,23 @@ pub mod types { /// infallible, but an i64 constructor can fail (if the value is negative) /// and a u64 constructor can fail (if the value is larger than i64::MAX). /// We provide all of these for consumers' convenience. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A count of bytes, typically used either for memory or + /// storage capacity\n\nThe maximum supported byte count is [`i64::MAX`]. + /// This makes it somewhat inconvenient to define constructors: a u32 + /// constructor can be infallible, but an i64 constructor can fail (if the + /// value is negative) and a u64 constructor can fail (if the value is + /// larger than i64::MAX). We provide all of these for consumers' + /// convenience.", "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ByteCount(pub u64); impl std::ops::Deref for ByteCount { @@ -232,6 +508,56 @@ pub mod types { } ///Client view of a [`Certificate`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Certificate`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "service", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "service": { + /// "$ref": "#/components/schemas/ServiceUsingCertificate" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Certificate { ///human-readable free-form text about a resource @@ -261,6 +587,58 @@ pub mod types { ///Create-time parameters for a /// [`Certificate`](crate::external_api::views::Certificate) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Certificate`](crate::external_api::views::Certificate)", + /// "type": "object", + /// "required": [ + /// "cert", + /// "description", + /// "key", + /// "name", + /// "service" + /// ], + /// "properties": { + /// "cert": { + /// "description": "PEM file containing public certificate chain", + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "key": { + /// "description": "PEM file containing private key", + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "service": { + /// "description": "The service using this certificate", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ServiceUsingCertificate" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct CertificateCreate { ///PEM file containing public certificate chain @@ -286,6 +664,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Certificate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct CertificateResultsPage { ///list of items on this page of results @@ -309,6 +716,47 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "component_type", + /// "id", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "component_type": { + /// "$ref": "#/components/schemas/UpdateableComponentType" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ComponentUpdate { pub component_type: UpdateableComponentType, @@ -334,6 +782,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ComponentUpdate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ComponentUpdateResultsPage { ///list of items on this page of results @@ -356,6 +833,30 @@ pub mod types { } ///A cumulative or counter data type. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A cumulative or counter data type.", + /// "type": "object", + /// "required": [ + /// "start_time", + /// "value" + /// ], + /// "properties": { + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "value": { + /// "type": "number", + /// "format": "double" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Cumulativedouble { pub start_time: chrono::DateTime, @@ -375,6 +876,30 @@ pub mod types { } ///A cumulative or counter data type. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A cumulative or counter data type.", + /// "type": "object", + /// "required": [ + /// "start_time", + /// "value" + /// ], + /// "properties": { + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "value": { + /// "type": "integer", + /// "format": "int64" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Cumulativeint64 { pub start_time: chrono::DateTime, @@ -394,6 +919,186 @@ pub mod types { } ///A `Datum` is a single sampled data point from a metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `Datum` is a single sampled data point from a + /// metric.", "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "boolean" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "bool" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "f64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "string" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "bytes" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Cumulativeint64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "cumulative_i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Cumulativedouble" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "cumulative_f64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Histogramint64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "histogram_i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Histogramdouble" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "histogram_f64" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type", content = "datum")] pub enum Datum { @@ -472,6 +1177,27 @@ pub mod types { } ///The type of an individual datum of a metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The type of an individual datum of a metric.", + /// "type": "string", + /// "enum": [ + /// "bool", + /// "i64", + /// "f64", + /// "string", + /// "bytes", + /// "cumulative_i64", + /// "cumulative_f64", + /// "histogram_i64", + /// "histogram_f64" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -567,6 +1293,30 @@ pub mod types { } } + ///DerEncodedKeyPair + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "private_key", + /// "public_cert" + /// ], + /// "properties": { + /// "private_key": { + /// "description": "request signing private key (base64 encoded der + /// file)", "type": "string" + /// }, + /// "public_cert": { + /// "description": "request signing public certificate (base64 encoded + /// der file)", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DerEncodedKeyPair { ///request signing private key (base64 encoded der file) @@ -587,6 +1337,33 @@ pub mod types { } } + ///DeviceAccessTokenRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "client_id", + /// "device_code", + /// "grant_type" + /// ], + /// "properties": { + /// "client_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "device_code": { + /// "type": "string" + /// }, + /// "grant_type": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DeviceAccessTokenRequest { pub client_id: uuid::Uuid, @@ -606,6 +1383,25 @@ pub mod types { } } + ///DeviceAuthRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "client_id" + /// ], + /// "properties": { + /// "client_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DeviceAuthRequest { pub client_id: uuid::Uuid, @@ -623,6 +1419,24 @@ pub mod types { } } + ///DeviceAuthVerify + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "user_code" + /// ], + /// "properties": { + /// "user_code": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DeviceAuthVerify { pub user_code: String, @@ -640,6 +1454,35 @@ pub mod types { } } + ///Digest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "sha256" + /// ] + /// }, + /// "value": { + /// "type": "string" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type", content = "value")] pub enum Digest { @@ -654,6 +1497,87 @@ pub mod types { } ///Client view of a [`Disk`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Disk`]", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "device_path", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "state", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "block_size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "device_path": { + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "image_id": { + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "snapshot_id": { + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/DiskState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Disk { pub block_size: ByteCount, @@ -691,6 +1615,46 @@ pub mod types { ///Create-time parameters for a /// [`Disk`](omicron_common::api::external::Disk) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Disk`](omicron_common::api::external::Disk)", "type": "object", + /// "required": [ + /// "description", + /// "disk_source", + /// "name", + /// "size" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk_source": { + /// "description": "initial source for this disk", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DiskSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "size": { + /// "description": "total size of the Disk in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DiskCreate { pub description: String, @@ -716,6 +1680,25 @@ pub mod types { ///TODO-v1: Delete this Parameters for the /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached /// to an instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "TODO-v1: Delete this Parameters for the + /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached + /// to an instance", "type": "object", + /// "required": [ + /// "name" + /// ], + /// "properties": { + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DiskIdentifier { pub name: Name, @@ -733,6 +1716,24 @@ pub mod types { } } + ///DiskMetricName + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "activated", + /// "flush", + /// "read", + /// "read_bytes", + /// "write", + /// "write_bytes" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -816,6 +1817,24 @@ pub mod types { } } + ///DiskPath + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disk" + /// ], + /// "properties": { + /// "disk": { + /// "$ref": "#/components/schemas/NameOrId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DiskPath { pub disk: NameOrId, @@ -834,6 +1853,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Disk" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DiskResultsPage { ///list of items on this page of results @@ -856,6 +1904,101 @@ pub mod types { } ///Different sources for a disk + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Different sources for a disk", + /// "oneOf": [ + /// { + /// "description": "Create a blank disk", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks for this Disk. valid values are: + /// 512, 2048, or 4096", "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "blank" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a disk snapshot", + /// "type": "object", + /// "required": [ + /// "snapshot_id", + /// "type" + /// ], + /// "properties": { + /// "snapshot_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "snapshot" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a project image", + /// "type": "object", + /// "required": [ + /// "image_id", + /// "type" + /// ], + /// "properties": { + /// "image_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "image" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a global image", + /// "type": "object", + /// "required": [ + /// "image_id", + /// "type" + /// ], + /// "properties": { + /// "image_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "global_image" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type")] pub enum DiskSource { @@ -884,6 +2027,137 @@ pub mod types { } ///State of a Disk (primarily: attached or not) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "State of a Disk (primarily: attached or not)", + /// "oneOf": [ + /// { + /// "description": "Disk is being initialized", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "creating" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is ready but detached from any Instance", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "detached" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is being attached to the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "attaching" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is attached to the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "attached" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is being detached from the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "detaching" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk has been destroyed", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "destroyed" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is unavailable", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "faulted" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "state", content = "instance")] pub enum DiskState { @@ -913,6 +2187,34 @@ pub mod types { } ///OS image distribution + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "OS image distribution", + /// "type": "object", + /// "required": [ + /// "name", + /// "version" + /// ], + /// "properties": { + /// "name": { + /// "description": "The name of the distribution (e.g. \"alpine\" or + /// \"ubuntu\")", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "version": { + /// "description": "The version of the distribution (e.g. \"3.10\" or + /// \"18.04\")", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Distribution { ///The name of the distribution (e.g. "alpine" or "ubuntu") @@ -934,6 +2236,31 @@ pub mod types { } ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -954,6 +2281,29 @@ pub mod types { } } + ///ExternalIp + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "ip", + /// "kind" + /// ], + /// "properties": { + /// "ip": { + /// "type": "string", + /// "format": "ip" + /// }, + /// "kind": { + /// "$ref": "#/components/schemas/IpKind" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ExternalIp { pub ip: std::net::IpAddr, @@ -973,6 +2323,40 @@ pub mod types { } ///Parameters for creating an external IP address for instances. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for creating an external IP address for + /// instances.", "oneOf": [ + /// { + /// "description": "An IP address providing both inbound and outbound + /// access. The address is automatically-assigned from the provided IP Pool, + /// or all available pools if not specified.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "pool_name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ephemeral" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type")] pub enum ExternalIpCreate { @@ -993,6 +2377,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ExternalIp" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ExternalIpResultsPage { ///list of items on this page of results @@ -1015,6 +2428,32 @@ pub mod types { } ///The name and type information for a field of a timeseries schema. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name and type information for a field of a + /// timeseries schema.", "type": "object", + /// "required": [ + /// "name", + /// "source", + /// "ty" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "source": { + /// "$ref": "#/components/schemas/FieldSource" + /// }, + /// "ty": { + /// "$ref": "#/components/schemas/FieldType" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct FieldSchema { pub name: String, @@ -1035,6 +2474,20 @@ pub mod types { } ///The source from which a field is derived, the target or metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The source from which a field is derived, the target or + /// metric.", "type": "string", + /// "enum": [ + /// "target", + /// "metric" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -1103,6 +2556,23 @@ pub mod types { } ///The `FieldType` identifies the data type of a target or metric field. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The `FieldType` identifies the data type of a target or + /// metric field.", "type": "string", + /// "enum": [ + /// "string", + /// "i64", + /// "ip_addr", + /// "uuid", + /// "bool" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -1182,6 +2652,21 @@ pub mod types { } } + ///FleetRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -1259,6 +2744,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FleetRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct FleetRolePolicy { ///Roles directly assigned on this resource @@ -1283,6 +2793,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/FleetRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct FleetRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -1303,6 +2843,95 @@ pub mod types { } ///Client view of global Images + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of global Images", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "distribution", + /// "id", + /// "name", + /// "size", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "digest": { + /// "description": "Hash of the image contents, if applicable", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Digest" + /// } + /// ] + /// }, + /// "distribution": { + /// "description": "Image distribution", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "size": { + /// "description": "total size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "url": { + /// "description": "URL source of this image, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "version": { + /// "description": "Image version", + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct GlobalImage { ///size of blocks in bytes @@ -1345,6 +2974,56 @@ pub mod types { ///Create-time parameters for an /// [`GlobalImage`](crate::external_api::views::GlobalImage) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`GlobalImage`](crate::external_api::views::GlobalImage)", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "distribution", + /// "name", + /// "source" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "block size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "distribution": { + /// "description": "OS image distribution", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Distribution" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "source": { + /// "description": "The source of the image's contents.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ImageSource" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct GlobalImageCreate { ///block size in bytes @@ -1370,6 +3049,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/GlobalImage" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct GlobalImageResultsPage { ///list of items on this page of results @@ -1392,6 +3100,36 @@ pub mod types { } ///Client view of a [`Group`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Group`]", + /// "type": "object", + /// "required": [ + /// "display_name", + /// "id", + /// "silo_id" + /// ], + /// "properties": { + /// "display_name": { + /// "description": "Human-readable name that can identify the group", + /// "type": "string" + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "silo_id": { + /// "description": "Uuid of the silo to which this group belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Group { ///Human-readable name that can identify the group @@ -1414,6 +3152,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Group" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct GroupResultsPage { ///list of items on this page of results @@ -1477,6 +3244,68 @@ pub mod types { /// _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In /// fact, every bin is one of those variants, the `BinRange::RangeTo` is /// only provided as a convenience during construction. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A simple type for managing a histogram metric.\n\nA + /// histogram maintains the count of any number of samples, over a set of + /// bins. Bins are specified on construction via their _left_ edges, + /// inclusive. There can't be any \"gaps\" in the bins, and an additional + /// bin may be added to the left, right, or both so that the bins extend to + /// the entire range of the support.\n\nNote that any gaps, unsorted bins, + /// or non-finite values will result in an error.\n\nExample ------- ```rust + /// use oximeter::histogram::{BinRange, Histogram};\n\nlet edges = [0i64, + /// 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); + /// assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) + /// assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); + /// assert_eq!(hist.n_samples(), 2);\n\nlet data = + /// hist.iter().collect::>(); assert_eq!(data[0].range, + /// BinRange::range(i64::MIN, 0)); // An additional bin for `..0` + /// assert_eq!(data[0].count, 0); // Nothing is in this + /// bin\n\nassert_eq!(data[1].range, BinRange::range(0, 10)); // The range + /// `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin + /// ```\n\nNotes -----\n\nHistograms may be constructed either from their + /// left bin edges, or from a sequence of ranges. In either case, the + /// left-most bin may be converted upon construction. In particular, if the + /// left-most value is not equal to the minimum of the support, a new bin + /// will be added from the minimum to that provided value. If the left-most + /// value _is_ the support's minimum, because the provided bin was unbounded + /// below, such as `(..0)`, then that bin will be converted into one bounded + /// below, `(MIN..0)` in this case.\n\nThe short of this is that, most of + /// the time, it shouldn't matter. If one specifies the extremes of the + /// support as their bins, be aware that the left-most may be converted from + /// a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the + /// first bin of a histogram is _always_ a `Bin::Range` or a + /// `Bin::RangeFrom` after construction. In fact, every bin is one of those + /// variants, the `BinRange::RangeTo` is only provided as a convenience + /// during construction.", "type": "object", + /// "required": [ + /// "bins", + /// "n_samples", + /// "start_time" + /// ], + /// "properties": { + /// "bins": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Bindouble" + /// } + /// }, + /// "n_samples": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Histogramdouble { pub bins: Vec, @@ -1538,6 +3367,68 @@ pub mod types { /// _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In /// fact, every bin is one of those variants, the `BinRange::RangeTo` is /// only provided as a convenience during construction. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A simple type for managing a histogram metric.\n\nA + /// histogram maintains the count of any number of samples, over a set of + /// bins. Bins are specified on construction via their _left_ edges, + /// inclusive. There can't be any \"gaps\" in the bins, and an additional + /// bin may be added to the left, right, or both so that the bins extend to + /// the entire range of the support.\n\nNote that any gaps, unsorted bins, + /// or non-finite values will result in an error.\n\nExample ------- ```rust + /// use oximeter::histogram::{BinRange, Histogram};\n\nlet edges = [0i64, + /// 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); + /// assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) + /// assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); + /// assert_eq!(hist.n_samples(), 2);\n\nlet data = + /// hist.iter().collect::>(); assert_eq!(data[0].range, + /// BinRange::range(i64::MIN, 0)); // An additional bin for `..0` + /// assert_eq!(data[0].count, 0); // Nothing is in this + /// bin\n\nassert_eq!(data[1].range, BinRange::range(0, 10)); // The range + /// `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin + /// ```\n\nNotes -----\n\nHistograms may be constructed either from their + /// left bin edges, or from a sequence of ranges. In either case, the + /// left-most bin may be converted upon construction. In particular, if the + /// left-most value is not equal to the minimum of the support, a new bin + /// will be added from the minimum to that provided value. If the left-most + /// value _is_ the support's minimum, because the provided bin was unbounded + /// below, such as `(..0)`, then that bin will be converted into one bounded + /// below, `(MIN..0)` in this case.\n\nThe short of this is that, most of + /// the time, it shouldn't matter. If one specifies the extremes of the + /// support as their bins, be aware that the left-most may be converted from + /// a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the + /// first bin of a histogram is _always_ a `Bin::Range` or a + /// `Bin::RangeFrom` after construction. In fact, every bin is one of those + /// variants, the `BinRange::RangeTo` is only provided as a convenience + /// during construction.", "type": "object", + /// "required": [ + /// "bins", + /// "n_samples", + /// "start_time" + /// ], + /// "properties": { + /// "bins": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Binint64" + /// } + /// }, + /// "n_samples": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Histogramint64 { pub bins: Vec, @@ -1560,6 +3451,25 @@ pub mod types { ///Supported set of sort modes for scanning by id only. /// ///Currently, we only support scanning in ascending order. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by id + /// only.\n\nCurrently, we only support scanning in ascending order.", + /// "oneOf": [ + /// { + /// "description": "sort in increasing order of \"id\"", + /// "type": "string", + /// "enum": [ + /// "id_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -1625,6 +3535,61 @@ pub mod types { } ///Client view of an [`IdentityProvider`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`IdentityProvider`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "provider_type", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "provider_type": { + /// "description": "Identity provider type", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/IdentityProviderType" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct IdentityProvider { ///human-readable free-form text about a resource @@ -1654,6 +3619,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IdentityProvider" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct IdentityProviderResultsPage { ///list of items on this page of results @@ -1675,6 +3669,24 @@ pub mod types { } } + ///IdentityProviderType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "description": "SAML identity provider", + /// "type": "string", + /// "enum": [ + /// "saml" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -1740,6 +3752,20 @@ pub mod types { } ///Describes what kind of identity is described by an id + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes what kind of identity is described by an id", + /// "type": "string", + /// "enum": [ + /// "silo_user", + /// "silo_group" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -1807,6 +3833,53 @@ pub mod types { } } + ///IdpMetadataSource + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "url" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "data", + /// "type" + /// ], + /// "properties": { + /// "data": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "base64_encoded_xml" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type")] pub enum IdpMetadataSource { @@ -1823,6 +3896,98 @@ pub mod types { } ///Client view of project Images + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of project Images", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "digest": { + /// "description": "Hash of the image contents, if applicable", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Digest" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "The project the disk belongs to", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "description": "total size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "url": { + /// "description": "URL source of this image, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "version": { + /// "description": "Version of this, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Image { ///size of blocks in bytes @@ -1866,6 +4031,46 @@ pub mod types { ///Create-time parameters for an /// [`Image`](crate::external_api::views::Image) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Image`](crate::external_api::views::Image)", "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "name", + /// "source" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "block size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "source": { + /// "description": "The source of the image's contents.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ImageSource" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ImageCreate { ///block size in bytes @@ -1889,6 +4094,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Image" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ImageResultsPage { ///list of items on this page of results @@ -1911,6 +4145,69 @@ pub mod types { } ///The source of the underlying image. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The source of the underlying image.", + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "url" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "id", + /// "type" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "snapshot" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Boot the Alpine ISO that ships with the Propolis + /// zone. Intended for development purposes only.", "type": + /// "object", "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "you_can_boot_anything_as_long_as_its_alpine" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type")] pub enum ImageSource { @@ -1929,6 +4226,90 @@ pub mod types { } ///Client view of an [`Instance`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Instance`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "hostname", + /// "id", + /// "memory", + /// "name", + /// "ncpus", + /// "project_id", + /// "run_state", + /// "time_created", + /// "time_modified", + /// "time_run_state_updated" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "hostname": { + /// "description": "RFC1035-compliant hostname for the Instance.", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "memory": { + /// "description": "memory allocated for this Instance", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "ncpus": { + /// "description": "number of CPUs allocated for this Instance", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceCpuCount" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "id for the project containing this Instance", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "run_state": { + /// "$ref": "#/components/schemas/InstanceState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_run_state_updated": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Instance { ///human-readable free-form text about a resource @@ -1966,6 +4347,18 @@ pub mod types { } ///The number of CPUs in an Instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The number of CPUs in an Instance", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceCpuCount(pub u16); impl std::ops::Deref for InstanceCpuCount { @@ -2029,6 +4422,84 @@ pub mod types { ///Create-time parameters for an /// [`Instance`](omicron_common::api::external::Instance) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Instance`](omicron_common::api::external::Instance)", + /// "type": "object", + /// "required": [ + /// "description", + /// "hostname", + /// "memory", + /// "name", + /// "ncpus" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disks": { + /// "description": "The disks to be created or attached for this + /// instance.", "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/InstanceDiskAttachment" + /// } + /// }, + /// "external_ips": { + /// "description": "The external IP addresses provided to this + /// instance.\n\nBy default, all instances have outbound connectivity, but + /// no inbound connectivity. These external addresses can be used to provide + /// a fixed, known IP address for making inbound connections to the + /// instance.", "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ExternalIpCreate" + /// } + /// }, + /// "hostname": { + /// "type": "string" + /// }, + /// "memory": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "ncpus": { + /// "$ref": "#/components/schemas/InstanceCpuCount" + /// }, + /// "network_interfaces": { + /// "description": "The network interfaces to be created for this + /// instance.", "default": { + /// "type": "default" + /// }, + /// "allOf": [ + /// { + /// "$ref": + /// "#/components/schemas/InstanceNetworkInterfaceAttachment" } + /// ] + /// }, + /// "start": { + /// "description": "Should this instance be started upon creation; true + /// by default.", "default": true, + /// "type": "boolean" + /// }, + /// "user_data": { + /// "description": "User data for instance initialization systems (such + /// as cloud-init). Must be a Base64-encoded string, as specified in RFC + /// 4648 § 4 (+ and / characters with padding). Maximum 32 KiB unencoded + /// data.", "default": "", + /// "type": "string", + /// "format": "byte" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceCreate { pub description: String, @@ -2073,6 +4544,82 @@ pub mod types { } ///Describe the instance's disks at creation time + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describe the instance's disks at creation time", + /// "oneOf": [ + /// { + /// "description": "During instance creation, create and attach disks", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk_source", + /// "name", + /// "size", + /// "type" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk_source": { + /// "description": "initial source for this disk", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DiskSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "size": { + /// "description": "total size of the Disk in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "create" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "During instance creation, attach this disk", + /// "type": "object", + /// "required": [ + /// "name", + /// "type" + /// ], + /// "properties": { + /// "name": { + /// "description": "A disk name to attach", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "attach" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type")] pub enum InstanceDiskAttachment { @@ -2102,6 +4649,26 @@ pub mod types { ///Migration parameters for an /// [`Instance`](omicron_common::api::external::Instance) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Migration parameters for an + /// [`Instance`](omicron_common::api::external::Instance)", + /// "type": "object", + /// "required": [ + /// "dst_sled_id" + /// ], + /// "properties": { + /// "dst_sled_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceMigrate { pub dst_sled_id: uuid::Uuid, @@ -2121,6 +4688,73 @@ pub mod types { ///Describes an attachment of a `NetworkInterface` to an `Instance`, at the /// time the instance is created. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes an attachment of a `NetworkInterface` to an + /// `Instance`, at the time the instance is created.", "oneOf": [ + /// { + /// "description": "Create one or more `NetworkInterface`s for the + /// `Instance`.\n\nIf more than one interface is provided, then the first + /// will be designated the primary interface for the instance.", + /// "type": "object", + /// "required": [ + /// "params", + /// "type" + /// ], + /// "properties": { + /// "params": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterfaceCreate" + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "create" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "The default networking configuration for an + /// instance is to create a single primary interface with an + /// automatically-assigned IP address. The IP will be pulled from the + /// Project's default VPC / VPC Subnet.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "default" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "No network interfaces at all will be created for + /// the instance.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "none" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type", content = "params")] pub enum InstanceNetworkInterfaceAttachment { @@ -2149,6 +4783,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Instance" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceResultsPage { ///list of items on this page of results @@ -2171,6 +4834,39 @@ pub mod types { } ///Contents of an Instance's serial console buffer. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Contents of an Instance's serial console buffer.", + /// "type": "object", + /// "required": [ + /// "data", + /// "last_byte_offset" + /// ], + /// "properties": { + /// "data": { + /// "description": "The bytes starting from the requested offset up to + /// either the end of the buffer or the request's `max_bytes`. Provided as a + /// u8 array rather than a string, as it may not be UTF-8.", "type" + /// : "array", "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "last_byte_offset": { + /// "description": "The absolute offset since boot (suitable for use as + /// `byte_offset` in a subsequent request) of the last byte returned in + /// `data`.", "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceSerialConsoleData { ///The bytes starting from the requested offset up to either the end of @@ -2198,6 +4894,90 @@ pub mod types { /// ///This typically reflects whether it's starting, running, stopping, or /// stopped, but also includes states related to the Instance's lifecycle + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Running state of an Instance (primarily: booted or + /// stopped)\n\nThis typically reflects whether it's starting, running, + /// stopping, or stopped, but also includes states related to the Instance's + /// lifecycle", "oneOf": [ + /// { + /// "description": "The instance is being created.", + /// "type": "string", + /// "enum": [ + /// "creating" + /// ] + /// }, + /// { + /// "description": "The instance is currently starting up.", + /// "type": "string", + /// "enum": [ + /// "starting" + /// ] + /// }, + /// { + /// "description": "The instance is currently running.", + /// "type": "string", + /// "enum": [ + /// "running" + /// ] + /// }, + /// { + /// "description": "The instance has been requested to stop and a + /// transition to \"Stopped\" is imminent.", "type": "string", + /// "enum": [ + /// "stopping" + /// ] + /// }, + /// { + /// "description": "The instance is currently stopped.", + /// "type": "string", + /// "enum": [ + /// "stopped" + /// ] + /// }, + /// { + /// "description": "The instance is in the process of rebooting - it + /// will remain in the \"rebooting\" state until the VM is starting once + /// more.", "type": "string", + /// "enum": [ + /// "rebooting" + /// ] + /// }, + /// { + /// "description": "The instance is in the process of migrating - it will remain in the \"migrating\" state until the migration process is complete and the destination propolis is ready to continue execution.", + /// "type": "string", + /// "enum": [ + /// "migrating" + /// ] + /// }, + /// { + /// "description": "The instance is attempting to recover from a + /// failure.", "type": "string", + /// "enum": [ + /// "repairing" + /// ] + /// }, + /// { + /// "description": "The instance has encountered a failure.", + /// "type": "string", + /// "enum": [ + /// "failed" + /// ] + /// }, + /// { + /// "description": "The instance has been deleted.", + /// "type": "string", + /// "enum": [ + /// "destroyed" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -2312,6 +5092,20 @@ pub mod types { } ///The kind of an external IP address for an instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The kind of an external IP address for an instance", + /// "type": "string", + /// "enum": [ + /// "ephemeral", + /// "floating" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -2379,6 +5173,33 @@ pub mod types { } } + ///IpNet + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "v4", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// { + /// "title": "v6", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(untagged)] pub enum IpNet { @@ -2449,6 +5270,52 @@ pub mod types { ///Identity-related metadata that's included in nearly all public API /// objects + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in nearly all + /// public API objects", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct IpPool { ///human-readable free-form text about a resource @@ -2478,6 +5345,28 @@ pub mod types { ///Create-time parameters for an IP Pool. /// ///See [`IpPool`](crate::external_api::views::IpPool) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an IP Pool.\n\nSee + /// [`IpPool`](crate::external_api::views::IpPool)", "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct IpPoolCreate { pub description: String, @@ -2496,6 +5385,34 @@ pub mod types { } } + ///IpPoolRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "range", + /// "time_created" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "range": { + /// "$ref": "#/components/schemas/IpRange" + /// }, + /// "time_created": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct IpPoolRange { pub id: uuid::Uuid, @@ -2516,6 +5433,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IpPoolRange" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct IpPoolRangeResultsPage { ///list of items on this page of results @@ -2538,6 +5484,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IpPool" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct IpPoolResultsPage { ///list of items on this page of results @@ -2560,6 +5535,31 @@ pub mod types { } ///Parameters for updating an IP Pool + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for updating an IP Pool", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct IpPoolUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -2580,6 +5580,33 @@ pub mod types { } } + ///IpRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "v4", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Range" + /// } + /// ] + /// }, + /// { + /// "title": "v6", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Range" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(untagged)] pub enum IpRange { @@ -2606,6 +5633,23 @@ pub mod types { } ///An IPv4 subnet, including prefix and subnet mask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "An IPv4 subnet", + /// "description": "An IPv4 subnet, including prefix and subnet mask", + /// "examples": [ + /// "192.168.1.0/24" + /// ], + /// "type": "string", + /// "pattern": + /// "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\. + /// ){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/ + /// ([8-9]|1[0-9]|2[0-9]|3[0-2])$" } + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -2685,6 +5729,31 @@ pub mod types { ///A non-decreasing IPv4 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A non-decreasing IPv4 address range, inclusive of both + /// ends.\n\nThe first address must be less than or equal to the last + /// address.", "type": "object", + /// "required": [ + /// "first", + /// "last" + /// ], + /// "properties": { + /// "first": { + /// "type": "string", + /// "format": "ipv4" + /// }, + /// "last": { + /// "type": "string", + /// "format": "ipv4" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Ipv4Range { pub first: std::net::Ipv4Addr, @@ -2704,6 +5773,23 @@ pub mod types { } ///An IPv6 subnet, including prefix and subnet mask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "An IPv6 subnet", + /// "description": "An IPv6 subnet, including prefix and subnet mask", + /// "examples": [ + /// "fd12:3456::/64" + /// ], + /// "type": "string", + /// "pattern": + /// "^([fF][dD])[0-9a-fA-F]{2}:(([0-9a-fA-F]{1,4}:){6}[0-9a-fA-F]{1, + /// 4}|([0-9a-fA-F]{1,4}:){1,6}:)\\/([1-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$" + /// } + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -2782,6 +5868,31 @@ pub mod types { ///A non-decreasing IPv6 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A non-decreasing IPv6 address range, inclusive of both + /// ends.\n\nThe first address must be less than or equal to the last + /// address.", "type": "object", + /// "required": [ + /// "first", + /// "last" + /// ], + /// "properties": { + /// "first": { + /// "type": "string", + /// "format": "ipv6" + /// }, + /// "last": { + /// "type": "string", + /// "format": "ipv6" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Ipv6Range { pub first: std::net::Ipv6Addr, @@ -2802,6 +5913,23 @@ pub mod types { ///An inclusive-inclusive range of IP ports. The second port may be omitted /// to represent a single port + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A range of IP ports", + /// "description": "An inclusive-inclusive range of IP ports. The second + /// port may be omitted to represent a single port", "examples": [ + /// "22" + /// ], + /// "type": "string", + /// "maxLength": 11, + /// "minLength": 1, + /// "pattern": "^[0-9]{1,5}(-[0-9]{1,5})?$" + ///} + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -2878,6 +6006,23 @@ pub mod types { } ///A Media Access Control address, in EUI-48 format + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A MAC address", + /// "description": "A Media Access Control address, in EUI-48 format", + /// "examples": [ + /// "ff:ff:ff:ff:ff:ff" + /// ], + /// "type": "string", + /// "maxLength": 17, + /// "minLength": 17, + /// "pattern": "^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$" + ///} + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -2954,6 +6099,29 @@ pub mod types { } ///A `Measurement` is a timestamped datum from a single metric + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `Measurement` is a timestamped datum from a single + /// metric", "type": "object", + /// "required": [ + /// "datum", + /// "timestamp" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Datum" + /// }, + /// "timestamp": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Measurement { pub datum: Datum, @@ -2973,6 +6141,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Measurement" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct MeasurementResultsPage { ///list of items on this page of results @@ -2997,6 +6194,22 @@ pub mod types { ///Names must begin with a lower case ASCII letter, be composed exclusively /// of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end /// with a '-'. Names cannot be a UUID though they may contain a UUID. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name unique within the parent collection", + /// "description": "Names must begin with a lower case ASCII letter, be + /// composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and + /// '-', and may not end with a '-'. Names cannot be a UUID though they may + /// contain a UUID.", "type": "string", + /// "maxLength": 63, + /// "pattern": + /// "^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z][a-z0-9-]* + /// [a-zA-Z0-9]$" } + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -3063,6 +6276,34 @@ pub mod types { } } + ///NameOrId + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "id", + /// "allOf": [ + /// { + /// "type": "string", + /// "format": "uuid" + /// } + /// ] + /// }, + /// { + /// "title": "name", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(untagged)] pub enum NameOrId { @@ -3132,6 +6373,38 @@ pub mod types { } ///Supported set of sort modes for scanning by name or id + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by name or + /// id", "oneOf": [ + /// { + /// "description": "sort in increasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_ascending" + /// ] + /// }, + /// { + /// "description": "sort in decreasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_descending" + /// ] + /// }, + /// { + /// "description": "sort in increasing order of \"id\"", + /// "type": "string", + /// "enum": [ + /// "id_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -3209,6 +6482,25 @@ pub mod types { ///Supported set of sort modes for scanning by name only /// ///Currently, we only support scanning in ascending order. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by name + /// only\n\nCurrently, we only support scanning in ascending order.", + /// "oneOf": [ + /// { + /// "description": "sort in increasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -3274,6 +6566,90 @@ pub mod types { } ///A `NetworkInterface` represents a virtual network interface device. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `NetworkInterface` represents a virtual network + /// interface device.", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "instance_id", + /// "ip", + /// "mac", + /// "name", + /// "primary", + /// "subnet_id", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "instance_id": { + /// "description": "The Instance to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "ip": { + /// "description": "The IP address assigned to this interface.", + /// "type": "string", + /// "format": "ip" + /// }, + /// "mac": { + /// "description": "The MAC address assigned to this interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/MacAddr" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "primary": { + /// "description": "True if this interface is the primary for the + /// instance to which it's attached.", "type": "boolean" + /// }, + /// "subnet_id": { + /// "description": "The subnet to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct NetworkInterface { ///human-readable free-form text about a resource @@ -3315,6 +6691,54 @@ pub mod types { ///Create-time parameters for a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a [`NetworkInterface`](omicron_common::api::external::NetworkInterface)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name", + /// "subnet_name", + /// "vpc_name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "ip": { + /// "description": "The IP address for the interface. One will be + /// auto-assigned if not provided.", "type": [ + /// "string", + /// "null" + /// ], + /// "format": "ip" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "subnet_name": { + /// "description": "The VPC Subnet in which to create the interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "vpc_name": { + /// "description": "The VPC in which to create the interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct NetworkInterfaceCreate { pub description: String, @@ -3342,6 +6766,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterface" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct NetworkInterfaceResultsPage { ///list of items on this page of results @@ -3368,6 +6821,45 @@ pub mod types { /// ///Note that modifying IP addresses for an interface is not yet supported, /// a new interface must be created instead. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for updating a + /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface).\ + /// n\nNote that modifying IP addresses for an interface is not yet + /// supported, a new interface must be created instead.", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "primary": { + /// "description": "Make a secondary interface the instance's primary + /// interface.\n\nIf applied to a secondary interface, that interface will + /// become the primary on the next reboot of the instance. Note that this + /// may have implications for routing between instances, as the new primary + /// interface will be on a distinct subnet from the previous primary + /// interface.\n\nNote that this can only be used to select a new primary + /// interface for an instance. Requests to change the primary interface into + /// a secondary will return an error.", "default": false, + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct NetworkInterfaceUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3407,6 +6899,19 @@ pub mod types { /// is used to identify its output. Nodes that depend on a given node /// (either directly or indirectly) can access the node's output using its /// name. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Unique name for a saga [`Node`]\n\nEach node requires a + /// string name that's unique within its DAG. The name is used to identify + /// its output. Nodes that depend on a given node (either directly or + /// indirectly) can access the node's output using its name.", + /// "type": "string" + ///} + /// ``` + ///
#[derive( Clone, Debug, @@ -3459,6 +6964,52 @@ pub mod types { } ///Client view of an [`Organization`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Organization`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Organization { ///human-readable free-form text about a resource @@ -3487,6 +7038,29 @@ pub mod types { ///Create-time parameters for an /// [`Organization`](crate::external_api::views::Organization) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Organization`](crate::external_api::views::Organization)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct OrganizationCreate { pub description: String, @@ -3506,6 +7080,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Organization" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct OrganizationResultsPage { ///list of items on this page of results @@ -3527,6 +7130,21 @@ pub mod types { } } + ///OrganizationRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -3604,6 +7222,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/OrganizationRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct OrganizationRolePolicy { ///Roles directly assigned on this resource @@ -3628,6 +7271,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/OrganizationRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct OrganizationRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -3649,6 +7322,32 @@ pub mod types { ///Updateable properties of an /// [`Organization`](crate::external_api::views::Organization) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of an + /// [`Organization`](crate::external_api::views::Organization)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct OrganizationUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3670,6 +7369,18 @@ pub mod types { } ///Passwords may be subject to additional constraints. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A password used to authenticate a user", + /// "description": "Passwords may be subject to additional constraints.", + /// "type": "string", + /// "maxLength": 512 + ///} + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -3736,6 +7447,62 @@ pub mod types { } ///Client view of a [`PhysicalDisk`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`PhysicalDisk`]", + /// "type": "object", + /// "required": [ + /// "disk_type", + /// "id", + /// "model", + /// "serial", + /// "time_created", + /// "time_modified", + /// "vendor" + /// ], + /// "properties": { + /// "disk_type": { + /// "$ref": "#/components/schemas/PhysicalDiskType" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "model": { + /// "type": "string" + /// }, + /// "serial": { + /// "type": "string" + /// }, + /// "sled_id": { + /// "description": "The sled to which this disk is attached, if any.", + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vendor": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct PhysicalDisk { pub disk_type: PhysicalDiskType, @@ -3766,6 +7533,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/PhysicalDisk" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct PhysicalDiskResultsPage { ///list of items on this page of results @@ -3787,6 +7583,20 @@ pub mod types { } } + ///PhysicalDiskType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "internal", + /// "external" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -3855,6 +7665,57 @@ pub mod types { } ///Client view of a [`Project`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Project`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "organization_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "organization_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Project { ///human-readable free-form text about a resource @@ -3884,6 +7745,28 @@ pub mod types { ///Create-time parameters for a /// [`Project`](crate::external_api::views::Project) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Project`](crate::external_api::views::Project)", "type": "object" + /// , "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ProjectCreate { pub description: String, @@ -3903,6 +7786,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Project" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ProjectResultsPage { ///list of items on this page of results @@ -3924,6 +7836,21 @@ pub mod types { } } + ///ProjectRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -4001,6 +7928,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ProjectRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ProjectRolePolicy { ///Roles directly assigned on this resource @@ -4025,6 +7977,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/ProjectRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ProjectRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -4046,6 +8028,31 @@ pub mod types { ///Updateable properties of a /// [`Project`](crate::external_api::views::Project) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`Project`](crate::external_api::views::Project)", "type": "object" + /// , "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct ProjectUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -4067,6 +8074,38 @@ pub mod types { } ///Client view of an [`Rack`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Rack`]", + /// "type": "object", + /// "required": [ + /// "id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Rack { ///unique, immutable, system-controlled identifier for each resource @@ -4090,6 +8129,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Rack" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct RackResultsPage { ///list of items on this page of results @@ -4112,6 +8180,28 @@ pub mod types { } ///Client view of a [`Role`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Role`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/RoleName" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Role { pub description: String, @@ -4131,6 +8221,19 @@ pub mod types { } ///Role names consist of two string components separated by dot ("."). + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name for a built-in role", + /// "description": "Role names consist of two string components separated + /// by dot (\".\").", "type": "string", + /// "maxLength": 63, + /// "pattern": "[a-z-]+\\.[a-z-]+" + ///} + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -4204,6 +8307,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Role" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct RoleResultsPage { ///list of items on this page of results @@ -4231,6 +8363,97 @@ pub mod types { ///When traffic is to be sent to a destination that is within a given /// `RouteDestination`, the corresponding [`RouterRoute`] applies, and /// traffic will be forward to the [`RouteTarget`] for that rule. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `RouteDestination` is used to match traffic with a + /// routing rule, on the destination of that traffic.\n\nWhen traffic is to + /// be sent to a destination that is within a given `RouteDestination`, the + /// corresponding [`RouterRoute`] applies, and traffic will be forward to + /// the [`RouteTarget`] for that rule.", "oneOf": [ + /// { + /// "description": "Route applies to traffic destined for a specific IP + /// address", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic destined for a specific IP + /// subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic destined for the given + /// VPC.", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type", content = "value")] pub enum RouteDestination { @@ -4268,6 +8491,113 @@ pub mod types { ///A `RouteTarget` describes the possible locations that traffic matching a /// route destination can be sent. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `RouteTarget` describes the possible locations that + /// traffic matching a route destination can be sent.", "oneOf": [ + /// { + /// "description": "Forward traffic to a particular IP address.", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a VPC", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a VPC Subnet", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a specific instance", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to an internet gateway", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "internet_gateway" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type", content = "value")] pub enum RouteTarget { @@ -4302,6 +8632,75 @@ pub mod types { ///A route defines a rule that governs where traffic should be sent based /// on its destination. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A route defines a rule that governs where traffic + /// should be sent based on its destination.", "type": "object", + /// "required": [ + /// "description", + /// "destination", + /// "id", + /// "kind", + /// "name", + /// "target", + /// "time_created", + /// "time_modified", + /// "vpc_router_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "kind": { + /// "description": "Describes the kind of router. Set at creation. + /// `read-only`", "allOf": [ + /// { + /// "$ref": "#/components/schemas/RouterRouteKind" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_router_id": { + /// "description": "The VPC Router to which the route belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct RouterRoute { ///human-readable free-form text about a resource @@ -4335,6 +8734,36 @@ pub mod types { } ///Create-time parameters for a [`RouterRoute`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a [`RouterRoute`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "destination", + /// "name", + /// "target" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct RouterRouteCreateParams { pub description: String, @@ -4360,6 +8789,48 @@ pub mod types { /// and describes how or where the route was created. /// ///See [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The classification of a [`RouterRoute`] as defined by the system. The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created.\n\nSee [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context", + /// "oneOf": [ + /// { + /// "description": "Determines the default destination of traffic, such + /// as whether it goes to the internet or not.\n\n`Destination: An Internet + /// Gateway` `Modifiable: true`", "type": "string", + /// "enum": [ + /// "default" + /// ] + /// }, + /// { + /// "description": "Automatically added for each VPC Subnet in the + /// VPC\n\n`Destination: A VPC Subnet` `Modifiable: false`", "type" + /// : "string", "enum": [ + /// "vpc_subnet" + /// ] + /// }, + /// { + /// "description": "Automatically added when VPC peering is + /// established\n\n`Destination: A different VPC` `Modifiable: false`", + /// "type": "string", + /// "enum": [ + /// "vpc_peering" + /// ] + /// }, + /// { + /// "description": "Created by a user See + /// [`RouteTarget`]\n\n`Destination: User defined` `Modifiable: true`", + /// "type": "string", + /// "enum": [ + /// "custom" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -4449,6 +8920,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/RouterRoute" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct RouterRouteResultsPage { ///list of items on this page of results @@ -4471,6 +8971,41 @@ pub mod types { } ///Updateable properties of a [`RouterRoute`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a [`RouterRoute`]", + /// "type": "object", + /// "required": [ + /// "destination", + /// "target" + /// ], + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct RouterRouteUpdateParams { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -4493,6 +9028,29 @@ pub mod types { } } + ///Saga + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "state" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/SagaState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Saga { pub id: uuid::Uuid, @@ -4511,6 +9069,101 @@ pub mod types { } } + ///SagaErrorInfo + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "source_error" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "action_failed" + /// ] + /// }, + /// "source_error": {} + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "deserialize_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "injected_error" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "serialize_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "subsaga_create_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "error")] pub enum SagaErrorInfo { @@ -4533,6 +9186,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Saga" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SagaResultsPage { ///list of items on this page of results @@ -4554,6 +9236,67 @@ pub mod types { } } + ///SagaState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "running" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "succeeded" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error_info", + /// "error_node_name", + /// "state" + /// ], + /// "properties": { + /// "error_info": { + /// "$ref": "#/components/schemas/SagaErrorInfo" + /// }, + /// "error_node_name": { + /// "$ref": "#/components/schemas/NodeName" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "failed" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "state")] pub enum SagaState { @@ -4576,6 +9319,84 @@ pub mod types { ///Identity-related metadata that's included in nearly all public API /// objects + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in nearly all + /// public API objects", "type": "object", + /// "required": [ + /// "acs_url", + /// "description", + /// "id", + /// "idp_entity_id", + /// "name", + /// "slo_url", + /// "sp_client_id", + /// "technical_contact_email", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "acs_url": { + /// "description": "service provider endpoint where the response will + /// be sent", "type": "string" + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "idp_entity_id": { + /// "description": "idp's entity id", + /// "type": "string" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "public_cert": { + /// "description": "optional request signing public certificate (base64 + /// encoded der file)", "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "slo_url": { + /// "description": "service provider endpoint where the idp should send + /// log out requests", "type": "string" + /// }, + /// "sp_client_id": { + /// "description": "sp's client id", + /// "type": "string" + /// }, + /// "technical_contact_email": { + /// "description": "customer's technical contact for saml + /// configuration", "type": "string" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SamlIdentityProvider { ///service provider endpoint where the response will be sent @@ -4617,6 +9438,79 @@ pub mod types { } ///Create-time identity-related parameters + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time identity-related parameters", + /// "type": "object", + /// "required": [ + /// "acs_url", + /// "description", + /// "idp_entity_id", + /// "idp_metadata_source", + /// "name", + /// "slo_url", + /// "sp_client_id", + /// "technical_contact_email" + /// ], + /// "properties": { + /// "acs_url": { + /// "description": "service provider endpoint where the response will + /// be sent", "type": "string" + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "group_attribute_name": { + /// "description": "If set, SAML attributes with this name will be + /// considered to denote a user's group membership, where the attribute + /// value(s) should be a comma-separated list of group names.", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "idp_entity_id": { + /// "description": "idp's entity id", + /// "type": "string" + /// }, + /// "idp_metadata_source": { + /// "description": "the source of an identity provider metadata + /// descriptor", "allOf": [ + /// { + /// "$ref": "#/components/schemas/IdpMetadataSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "signing_keypair": { + /// "description": "optional request signing key pair", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DerEncodedKeyPair" + /// } + /// ] + /// }, + /// "slo_url": { + /// "description": "service provider endpoint where the idp should send + /// log out requests", "type": "string" + /// }, + /// "sp_client_id": { + /// "description": "sp's client id", + /// "type": "string" + /// }, + /// "technical_contact_email": { + /// "description": "customer's technical contact for saml + /// configuration", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SamlIdentityProviderCreate { ///service provider endpoint where the response will be sent @@ -4655,6 +9549,17 @@ pub mod types { } } + ///SemverVersion + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "pattern": "^\\d+\\.\\d+\\.\\d+([\\-\\+].+)?$" + ///} + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -4725,6 +9630,24 @@ pub mod types { } ///The service intended to use this certificate. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The service intended to use this certificate.", + /// "oneOf": [ + /// { + /// "description": "This certificate is intended for access to the + /// external API.", "type": "string", + /// "enum": [ + /// "external_api" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -4790,6 +9713,66 @@ pub mod types { } ///Client view of a ['Silo'] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a ['Silo']", + /// "type": "object", + /// "required": [ + /// "description", + /// "discoverable", + /// "id", + /// "identity_mode", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "discoverable": { + /// "description": "A silo where discoverable is false can be retrieved only by its id - it will not be part of the \"list all silos\" output.", + /// "type": "boolean" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "identity_mode": { + /// "description": "How users and groups are managed in this Silo", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SiloIdentityMode" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Silo { ///human-readable free-form text about a resource @@ -4822,6 +9805,48 @@ pub mod types { } ///Create-time parameters for a [`Silo`](crate::external_api::views::Silo) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Silo`](crate::external_api::views::Silo)", "type": "object", + /// "required": [ + /// "description", + /// "discoverable", + /// "identity_mode", + /// "name" + /// ], + /// "properties": { + /// "admin_group_name": { + /// "description": "If set, this group will be created during Silo + /// creation and granted the \"Silo Admin\" role. Identity providers can + /// assert that users belong to this group and those users can log in and + /// further initialize the Silo.\n\nNote that if configuring a SAML based + /// identity provider, group_attribute_name must be set for users to be + /// considered part of a group. See [`SamlIdentityProviderCreate`] for more + /// information.", "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "discoverable": { + /// "type": "boolean" + /// }, + /// "identity_mode": { + /// "$ref": "#/components/schemas/SiloIdentityMode" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SiloCreate { ///If set, this group will be created during Silo creation and granted @@ -4854,6 +9879,34 @@ pub mod types { ///Describes how identities are managed and users are authenticated in this /// Silo + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes how identities are managed and users are + /// authenticated in this Silo", "oneOf": [ + /// { + /// "description": "Users are authenticated with SAML using an external + /// authentication provider. The system updates information about users and + /// groups only during successful authentication (i.e,. \"JIT provisioning\" + /// of users and groups).", "type": "string", + /// "enum": [ + /// "saml_jit" + /// ] + /// }, + /// { + /// "description": "The system is the source of truth about users. + /// There is no linkage to an external authentication provider or identity + /// provider.", "type": "string", + /// "enum": [ + /// "local_only" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -4928,6 +9981,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Silo" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SiloResultsPage { ///list of items on this page of results @@ -4949,6 +10031,21 @@ pub mod types { } } + ///SiloRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -5026,6 +10123,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SiloRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SiloRolePolicy { ///Roles directly assigned on this resource @@ -5050,6 +10172,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/SiloRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SiloRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -5070,6 +10222,46 @@ pub mod types { } ///Client view of a [`Sled`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Sled`]", + /// "type": "object", + /// "required": [ + /// "baseboard", + /// "id", + /// "service_address", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "baseboard": { + /// "$ref": "#/components/schemas/Baseboard" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "service_address": { + /// "type": "string" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Sled { pub baseboard: Baseboard, @@ -5095,6 +10287,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Sled" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SledResultsPage { ///list of items on this page of results @@ -5117,6 +10338,70 @@ pub mod types { } ///Client view of a Snapshot + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a Snapshot", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk_id", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "state", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "disk_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/SnapshotState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Snapshot { ///human-readable free-form text about a resource @@ -5149,6 +10434,38 @@ pub mod types { ///Create-time parameters for a /// [`Snapshot`](crate::external_api::views::Snapshot) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Snapshot`](crate::external_api::views::Snapshot)", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk": { + /// "description": "The name of the disk to be snapshotted", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SnapshotCreate { pub description: String, @@ -5170,6 +10487,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Snapshot" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SnapshotResultsPage { ///list of items on this page of results @@ -5191,6 +10537,22 @@ pub mod types { } } + ///SnapshotState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "creating", + /// "ready", + /// "faulted", + /// "destroyed" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -5266,6 +10628,24 @@ pub mod types { } } + ///SpoofLoginBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "username" + /// ], + /// "properties": { + /// "username": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SpoofLoginBody { pub username: String, @@ -5284,6 +10664,63 @@ pub mod types { } ///Client view of a [`SshKey`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`SshKey`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "public_key", + /// "silo_user_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "public_key": { + /// "description": "SSH public key, e.g., `\"ssh-ed25519 + /// AAAAC3NzaC...\"`", "type": "string" + /// }, + /// "silo_user_id": { + /// "description": "The user to whom this key belongs", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SshKey { ///human-readable free-form text about a resource @@ -5316,6 +10753,33 @@ pub mod types { ///Create-time parameters for an /// [`SshKey`](crate::external_api::views::SshKey) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`SshKey`](crate::external_api::views::SshKey)", "type": "object", + /// "required": [ + /// "description", + /// "name", + /// "public_key" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "public_key": { + /// "description": "SSH public key, e.g., `\"ssh-ed25519 + /// AAAAC3NzaC...\"`", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SshKeyCreate { pub description: String, @@ -5337,6 +10801,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SshKey" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SshKeyResultsPage { ///list of items on this page of results @@ -5358,6 +10851,21 @@ pub mod types { } } + ///SystemMetricName + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "virtual_disk_space_provisioned", + /// "cpus_provisioned", + /// "ram_provisioned" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -5431,6 +10939,43 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "id", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SystemUpdate { ///unique, immutable, system-controlled identifier for each resource @@ -5455,6 +11000,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SystemUpdate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SystemUpdateResultsPage { ///list of items on this page of results @@ -5476,6 +11050,24 @@ pub mod types { } } + ///SystemUpdateStart + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "version" + /// ], + /// "properties": { + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SystemUpdateStart { pub version: SemverVersion, @@ -5493,6 +11085,28 @@ pub mod types { } } + ///SystemVersion + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "status", + /// "version_range" + /// ], + /// "properties": { + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "version_range": { + /// "$ref": "#/components/schemas/VersionRange" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct SystemVersion { pub status: UpdateStatus, @@ -5514,6 +11128,21 @@ pub mod types { ///Names are constructed by concatenating the target and metric names with /// ':'. Target and metric names must be lowercase alphanumeric characters /// with '_' separating words. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "The name of a timeseries", + /// "description": "Names are constructed by concatenating the target and + /// metric names with ':'. Target and metric names must be lowercase + /// alphanumeric characters with '_' separating words.", + /// "type": "string", + /// "pattern": + /// "(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*):(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*)" + /// } + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -5591,6 +11220,41 @@ pub mod types { /// ///This includes the name of the timeseries, as well as the datum type of /// its metric and the schema for each field. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The schema for a timeseries.\n\nThis includes the name + /// of the timeseries, as well as the datum type of its metric and the + /// schema for each field.", "type": "object", + /// "required": [ + /// "created", + /// "datum_type", + /// "field_schema", + /// "timeseries_name" + /// ], + /// "properties": { + /// "created": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "datum_type": { + /// "$ref": "#/components/schemas/DatumType" + /// }, + /// "field_schema": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FieldSchema" + /// } + /// }, + /// "timeseries_name": { + /// "$ref": "#/components/schemas/TimeseriesName" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct TimeseriesSchema { pub created: chrono::DateTime, @@ -5612,6 +11276,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/TimeseriesSchema" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct TimeseriesSchemaResultsPage { ///list of items on this page of results @@ -5635,6 +11328,47 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "id", + /// "status", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UpdateDeployment { ///unique, immutable, system-controlled identifier for each resource @@ -5660,6 +11394,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UpdateDeployment" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UpdateDeploymentResultsPage { ///list of items on this page of results @@ -5681,6 +11444,45 @@ pub mod types { } } + ///UpdateStatus + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "status" + /// ], + /// "properties": { + /// "status": { + /// "type": "string", + /// "enum": [ + /// "updating" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "status" + /// ], + /// "properties": { + /// "status": { + /// "type": "string", + /// "enum": [ + /// "steady" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -5751,6 +11553,59 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "component_type", + /// "device_id", + /// "id", + /// "status", + /// "system_version", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "component_type": { + /// "$ref": "#/components/schemas/UpdateableComponentType" + /// }, + /// "device_id": { + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "system_version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UpdateableComponent { pub component_type: UpdateableComponentType, @@ -5779,6 +11634,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UpdateableComponent" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UpdateableComponentResultsPage { ///list of items on this page of results @@ -5800,6 +11684,30 @@ pub mod types { } } + ///UpdateableComponentType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "bootloader_for_rot", + /// "bootloader_for_sp", + /// "bootloader_for_host_proc", + /// "hubris_for_psc_rot", + /// "hubris_for_psc_sp", + /// "hubris_for_sidecar_rot", + /// "hubris_for_sidecar_sp", + /// "hubris_for_gimlet_rot", + /// "hubris_for_gimlet_sp", + /// "helios_host_phase1", + /// "helios_host_phase2", + /// "host_omicron" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -5908,6 +11816,36 @@ pub mod types { } ///Client view of a [`User`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`User`]", + /// "type": "object", + /// "required": [ + /// "display_name", + /// "id", + /// "silo_id" + /// ], + /// "properties": { + /// "display_name": { + /// "description": "Human-readable name that can identify the user", + /// "type": "string" + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "silo_id": { + /// "description": "Uuid of the silo to which this user belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct User { ///Human-readable name that can identify the user @@ -5930,6 +11868,52 @@ pub mod types { } ///Client view of a [`UserBuiltin`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`UserBuiltin`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UserBuiltin { ///human-readable free-form text about a resource @@ -5957,6 +11941,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UserBuiltin" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UserBuiltinResultsPage { ///list of items on this page of results @@ -5979,6 +11992,38 @@ pub mod types { } ///Create-time parameters for a [`User`](crate::external_api::views::User) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`User`](crate::external_api::views::User)", "type": "object", + /// "required": [ + /// "external_id", + /// "password" + /// ], + /// "properties": { + /// "external_id": { + /// "description": "username used to log in", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/UserId" + /// } + /// ] + /// }, + /// "password": { + /// "description": "password used to log in", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/UserPassword" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UserCreate { ///username used to log in @@ -6002,6 +12047,22 @@ pub mod types { ///Names must begin with a lower case ASCII letter, be composed exclusively /// of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end /// with a '-'. Names cannot be a UUID though they may contain a UUID. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name unique within the parent collection", + /// "description": "Names must begin with a lower case ASCII letter, be + /// composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and + /// '-', and may not end with a '-'. Names cannot be a UUID though they may + /// contain a UUID.", "type": "string", + /// "maxLength": 63, + /// "pattern": + /// "^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z][a-z0-9-]* + /// [a-zA-Z0-9]$" } + /// ``` + ///
#[derive( Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, schemars :: JsonSchema, )] @@ -6069,6 +12130,51 @@ pub mod types { } ///Parameters for setting a user's password + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for setting a user's password", + /// "oneOf": [ + /// { + /// "description": "Sets the user's password to the provided value", + /// "type": "object", + /// "required": [ + /// "details", + /// "user_password_value" + /// ], + /// "properties": { + /// "details": { + /// "$ref": "#/components/schemas/Password" + /// }, + /// "user_password_value": { + /// "type": "string", + /// "enum": [ + /// "password" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Invalidates any current password (disabling + /// password authentication)", "type": "object", + /// "required": [ + /// "user_password_value" + /// ], + /// "properties": { + /// "user_password_value": { + /// "type": "string", + /// "enum": [ + /// "invalid_password" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "user_password_value", content = "details")] pub enum UserPassword { @@ -6092,6 +12198,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/User" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UserResultsPage { ///list of items on this page of results @@ -6114,6 +12249,28 @@ pub mod types { } ///Credentials for local user login + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Credentials for local user login", + /// "type": "object", + /// "required": [ + /// "password", + /// "username" + /// ], + /// "properties": { + /// "password": { + /// "$ref": "#/components/schemas/Password" + /// }, + /// "username": { + /// "$ref": "#/components/schemas/UserId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct UsernamePasswordCredentials { pub password: Password, @@ -6132,6 +12289,28 @@ pub mod types { } } + ///VersionRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "high", + /// "low" + /// ], + /// "properties": { + /// "high": { + /// "$ref": "#/components/schemas/SemverVersion" + /// }, + /// "low": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VersionRange { pub high: SemverVersion, @@ -6151,6 +12330,82 @@ pub mod types { } ///Client view of a [`Vpc`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Vpc`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "dns_name", + /// "id", + /// "ipv6_prefix", + /// "name", + /// "project_id", + /// "system_router_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "dns_name": { + /// "description": "The name used for the VPC in DNS.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "ipv6_prefix": { + /// "description": "The unique local IPv6 address range for subnets in + /// this VPC", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "id for the project containing this VPC", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "system_router_id": { + /// "description": "id for the system router where subnet default + /// routes are registered", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Vpc { ///human-readable free-form text about a resource @@ -6186,6 +12441,42 @@ pub mod types { } ///Create-time parameters for a [`Vpc`](crate::external_api::views::Vpc) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Vpc`](crate::external_api::views::Vpc)", "type": "object", + /// "required": [ + /// "description", + /// "dns_name", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "dns_name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "ipv6_prefix": { + /// "description": "The IPv6 prefix for this VPC.\n\nAll IPv6 subnets + /// created from this VPC must be taken from this range, which sould be a + /// Unique Local Address in the range `fd00::/48`. The default VPC Subnet + /// will have the first `/64` range from this prefix.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcCreate { pub description: String, @@ -6214,6 +12505,109 @@ pub mod types { } ///A single rule in a VPC firewall + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single rule in a VPC firewall", + /// "type": "object", + /// "required": [ + /// "action", + /// "description", + /// "direction", + /// "filters", + /// "id", + /// "name", + /// "priority", + /// "status", + /// "targets", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "action": { + /// "description": "whether traffic matching the rule should be allowed + /// or dropped", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleAction" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "direction": { + /// "description": "whether this rule is for incoming or outgoing + /// traffic", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleDirection" + /// } + /// ] + /// }, + /// "filters": { + /// "description": "reductions on the scope of the rule", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleFilter" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "priority": { + /// "description": "the relative priority of this rule", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// }, + /// "status": { + /// "description": "whether this rule is in effect", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleStatus" + /// } + /// ] + /// }, + /// "targets": { + /// "description": "list of sets of instances that the rule applies + /// to", "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleTarget" + /// } + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "the VPC to which this rule belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcFirewallRule { ///whether traffic matching the rule should be allowed or dropped @@ -6254,6 +12648,20 @@ pub mod types { } } + ///VpcFirewallRuleAction + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "allow", + /// "deny" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -6321,6 +12729,20 @@ pub mod types { } } + ///VpcFirewallRuleDirection + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "inbound", + /// "outbound" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -6391,6 +12813,50 @@ pub mod types { ///Filter for a firewall rule. A given packet must match every field that /// is present for the rule to apply to it. A packet matches a field if any /// entry in that field matches the packet. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Filter for a firewall rule. A given packet must match + /// every field that is present for the rule to apply to it. A packet + /// matches a field if any entry in that field matches the packet.", + /// "type": "object", + /// "properties": { + /// "hosts": { + /// "description": "If present, the sources (if incoming) or + /// destinations (if outgoing) this rule applies to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleHostFilter" + /// } + /// }, + /// "ports": { + /// "description": "If present, the destination ports this rule applies + /// to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/L4PortRange" + /// } + /// }, + /// "protocols": { + /// "description": "If present, the networking protocols this rule + /// applies to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleProtocol" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcFirewallRuleFilter { ///If present, the sources (if incoming) or destinations (if outgoing) @@ -6419,6 +12885,114 @@ pub mod types { ///The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis /// of its source or destination host. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The `VpcFirewallRuleHostFilter` is used to filter + /// traffic on the basis of its source or destination host.", + /// "oneOf": [ + /// { + /// "description": "The rule applies to traffic from/to all instances + /// in the VPC", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to all instances + /// in the VPC Subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to this specific + /// instance", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to a specific IP + /// address", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to a specific IP + /// subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type", content = "value")] pub enum VpcFirewallRuleHostFilter { @@ -6458,6 +13032,21 @@ pub mod types { } ///The protocols that may be specified in a firewall rule's filter + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The protocols that may be specified in a firewall + /// rule's filter", "type": "string", + /// "enum": [ + /// "TCP", + /// "UDP", + /// "ICMP" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -6529,6 +13118,20 @@ pub mod types { } } + ///VpcFirewallRuleStatus + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "disabled", + /// "enabled" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -6598,6 +13201,113 @@ pub mod types { ///A `VpcFirewallRuleTarget` is used to specify the set of [`Instance`]s to /// which a firewall rule applies. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `VpcFirewallRuleTarget` is used to specify the set of + /// [`Instance`]s to which a firewall rule applies.", "oneOf": [ + /// { + /// "description": "The rule applies to all instances in the VPC", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to all instances in the VPC + /// Subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to this specific instance", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to a specific IP address", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to a specific IP subnet", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type", content = "value")] pub enum VpcFirewallRuleTarget { @@ -6637,6 +13347,85 @@ pub mod types { } ///A single rule in a VPC firewall + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single rule in a VPC firewall", + /// "type": "object", + /// "required": [ + /// "action", + /// "description", + /// "direction", + /// "filters", + /// "name", + /// "priority", + /// "status", + /// "targets" + /// ], + /// "properties": { + /// "action": { + /// "description": "whether traffic matching the rule should be allowed + /// or dropped", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleAction" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "direction": { + /// "description": "whether this rule is for incoming or outgoing + /// traffic", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleDirection" + /// } + /// ] + /// }, + /// "filters": { + /// "description": "reductions on the scope of the rule", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleFilter" + /// } + /// ] + /// }, + /// "name": { + /// "description": "name of the rule, unique to this VPC", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "priority": { + /// "description": "the relative priority of this rule", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// }, + /// "status": { + /// "description": "whether this rule is in effect", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleStatus" + /// } + /// ] + /// }, + /// "targets": { + /// "description": "list of sets of instances that the rule applies + /// to", "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleTarget" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcFirewallRuleUpdate { ///whether traffic matching the rule should be allowed or dropped @@ -6672,6 +13461,28 @@ pub mod types { ///Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules /// are implicitly created along with a Vpc, so there is no explicit /// creation. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a `Vpc`'s firewall Note that + /// VpcFirewallRules are implicitly created along with a Vpc, so there is no + /// explicit creation.", "type": "object", + /// "required": [ + /// "rules" + /// ], + /// "properties": { + /// "rules": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleUpdate" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcFirewallRuleUpdateParams { pub rules: Vec, @@ -6690,6 +13501,27 @@ pub mod types { } ///Collection of a Vpc's firewall rules + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Collection of a Vpc's firewall rules", + /// "type": "object", + /// "required": [ + /// "rules" + /// ], + /// "properties": { + /// "rules": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRule" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcFirewallRules { pub rules: Vec, @@ -6708,6 +13540,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Vpc" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcResultsPage { ///list of items on this page of results @@ -6731,6 +13592,63 @@ pub mod types { ///A VPC router defines a series of rules that indicate where traffic /// should be sent depending on its destination. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A VPC router defines a series of rules that indicate + /// where traffic should be sent depending on its destination.", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "kind", + /// "name", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "kind": { + /// "$ref": "#/components/schemas/VpcRouterKind" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the router belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcRouter { ///human-readable free-form text about a resource @@ -6762,6 +13680,29 @@ pub mod types { ///Create-time parameters for a /// [`VpcRouter`](crate::external_api::views::VpcRouter) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`VpcRouter`](crate::external_api::views::VpcRouter)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcRouterCreate { pub description: String, @@ -6780,6 +13721,20 @@ pub mod types { } } + ///VpcRouterKind + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "system", + /// "custom" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -6848,6 +13803,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcRouter" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcRouterResultsPage { ///list of items on this page of results @@ -6871,6 +13855,32 @@ pub mod types { ///Updateable properties of a /// [`VpcRouter`](crate::external_api::views::VpcRouter) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`VpcRouter`](crate::external_api::views::VpcRouter)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcRouterUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -6894,6 +13904,77 @@ pub mod types { ///A VPC subnet represents a logical grouping for instances that allows /// network traffic between them, within a IPv4 subnetwork or optionall an /// IPv6 subnetwork. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A VPC subnet represents a logical grouping for + /// instances that allows network traffic between them, within a IPv4 + /// subnetwork or optionall an IPv6 subnetwork.", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "ipv4_block", + /// "ipv6_block", + /// "name", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "ipv4_block": { + /// "description": "The IPv4 subnet CIDR block.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// "ipv6_block": { + /// "description": "The IPv6 subnet CIDR block.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the subnet belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcSubnet { ///human-readable free-form text about a resource @@ -6928,6 +14009,50 @@ pub mod types { ///Create-time parameters for a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`VpcSubnet`](crate::external_api::views::VpcSubnet)", + /// "type": "object", + /// "required": [ + /// "description", + /// "ipv4_block", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "ipv4_block": { + /// "description": "The IPv4 address range for this subnet.\n\nIt must + /// be allocated from an RFC 1918 private address range, and must not + /// overlap with any other existing subnet in the VPC.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// "ipv6_block": { + /// "description": "The IPv6 address range for this subnet.\n\nIt must + /// be allocated from the RFC 4193 Unique Local Address range, with the + /// prefix equal to the parent VPC's prefix. A random `/64` block will be + /// assigned if one is not provided. It must not overlap with any existing + /// subnet in the VPC.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcSubnetCreate { pub description: String, @@ -6960,6 +14085,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcSubnet" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcSubnetResultsPage { ///list of items on this page of results @@ -6983,6 +14137,32 @@ pub mod types { ///Updateable properties of a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`VpcSubnet`](crate::external_api::views::VpcSubnet)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcSubnetUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -7004,6 +14184,38 @@ pub mod types { } ///Updateable properties of a [`Vpc`](crate::external_api::views::Vpc) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`Vpc`](crate::external_api::views::Vpc)", "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "dns_name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct VpcUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/progenitor-impl/tests/output/nexus-cli.out b/progenitor-impl/tests/output/nexus-cli.out index 3d94453..6eacbc9 100644 --- a/progenitor-impl/tests/output/nexus-cli.out +++ b/progenitor-impl/tests/output/nexus-cli.out @@ -13429,7 +13429,6 @@ pub trait CliOverride { } impl CliOverride for () {} - #[derive(Copy, Clone, Debug)] pub enum CliCommand { DiskViewById, diff --git a/progenitor-impl/tests/output/nexus-positional.out b/progenitor-impl/tests/output/nexus-positional.out index 6065284..e284982 100644 --- a/progenitor-impl/tests/output/nexus-positional.out +++ b/progenitor-impl/tests/output/nexus-positional.out @@ -8,6 +8,33 @@ pub mod types { #[allow(unused_imports)] use std::convert::TryFrom; ///Describes properties that should uniquely identify a Gimlet. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes properties that should uniquely identify a + /// Gimlet.", "type": "object", + /// "required": [ + /// "part", + /// "revision", + /// "serial" + /// ], + /// "properties": { + /// "part": { + /// "type": "string" + /// }, + /// "revision": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "serial": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Baseboard { pub part: String, @@ -26,6 +53,84 @@ pub mod types { ///This type supports ranges similar to the `RangeTo`, `Range` and /// `RangeFrom` types in the standard library. Those cover `(..end)`, /// `(start..end)`, and `(start..)` respectively. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A type storing a range over `T`.\n\nThis type supports + /// ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the + /// standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` + /// respectively.", "oneOf": [ + /// { + /// "description": "A range unbounded below and exclusively above, + /// `..end`.", "type": "object", + /// "required": [ + /// "end", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_to" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and exclusively + /// above, `start..end`.", "type": "object", + /// "required": [ + /// "end", + /// "start", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "number", + /// "format": "double" + /// }, + /// "start": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and unbounded + /// above, `start..`.", "type": "object", + /// "required": [ + /// "start", + /// "type" + /// ], + /// "properties": { + /// "start": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_from" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum BinRangedouble { @@ -52,6 +157,84 @@ pub mod types { ///This type supports ranges similar to the `RangeTo`, `Range` and /// `RangeFrom` types in the standard library. Those cover `(..end)`, /// `(start..end)`, and `(start..)` respectively. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A type storing a range over `T`.\n\nThis type supports + /// ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the + /// standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` + /// respectively.", "oneOf": [ + /// { + /// "description": "A range unbounded below and exclusively above, + /// `..end`.", "type": "object", + /// "required": [ + /// "end", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_to" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and exclusively + /// above, `start..end`.", "type": "object", + /// "required": [ + /// "end", + /// "start", + /// "type" + /// ], + /// "properties": { + /// "end": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "start": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "A range bounded inclusively below and unbounded + /// above, `start..`.", "type": "object", + /// "required": [ + /// "start", + /// "type" + /// ], + /// "properties": { + /// "start": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "range_from" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum BinRangeint64 { @@ -74,6 +257,36 @@ pub mod types { } ///Type storing bin edges and a count of samples within it. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Type storing bin edges and a count of samples within + /// it.", "type": "object", + /// "required": [ + /// "count", + /// "range" + /// ], + /// "properties": { + /// "count": { + /// "description": "The total count of samples in this bin.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "range": { + /// "description": "The range of the support covered by this bin.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BinRangedouble" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Bindouble { ///The total count of samples in this bin. @@ -89,6 +302,36 @@ pub mod types { } ///Type storing bin edges and a count of samples within it. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Type storing bin edges and a count of samples within + /// it.", "type": "object", + /// "required": [ + /// "count", + /// "range" + /// ], + /// "properties": { + /// "count": { + /// "description": "The total count of samples in this bin.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "range": { + /// "description": "The range of the support covered by this bin.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BinRangeint64" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Binint64 { ///The total count of samples in this bin. @@ -103,6 +346,22 @@ pub mod types { } } + ///BlockSize + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "disk block size in bytes", + /// "type": "integer", + /// "enum": [ + /// 512, + /// 2048, + /// 4096 + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Serialize)] pub struct BlockSize(i64); impl std::ops::Deref for BlockSize { @@ -152,6 +411,23 @@ pub mod types { /// infallible, but an i64 constructor can fail (if the value is negative) /// and a u64 constructor can fail (if the value is larger than i64::MAX). /// We provide all of these for consumers' convenience. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A count of bytes, typically used either for memory or + /// storage capacity\n\nThe maximum supported byte count is [`i64::MAX`]. + /// This makes it somewhat inconvenient to define constructors: a u32 + /// constructor can be infallible, but an i64 constructor can fail (if the + /// value is negative) and a u64 constructor can fail (if the value is + /// larger than i64::MAX). We provide all of these for consumers' + /// convenience.", "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ByteCount(pub u64); impl std::ops::Deref for ByteCount { @@ -214,6 +490,56 @@ pub mod types { } ///Client view of a [`Certificate`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Certificate`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "service", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "service": { + /// "$ref": "#/components/schemas/ServiceUsingCertificate" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Certificate { ///human-readable free-form text about a resource @@ -237,6 +563,58 @@ pub mod types { ///Create-time parameters for a /// [`Certificate`](crate::external_api::views::Certificate) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Certificate`](crate::external_api::views::Certificate)", + /// "type": "object", + /// "required": [ + /// "cert", + /// "description", + /// "key", + /// "name", + /// "service" + /// ], + /// "properties": { + /// "cert": { + /// "description": "PEM file containing public certificate chain", + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "key": { + /// "description": "PEM file containing private key", + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "service": { + /// "description": "The service using this certificate", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ServiceUsingCertificate" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct CertificateCreate { ///PEM file containing public certificate chain @@ -256,6 +634,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Certificate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct CertificateResultsPage { ///list of items on this page of results @@ -273,6 +680,47 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "component_type", + /// "id", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "component_type": { + /// "$ref": "#/components/schemas/UpdateableComponentType" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ComponentUpdate { pub component_type: UpdateableComponentType, @@ -292,6 +740,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ComponentUpdate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ComponentUpdateResultsPage { ///list of items on this page of results @@ -308,6 +785,30 @@ pub mod types { } ///A cumulative or counter data type. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A cumulative or counter data type.", + /// "type": "object", + /// "required": [ + /// "start_time", + /// "value" + /// ], + /// "properties": { + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "value": { + /// "type": "number", + /// "format": "double" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cumulativedouble { pub start_time: chrono::DateTime, @@ -321,6 +822,30 @@ pub mod types { } ///A cumulative or counter data type. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A cumulative or counter data type.", + /// "type": "object", + /// "required": [ + /// "start_time", + /// "value" + /// ], + /// "properties": { + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "value": { + /// "type": "integer", + /// "format": "int64" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cumulativeint64 { pub start_time: chrono::DateTime, @@ -334,6 +859,186 @@ pub mod types { } ///A `Datum` is a single sampled data point from a metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `Datum` is a single sampled data point from a + /// metric.", "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "boolean" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "bool" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "integer", + /// "format": "int64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "number", + /// "format": "double" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "f64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "string" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "type": "array", + /// "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "bytes" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Cumulativeint64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "cumulative_i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Cumulativedouble" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "cumulative_f64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Histogramint64" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "histogram_i64" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "datum", + /// "type" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Histogramdouble" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "histogram_f64" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "datum")] pub enum Datum { @@ -412,6 +1117,27 @@ pub mod types { } ///The type of an individual datum of a metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The type of an individual datum of a metric.", + /// "type": "string", + /// "enum": [ + /// "bool", + /// "i64", + /// "f64", + /// "string", + /// "bytes", + /// "cumulative_i64", + /// "cumulative_f64", + /// "histogram_i64", + /// "histogram_f64" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum DatumType { #[serde(rename = "bool")] @@ -495,6 +1221,30 @@ pub mod types { } } + ///DerEncodedKeyPair + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "private_key", + /// "public_cert" + /// ], + /// "properties": { + /// "private_key": { + /// "description": "request signing private key (base64 encoded der + /// file)", "type": "string" + /// }, + /// "public_cert": { + /// "description": "request signing public certificate (base64 encoded + /// der file)", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DerEncodedKeyPair { ///request signing private key (base64 encoded der file) @@ -509,6 +1259,33 @@ pub mod types { } } + ///DeviceAccessTokenRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "client_id", + /// "device_code", + /// "grant_type" + /// ], + /// "properties": { + /// "client_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "device_code": { + /// "type": "string" + /// }, + /// "grant_type": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAccessTokenRequest { pub client_id: uuid::Uuid, @@ -522,6 +1299,25 @@ pub mod types { } } + ///DeviceAuthRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "client_id" + /// ], + /// "properties": { + /// "client_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAuthRequest { pub client_id: uuid::Uuid, @@ -533,6 +1329,24 @@ pub mod types { } } + ///DeviceAuthVerify + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "user_code" + /// ], + /// "properties": { + /// "user_code": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAuthVerify { pub user_code: String, @@ -544,6 +1358,35 @@ pub mod types { } } + ///Digest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "sha256" + /// ] + /// }, + /// "value": { + /// "type": "string" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum Digest { @@ -558,6 +1401,87 @@ pub mod types { } ///Client view of a [`Disk`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Disk`]", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "device_path", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "state", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "block_size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "device_path": { + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "image_id": { + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "snapshot_id": { + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/DiskState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Disk { pub block_size: ByteCount, @@ -589,6 +1513,46 @@ pub mod types { ///Create-time parameters for a /// [`Disk`](omicron_common::api::external::Disk) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Disk`](omicron_common::api::external::Disk)", "type": "object", + /// "required": [ + /// "description", + /// "disk_source", + /// "name", + /// "size" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk_source": { + /// "description": "initial source for this disk", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DiskSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "size": { + /// "description": "total size of the Disk in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskCreate { pub description: String, @@ -608,6 +1572,25 @@ pub mod types { ///TODO-v1: Delete this Parameters for the /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached /// to an instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "TODO-v1: Delete this Parameters for the + /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached + /// to an instance", "type": "object", + /// "required": [ + /// "name" + /// ], + /// "properties": { + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskIdentifier { pub name: Name, @@ -619,6 +1602,24 @@ pub mod types { } } + ///DiskMetricName + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "activated", + /// "flush", + /// "read", + /// "read_bytes", + /// "write", + /// "write_bytes" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum DiskMetricName { #[serde(rename = "activated")] @@ -690,6 +1691,24 @@ pub mod types { } } + ///DiskPath + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disk" + /// ], + /// "properties": { + /// "disk": { + /// "$ref": "#/components/schemas/NameOrId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskPath { pub disk: NameOrId, @@ -702,6 +1721,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Disk" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskResultsPage { ///list of items on this page of results @@ -718,6 +1766,101 @@ pub mod types { } ///Different sources for a disk + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Different sources for a disk", + /// "oneOf": [ + /// { + /// "description": "Create a blank disk", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks for this Disk. valid values are: + /// 512, 2048, or 4096", "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "blank" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a disk snapshot", + /// "type": "object", + /// "required": [ + /// "snapshot_id", + /// "type" + /// ], + /// "properties": { + /// "snapshot_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "snapshot" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a project image", + /// "type": "object", + /// "required": [ + /// "image_id", + /// "type" + /// ], + /// "properties": { + /// "image_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "image" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Create a disk from a global image", + /// "type": "object", + /// "required": [ + /// "image_id", + /// "type" + /// ], + /// "properties": { + /// "image_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "global_image" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum DiskSource { @@ -746,6 +1889,137 @@ pub mod types { } ///State of a Disk (primarily: attached or not) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "State of a Disk (primarily: attached or not)", + /// "oneOf": [ + /// { + /// "description": "Disk is being initialized", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "creating" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is ready but detached from any Instance", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "detached" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is being attached to the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "attaching" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is attached to the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "attached" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is being detached from the given Instance", + /// "type": "object", + /// "required": [ + /// "instance", + /// "state" + /// ], + /// "properties": { + /// "instance": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "detaching" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk has been destroyed", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "destroyed" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Disk is unavailable", + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "faulted" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "state", content = "instance")] pub enum DiskState { @@ -775,6 +2049,34 @@ pub mod types { } ///OS image distribution + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "OS image distribution", + /// "type": "object", + /// "required": [ + /// "name", + /// "version" + /// ], + /// "properties": { + /// "name": { + /// "description": "The name of the distribution (e.g. \"alpine\" or + /// \"ubuntu\")", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "version": { + /// "description": "The version of the distribution (e.g. \"3.10\" or + /// \"18.04\")", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Distribution { ///The name of the distribution (e.g. "alpine" or "ubuntu") @@ -790,6 +2092,31 @@ pub mod types { } ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -804,6 +2131,29 @@ pub mod types { } } + ///ExternalIp + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "ip", + /// "kind" + /// ], + /// "properties": { + /// "ip": { + /// "type": "string", + /// "format": "ip" + /// }, + /// "kind": { + /// "$ref": "#/components/schemas/IpKind" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ExternalIp { pub ip: std::net::IpAddr, @@ -817,6 +2167,40 @@ pub mod types { } ///Parameters for creating an external IP address for instances. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for creating an external IP address for + /// instances.", "oneOf": [ + /// { + /// "description": "An IP address providing both inbound and outbound + /// access. The address is automatically-assigned from the provided IP Pool, + /// or all available pools if not specified.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "pool_name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ephemeral" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum ExternalIpCreate { @@ -837,6 +2221,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ExternalIp" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ExternalIpResultsPage { ///list of items on this page of results @@ -853,6 +2266,32 @@ pub mod types { } ///The name and type information for a field of a timeseries schema. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The name and type information for a field of a + /// timeseries schema.", "type": "object", + /// "required": [ + /// "name", + /// "source", + /// "ty" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "source": { + /// "$ref": "#/components/schemas/FieldSource" + /// }, + /// "ty": { + /// "$ref": "#/components/schemas/FieldType" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct FieldSchema { pub name: String, @@ -867,6 +2306,20 @@ pub mod types { } ///The source from which a field is derived, the target or metric. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The source from which a field is derived, the target or + /// metric.", "type": "string", + /// "enum": [ + /// "target", + /// "metric" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FieldSource { #[serde(rename = "target")] @@ -923,6 +2376,23 @@ pub mod types { } ///The `FieldType` identifies the data type of a target or metric field. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The `FieldType` identifies the data type of a target or + /// metric field.", "type": "string", + /// "enum": [ + /// "string", + /// "i64", + /// "ip_addr", + /// "uuid", + /// "bool" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FieldType { #[serde(rename = "string")] @@ -990,6 +2460,21 @@ pub mod types { } } + ///FleetRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FleetRole { #[serde(rename = "admin")] @@ -1055,6 +2540,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FleetRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct FleetRolePolicy { ///Roles directly assigned on this resource @@ -1073,6 +2583,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/FleetRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct FleetRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -1087,6 +2627,95 @@ pub mod types { } ///Client view of global Images + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of global Images", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "distribution", + /// "id", + /// "name", + /// "size", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "digest": { + /// "description": "Hash of the image contents, if applicable", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Digest" + /// } + /// ] + /// }, + /// "distribution": { + /// "description": "Image distribution", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "size": { + /// "description": "total size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "url": { + /// "description": "URL source of this image, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "version": { + /// "description": "Image version", + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImage { ///size of blocks in bytes @@ -1123,6 +2752,56 @@ pub mod types { ///Create-time parameters for an /// [`GlobalImage`](crate::external_api::views::GlobalImage) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`GlobalImage`](crate::external_api::views::GlobalImage)", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "distribution", + /// "name", + /// "source" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "block size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "distribution": { + /// "description": "OS image distribution", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Distribution" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "source": { + /// "description": "The source of the image's contents.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ImageSource" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImageCreate { ///block size in bytes @@ -1142,6 +2821,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/GlobalImage" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImageResultsPage { ///list of items on this page of results @@ -1158,6 +2866,36 @@ pub mod types { } ///Client view of a [`Group`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Group`]", + /// "type": "object", + /// "required": [ + /// "display_name", + /// "id", + /// "silo_id" + /// ], + /// "properties": { + /// "display_name": { + /// "description": "Human-readable name that can identify the group", + /// "type": "string" + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "silo_id": { + /// "description": "Uuid of the silo to which this group belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Group { ///Human-readable name that can identify the group @@ -1174,6 +2912,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Group" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GroupResultsPage { ///list of items on this page of results @@ -1231,6 +2998,68 @@ pub mod types { /// _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In /// fact, every bin is one of those variants, the `BinRange::RangeTo` is /// only provided as a convenience during construction. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A simple type for managing a histogram metric.\n\nA + /// histogram maintains the count of any number of samples, over a set of + /// bins. Bins are specified on construction via their _left_ edges, + /// inclusive. There can't be any \"gaps\" in the bins, and an additional + /// bin may be added to the left, right, or both so that the bins extend to + /// the entire range of the support.\n\nNote that any gaps, unsorted bins, + /// or non-finite values will result in an error.\n\nExample ------- ```rust + /// use oximeter::histogram::{BinRange, Histogram};\n\nlet edges = [0i64, + /// 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); + /// assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) + /// assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); + /// assert_eq!(hist.n_samples(), 2);\n\nlet data = + /// hist.iter().collect::>(); assert_eq!(data[0].range, + /// BinRange::range(i64::MIN, 0)); // An additional bin for `..0` + /// assert_eq!(data[0].count, 0); // Nothing is in this + /// bin\n\nassert_eq!(data[1].range, BinRange::range(0, 10)); // The range + /// `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin + /// ```\n\nNotes -----\n\nHistograms may be constructed either from their + /// left bin edges, or from a sequence of ranges. In either case, the + /// left-most bin may be converted upon construction. In particular, if the + /// left-most value is not equal to the minimum of the support, a new bin + /// will be added from the minimum to that provided value. If the left-most + /// value _is_ the support's minimum, because the provided bin was unbounded + /// below, such as `(..0)`, then that bin will be converted into one bounded + /// below, `(MIN..0)` in this case.\n\nThe short of this is that, most of + /// the time, it shouldn't matter. If one specifies the extremes of the + /// support as their bins, be aware that the left-most may be converted from + /// a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the + /// first bin of a histogram is _always_ a `Bin::Range` or a + /// `Bin::RangeFrom` after construction. In fact, every bin is one of those + /// variants, the `BinRange::RangeTo` is only provided as a convenience + /// during construction.", "type": "object", + /// "required": [ + /// "bins", + /// "n_samples", + /// "start_time" + /// ], + /// "properties": { + /// "bins": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Bindouble" + /// } + /// }, + /// "n_samples": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Histogramdouble { pub bins: Vec, @@ -1286,6 +3115,68 @@ pub mod types { /// _always_ a `Bin::Range` or a `Bin::RangeFrom` after construction. In /// fact, every bin is one of those variants, the `BinRange::RangeTo` is /// only provided as a convenience during construction. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A simple type for managing a histogram metric.\n\nA + /// histogram maintains the count of any number of samples, over a set of + /// bins. Bins are specified on construction via their _left_ edges, + /// inclusive. There can't be any \"gaps\" in the bins, and an additional + /// bin may be added to the left, right, or both so that the bins extend to + /// the entire range of the support.\n\nNote that any gaps, unsorted bins, + /// or non-finite values will result in an error.\n\nExample ------- ```rust + /// use oximeter::histogram::{BinRange, Histogram};\n\nlet edges = [0i64, + /// 10, 20]; let mut hist = Histogram::new(&edges).unwrap(); + /// assert_eq!(hist.n_bins(), 4); // One additional bin for the range (20..) + /// assert_eq!(hist.n_samples(), 0); hist.sample(4); hist.sample(100); + /// assert_eq!(hist.n_samples(), 2);\n\nlet data = + /// hist.iter().collect::>(); assert_eq!(data[0].range, + /// BinRange::range(i64::MIN, 0)); // An additional bin for `..0` + /// assert_eq!(data[0].count, 0); // Nothing is in this + /// bin\n\nassert_eq!(data[1].range, BinRange::range(0, 10)); // The range + /// `0..10` assert_eq!(data[1].count, 1); // 4 is sampled into this bin + /// ```\n\nNotes -----\n\nHistograms may be constructed either from their + /// left bin edges, or from a sequence of ranges. In either case, the + /// left-most bin may be converted upon construction. In particular, if the + /// left-most value is not equal to the minimum of the support, a new bin + /// will be added from the minimum to that provided value. If the left-most + /// value _is_ the support's minimum, because the provided bin was unbounded + /// below, such as `(..0)`, then that bin will be converted into one bounded + /// below, `(MIN..0)` in this case.\n\nThe short of this is that, most of + /// the time, it shouldn't matter. If one specifies the extremes of the + /// support as their bins, be aware that the left-most may be converted from + /// a `BinRange::RangeTo` into a `BinRange::Range`. In other words, the + /// first bin of a histogram is _always_ a `Bin::Range` or a + /// `Bin::RangeFrom` after construction. In fact, every bin is one of those + /// variants, the `BinRange::RangeTo` is only provided as a convenience + /// during construction.", "type": "object", + /// "required": [ + /// "bins", + /// "n_samples", + /// "start_time" + /// ], + /// "properties": { + /// "bins": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Binint64" + /// } + /// }, + /// "n_samples": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "start_time": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Histogramint64 { pub bins: Vec, @@ -1302,6 +3193,25 @@ pub mod types { ///Supported set of sort modes for scanning by id only. /// ///Currently, we only support scanning in ascending order. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by id + /// only.\n\nCurrently, we only support scanning in ascending order.", + /// "oneOf": [ + /// { + /// "description": "sort in increasing order of \"id\"", + /// "type": "string", + /// "enum": [ + /// "id_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdSortMode { ///sort in increasing order of "id" @@ -1355,6 +3265,61 @@ pub mod types { } ///Client view of an [`IdentityProvider`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`IdentityProvider`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "provider_type", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "provider_type": { + /// "description": "Identity provider type", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/IdentityProviderType" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProvider { ///human-readable free-form text about a resource @@ -1378,6 +3343,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IdentityProvider" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProviderResultsPage { ///list of items on this page of results @@ -1393,6 +3387,24 @@ pub mod types { } } + ///IdentityProviderType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "description": "SAML identity provider", + /// "type": "string", + /// "enum": [ + /// "saml" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdentityProviderType { ///SAML identity provider @@ -1446,6 +3458,20 @@ pub mod types { } ///Describes what kind of identity is described by an id + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes what kind of identity is described by an id", + /// "type": "string", + /// "enum": [ + /// "silo_user", + /// "silo_group" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdentityType { #[serde(rename = "silo_user")] @@ -1501,6 +3527,53 @@ pub mod types { } } + ///IdpMetadataSource + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "url" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "data", + /// "type" + /// ], + /// "properties": { + /// "data": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "base64_encoded_xml" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum IdpMetadataSource { @@ -1517,6 +3590,98 @@ pub mod types { } ///Client view of project Images + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of project Images", + /// "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "size of blocks in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "digest": { + /// "description": "Hash of the image contents, if applicable", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Digest" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "The project the disk belongs to", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "description": "total size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "url": { + /// "description": "URL source of this image, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "version": { + /// "description": "Version of this, if any", + /// "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Image { ///size of blocks in bytes @@ -1554,6 +3719,46 @@ pub mod types { ///Create-time parameters for an /// [`Image`](crate::external_api::views::Image) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Image`](crate::external_api::views::Image)", "type": "object", + /// "required": [ + /// "block_size", + /// "description", + /// "name", + /// "source" + /// ], + /// "properties": { + /// "block_size": { + /// "description": "block size in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/BlockSize" + /// } + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "source": { + /// "description": "The source of the image's contents.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ImageSource" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ImageCreate { ///block size in bytes @@ -1571,6 +3776,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Image" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ImageResultsPage { ///list of items on this page of results @@ -1587,6 +3821,69 @@ pub mod types { } ///The source of the underlying image. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The source of the underlying image.", + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "type", + /// "url" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "id", + /// "type" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "snapshot" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Boot the Alpine ISO that ships with the Propolis + /// zone. Intended for development purposes only.", "type": + /// "object", "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "you_can_boot_anything_as_long_as_its_alpine" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum ImageSource { @@ -1605,6 +3902,90 @@ pub mod types { } ///Client view of an [`Instance`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Instance`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "hostname", + /// "id", + /// "memory", + /// "name", + /// "ncpus", + /// "project_id", + /// "run_state", + /// "time_created", + /// "time_modified", + /// "time_run_state_updated" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "hostname": { + /// "description": "RFC1035-compliant hostname for the Instance.", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "memory": { + /// "description": "memory allocated for this Instance", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "ncpus": { + /// "description": "number of CPUs allocated for this Instance", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceCpuCount" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "id for the project containing this Instance", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "run_state": { + /// "$ref": "#/components/schemas/InstanceState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_run_state_updated": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Instance { ///human-readable free-form text about a resource @@ -1636,6 +4017,18 @@ pub mod types { } ///The number of CPUs in an Instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The number of CPUs in an Instance", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceCpuCount(pub u16); impl std::ops::Deref for InstanceCpuCount { @@ -1699,6 +4092,84 @@ pub mod types { ///Create-time parameters for an /// [`Instance`](omicron_common::api::external::Instance) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Instance`](omicron_common::api::external::Instance)", + /// "type": "object", + /// "required": [ + /// "description", + /// "hostname", + /// "memory", + /// "name", + /// "ncpus" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disks": { + /// "description": "The disks to be created or attached for this + /// instance.", "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/InstanceDiskAttachment" + /// } + /// }, + /// "external_ips": { + /// "description": "The external IP addresses provided to this + /// instance.\n\nBy default, all instances have outbound connectivity, but + /// no inbound connectivity. These external addresses can be used to provide + /// a fixed, known IP address for making inbound connections to the + /// instance.", "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ExternalIpCreate" + /// } + /// }, + /// "hostname": { + /// "type": "string" + /// }, + /// "memory": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "ncpus": { + /// "$ref": "#/components/schemas/InstanceCpuCount" + /// }, + /// "network_interfaces": { + /// "description": "The network interfaces to be created for this + /// instance.", "default": { + /// "type": "default" + /// }, + /// "allOf": [ + /// { + /// "$ref": + /// "#/components/schemas/InstanceNetworkInterfaceAttachment" } + /// ] + /// }, + /// "start": { + /// "description": "Should this instance be started upon creation; true + /// by default.", "default": true, + /// "type": "boolean" + /// }, + /// "user_data": { + /// "description": "User data for instance initialization systems (such + /// as cloud-init). Must be a Base64-encoded string, as specified in RFC + /// 4648 § 4 (+ and / characters with padding). Maximum 32 KiB unencoded + /// data.", "default": "", + /// "type": "string", + /// "format": "byte" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceCreate { pub description: String, @@ -1737,6 +4208,82 @@ pub mod types { } ///Describe the instance's disks at creation time + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describe the instance's disks at creation time", + /// "oneOf": [ + /// { + /// "description": "During instance creation, create and attach disks", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk_source", + /// "name", + /// "size", + /// "type" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk_source": { + /// "description": "initial source for this disk", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DiskSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "size": { + /// "description": "total size of the Disk in bytes", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/ByteCount" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "create" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "During instance creation, attach this disk", + /// "type": "object", + /// "required": [ + /// "name", + /// "type" + /// ], + /// "properties": { + /// "name": { + /// "description": "A disk name to attach", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "attach" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum InstanceDiskAttachment { @@ -1766,6 +4313,26 @@ pub mod types { ///Migration parameters for an /// [`Instance`](omicron_common::api::external::Instance) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Migration parameters for an + /// [`Instance`](omicron_common::api::external::Instance)", + /// "type": "object", + /// "required": [ + /// "dst_sled_id" + /// ], + /// "properties": { + /// "dst_sled_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrate { pub dst_sled_id: uuid::Uuid, @@ -1779,6 +4346,73 @@ pub mod types { ///Describes an attachment of a `NetworkInterface` to an `Instance`, at the /// time the instance is created. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes an attachment of a `NetworkInterface` to an + /// `Instance`, at the time the instance is created.", "oneOf": [ + /// { + /// "description": "Create one or more `NetworkInterface`s for the + /// `Instance`.\n\nIf more than one interface is provided, then the first + /// will be designated the primary interface for the instance.", + /// "type": "object", + /// "required": [ + /// "params", + /// "type" + /// ], + /// "properties": { + /// "params": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterfaceCreate" + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "create" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "The default networking configuration for an + /// instance is to create a single primary interface with an + /// automatically-assigned IP address. The IP will be pulled from the + /// Project's default VPC / VPC Subnet.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "default" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "No network interfaces at all will be created for + /// the instance.", "type": "object", + /// "required": [ + /// "type" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "none" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "params")] pub enum InstanceNetworkInterfaceAttachment { @@ -1807,6 +4441,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Instance" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceResultsPage { ///list of items on this page of results @@ -1823,6 +4486,39 @@ pub mod types { } ///Contents of an Instance's serial console buffer. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Contents of an Instance's serial console buffer.", + /// "type": "object", + /// "required": [ + /// "data", + /// "last_byte_offset" + /// ], + /// "properties": { + /// "data": { + /// "description": "The bytes starting from the requested offset up to + /// either the end of the buffer or the request's `max_bytes`. Provided as a + /// u8 array rather than a string, as it may not be UTF-8.", "type" + /// : "array", "items": { + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// }, + /// "last_byte_offset": { + /// "description": "The absolute offset since boot (suitable for use as + /// `byte_offset` in a subsequent request) of the last byte returned in + /// `data`.", "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceSerialConsoleData { ///The bytes starting from the requested offset up to either the end of @@ -1844,6 +4540,90 @@ pub mod types { /// ///This typically reflects whether it's starting, running, stopping, or /// stopped, but also includes states related to the Instance's lifecycle + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Running state of an Instance (primarily: booted or + /// stopped)\n\nThis typically reflects whether it's starting, running, + /// stopping, or stopped, but also includes states related to the Instance's + /// lifecycle", "oneOf": [ + /// { + /// "description": "The instance is being created.", + /// "type": "string", + /// "enum": [ + /// "creating" + /// ] + /// }, + /// { + /// "description": "The instance is currently starting up.", + /// "type": "string", + /// "enum": [ + /// "starting" + /// ] + /// }, + /// { + /// "description": "The instance is currently running.", + /// "type": "string", + /// "enum": [ + /// "running" + /// ] + /// }, + /// { + /// "description": "The instance has been requested to stop and a + /// transition to \"Stopped\" is imminent.", "type": "string", + /// "enum": [ + /// "stopping" + /// ] + /// }, + /// { + /// "description": "The instance is currently stopped.", + /// "type": "string", + /// "enum": [ + /// "stopped" + /// ] + /// }, + /// { + /// "description": "The instance is in the process of rebooting - it + /// will remain in the \"rebooting\" state until the VM is starting once + /// more.", "type": "string", + /// "enum": [ + /// "rebooting" + /// ] + /// }, + /// { + /// "description": "The instance is in the process of migrating - it will remain in the \"migrating\" state until the migration process is complete and the destination propolis is ready to continue execution.", + /// "type": "string", + /// "enum": [ + /// "migrating" + /// ] + /// }, + /// { + /// "description": "The instance is attempting to recover from a + /// failure.", "type": "string", + /// "enum": [ + /// "repairing" + /// ] + /// }, + /// { + /// "description": "The instance has encountered a failure.", + /// "type": "string", + /// "enum": [ + /// "failed" + /// ] + /// }, + /// { + /// "description": "The instance has been deleted.", + /// "type": "string", + /// "enum": [ + /// "destroyed" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceState { ///The instance is being created. @@ -1946,6 +4726,20 @@ pub mod types { } ///The kind of an external IP address for an instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The kind of an external IP address for an instance", + /// "type": "string", + /// "enum": [ + /// "ephemeral", + /// "floating" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IpKind { #[serde(rename = "ephemeral")] @@ -2001,6 +4795,33 @@ pub mod types { } } + ///IpNet + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "v4", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// { + /// "title": "v6", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum IpNet { @@ -2071,6 +4892,52 @@ pub mod types { ///Identity-related metadata that's included in nearly all public API /// objects + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in nearly all + /// public API objects", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPool { ///human-readable free-form text about a resource @@ -2094,6 +4961,28 @@ pub mod types { ///Create-time parameters for an IP Pool. /// ///See [`IpPool`](crate::external_api::views::IpPool) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an IP Pool.\n\nSee + /// [`IpPool`](crate::external_api::views::IpPool)", "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolCreate { pub description: String, @@ -2106,6 +4995,34 @@ pub mod types { } } + ///IpPoolRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "range", + /// "time_created" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "range": { + /// "$ref": "#/components/schemas/IpRange" + /// }, + /// "time_created": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolRange { pub id: uuid::Uuid, @@ -2120,6 +5037,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IpPoolRange" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolRangeResultsPage { ///list of items on this page of results @@ -2136,6 +5082,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/IpPool" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolResultsPage { ///list of items on this page of results @@ -2152,6 +5127,31 @@ pub mod types { } ///Parameters for updating an IP Pool + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for updating an IP Pool", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -2166,6 +5166,33 @@ pub mod types { } } + ///IpRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "v4", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Range" + /// } + /// ] + /// }, + /// { + /// "title": "v6", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Range" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum IpRange { @@ -2192,6 +5219,23 @@ pub mod types { } ///An IPv4 subnet, including prefix and subnet mask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "An IPv4 subnet", + /// "description": "An IPv4 subnet, including prefix and subnet mask", + /// "examples": [ + /// "192.168.1.0/24" + /// ], + /// "type": "string", + /// "pattern": + /// "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\. + /// ){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/ + /// ([8-9]|1[0-9]|2[0-9]|3[0-2])$" } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct Ipv4Net(String); impl std::ops::Deref for Ipv4Net { @@ -2269,6 +5313,31 @@ pub mod types { ///A non-decreasing IPv4 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A non-decreasing IPv4 address range, inclusive of both + /// ends.\n\nThe first address must be less than or equal to the last + /// address.", "type": "object", + /// "required": [ + /// "first", + /// "last" + /// ], + /// "properties": { + /// "first": { + /// "type": "string", + /// "format": "ipv4" + /// }, + /// "last": { + /// "type": "string", + /// "format": "ipv4" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Ipv4Range { pub first: std::net::Ipv4Addr, @@ -2282,6 +5351,23 @@ pub mod types { } ///An IPv6 subnet, including prefix and subnet mask + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "An IPv6 subnet", + /// "description": "An IPv6 subnet, including prefix and subnet mask", + /// "examples": [ + /// "fd12:3456::/64" + /// ], + /// "type": "string", + /// "pattern": + /// "^([fF][dD])[0-9a-fA-F]{2}:(([0-9a-fA-F]{1,4}:){6}[0-9a-fA-F]{1, + /// 4}|([0-9a-fA-F]{1,4}:){1,6}:)\\/([1-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$" + /// } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct Ipv6Net(String); impl std::ops::Deref for Ipv6Net { @@ -2358,6 +5444,31 @@ pub mod types { ///A non-decreasing IPv6 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A non-decreasing IPv6 address range, inclusive of both + /// ends.\n\nThe first address must be less than or equal to the last + /// address.", "type": "object", + /// "required": [ + /// "first", + /// "last" + /// ], + /// "properties": { + /// "first": { + /// "type": "string", + /// "format": "ipv6" + /// }, + /// "last": { + /// "type": "string", + /// "format": "ipv6" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Ipv6Range { pub first: std::net::Ipv6Addr, @@ -2372,6 +5483,23 @@ pub mod types { ///An inclusive-inclusive range of IP ports. The second port may be omitted /// to represent a single port + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A range of IP ports", + /// "description": "An inclusive-inclusive range of IP ports. The second + /// port may be omitted to represent a single port", "examples": [ + /// "22" + /// ], + /// "type": "string", + /// "maxLength": 11, + /// "minLength": 1, + /// "pattern": "^[0-9]{1,5}(-[0-9]{1,5})?$" + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct L4PortRange(String); impl std::ops::Deref for L4PortRange { @@ -2446,6 +5574,23 @@ pub mod types { } ///A Media Access Control address, in EUI-48 format + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A MAC address", + /// "description": "A Media Access Control address, in EUI-48 format", + /// "examples": [ + /// "ff:ff:ff:ff:ff:ff" + /// ], + /// "type": "string", + /// "maxLength": 17, + /// "minLength": 17, + /// "pattern": "^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$" + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct MacAddr(String); impl std::ops::Deref for MacAddr { @@ -2520,6 +5665,29 @@ pub mod types { } ///A `Measurement` is a timestamped datum from a single metric + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `Measurement` is a timestamped datum from a single + /// metric", "type": "object", + /// "required": [ + /// "datum", + /// "timestamp" + /// ], + /// "properties": { + /// "datum": { + /// "$ref": "#/components/schemas/Datum" + /// }, + /// "timestamp": { + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Measurement { pub datum: Datum, @@ -2533,6 +5701,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Measurement" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct MeasurementResultsPage { ///list of items on this page of results @@ -2551,6 +5748,22 @@ pub mod types { ///Names must begin with a lower case ASCII letter, be composed exclusively /// of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end /// with a '-'. Names cannot be a UUID though they may contain a UUID. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name unique within the parent collection", + /// "description": "Names must begin with a lower case ASCII letter, be + /// composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and + /// '-', and may not end with a '-'. Names cannot be a UUID though they may + /// contain a UUID.", "type": "string", + /// "maxLength": 63, + /// "pattern": + /// "^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z][a-z0-9-]* + /// [a-zA-Z0-9]$" } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct Name(String); impl std::ops::Deref for Name { @@ -2615,6 +5828,34 @@ pub mod types { } } + ///NameOrId + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "title": "id", + /// "allOf": [ + /// { + /// "type": "string", + /// "format": "uuid" + /// } + /// ] + /// }, + /// { + /// "title": "name", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum NameOrId { @@ -2684,6 +5925,38 @@ pub mod types { } ///Supported set of sort modes for scanning by name or id + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by name or + /// id", "oneOf": [ + /// { + /// "description": "sort in increasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_ascending" + /// ] + /// }, + /// { + /// "description": "sort in decreasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_descending" + /// ] + /// }, + /// { + /// "description": "sort in increasing order of \"id\"", + /// "type": "string", + /// "enum": [ + /// "id_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum NameOrIdSortMode { ///sort in increasing order of "name" @@ -2749,6 +6022,25 @@ pub mod types { ///Supported set of sort modes for scanning by name only /// ///Currently, we only support scanning in ascending order. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Supported set of sort modes for scanning by name + /// only\n\nCurrently, we only support scanning in ascending order.", + /// "oneOf": [ + /// { + /// "description": "sort in increasing order of \"name\"", + /// "type": "string", + /// "enum": [ + /// "name_ascending" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum NameSortMode { ///sort in increasing order of "name" @@ -2802,6 +6094,90 @@ pub mod types { } ///A `NetworkInterface` represents a virtual network interface device. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `NetworkInterface` represents a virtual network + /// interface device.", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "instance_id", + /// "ip", + /// "mac", + /// "name", + /// "primary", + /// "subnet_id", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "instance_id": { + /// "description": "The Instance to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "ip": { + /// "description": "The IP address assigned to this interface.", + /// "type": "string", + /// "format": "ip" + /// }, + /// "mac": { + /// "description": "The MAC address assigned to this interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/MacAddr" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "primary": { + /// "description": "True if this interface is the primary for the + /// instance to which it's attached.", "type": "boolean" + /// }, + /// "subnet_id": { + /// "description": "The subnet to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the interface belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterface { ///human-readable free-form text about a resource @@ -2837,6 +6213,54 @@ pub mod types { ///Create-time parameters for a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a [`NetworkInterface`](omicron_common::api::external::NetworkInterface)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name", + /// "subnet_name", + /// "vpc_name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "ip": { + /// "description": "The IP address for the interface. One will be + /// auto-assigned if not provided.", "type": [ + /// "string", + /// "null" + /// ], + /// "format": "ip" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "subnet_name": { + /// "description": "The VPC Subnet in which to create the interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "vpc_name": { + /// "description": "The VPC in which to create the interface.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceCreate { pub description: String, @@ -2858,6 +6282,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterface" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceResultsPage { ///list of items on this page of results @@ -2878,6 +6331,45 @@ pub mod types { /// ///Note that modifying IP addresses for an interface is not yet supported, /// a new interface must be created instead. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for updating a + /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface).\ + /// n\nNote that modifying IP addresses for an interface is not yet + /// supported, a new interface must be created instead.", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "primary": { + /// "description": "Make a secondary interface the instance's primary + /// interface.\n\nIf applied to a secondary interface, that interface will + /// become the primary on the next reboot of the instance. Note that this + /// may have implications for routing between instances, as the new primary + /// interface will be on a distinct subnet from the previous primary + /// interface.\n\nNote that this can only be used to select a new primary + /// interface for an instance. Requests to change the primary interface into + /// a secondary will return an error.", "default": false, + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -2911,6 +6403,19 @@ pub mod types { /// is used to identify its output. Nodes that depend on a given node /// (either directly or indirectly) can access the node's output using its /// name. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Unique name for a saga [`Node`]\n\nEach node requires a + /// string name that's unique within its DAG. The name is used to identify + /// its output. Nodes that depend on a given node (either directly or + /// indirectly) can access the node's output using its name.", + /// "type": "string" + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct NodeName(pub String); impl std::ops::Deref for NodeName { @@ -2952,6 +6457,52 @@ pub mod types { } ///Client view of an [`Organization`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Organization`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Organization { ///human-readable free-form text about a resource @@ -2974,6 +6525,29 @@ pub mod types { ///Create-time parameters for an /// [`Organization`](crate::external_api::views::Organization) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`Organization`](crate::external_api::views::Organization)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationCreate { pub description: String, @@ -2987,6 +6561,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Organization" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationResultsPage { ///list of items on this page of results @@ -3002,6 +6605,21 @@ pub mod types { } } + ///OrganizationRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum OrganizationRole { #[serde(rename = "admin")] @@ -3067,6 +6685,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/OrganizationRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationRolePolicy { ///Roles directly assigned on this resource @@ -3085,6 +6728,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/OrganizationRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -3100,6 +6773,32 @@ pub mod types { ///Updateable properties of an /// [`Organization`](crate::external_api::views::Organization) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of an + /// [`Organization`](crate::external_api::views::Organization)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3115,6 +6814,18 @@ pub mod types { } ///Passwords may be subject to additional constraints. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A password used to authenticate a user", + /// "description": "Passwords may be subject to additional constraints.", + /// "type": "string", + /// "maxLength": 512 + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct Password(String); impl std::ops::Deref for Password { @@ -3179,6 +6890,62 @@ pub mod types { } ///Client view of a [`PhysicalDisk`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`PhysicalDisk`]", + /// "type": "object", + /// "required": [ + /// "disk_type", + /// "id", + /// "model", + /// "serial", + /// "time_created", + /// "time_modified", + /// "vendor" + /// ], + /// "properties": { + /// "disk_type": { + /// "$ref": "#/components/schemas/PhysicalDiskType" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "model": { + /// "type": "string" + /// }, + /// "serial": { + /// "type": "string" + /// }, + /// "sled_id": { + /// "description": "The sled to which this disk is attached, if any.", + /// "type": [ + /// "string", + /// "null" + /// ], + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vendor": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhysicalDisk { pub disk_type: PhysicalDiskType, @@ -3203,6 +6970,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/PhysicalDisk" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhysicalDiskResultsPage { ///list of items on this page of results @@ -3218,6 +7014,20 @@ pub mod types { } } + ///PhysicalDiskType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "internal", + /// "external" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum PhysicalDiskType { #[serde(rename = "internal")] @@ -3274,6 +7084,57 @@ pub mod types { } ///Client view of a [`Project`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Project`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "organization_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "organization_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Project { ///human-readable free-form text about a resource @@ -3297,6 +7158,28 @@ pub mod types { ///Create-time parameters for a /// [`Project`](crate::external_api::views::Project) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Project`](crate::external_api::views::Project)", "type": "object" + /// , "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectCreate { pub description: String, @@ -3310,6 +7193,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Project" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectResultsPage { ///list of items on this page of results @@ -3325,6 +7237,21 @@ pub mod types { } } + ///ProjectRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum ProjectRole { #[serde(rename = "admin")] @@ -3390,6 +7317,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/ProjectRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectRolePolicy { ///Roles directly assigned on this resource @@ -3408,6 +7360,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/ProjectRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -3423,6 +7405,31 @@ pub mod types { ///Updateable properties of a /// [`Project`](crate::external_api::views::Project) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`Project`](crate::external_api::views::Project)", "type": "object" + /// , "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3438,6 +7445,38 @@ pub mod types { } ///Client view of an [`Rack`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of an [`Rack`]", + /// "type": "object", + /// "required": [ + /// "id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Rack { ///unique, immutable, system-controlled identifier for each resource @@ -3455,6 +7494,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Rack" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RackResultsPage { ///list of items on this page of results @@ -3471,6 +7539,28 @@ pub mod types { } ///Client view of a [`Role`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Role`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/RoleName" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Role { pub description: String, @@ -3484,6 +7574,19 @@ pub mod types { } ///Role names consist of two string components separated by dot ("."). + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name for a built-in role", + /// "description": "Role names consist of two string components separated + /// by dot (\".\").", "type": "string", + /// "maxLength": 63, + /// "pattern": "[a-z-]+\\.[a-z-]+" + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct RoleName(String); impl std::ops::Deref for RoleName { @@ -3555,6 +7658,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Role" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RoleResultsPage { ///list of items on this page of results @@ -3576,6 +7708,97 @@ pub mod types { ///When traffic is to be sent to a destination that is within a given /// `RouteDestination`, the corresponding [`RouterRoute`] applies, and /// traffic will be forward to the [`RouteTarget`] for that rule. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `RouteDestination` is used to match traffic with a + /// routing rule, on the destination of that traffic.\n\nWhen traffic is to + /// be sent to a destination that is within a given `RouteDestination`, the + /// corresponding [`RouterRoute`] applies, and traffic will be forward to + /// the [`RouteTarget`] for that rule.", "oneOf": [ + /// { + /// "description": "Route applies to traffic destined for a specific IP + /// address", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic destined for a specific IP + /// subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic destined for the given + /// VPC.", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Route applies to traffic", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum RouteDestination { @@ -3613,6 +7836,113 @@ pub mod types { ///A `RouteTarget` describes the possible locations that traffic matching a /// route destination can be sent. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `RouteTarget` describes the possible locations that + /// traffic matching a route destination can be sent.", "oneOf": [ + /// { + /// "description": "Forward traffic to a particular IP address.", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a VPC", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a VPC Subnet", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to a specific instance", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "Forward traffic to an internet gateway", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "internet_gateway" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum RouteTarget { @@ -3647,6 +7977,75 @@ pub mod types { ///A route defines a rule that governs where traffic should be sent based /// on its destination. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A route defines a rule that governs where traffic + /// should be sent based on its destination.", "type": "object", + /// "required": [ + /// "description", + /// "destination", + /// "id", + /// "kind", + /// "name", + /// "target", + /// "time_created", + /// "time_modified", + /// "vpc_router_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "kind": { + /// "description": "Describes the kind of router. Set at creation. + /// `read-only`", "allOf": [ + /// { + /// "$ref": "#/components/schemas/RouterRouteKind" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_router_id": { + /// "description": "The VPC Router to which the route belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRoute { ///human-readable free-form text about a resource @@ -3674,6 +8073,36 @@ pub mod types { } ///Create-time parameters for a [`RouterRoute`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a [`RouterRoute`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "destination", + /// "name", + /// "target" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteCreateParams { pub description: String, @@ -3693,6 +8122,48 @@ pub mod types { /// and describes how or where the route was created. /// ///See [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The classification of a [`RouterRoute`] as defined by the system. The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created.\n\nSee [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context", + /// "oneOf": [ + /// { + /// "description": "Determines the default destination of traffic, such + /// as whether it goes to the internet or not.\n\n`Destination: An Internet + /// Gateway` `Modifiable: true`", "type": "string", + /// "enum": [ + /// "default" + /// ] + /// }, + /// { + /// "description": "Automatically added for each VPC Subnet in the + /// VPC\n\n`Destination: A VPC Subnet` `Modifiable: false`", "type" + /// : "string", "enum": [ + /// "vpc_subnet" + /// ] + /// }, + /// { + /// "description": "Automatically added when VPC peering is + /// established\n\n`Destination: A different VPC` `Modifiable: false`", + /// "type": "string", + /// "enum": [ + /// "vpc_peering" + /// ] + /// }, + /// { + /// "description": "Created by a user See + /// [`RouteTarget`]\n\n`Destination: User defined` `Modifiable: true`", + /// "type": "string", + /// "enum": [ + /// "custom" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum RouterRouteKind { ///Determines the default destination of traffic, such as whether it @@ -3770,6 +8241,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/RouterRoute" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteResultsPage { ///list of items on this page of results @@ -3786,6 +8286,41 @@ pub mod types { } ///Updateable properties of a [`RouterRoute`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a [`RouterRoute`]", + /// "type": "object", + /// "required": [ + /// "destination", + /// "target" + /// ], + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "destination": { + /// "$ref": "#/components/schemas/RouteDestination" + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "target": { + /// "$ref": "#/components/schemas/RouteTarget" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteUpdateParams { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -3802,6 +8337,29 @@ pub mod types { } } + ///Saga + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "state" + /// ], + /// "properties": { + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/SagaState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Saga { pub id: uuid::Uuid, @@ -3814,6 +8372,101 @@ pub mod types { } } + ///SagaErrorInfo + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "source_error" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "action_failed" + /// ] + /// }, + /// "source_error": {} + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "deserialize_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "injected_error" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "serialize_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error", + /// "message" + /// ], + /// "properties": { + /// "error": { + /// "type": "string", + /// "enum": [ + /// "subsaga_create_failed" + /// ] + /// }, + /// "message": { + /// "type": "string" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "error")] pub enum SagaErrorInfo { @@ -3836,6 +8489,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Saga" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SagaResultsPage { ///list of items on this page of results @@ -3851,6 +8533,67 @@ pub mod types { } } + ///SagaState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "running" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "type": "string", + /// "enum": [ + /// "succeeded" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "error_info", + /// "error_node_name", + /// "state" + /// ], + /// "properties": { + /// "error_info": { + /// "$ref": "#/components/schemas/SagaErrorInfo" + /// }, + /// "error_node_name": { + /// "$ref": "#/components/schemas/NodeName" + /// }, + /// "state": { + /// "type": "string", + /// "enum": [ + /// "failed" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "state")] pub enum SagaState { @@ -3873,6 +8616,84 @@ pub mod types { ///Identity-related metadata that's included in nearly all public API /// objects + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in nearly all + /// public API objects", "type": "object", + /// "required": [ + /// "acs_url", + /// "description", + /// "id", + /// "idp_entity_id", + /// "name", + /// "slo_url", + /// "sp_client_id", + /// "technical_contact_email", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "acs_url": { + /// "description": "service provider endpoint where the response will + /// be sent", "type": "string" + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "idp_entity_id": { + /// "description": "idp's entity id", + /// "type": "string" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "public_cert": { + /// "description": "optional request signing public certificate (base64 + /// encoded der file)", "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "slo_url": { + /// "description": "service provider endpoint where the idp should send + /// log out requests", "type": "string" + /// }, + /// "sp_client_id": { + /// "description": "sp's client id", + /// "type": "string" + /// }, + /// "technical_contact_email": { + /// "description": "customer's technical contact for saml + /// configuration", "type": "string" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SamlIdentityProvider { ///service provider endpoint where the response will be sent @@ -3908,6 +8729,79 @@ pub mod types { } ///Create-time identity-related parameters + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time identity-related parameters", + /// "type": "object", + /// "required": [ + /// "acs_url", + /// "description", + /// "idp_entity_id", + /// "idp_metadata_source", + /// "name", + /// "slo_url", + /// "sp_client_id", + /// "technical_contact_email" + /// ], + /// "properties": { + /// "acs_url": { + /// "description": "service provider endpoint where the response will + /// be sent", "type": "string" + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "group_attribute_name": { + /// "description": "If set, SAML attributes with this name will be + /// considered to denote a user's group membership, where the attribute + /// value(s) should be a comma-separated list of group names.", + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "idp_entity_id": { + /// "description": "idp's entity id", + /// "type": "string" + /// }, + /// "idp_metadata_source": { + /// "description": "the source of an identity provider metadata + /// descriptor", "allOf": [ + /// { + /// "$ref": "#/components/schemas/IdpMetadataSource" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "signing_keypair": { + /// "description": "optional request signing key pair", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/DerEncodedKeyPair" + /// } + /// ] + /// }, + /// "slo_url": { + /// "description": "service provider endpoint where the idp should send + /// log out requests", "type": "string" + /// }, + /// "sp_client_id": { + /// "description": "sp's client id", + /// "type": "string" + /// }, + /// "technical_contact_email": { + /// "description": "customer's technical contact for saml + /// configuration", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SamlIdentityProviderCreate { ///service provider endpoint where the response will be sent @@ -3940,6 +8834,17 @@ pub mod types { } } + ///SemverVersion + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "pattern": "^\\d+\\.\\d+\\.\\d+([\\-\\+].+)?$" + ///} + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct SemverVersion(String); impl std::ops::Deref for SemverVersion { @@ -4008,6 +8913,24 @@ pub mod types { } ///The service intended to use this certificate. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The service intended to use this certificate.", + /// "oneOf": [ + /// { + /// "description": "This certificate is intended for access to the + /// external API.", "type": "string", + /// "enum": [ + /// "external_api" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum ServiceUsingCertificate { ///This certificate is intended for access to the external API. @@ -4061,6 +8984,66 @@ pub mod types { } ///Client view of a ['Silo'] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a ['Silo']", + /// "type": "object", + /// "required": [ + /// "description", + /// "discoverable", + /// "id", + /// "identity_mode", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "discoverable": { + /// "description": "A silo where discoverable is false can be retrieved only by its id - it will not be part of the \"list all silos\" output.", + /// "type": "boolean" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "identity_mode": { + /// "description": "How users and groups are managed in this Silo", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/SiloIdentityMode" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Silo { ///human-readable free-form text about a resource @@ -4087,6 +9070,48 @@ pub mod types { } ///Create-time parameters for a [`Silo`](crate::external_api::views::Silo) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Silo`](crate::external_api::views::Silo)", "type": "object", + /// "required": [ + /// "description", + /// "discoverable", + /// "identity_mode", + /// "name" + /// ], + /// "properties": { + /// "admin_group_name": { + /// "description": "If set, this group will be created during Silo + /// creation and granted the \"Silo Admin\" role. Identity providers can + /// assert that users belong to this group and those users can log in and + /// further initialize the Silo.\n\nNote that if configuring a SAML based + /// identity provider, group_attribute_name must be set for users to be + /// considered part of a group. See [`SamlIdentityProviderCreate`] for more + /// information.", "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "description": { + /// "type": "string" + /// }, + /// "discoverable": { + /// "type": "boolean" + /// }, + /// "identity_mode": { + /// "$ref": "#/components/schemas/SiloIdentityMode" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloCreate { ///If set, this group will be created during Silo creation and granted @@ -4113,6 +9138,34 @@ pub mod types { ///Describes how identities are managed and users are authenticated in this /// Silo + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes how identities are managed and users are + /// authenticated in this Silo", "oneOf": [ + /// { + /// "description": "Users are authenticated with SAML using an external + /// authentication provider. The system updates information about users and + /// groups only during successful authentication (i.e,. \"JIT provisioning\" + /// of users and groups).", "type": "string", + /// "enum": [ + /// "saml_jit" + /// ] + /// }, + /// { + /// "description": "The system is the source of truth about users. + /// There is no linkage to an external authentication provider or identity + /// provider.", "type": "string", + /// "enum": [ + /// "local_only" + /// ] + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SiloIdentityMode { ///Users are authenticated with SAML using an external authentication @@ -4175,6 +9228,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Silo" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloResultsPage { ///list of items on this page of results @@ -4190,6 +9272,21 @@ pub mod types { } } + ///SiloRole + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "admin", + /// "collaborator", + /// "viewer" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SiloRole { #[serde(rename = "admin")] @@ -4255,6 +9352,31 @@ pub mod types { ///Note that the Policy only describes access granted explicitly for this /// resource. The policies of parent resources can also cause a user to /// have access to this resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Policy`], which describes how this + /// resource may be accessed\n\nNote that the Policy only describes access + /// granted explicitly for this resource. The policies of parent resources + /// can also cause a user to have access to this resource.", + /// "type": "object", + /// "required": [ + /// "role_assignments" + /// ], + /// "properties": { + /// "role_assignments": { + /// "description": "Roles directly assigned on this resource", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SiloRoleRoleAssignment" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloRolePolicy { ///Roles directly assigned on this resource @@ -4273,6 +9395,36 @@ pub mod types { ///The resource is not part of this structure. Rather, [`RoleAssignment`]s /// are put into a [`Policy`] and that Policy is applied to a particular /// resource. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Describes the assignment of a particular role on a + /// particular resource to a particular identity (user, group, etc.)\n\nThe + /// resource is not part of this structure. Rather, [`RoleAssignment`]s are + /// put into a [`Policy`] and that Policy is applied to a particular + /// resource.", "type": "object", + /// "required": [ + /// "identity_id", + /// "identity_type", + /// "role_name" + /// ], + /// "properties": { + /// "identity_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "identity_type": { + /// "$ref": "#/components/schemas/IdentityType" + /// }, + /// "role_name": { + /// "$ref": "#/components/schemas/SiloRole" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloRoleRoleAssignment { pub identity_id: uuid::Uuid, @@ -4287,6 +9439,46 @@ pub mod types { } ///Client view of a [`Sled`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Sled`]", + /// "type": "object", + /// "required": [ + /// "baseboard", + /// "id", + /// "service_address", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "baseboard": { + /// "$ref": "#/components/schemas/Baseboard" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "service_address": { + /// "type": "string" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Sled { pub baseboard: Baseboard, @@ -4306,6 +9498,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Sled" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SledResultsPage { ///list of items on this page of results @@ -4322,6 +9543,70 @@ pub mod types { } ///Client view of a Snapshot + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a Snapshot", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk_id", + /// "id", + /// "name", + /// "project_id", + /// "size", + /// "state", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "disk_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "size": { + /// "$ref": "#/components/schemas/ByteCount" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/SnapshotState" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Snapshot { ///human-readable free-form text about a resource @@ -4348,6 +9633,38 @@ pub mod types { ///Create-time parameters for a /// [`Snapshot`](crate::external_api::views::Snapshot) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Snapshot`](crate::external_api::views::Snapshot)", + /// "type": "object", + /// "required": [ + /// "description", + /// "disk", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "disk": { + /// "description": "The name of the disk to be snapshotted", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SnapshotCreate { pub description: String, @@ -4363,6 +9680,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Snapshot" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SnapshotResultsPage { ///list of items on this page of results @@ -4378,6 +9724,22 @@ pub mod types { } } + ///SnapshotState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "creating", + /// "ready", + /// "faulted", + /// "destroyed" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SnapshotState { #[serde(rename = "creating")] @@ -4441,6 +9803,24 @@ pub mod types { } } + ///SpoofLoginBody + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "username" + /// ], + /// "properties": { + /// "username": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SpoofLoginBody { pub username: String, @@ -4453,6 +9833,63 @@ pub mod types { } ///Client view of a [`SshKey`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`SshKey`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "public_key", + /// "silo_user_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "public_key": { + /// "description": "SSH public key, e.g., `\"ssh-ed25519 + /// AAAAC3NzaC...\"`", "type": "string" + /// }, + /// "silo_user_id": { + /// "description": "The user to whom this key belongs", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKey { ///human-readable free-form text about a resource @@ -4479,6 +9916,33 @@ pub mod types { ///Create-time parameters for an /// [`SshKey`](crate::external_api::views::SshKey) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for an + /// [`SshKey`](crate::external_api::views::SshKey)", "type": "object", + /// "required": [ + /// "description", + /// "name", + /// "public_key" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "public_key": { + /// "description": "SSH public key, e.g., `\"ssh-ed25519 + /// AAAAC3NzaC...\"`", "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKeyCreate { pub description: String, @@ -4494,6 +9958,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SshKey" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKeyResultsPage { ///list of items on this page of results @@ -4509,6 +10002,21 @@ pub mod types { } } + ///SystemMetricName + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "virtual_disk_space_provisioned", + /// "cpus_provisioned", + /// "ram_provisioned" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SystemMetricName { #[serde(rename = "virtual_disk_space_provisioned")] @@ -4570,6 +10078,43 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "id", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdate { ///unique, immutable, system-controlled identifier for each resource @@ -4588,6 +10133,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/SystemUpdate" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdateResultsPage { ///list of items on this page of results @@ -4603,6 +10177,24 @@ pub mod types { } } + ///SystemUpdateStart + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "version" + /// ], + /// "properties": { + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdateStart { pub version: SemverVersion, @@ -4614,6 +10206,28 @@ pub mod types { } } + ///SystemVersion + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "status", + /// "version_range" + /// ], + /// "properties": { + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "version_range": { + /// "$ref": "#/components/schemas/VersionRange" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemVersion { pub status: UpdateStatus, @@ -4629,6 +10243,21 @@ pub mod types { ///Names are constructed by concatenating the target and metric names with /// ':'. Target and metric names must be lowercase alphanumeric characters /// with '_' separating words. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "The name of a timeseries", + /// "description": "Names are constructed by concatenating the target and + /// metric names with ':'. Target and metric names must be lowercase + /// alphanumeric characters with '_' separating words.", + /// "type": "string", + /// "pattern": + /// "(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*):(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*)" + /// } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct TimeseriesName(String); impl std::ops::Deref for TimeseriesName { @@ -4704,6 +10333,41 @@ pub mod types { /// ///This includes the name of the timeseries, as well as the datum type of /// its metric and the schema for each field. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The schema for a timeseries.\n\nThis includes the name + /// of the timeseries, as well as the datum type of its metric and the + /// schema for each field.", "type": "object", + /// "required": [ + /// "created", + /// "datum_type", + /// "field_schema", + /// "timeseries_name" + /// ], + /// "properties": { + /// "created": { + /// "type": "string", + /// "format": "date-time" + /// }, + /// "datum_type": { + /// "$ref": "#/components/schemas/DatumType" + /// }, + /// "field_schema": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/FieldSchema" + /// } + /// }, + /// "timeseries_name": { + /// "$ref": "#/components/schemas/TimeseriesName" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TimeseriesSchema { pub created: chrono::DateTime, @@ -4719,6 +10383,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/TimeseriesSchema" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct TimeseriesSchemaResultsPage { ///list of items on this page of results @@ -4736,6 +10429,47 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "id", + /// "status", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateDeployment { ///unique, immutable, system-controlled identifier for each resource @@ -4755,6 +10489,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UpdateDeployment" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateDeploymentResultsPage { ///list of items on this page of results @@ -4770,6 +10533,45 @@ pub mod types { } } + ///UpdateStatus + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "status" + /// ], + /// "properties": { + /// "status": { + /// "type": "string", + /// "enum": [ + /// "updating" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "status" + /// ], + /// "properties": { + /// "status": { + /// "type": "string", + /// "enum": [ + /// "steady" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] #[serde(tag = "status")] pub enum UpdateStatus { @@ -4828,6 +10630,59 @@ pub mod types { ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Identity-related metadata that's included in \"asset\" + /// public API objects (which generally have no name or description)", + /// "type": "object", + /// "required": [ + /// "component_type", + /// "device_id", + /// "id", + /// "status", + /// "system_version", + /// "time_created", + /// "time_modified", + /// "version" + /// ], + /// "properties": { + /// "component_type": { + /// "$ref": "#/components/schemas/UpdateableComponentType" + /// }, + /// "device_id": { + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "status": { + /// "$ref": "#/components/schemas/UpdateStatus" + /// }, + /// "system_version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "version": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateableComponent { pub component_type: UpdateableComponentType, @@ -4850,6 +10705,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UpdateableComponent" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateableComponentResultsPage { ///list of items on this page of results @@ -4865,6 +10749,30 @@ pub mod types { } } + ///UpdateableComponentType + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "bootloader_for_rot", + /// "bootloader_for_sp", + /// "bootloader_for_host_proc", + /// "hubris_for_psc_rot", + /// "hubris_for_psc_sp", + /// "hubris_for_sidecar_rot", + /// "hubris_for_sidecar_sp", + /// "hubris_for_gimlet_rot", + /// "hubris_for_gimlet_sp", + /// "helios_host_phase1", + /// "helios_host_phase2", + /// "host_omicron" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum UpdateableComponentType { #[serde(rename = "bootloader_for_rot")] @@ -4961,6 +10869,36 @@ pub mod types { } ///Client view of a [`User`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`User`]", + /// "type": "object", + /// "required": [ + /// "display_name", + /// "id", + /// "silo_id" + /// ], + /// "properties": { + /// "display_name": { + /// "description": "Human-readable name that can identify the user", + /// "type": "string" + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "silo_id": { + /// "description": "Uuid of the silo to which this user belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct User { ///Human-readable name that can identify the user @@ -4977,6 +10915,52 @@ pub mod types { } ///Client view of a [`UserBuiltin`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`UserBuiltin`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "name", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserBuiltin { ///human-readable free-form text about a resource @@ -4998,6 +10982,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/UserBuiltin" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserBuiltinResultsPage { ///list of items on this page of results @@ -5014,6 +11027,38 @@ pub mod types { } ///Create-time parameters for a [`User`](crate::external_api::views::User) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`User`](crate::external_api::views::User)", "type": "object", + /// "required": [ + /// "external_id", + /// "password" + /// ], + /// "properties": { + /// "external_id": { + /// "description": "username used to log in", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/UserId" + /// } + /// ] + /// }, + /// "password": { + /// "description": "password used to log in", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/UserPassword" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreate { ///username used to log in @@ -5031,6 +11076,22 @@ pub mod types { ///Names must begin with a lower case ASCII letter, be composed exclusively /// of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end /// with a '-'. Names cannot be a UUID though they may contain a UUID. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "title": "A name unique within the parent collection", + /// "description": "Names must begin with a lower case ASCII letter, be + /// composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and + /// '-', and may not end with a '-'. Names cannot be a UUID though they may + /// contain a UUID.", "type": "string", + /// "maxLength": 63, + /// "pattern": + /// "^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z][a-z0-9-]* + /// [a-zA-Z0-9]$" } + /// ``` + ///
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub struct UserId(String); impl std::ops::Deref for UserId { @@ -5096,6 +11157,51 @@ pub mod types { } ///Parameters for setting a user's password + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Parameters for setting a user's password", + /// "oneOf": [ + /// { + /// "description": "Sets the user's password to the provided value", + /// "type": "object", + /// "required": [ + /// "details", + /// "user_password_value" + /// ], + /// "properties": { + /// "details": { + /// "$ref": "#/components/schemas/Password" + /// }, + /// "user_password_value": { + /// "type": "string", + /// "enum": [ + /// "password" + /// ] + /// } + /// } + /// }, + /// { + /// "description": "Invalidates any current password (disabling + /// password authentication)", "type": "object", + /// "required": [ + /// "user_password_value" + /// ], + /// "properties": { + /// "user_password_value": { + /// "type": "string", + /// "enum": [ + /// "invalid_password" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "user_password_value", content = "details")] pub enum UserPassword { @@ -5119,6 +11225,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/User" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserResultsPage { ///list of items on this page of results @@ -5135,6 +11270,28 @@ pub mod types { } ///Credentials for local user login + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Credentials for local user login", + /// "type": "object", + /// "required": [ + /// "password", + /// "username" + /// ], + /// "properties": { + /// "password": { + /// "$ref": "#/components/schemas/Password" + /// }, + /// "username": { + /// "$ref": "#/components/schemas/UserId" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct UsernamePasswordCredentials { pub password: Password, @@ -5147,6 +11304,28 @@ pub mod types { } } + ///VersionRange + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "high", + /// "low" + /// ], + /// "properties": { + /// "high": { + /// "$ref": "#/components/schemas/SemverVersion" + /// }, + /// "low": { + /// "$ref": "#/components/schemas/SemverVersion" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VersionRange { pub high: SemverVersion, @@ -5160,6 +11339,82 @@ pub mod types { } ///Client view of a [`Vpc`] + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Client view of a [`Vpc`]", + /// "type": "object", + /// "required": [ + /// "description", + /// "dns_name", + /// "id", + /// "ipv6_prefix", + /// "name", + /// "project_id", + /// "system_router_id", + /// "time_created", + /// "time_modified" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "dns_name": { + /// "description": "The name used for the VPC in DNS.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "ipv6_prefix": { + /// "description": "The unique local IPv6 address range for subnets in + /// this VPC", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "project_id": { + /// "description": "id for the project containing this VPC", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "system_router_id": { + /// "description": "id for the system router where subnet default + /// routes are registered", "type": "string", + /// "format": "uuid" + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Vpc { ///human-readable free-form text about a resource @@ -5189,6 +11444,42 @@ pub mod types { } ///Create-time parameters for a [`Vpc`](crate::external_api::views::Vpc) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`Vpc`](crate::external_api::views::Vpc)", "type": "object", + /// "required": [ + /// "description", + /// "dns_name", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "dns_name": { + /// "$ref": "#/components/schemas/Name" + /// }, + /// "ipv6_prefix": { + /// "description": "The IPv6 prefix for this VPC.\n\nAll IPv6 subnets + /// created from this VPC must be taken from this range, which sould be a + /// Unique Local Address in the range `fd00::/48`. The default VPC Subnet + /// will have the first `/64` range from this prefix.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcCreate { pub description: String, @@ -5211,6 +11502,109 @@ pub mod types { } ///A single rule in a VPC firewall + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single rule in a VPC firewall", + /// "type": "object", + /// "required": [ + /// "action", + /// "description", + /// "direction", + /// "filters", + /// "id", + /// "name", + /// "priority", + /// "status", + /// "targets", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "action": { + /// "description": "whether traffic matching the rule should be allowed + /// or dropped", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleAction" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "direction": { + /// "description": "whether this rule is for incoming or outgoing + /// traffic", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleDirection" + /// } + /// ] + /// }, + /// "filters": { + /// "description": "reductions on the scope of the rule", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleFilter" + /// } + /// ] + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "priority": { + /// "description": "the relative priority of this rule", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// }, + /// "status": { + /// "description": "whether this rule is in effect", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleStatus" + /// } + /// ] + /// }, + /// "targets": { + /// "description": "list of sets of instances that the rule applies + /// to", "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleTarget" + /// } + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "the VPC to which this rule belongs", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRule { ///whether traffic matching the rule should be allowed or dropped @@ -5245,6 +11639,20 @@ pub mod types { } } + ///VpcFirewallRuleAction + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "allow", + /// "deny" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleAction { #[serde(rename = "allow")] @@ -5300,6 +11708,20 @@ pub mod types { } } + ///VpcFirewallRuleDirection + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "inbound", + /// "outbound" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleDirection { #[serde(rename = "inbound")] @@ -5358,6 +11780,50 @@ pub mod types { ///Filter for a firewall rule. A given packet must match every field that /// is present for the rule to apply to it. A packet matches a field if any /// entry in that field matches the packet. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Filter for a firewall rule. A given packet must match + /// every field that is present for the rule to apply to it. A packet + /// matches a field if any entry in that field matches the packet.", + /// "type": "object", + /// "properties": { + /// "hosts": { + /// "description": "If present, the sources (if incoming) or + /// destinations (if outgoing) this rule applies to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleHostFilter" + /// } + /// }, + /// "ports": { + /// "description": "If present, the destination ports this rule applies + /// to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/L4PortRange" + /// } + /// }, + /// "protocols": { + /// "description": "If present, the networking protocols this rule + /// applies to.", "type": [ + /// "array", + /// "null" + /// ], + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleProtocol" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRuleFilter { ///If present, the sources (if incoming) or destinations (if outgoing) @@ -5380,6 +11846,114 @@ pub mod types { ///The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis /// of its source or destination host. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The `VpcFirewallRuleHostFilter` is used to filter + /// traffic on the basis of its source or destination host.", + /// "oneOf": [ + /// { + /// "description": "The rule applies to traffic from/to all instances + /// in the VPC", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to all instances + /// in the VPC Subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to this specific + /// instance", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to a specific IP + /// address", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to traffic from/to a specific IP + /// subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum VpcFirewallRuleHostFilter { @@ -5419,6 +11993,21 @@ pub mod types { } ///The protocols that may be specified in a firewall rule's filter + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "The protocols that may be specified in a firewall + /// rule's filter", "type": "string", + /// "enum": [ + /// "TCP", + /// "UDP", + /// "ICMP" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleProtocol { #[serde(rename = "TCP")] @@ -5478,6 +12067,20 @@ pub mod types { } } + ///VpcFirewallRuleStatus + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "disabled", + /// "enabled" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleStatus { #[serde(rename = "disabled")] @@ -5535,6 +12138,113 @@ pub mod types { ///A `VpcFirewallRuleTarget` is used to specify the set of [`Instance`]s to /// which a firewall rule applies. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A `VpcFirewallRuleTarget` is used to specify the set of + /// [`Instance`]s to which a firewall rule applies.", "oneOf": [ + /// { + /// "description": "The rule applies to all instances in the VPC", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "vpc" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to all instances in the VPC + /// Subnet", "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "subnet" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to this specific instance", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "instance" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to a specific IP address", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip" + /// ] + /// }, + /// "value": { + /// "type": "string", + /// "format": "ip" + /// } + /// } + /// }, + /// { + /// "description": "The rule applies to a specific IP subnet", + /// "type": "object", + /// "required": [ + /// "type", + /// "value" + /// ], + /// "properties": { + /// "type": { + /// "type": "string", + /// "enum": [ + /// "ip_net" + /// ] + /// }, + /// "value": { + /// "$ref": "#/components/schemas/IpNet" + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum VpcFirewallRuleTarget { @@ -5574,6 +12284,85 @@ pub mod types { } ///A single rule in a VPC firewall + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single rule in a VPC firewall", + /// "type": "object", + /// "required": [ + /// "action", + /// "description", + /// "direction", + /// "filters", + /// "name", + /// "priority", + /// "status", + /// "targets" + /// ], + /// "properties": { + /// "action": { + /// "description": "whether traffic matching the rule should be allowed + /// or dropped", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleAction" + /// } + /// ] + /// }, + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "direction": { + /// "description": "whether this rule is for incoming or outgoing + /// traffic", "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleDirection" + /// } + /// ] + /// }, + /// "filters": { + /// "description": "reductions on the scope of the rule", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleFilter" + /// } + /// ] + /// }, + /// "name": { + /// "description": "name of the rule, unique to this VPC", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "priority": { + /// "description": "the relative priority of this rule", + /// "type": "integer", + /// "format": "uint16", + /// "minimum": 0.0 + /// }, + /// "status": { + /// "description": "whether this rule is in effect", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VpcFirewallRuleStatus" + /// } + /// ] + /// }, + /// "targets": { + /// "description": "list of sets of instances that the rule applies + /// to", "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleTarget" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRuleUpdate { ///whether traffic matching the rule should be allowed or dropped @@ -5603,6 +12392,28 @@ pub mod types { ///Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules /// are implicitly created along with a Vpc, so there is no explicit /// creation. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a `Vpc`'s firewall Note that + /// VpcFirewallRules are implicitly created along with a Vpc, so there is no + /// explicit creation.", "type": "object", + /// "required": [ + /// "rules" + /// ], + /// "properties": { + /// "rules": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRuleUpdate" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRuleUpdateParams { pub rules: Vec, @@ -5615,6 +12426,27 @@ pub mod types { } ///Collection of a Vpc's firewall rules + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Collection of a Vpc's firewall rules", + /// "type": "object", + /// "required": [ + /// "rules" + /// ], + /// "properties": { + /// "rules": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcFirewallRule" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRules { pub rules: Vec, @@ -5627,6 +12459,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/Vpc" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcResultsPage { ///list of items on this page of results @@ -5644,6 +12505,63 @@ pub mod types { ///A VPC router defines a series of rules that indicate where traffic /// should be sent depending on its destination. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A VPC router defines a series of rules that indicate + /// where traffic should be sent depending on its destination.", + /// "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "kind", + /// "name", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "kind": { + /// "$ref": "#/components/schemas/VpcRouterKind" + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the router belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouter { ///human-readable free-form text about a resource @@ -5669,6 +12587,29 @@ pub mod types { ///Create-time parameters for a /// [`VpcRouter`](crate::external_api::views::VpcRouter) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`VpcRouter`](crate::external_api::views::VpcRouter)", + /// "type": "object", + /// "required": [ + /// "description", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouterCreate { pub description: String, @@ -5681,6 +12622,20 @@ pub mod types { } } + ///VpcRouterKind + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "system", + /// "custom" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcRouterKind { #[serde(rename = "system")] @@ -5737,6 +12692,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcRouter" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouterResultsPage { ///list of items on this page of results @@ -5754,6 +12738,32 @@ pub mod types { ///Updateable properties of a /// [`VpcRouter`](crate::external_api::views::VpcRouter) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`VpcRouter`](crate::external_api::views::VpcRouter)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouterUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -5771,6 +12781,77 @@ pub mod types { ///A VPC subnet represents a logical grouping for instances that allows /// network traffic between them, within a IPv4 subnetwork or optionall an /// IPv6 subnetwork. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A VPC subnet represents a logical grouping for + /// instances that allows network traffic between them, within a IPv4 + /// subnetwork or optionall an IPv6 subnetwork.", "type": "object", + /// "required": [ + /// "description", + /// "id", + /// "ipv4_block", + /// "ipv6_block", + /// "name", + /// "time_created", + /// "time_modified", + /// "vpc_id" + /// ], + /// "properties": { + /// "description": { + /// "description": "human-readable free-form text about a resource", + /// "type": "string" + /// }, + /// "id": { + /// "description": "unique, immutable, system-controlled identifier for + /// each resource", "type": "string", + /// "format": "uuid" + /// }, + /// "ipv4_block": { + /// "description": "The IPv4 subnet CIDR block.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// "ipv6_block": { + /// "description": "The IPv6 subnet CIDR block.", + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "description": "unique, mutable, user-controlled identifier for + /// each resource", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "time_created": { + /// "description": "timestamp when this resource was created", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "time_modified": { + /// "description": "timestamp when this resource was last modified", + /// "type": "string", + /// "format": "date-time" + /// }, + /// "vpc_id": { + /// "description": "The VPC to which the subnet belongs.", + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnet { ///human-readable free-form text about a resource @@ -5799,6 +12880,50 @@ pub mod types { ///Create-time parameters for a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Create-time parameters for a + /// [`VpcSubnet`](crate::external_api::views::VpcSubnet)", + /// "type": "object", + /// "required": [ + /// "description", + /// "ipv4_block", + /// "name" + /// ], + /// "properties": { + /// "description": { + /// "type": "string" + /// }, + /// "ipv4_block": { + /// "description": "The IPv4 address range for this subnet.\n\nIt must + /// be allocated from an RFC 1918 private address range, and must not + /// overlap with any other existing subnet in the VPC.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv4Net" + /// } + /// ] + /// }, + /// "ipv6_block": { + /// "description": "The IPv6 address range for this subnet.\n\nIt must + /// be allocated from the RFC 4193 Unique Local Address range, with the + /// prefix equal to the parent VPC's prefix. A random `/64` block will be + /// assigned if one is not provided. It must not overlap with any existing + /// subnet in the VPC.", "allOf": [ + /// { + /// "$ref": "#/components/schemas/Ipv6Net" + /// } + /// ] + /// }, + /// "name": { + /// "$ref": "#/components/schemas/Name" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnetCreate { pub description: String, @@ -5825,6 +12950,35 @@ pub mod types { } ///A single page of results + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A single page of results", + /// "type": "object", + /// "required": [ + /// "items" + /// ], + /// "properties": { + /// "items": { + /// "description": "list of items on this page of results", + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VpcSubnet" + /// } + /// }, + /// "next_page": { + /// "description": "token used to fetch the next page of results (if + /// any)", "type": [ + /// "string", + /// "null" + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnetResultsPage { ///list of items on this page of results @@ -5842,6 +12996,32 @@ pub mod types { ///Updateable properties of a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`VpcSubnet`](crate::external_api::views::VpcSubnet)", + /// "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnetUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -5857,6 +13037,38 @@ pub mod types { } ///Updateable properties of a [`Vpc`](crate::external_api::views::Vpc) + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Updateable properties of a + /// [`Vpc`](crate::external_api::views::Vpc)", "type": "object", + /// "properties": { + /// "description": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "dns_name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// }, + /// "name": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/Name" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcUpdate { #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/progenitor-impl/tests/output/param-collision-cli.out b/progenitor-impl/tests/output/param-collision-cli.out index 3c65faf..aa70f08 100644 --- a/progenitor-impl/tests/output/param-collision-cli.out +++ b/progenitor-impl/tests/output/param-collision-cli.out @@ -125,7 +125,6 @@ pub trait CliOverride { } impl CliOverride for () {} - #[derive(Copy, Clone, Debug)] pub enum CliCommand { KeyGet, diff --git a/progenitor-impl/tests/output/param-overrides-cli.out b/progenitor-impl/tests/output/param-overrides-cli.out index 5bd01a4..813e3a3 100644 --- a/progenitor-impl/tests/output/param-overrides-cli.out +++ b/progenitor-impl/tests/output/param-overrides-cli.out @@ -81,7 +81,6 @@ pub trait CliOverride { } impl CliOverride for () {} - #[derive(Copy, Clone, Debug)] pub enum CliCommand { KeyGet, diff --git a/progenitor-impl/tests/output/propolis-server-builder-tagged.out b/progenitor-impl/tests/output/propolis-server-builder-tagged.out index 6776e7f..0a6e92c 100644 --- a/progenitor-impl/tests/output/propolis-server-builder-tagged.out +++ b/progenitor-impl/tests/output/propolis-server-builder-tagged.out @@ -7,6 +7,78 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///CrucibleOpts + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "lossy", + /// "read_only", + /// "target" + /// ], + /// "properties": { + /// "cert_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "control": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "flush_timeout": { + /// "type": [ + /// "integer", + /// "null" + /// ], + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "key": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "key_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "lossy": { + /// "type": "boolean" + /// }, + /// "read_only": { + /// "type": "boolean" + /// }, + /// "root_cert_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "target": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct CrucibleOpts { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -39,6 +111,35 @@ pub mod types { } } + ///DiskAttachment + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disk_id", + /// "generation_id", + /// "state" + /// ], + /// "properties": { + /// "disk_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "generation_id": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "state": { + /// "$ref": "#/components/schemas/DiskAttachmentState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskAttachment { pub disk_id: uuid::Uuid, @@ -58,6 +159,38 @@ pub mod types { } } + ///DiskAttachmentState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "string", + /// "enum": [ + /// "Detached", + /// "Destroyed", + /// "Faulted" + /// ] + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "Attached" + /// ], + /// "properties": { + /// "Attached": { + /// "type": "string", + /// "format": "uuid" + /// } + /// }, + /// "additionalProperties": false + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub enum DiskAttachmentState { Detached, @@ -78,6 +211,46 @@ pub mod types { } } + ///DiskRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "device", + /// "gen", + /// "name", + /// "read_only", + /// "slot", + /// "volume_construction_request" + /// ], + /// "properties": { + /// "device": { + /// "type": "string" + /// }, + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "read_only": { + /// "type": "boolean" + /// }, + /// "slot": { + /// "$ref": "#/components/schemas/Slot" + /// }, + /// "volume_construction_request": { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskRequest { pub device: String, @@ -101,6 +274,31 @@ pub mod types { } ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -121,6 +319,42 @@ pub mod types { } } + ///Instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disks", + /// "nics", + /// "properties", + /// "state" + /// ], + /// "properties": { + /// "disks": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/DiskAttachment" + /// } + /// }, + /// "nics": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterface" + /// } + /// }, + /// "properties": { + /// "$ref": "#/components/schemas/InstanceProperties" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/InstanceState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Instance { pub disks: Vec, @@ -141,6 +375,51 @@ pub mod types { } } + ///InstanceEnsureRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "properties" + /// ], + /// "properties": { + /// "cloud_init_bytes": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "disks": { + /// "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/DiskRequest" + /// } + /// }, + /// "migrate": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceMigrateInitiateRequest" + /// } + /// ] + /// }, + /// "nics": { + /// "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterfaceRequest" + /// } + /// }, + /// "properties": { + /// "$ref": "#/components/schemas/InstanceProperties" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceEnsureRequest { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -166,6 +445,25 @@ pub mod types { } } + ///InstanceEnsureResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "migrate": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceMigrateInitiateResponse" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceEnsureResponse { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -184,6 +482,24 @@ pub mod types { } } + ///InstanceGetResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "instance" + /// ], + /// "properties": { + /// "instance": { + /// "$ref": "#/components/schemas/Instance" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceGetResponse { pub instance: Instance, @@ -201,6 +517,34 @@ pub mod types { } } + ///InstanceMigrateInitiateRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id", + /// "src_addr", + /// "src_uuid" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "src_addr": { + /// "type": "string" + /// }, + /// "src_uuid": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateInitiateRequest { pub migration_id: uuid::Uuid, @@ -220,6 +564,25 @@ pub mod types { } } + ///InstanceMigrateInitiateResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateInitiateResponse { pub migration_id: uuid::Uuid, @@ -237,6 +600,25 @@ pub mod types { } } + ///InstanceMigrateStatusRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateStatusRequest { pub migration_id: uuid::Uuid, @@ -254,6 +636,24 @@ pub mod types { } } + ///InstanceMigrateStatusResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "$ref": "#/components/schemas/MigrationState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateStatusResponse { pub state: MigrationState, @@ -271,6 +671,62 @@ pub mod types { } } + ///InstanceProperties + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "bootrom_id", + /// "description", + /// "id", + /// "image_id", + /// "memory", + /// "name", + /// "vcpus" + /// ], + /// "properties": { + /// "bootrom_id": { + /// "description": "ID of the bootrom used to initialize this + /// Instance.", "type": "string", + /// "format": "uuid" + /// }, + /// "description": { + /// "description": "Free-form text description of an Instance.", + /// "type": "string" + /// }, + /// "id": { + /// "description": "Unique identifier for this Instance.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "image_id": { + /// "description": "ID of the image used to initialize this Instance.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "memory": { + /// "description": "Size of memory allocated to the Instance, in MiB.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "name": { + /// "description": "Human-readable name of the Instance.", + /// "type": "string" + /// }, + /// "vcpus": { + /// "description": "Number of vCPUs to be allocated to the Instance.", + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceProperties { ///ID of the bootrom used to initialize this Instance. @@ -302,6 +758,28 @@ pub mod types { } ///Current state of an Instance. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Current state of an Instance.", + /// "type": "string", + /// "enum": [ + /// "Creating", + /// "Starting", + /// "Running", + /// "Stopping", + /// "Stopped", + /// "Rebooting", + /// "Migrating", + /// "Repairing", + /// "Failed", + /// "Destroyed" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceState { Creating, @@ -379,6 +857,26 @@ pub mod types { } } + ///InstanceStateMonitorRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "gen" + /// ], + /// "properties": { + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceStateMonitorRequest { pub gen: u64, @@ -396,6 +894,30 @@ pub mod types { } } + ///InstanceStateMonitorResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "gen", + /// "state" + /// ], + /// "properties": { + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "state": { + /// "$ref": "#/components/schemas/InstanceState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceStateMonitorResponse { pub gen: u64, @@ -414,6 +936,22 @@ pub mod types { } } + ///InstanceStateRequested + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "Run", + /// "Stop", + /// "Reboot", + /// "MigrateStart" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceStateRequested { Run, @@ -473,6 +1011,28 @@ pub mod types { } } + ///MigrationState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "Sync", + /// "RamPush", + /// "Pause", + /// "RamPushDirty", + /// "Device", + /// "Arch", + /// "Resume", + /// "RamPull", + /// "Finish", + /// "Error" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum MigrationState { Sync, @@ -550,6 +1110,28 @@ pub mod types { } } + ///NetworkInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "attachment", + /// "name" + /// ], + /// "properties": { + /// "attachment": { + /// "$ref": "#/components/schemas/NetworkInterfaceAttachmentState" + /// }, + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterface { pub attachment: NetworkInterfaceAttachmentState, @@ -568,6 +1150,36 @@ pub mod types { } } + ///NetworkInterfaceAttachmentState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "string", + /// "enum": [ + /// "Detached", + /// "Faulted" + /// ] + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "Attached" + /// ], + /// "properties": { + /// "Attached": { + /// "$ref": "#/components/schemas/Slot" + /// } + /// }, + /// "additionalProperties": false + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub enum NetworkInterfaceAttachmentState { Detached, @@ -587,6 +1199,28 @@ pub mod types { } } + ///NetworkInterfaceRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name", + /// "slot" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "slot": { + /// "$ref": "#/components/schemas/Slot" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceRequest { pub name: String, @@ -607,6 +1241,18 @@ pub mod types { ///A stable index which is translated by Propolis into a PCI BDF, visible /// to the guest. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A stable index which is translated by Propolis into a + /// PCI BDF, visible to the guest.", "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Slot(pub u8); impl std::ops::Deref for Slot { @@ -668,6 +1314,144 @@ pub mod types { } } + ///VolumeConstructionRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "sub_volumes", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "read_only_parent": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// ] + /// }, + /// "sub_volumes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "volume" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "type", + /// "url" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "gen", + /// "opts", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "opts": { + /// "$ref": "#/components/schemas/CrucibleOpts" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "region" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "path", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "file" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum VolumeConstructionRequest { diff --git a/progenitor-impl/tests/output/propolis-server-builder.out b/progenitor-impl/tests/output/propolis-server-builder.out index 3852f12..5da6099 100644 --- a/progenitor-impl/tests/output/propolis-server-builder.out +++ b/progenitor-impl/tests/output/propolis-server-builder.out @@ -7,6 +7,78 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///CrucibleOpts + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "lossy", + /// "read_only", + /// "target" + /// ], + /// "properties": { + /// "cert_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "control": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "flush_timeout": { + /// "type": [ + /// "integer", + /// "null" + /// ], + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "key": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "key_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "lossy": { + /// "type": "boolean" + /// }, + /// "read_only": { + /// "type": "boolean" + /// }, + /// "root_cert_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "target": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct CrucibleOpts { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -39,6 +111,35 @@ pub mod types { } } + ///DiskAttachment + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disk_id", + /// "generation_id", + /// "state" + /// ], + /// "properties": { + /// "disk_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "generation_id": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "state": { + /// "$ref": "#/components/schemas/DiskAttachmentState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DiskAttachment { pub disk_id: uuid::Uuid, @@ -58,6 +159,38 @@ pub mod types { } } + ///DiskAttachmentState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "string", + /// "enum": [ + /// "Detached", + /// "Destroyed", + /// "Faulted" + /// ] + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "Attached" + /// ], + /// "properties": { + /// "Attached": { + /// "type": "string", + /// "format": "uuid" + /// } + /// }, + /// "additionalProperties": false + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub enum DiskAttachmentState { Detached, @@ -78,6 +211,46 @@ pub mod types { } } + ///DiskRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "device", + /// "gen", + /// "name", + /// "read_only", + /// "slot", + /// "volume_construction_request" + /// ], + /// "properties": { + /// "device": { + /// "type": "string" + /// }, + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "read_only": { + /// "type": "boolean" + /// }, + /// "slot": { + /// "$ref": "#/components/schemas/Slot" + /// }, + /// "volume_construction_request": { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct DiskRequest { pub device: String, @@ -101,6 +274,31 @@ pub mod types { } ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -121,6 +319,42 @@ pub mod types { } } + ///Instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disks", + /// "nics", + /// "properties", + /// "state" + /// ], + /// "properties": { + /// "disks": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/DiskAttachment" + /// } + /// }, + /// "nics": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterface" + /// } + /// }, + /// "properties": { + /// "$ref": "#/components/schemas/InstanceProperties" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/InstanceState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Instance { pub disks: Vec, @@ -141,6 +375,51 @@ pub mod types { } } + ///InstanceEnsureRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "properties" + /// ], + /// "properties": { + /// "cloud_init_bytes": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "disks": { + /// "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/DiskRequest" + /// } + /// }, + /// "migrate": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceMigrateInitiateRequest" + /// } + /// ] + /// }, + /// "nics": { + /// "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterfaceRequest" + /// } + /// }, + /// "properties": { + /// "$ref": "#/components/schemas/InstanceProperties" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceEnsureRequest { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -166,6 +445,25 @@ pub mod types { } } + ///InstanceEnsureResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "migrate": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceMigrateInitiateResponse" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceEnsureResponse { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -184,6 +482,24 @@ pub mod types { } } + ///InstanceGetResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "instance" + /// ], + /// "properties": { + /// "instance": { + /// "$ref": "#/components/schemas/Instance" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceGetResponse { pub instance: Instance, @@ -201,6 +517,34 @@ pub mod types { } } + ///InstanceMigrateInitiateRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id", + /// "src_addr", + /// "src_uuid" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "src_addr": { + /// "type": "string" + /// }, + /// "src_uuid": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceMigrateInitiateRequest { pub migration_id: uuid::Uuid, @@ -220,6 +564,25 @@ pub mod types { } } + ///InstanceMigrateInitiateResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceMigrateInitiateResponse { pub migration_id: uuid::Uuid, @@ -237,6 +600,25 @@ pub mod types { } } + ///InstanceMigrateStatusRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceMigrateStatusRequest { pub migration_id: uuid::Uuid, @@ -254,6 +636,24 @@ pub mod types { } } + ///InstanceMigrateStatusResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "$ref": "#/components/schemas/MigrationState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceMigrateStatusResponse { pub state: MigrationState, @@ -271,6 +671,62 @@ pub mod types { } } + ///InstanceProperties + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "bootrom_id", + /// "description", + /// "id", + /// "image_id", + /// "memory", + /// "name", + /// "vcpus" + /// ], + /// "properties": { + /// "bootrom_id": { + /// "description": "ID of the bootrom used to initialize this + /// Instance.", "type": "string", + /// "format": "uuid" + /// }, + /// "description": { + /// "description": "Free-form text description of an Instance.", + /// "type": "string" + /// }, + /// "id": { + /// "description": "Unique identifier for this Instance.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "image_id": { + /// "description": "ID of the image used to initialize this Instance.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "memory": { + /// "description": "Size of memory allocated to the Instance, in MiB.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "name": { + /// "description": "Human-readable name of the Instance.", + /// "type": "string" + /// }, + /// "vcpus": { + /// "description": "Number of vCPUs to be allocated to the Instance.", + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceProperties { ///ID of the bootrom used to initialize this Instance. @@ -302,6 +758,28 @@ pub mod types { } ///Current state of an Instance. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Current state of an Instance.", + /// "type": "string", + /// "enum": [ + /// "Creating", + /// "Starting", + /// "Running", + /// "Stopping", + /// "Stopped", + /// "Rebooting", + /// "Migrating", + /// "Repairing", + /// "Failed", + /// "Destroyed" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -391,6 +869,26 @@ pub mod types { } } + ///InstanceStateMonitorRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "gen" + /// ], + /// "properties": { + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceStateMonitorRequest { pub gen: u64, @@ -408,6 +906,30 @@ pub mod types { } } + ///InstanceStateMonitorResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "gen", + /// "state" + /// ], + /// "properties": { + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "state": { + /// "$ref": "#/components/schemas/InstanceState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct InstanceStateMonitorResponse { pub gen: u64, @@ -426,6 +948,22 @@ pub mod types { } } + ///InstanceStateRequested + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "Run", + /// "Stop", + /// "Reboot", + /// "MigrateStart" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -497,6 +1035,28 @@ pub mod types { } } + ///MigrationState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "Sync", + /// "RamPush", + /// "Pause", + /// "RamPushDirty", + /// "Device", + /// "Arch", + /// "Resume", + /// "RamPull", + /// "Finish", + /// "Error" + /// ] + ///} + /// ``` + ///
#[derive( Clone, Copy, @@ -586,6 +1146,28 @@ pub mod types { } } + ///NetworkInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "attachment", + /// "name" + /// ], + /// "properties": { + /// "attachment": { + /// "$ref": "#/components/schemas/NetworkInterfaceAttachmentState" + /// }, + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct NetworkInterface { pub attachment: NetworkInterfaceAttachmentState, @@ -604,6 +1186,36 @@ pub mod types { } } + ///NetworkInterfaceAttachmentState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "string", + /// "enum": [ + /// "Detached", + /// "Faulted" + /// ] + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "Attached" + /// ], + /// "properties": { + /// "Attached": { + /// "$ref": "#/components/schemas/Slot" + /// } + /// }, + /// "additionalProperties": false + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub enum NetworkInterfaceAttachmentState { Detached, @@ -623,6 +1235,28 @@ pub mod types { } } + ///NetworkInterfaceRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name", + /// "slot" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "slot": { + /// "$ref": "#/components/schemas/Slot" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct NetworkInterfaceRequest { pub name: String, @@ -643,6 +1277,18 @@ pub mod types { ///A stable index which is translated by Propolis into a PCI BDF, visible /// to the guest. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A stable index which is translated by Propolis into a + /// PCI BDF, visible to the guest.", "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] pub struct Slot(pub u8); impl std::ops::Deref for Slot { @@ -704,6 +1350,144 @@ pub mod types { } } + ///VolumeConstructionRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "sub_volumes", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "read_only_parent": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// ] + /// }, + /// "sub_volumes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "volume" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "type", + /// "url" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "gen", + /// "opts", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "opts": { + /// "$ref": "#/components/schemas/CrucibleOpts" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "region" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "path", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "file" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)] #[serde(tag = "type")] pub enum VolumeConstructionRequest { diff --git a/progenitor-impl/tests/output/propolis-server-cli.out b/progenitor-impl/tests/output/propolis-server-cli.out index 6cdb4c0..7d44ec6 100644 --- a/progenitor-impl/tests/output/propolis-server-cli.out +++ b/progenitor-impl/tests/output/propolis-server-cli.out @@ -393,7 +393,6 @@ pub trait CliOverride { } impl CliOverride for () {} - #[derive(Copy, Clone, Debug)] pub enum CliCommand { InstanceGet, diff --git a/progenitor-impl/tests/output/propolis-server-positional.out b/progenitor-impl/tests/output/propolis-server-positional.out index 0a69540..40ef23c 100644 --- a/progenitor-impl/tests/output/propolis-server-positional.out +++ b/progenitor-impl/tests/output/propolis-server-positional.out @@ -7,6 +7,78 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///CrucibleOpts + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "id", + /// "lossy", + /// "read_only", + /// "target" + /// ], + /// "properties": { + /// "cert_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "control": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "flush_timeout": { + /// "type": [ + /// "integer", + /// "null" + /// ], + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "key": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "key_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "lossy": { + /// "type": "boolean" + /// }, + /// "read_only": { + /// "type": "boolean" + /// }, + /// "root_cert_pem": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "target": { + /// "type": "array", + /// "items": { + /// "type": "string" + /// } + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct CrucibleOpts { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -33,6 +105,35 @@ pub mod types { } } + ///DiskAttachment + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disk_id", + /// "generation_id", + /// "state" + /// ], + /// "properties": { + /// "disk_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "generation_id": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "state": { + /// "$ref": "#/components/schemas/DiskAttachmentState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskAttachment { pub disk_id: uuid::Uuid, @@ -46,6 +147,38 @@ pub mod types { } } + ///DiskAttachmentState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "string", + /// "enum": [ + /// "Detached", + /// "Destroyed", + /// "Faulted" + /// ] + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "Attached" + /// ], + /// "properties": { + /// "Attached": { + /// "type": "string", + /// "format": "uuid" + /// } + /// }, + /// "additionalProperties": false + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub enum DiskAttachmentState { Detached, @@ -66,6 +199,46 @@ pub mod types { } } + ///DiskRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "device", + /// "gen", + /// "name", + /// "read_only", + /// "slot", + /// "volume_construction_request" + /// ], + /// "properties": { + /// "device": { + /// "type": "string" + /// }, + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "name": { + /// "type": "string" + /// }, + /// "read_only": { + /// "type": "boolean" + /// }, + /// "slot": { + /// "$ref": "#/components/schemas/Slot" + /// }, + /// "volume_construction_request": { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskRequest { pub device: String, @@ -83,6 +256,31 @@ pub mod types { } ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -97,6 +295,42 @@ pub mod types { } } + ///Instance + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "disks", + /// "nics", + /// "properties", + /// "state" + /// ], + /// "properties": { + /// "disks": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/DiskAttachment" + /// } + /// }, + /// "nics": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterface" + /// } + /// }, + /// "properties": { + /// "$ref": "#/components/schemas/InstanceProperties" + /// }, + /// "state": { + /// "$ref": "#/components/schemas/InstanceState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Instance { pub disks: Vec, @@ -111,6 +345,51 @@ pub mod types { } } + ///InstanceEnsureRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "properties" + /// ], + /// "properties": { + /// "cloud_init_bytes": { + /// "type": [ + /// "string", + /// "null" + /// ] + /// }, + /// "disks": { + /// "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/DiskRequest" + /// } + /// }, + /// "migrate": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceMigrateInitiateRequest" + /// } + /// ] + /// }, + /// "nics": { + /// "default": [], + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/NetworkInterfaceRequest" + /// } + /// }, + /// "properties": { + /// "$ref": "#/components/schemas/InstanceProperties" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceEnsureRequest { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -130,6 +409,25 @@ pub mod types { } } + ///InstanceEnsureResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "properties": { + /// "migrate": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/InstanceMigrateInitiateResponse" + /// } + /// ] + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceEnsureResponse { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -142,6 +440,24 @@ pub mod types { } } + ///InstanceGetResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "instance" + /// ], + /// "properties": { + /// "instance": { + /// "$ref": "#/components/schemas/Instance" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceGetResponse { pub instance: Instance, @@ -153,6 +469,34 @@ pub mod types { } } + ///InstanceMigrateInitiateRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id", + /// "src_addr", + /// "src_uuid" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "src_addr": { + /// "type": "string" + /// }, + /// "src_uuid": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateInitiateRequest { pub migration_id: uuid::Uuid, @@ -166,6 +510,25 @@ pub mod types { } } + ///InstanceMigrateInitiateResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateInitiateResponse { pub migration_id: uuid::Uuid, @@ -177,6 +540,25 @@ pub mod types { } } + ///InstanceMigrateStatusRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "migration_id" + /// ], + /// "properties": { + /// "migration_id": { + /// "type": "string", + /// "format": "uuid" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateStatusRequest { pub migration_id: uuid::Uuid, @@ -188,6 +570,24 @@ pub mod types { } } + ///InstanceMigrateStatusResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "state" + /// ], + /// "properties": { + /// "state": { + /// "$ref": "#/components/schemas/MigrationState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateStatusResponse { pub state: MigrationState, @@ -199,6 +599,62 @@ pub mod types { } } + ///InstanceProperties + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "bootrom_id", + /// "description", + /// "id", + /// "image_id", + /// "memory", + /// "name", + /// "vcpus" + /// ], + /// "properties": { + /// "bootrom_id": { + /// "description": "ID of the bootrom used to initialize this + /// Instance.", "type": "string", + /// "format": "uuid" + /// }, + /// "description": { + /// "description": "Free-form text description of an Instance.", + /// "type": "string" + /// }, + /// "id": { + /// "description": "Unique identifier for this Instance.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "image_id": { + /// "description": "ID of the image used to initialize this Instance.", + /// "type": "string", + /// "format": "uuid" + /// }, + /// "memory": { + /// "description": "Size of memory allocated to the Instance, in MiB.", + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "name": { + /// "description": "Human-readable name of the Instance.", + /// "type": "string" + /// }, + /// "vcpus": { + /// "description": "Number of vCPUs to be allocated to the Instance.", + /// "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceProperties { ///ID of the bootrom used to initialize this Instance. @@ -224,6 +680,28 @@ pub mod types { } ///Current state of an Instance. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Current state of an Instance.", + /// "type": "string", + /// "enum": [ + /// "Creating", + /// "Starting", + /// "Running", + /// "Stopping", + /// "Stopped", + /// "Rebooting", + /// "Migrating", + /// "Repairing", + /// "Failed", + /// "Destroyed" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceState { Creating, @@ -301,6 +779,26 @@ pub mod types { } } + ///InstanceStateMonitorRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "gen" + /// ], + /// "properties": { + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceStateMonitorRequest { pub gen: u64, @@ -312,6 +810,30 @@ pub mod types { } } + ///InstanceStateMonitorResponse + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "gen", + /// "state" + /// ], + /// "properties": { + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "state": { + /// "$ref": "#/components/schemas/InstanceState" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceStateMonitorResponse { pub gen: u64, @@ -324,6 +846,22 @@ pub mod types { } } + ///InstanceStateRequested + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "Run", + /// "Stop", + /// "Reboot", + /// "MigrateStart" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceStateRequested { Run, @@ -383,6 +921,28 @@ pub mod types { } } + ///MigrationState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "string", + /// "enum": [ + /// "Sync", + /// "RamPush", + /// "Pause", + /// "RamPushDirty", + /// "Device", + /// "Arch", + /// "Resume", + /// "RamPull", + /// "Finish", + /// "Error" + /// ] + ///} + /// ``` + ///
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum MigrationState { Sync, @@ -460,6 +1020,28 @@ pub mod types { } } + ///NetworkInterface + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "attachment", + /// "name" + /// ], + /// "properties": { + /// "attachment": { + /// "$ref": "#/components/schemas/NetworkInterfaceAttachmentState" + /// }, + /// "name": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterface { pub attachment: NetworkInterfaceAttachmentState, @@ -472,6 +1054,36 @@ pub mod types { } } + ///NetworkInterfaceAttachmentState + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "string", + /// "enum": [ + /// "Detached", + /// "Faulted" + /// ] + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "Attached" + /// ], + /// "properties": { + /// "Attached": { + /// "$ref": "#/components/schemas/Slot" + /// } + /// }, + /// "additionalProperties": false + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub enum NetworkInterfaceAttachmentState { Detached, @@ -491,6 +1103,28 @@ pub mod types { } } + ///NetworkInterfaceRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "name", + /// "slot" + /// ], + /// "properties": { + /// "name": { + /// "type": "string" + /// }, + /// "slot": { + /// "$ref": "#/components/schemas/Slot" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceRequest { pub name: String, @@ -505,6 +1139,18 @@ pub mod types { ///A stable index which is translated by Propolis into a PCI BDF, visible /// to the guest. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "A stable index which is translated by Propolis into a + /// PCI BDF, visible to the guest.", "type": "integer", + /// "format": "uint8", + /// "minimum": 0.0 + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Slot(pub u8); impl std::ops::Deref for Slot { @@ -566,6 +1212,144 @@ pub mod types { } } + ///VolumeConstructionRequest + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "oneOf": [ + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "sub_volumes", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "read_only_parent": { + /// "allOf": [ + /// { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// ] + /// }, + /// "sub_volumes": { + /// "type": "array", + /// "items": { + /// "$ref": "#/components/schemas/VolumeConstructionRequest" + /// } + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "volume" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "type", + /// "url" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "url" + /// ] + /// }, + /// "url": { + /// "type": "string" + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "gen", + /// "opts", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "gen": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "opts": { + /// "$ref": "#/components/schemas/CrucibleOpts" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "region" + /// ] + /// } + /// } + /// }, + /// { + /// "type": "object", + /// "required": [ + /// "block_size", + /// "id", + /// "path", + /// "type" + /// ], + /// "properties": { + /// "block_size": { + /// "type": "integer", + /// "format": "uint64", + /// "minimum": 0.0 + /// }, + /// "id": { + /// "type": "string", + /// "format": "uuid" + /// }, + /// "path": { + /// "type": "string" + /// }, + /// "type": { + /// "type": "string", + /// "enum": [ + /// "file" + /// ] + /// } + /// } + /// } + /// ] + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum VolumeConstructionRequest { diff --git a/progenitor-impl/tests/output/test_default_params_builder.out b/progenitor-impl/tests/output/test_default_params_builder.out index 491259e..491d4db 100644 --- a/progenitor-impl/tests/output/test_default_params_builder.out +++ b/progenitor-impl/tests/output/test_default_params_builder.out @@ -7,6 +7,41 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///BodyWithDefaults + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "s" + /// ], + /// "properties": { + /// "forty-two": { + /// "default": 42, + /// "type": "integer", + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "s": { + /// "type": "string" + /// }, + /// "something": { + /// "default": true, + /// "type": [ + /// "boolean", + /// "null" + /// ] + /// }, + /// "yes": { + /// "default": false, + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct BodyWithDefaults { #[serde(rename = "forty-two", default = "defaults::default_u64::")] @@ -31,6 +66,31 @@ pub mod types { } ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/progenitor-impl/tests/output/test_default_params_positional.out b/progenitor-impl/tests/output/test_default_params_positional.out index 5ca013c..287f28a 100644 --- a/progenitor-impl/tests/output/test_default_params_positional.out +++ b/progenitor-impl/tests/output/test_default_params_positional.out @@ -7,6 +7,41 @@ pub mod types { use serde::{Deserialize, Serialize}; #[allow(unused_imports)] use std::convert::TryFrom; + ///BodyWithDefaults + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "type": "object", + /// "required": [ + /// "s" + /// ], + /// "properties": { + /// "forty-two": { + /// "default": 42, + /// "type": "integer", + /// "format": "uint32", + /// "minimum": 0.0 + /// }, + /// "s": { + /// "type": "string" + /// }, + /// "something": { + /// "default": true, + /// "type": [ + /// "boolean", + /// "null" + /// ] + /// }, + /// "yes": { + /// "default": false, + /// "type": "boolean" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct BodyWithDefaults { #[serde(rename = "forty-two", default = "defaults::default_u64::")] @@ -25,6 +60,31 @@ pub mod types { } ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/progenitor-impl/tests/output/test_freeform_response.out b/progenitor-impl/tests/output/test_freeform_response.out index ba64d54..8b1d54c 100644 --- a/progenitor-impl/tests/output/test_freeform_response.out +++ b/progenitor-impl/tests/output/test_freeform_response.out @@ -8,6 +8,31 @@ pub mod types { #[allow(unused_imports)] use std::convert::TryFrom; ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/progenitor-impl/tests/output/test_renamed_parameters.out b/progenitor-impl/tests/output/test_renamed_parameters.out index 9701c65..2cfb68b 100644 --- a/progenitor-impl/tests/output/test_renamed_parameters.out +++ b/progenitor-impl/tests/output/test_renamed_parameters.out @@ -8,6 +8,31 @@ pub mod types { #[allow(unused_imports)] use std::convert::TryFrom; ///Error information from a response. + /// + ///
JSON schema + /// + /// ```json + ///{ + /// "description": "Error information from a response.", + /// "type": "object", + /// "required": [ + /// "message", + /// "request_id" + /// ], + /// "properties": { + /// "error_code": { + /// "type": "string" + /// }, + /// "message": { + /// "type": "string" + /// }, + /// "request_id": { + /// "type": "string" + /// } + /// } + ///} + /// ``` + ///
#[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { #[serde(default, skip_serializing_if = "Option::is_none")]