diff --git a/Cargo.lock b/Cargo.lock index efd0c3dc..7e0ed2a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -480,12 +480,14 @@ version = "0.0.1" dependencies = [ "base64", "chrono", + "prettyplease", "progenitor", "progenitor-client", "rand", "reqwest", "serde", "serde_json", + "syn 1.0.109", "uuid", ] @@ -1217,6 +1219,16 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + [[package]] name = "proc-macro2" version = "1.0.56" @@ -1245,6 +1257,7 @@ dependencies = [ "rand", "regress", "reqwest", + "rustfmt-wrapper", "schemars", "serde", "serde_json", diff --git a/example-build/Cargo.toml b/example-build/Cargo.toml index d1eaac93..7c9d5b37 100644 --- a/example-build/Cargo.toml +++ b/example-build/Cargo.toml @@ -14,5 +14,7 @@ serde = { version = "1.0", features = ["derive"] } uuid = { version = "1.3", features = ["serde", "v4"] } [build-dependencies] +prettyplease = "0.1.25" progenitor = { path = "../progenitor" } serde_json = "1.0" +syn = "1.0" diff --git a/example-build/build.rs b/example-build/build.rs index ffb0ab44..2119be59 100644 --- a/example-build/build.rs +++ b/example-build/build.rs @@ -13,7 +13,9 @@ fn main() { let spec = serde_json::from_reader(file).unwrap(); let mut generator = progenitor::Generator::default(); - let content = generator.generate_text(&spec).unwrap(); + let tokens = generator.generate_tokens(&spec).unwrap(); + let ast = syn::parse2(tokens).unwrap(); + let content = prettyplease::unparse(&ast); let mut out_file = Path::new(&env::var("OUT_DIR").unwrap()).to_path_buf(); out_file.push("codegen.rs"); diff --git a/progenitor-impl/Cargo.toml b/progenitor-impl/Cargo.toml index fb24da2d..029d1805 100644 --- a/progenitor-impl/Cargo.toml +++ b/progenitor-impl/Cargo.toml @@ -15,7 +15,6 @@ openapiv3 = "1.0.0" proc-macro2 = "1.0" quote = "1.0" regex = "1.7" -rustfmt-wrapper = "0.2.0" schemars = { version = "0.8.12", features = ["chrono", "uuid1"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" @@ -31,5 +30,6 @@ dropshot = { git = "https://github.com/oxidecomputer/dropshot", default-features expectorate = "1.0" http = "0.2.9" hyper = "0.14.26" +rustfmt-wrapper = "0.2.0" serde_yaml = "0.9" serde_json = "1.0.95" diff --git a/progenitor-impl/src/cli.rs b/progenitor-impl/src/cli.rs index f7d265d4..95802e71 100644 --- a/progenitor-impl/src/cli.rs +++ b/progenitor-impl/src/cli.rs @@ -30,16 +30,7 @@ impl Generator { ) -> Result { let output = self.cli(spec, crate_name)?; - let content = rustfmt_wrapper::rustfmt_config( - rustfmt_wrapper::config::Config { - format_strings: Some(true), - ..Default::default() - }, - output, - ) - .unwrap(); - - space_out_items(content) + space_out_items(output.to_string()) } pub fn cli( diff --git a/progenitor-impl/src/lib.rs b/progenitor-impl/src/lib.rs index 331c3b1a..3bb78a8e 100644 --- a/progenitor-impl/src/lib.rs +++ b/progenitor-impl/src/lib.rs @@ -505,41 +505,19 @@ impl Generator { /// Render text output. pub fn generate_text(&mut self, spec: &OpenAPI) -> Result { - self.generate_text_impl( - spec, - rustfmt_wrapper::config::Config::default(), - ) + self.generate_text_impl(spec) } /// Render text output and normalize doc comments - /// - /// Requires a nightly install of `rustfmt` (even if the target project is - /// not using nightly). pub fn generate_text_normalize_comments( &mut self, spec: &OpenAPI, ) -> Result { - self.generate_text_impl( - spec, - rustfmt_wrapper::config::Config { - normalize_doc_attributes: Some(true), - wrap_comments: Some(true), - ..Default::default() - }, - ) + self.generate_text_impl(spec) } - fn generate_text_impl( - &mut self, - spec: &OpenAPI, - config: rustfmt_wrapper::config::Config, - ) -> Result { - let output = self.generate_tokens(spec)?; - - // Format the file with rustfmt. - let content = rustfmt_wrapper::rustfmt_config(config, output).unwrap(); - - space_out_items(content) + fn generate_text_impl(&mut self, spec: &OpenAPI) -> Result { + space_out_items(self.generate_tokens(spec)?.to_string()) } // TODO deprecate? diff --git a/progenitor-impl/src/to_schema.rs b/progenitor-impl/src/to_schema.rs index 4f33a47f..009d17b4 100644 --- a/progenitor-impl/src/to_schema.rs +++ b/progenitor-impl/src/to_schema.rs @@ -89,7 +89,7 @@ impl Convert for openapiv3::Schema { // 2. It can be used within a oneOf or anyOf schema to determine which // subschema is relevant. This is easier to detect because it doesn't - // required chasing references. For each subschema we can then make it + // require chasing references. For each subschema we can then make it // an allOf union of the actual subschema along with a fixed-field // structure. diff --git a/progenitor-impl/tests/output/buildomat-builder-tagged.out b/progenitor-impl/tests/output/buildomat-builder-tagged.out index abb253ff..d14a5acf 100644 --- a/progenitor-impl/tests/output/buildomat-builder-tagged.out +++ b/progenitor-impl/tests/output/buildomat-builder-tagged.out @@ -15,19 +15,16 @@ pub mod types { pub script: String, pub state: String, } - impl From<&Task> for Task { fn from(value: &Task) -> Self { value.clone() } } - impl Task { pub fn builder() -> builder::Task { builder::Task::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskEvent { pub payload: String, @@ -35,38 +32,32 @@ pub mod types { pub stream: String, pub time: chrono::DateTime, } - impl From<&TaskEvent> for TaskEvent { fn from(value: &TaskEvent) -> Self { value.clone() } } - impl TaskEvent { pub fn builder() -> builder::TaskEvent { builder::TaskEvent::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskOutput { pub id: String, pub path: String, pub size: u64, } - impl From<&TaskOutput> for TaskOutput { fn from(value: &TaskOutput) -> Self { value.clone() } } - impl TaskOutput { pub fn builder() -> builder::TaskOutput { builder::TaskOutput::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskSubmit { pub name: String, @@ -74,107 +65,89 @@ pub mod types { pub output_rules: Vec, pub script: String, } - impl From<&TaskSubmit> for TaskSubmit { fn from(value: &TaskSubmit) -> Self { value.clone() } } - impl TaskSubmit { pub fn builder() -> builder::TaskSubmit { builder::TaskSubmit::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskSubmitResult { pub id: String, } - impl From<&TaskSubmitResult> for TaskSubmitResult { fn from(value: &TaskSubmitResult) -> Self { value.clone() } } - impl TaskSubmitResult { pub fn builder() -> builder::TaskSubmitResult { builder::TaskSubmitResult::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UploadedChunk { pub id: String, } - impl From<&UploadedChunk> for UploadedChunk { fn from(value: &UploadedChunk) -> Self { value.clone() } } - impl UploadedChunk { pub fn builder() -> builder::UploadedChunk { builder::UploadedChunk::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreate { pub name: String, } - impl From<&UserCreate> for UserCreate { fn from(value: &UserCreate) -> Self { value.clone() } } - impl UserCreate { pub fn builder() -> builder::UserCreate { builder::UserCreate::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreateResult { pub id: String, pub name: String, pub token: String, } - impl From<&UserCreateResult> for UserCreateResult { fn from(value: &UserCreateResult) -> Self { value.clone() } } - impl UserCreateResult { pub fn builder() -> builder::UserCreateResult { builder::UserCreateResult::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WhoamiResult { pub id: String, pub name: String, } - impl From<&WhoamiResult> for WhoamiResult { fn from(value: &WhoamiResult) -> Self { value.clone() } } - impl WhoamiResult { pub fn builder() -> builder::WhoamiResult { builder::WhoamiResult::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Worker { pub deleted: bool, @@ -186,183 +159,153 @@ pub mod types { pub recycle: bool, pub tasks: Vec, } - impl From<&Worker> for Worker { fn from(value: &Worker) -> Self { value.clone() } } - impl Worker { pub fn builder() -> builder::Worker { builder::Worker::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerAddOutput { pub chunks: Vec, pub path: String, pub size: i64, } - impl From<&WorkerAddOutput> for WorkerAddOutput { fn from(value: &WorkerAddOutput) -> Self { value.clone() } } - impl WorkerAddOutput { pub fn builder() -> builder::WorkerAddOutput { builder::WorkerAddOutput::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerAppendTask { pub payload: String, pub stream: String, pub time: chrono::DateTime, } - impl From<&WorkerAppendTask> for WorkerAppendTask { fn from(value: &WorkerAppendTask) -> Self { value.clone() } } - impl WorkerAppendTask { pub fn builder() -> builder::WorkerAppendTask { builder::WorkerAppendTask::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerBootstrap { pub bootstrap: String, pub token: String, } - impl From<&WorkerBootstrap> for WorkerBootstrap { fn from(value: &WorkerBootstrap) -> Self { value.clone() } } - impl WorkerBootstrap { pub fn builder() -> builder::WorkerBootstrap { builder::WorkerBootstrap::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerBootstrapResult { pub id: String, } - impl From<&WorkerBootstrapResult> for WorkerBootstrapResult { fn from(value: &WorkerBootstrapResult) -> Self { value.clone() } } - impl WorkerBootstrapResult { pub fn builder() -> builder::WorkerBootstrapResult { builder::WorkerBootstrapResult::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerCompleteTask { pub failed: bool, } - impl From<&WorkerCompleteTask> for WorkerCompleteTask { fn from(value: &WorkerCompleteTask) -> Self { value.clone() } } - impl WorkerCompleteTask { pub fn builder() -> builder::WorkerCompleteTask { builder::WorkerCompleteTask::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerPingResult { pub poweroff: bool, #[serde(default, skip_serializing_if = "Option::is_none")] pub task: Option, } - impl From<&WorkerPingResult> for WorkerPingResult { fn from(value: &WorkerPingResult) -> Self { value.clone() } } - impl WorkerPingResult { pub fn builder() -> builder::WorkerPingResult { builder::WorkerPingResult::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerPingTask { pub id: String, pub output_rules: Vec, pub script: String, } - impl From<&WorkerPingTask> for WorkerPingTask { fn from(value: &WorkerPingTask) -> Self { value.clone() } } - impl WorkerPingTask { pub fn builder() -> builder::WorkerPingTask { builder::WorkerPingTask::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerTask { pub id: String, pub name: String, pub owner: String, } - impl From<&WorkerTask> for WorkerTask { fn from(value: &WorkerTask) -> Self { value.clone() } } - impl WorkerTask { pub fn builder() -> builder::WorkerTask { builder::WorkerTask::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkersResult { pub workers: Vec, } - impl From<&WorkersResult> for WorkersResult { fn from(value: &WorkersResult) -> Self { value.clone() } } - impl WorkersResult { pub fn builder() -> builder::WorkersResult { builder::WorkersResult::default() } } - pub mod builder { #[derive(Clone, Debug)] pub struct Task { @@ -372,7 +315,6 @@ pub mod types { script: Result, state: Result, } - impl Default for Task { fn default() -> Self { Self { @@ -384,7 +326,6 @@ pub mod types { } } } - impl Task { pub fn id(mut self, value: T) -> Self where @@ -437,7 +378,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Task { type Error = String; fn try_from(value: Task) -> Result { @@ -450,7 +390,6 @@ pub mod types { }) } } - impl From for Task { fn from(value: super::Task) -> Self { Self { @@ -462,7 +401,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TaskEvent { payload: Result, @@ -470,7 +408,6 @@ pub mod types { stream: Result, time: Result, String>, } - impl Default for TaskEvent { fn default() -> Self { Self { @@ -481,7 +418,6 @@ pub mod types { } } } - impl TaskEvent { pub fn payload(mut self, value: T) -> Self where @@ -524,7 +460,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TaskEvent { type Error = String; fn try_from(value: TaskEvent) -> Result { @@ -536,7 +471,6 @@ pub mod types { }) } } - impl From for TaskEvent { fn from(value: super::TaskEvent) -> Self { Self { @@ -547,14 +481,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TaskOutput { id: Result, path: Result, size: Result, } - impl Default for TaskOutput { fn default() -> Self { Self { @@ -564,7 +496,6 @@ pub mod types { } } } - impl TaskOutput { pub fn id(mut self, value: T) -> Self where @@ -597,7 +528,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TaskOutput { type Error = String; fn try_from(value: TaskOutput) -> Result { @@ -608,7 +538,6 @@ pub mod types { }) } } - impl From for TaskOutput { fn from(value: super::TaskOutput) -> Self { Self { @@ -618,14 +547,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TaskSubmit { name: Result, output_rules: Result, String>, script: Result, } - impl Default for TaskSubmit { fn default() -> Self { Self { @@ -635,7 +562,6 @@ pub mod types { } } } - impl TaskSubmit { pub fn name(mut self, value: T) -> Self where @@ -668,7 +594,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TaskSubmit { type Error = String; fn try_from(value: TaskSubmit) -> Result { @@ -679,7 +604,6 @@ pub mod types { }) } } - impl From for TaskSubmit { fn from(value: super::TaskSubmit) -> Self { Self { @@ -689,12 +613,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TaskSubmitResult { id: Result, } - impl Default for TaskSubmitResult { fn default() -> Self { Self { @@ -702,7 +624,6 @@ pub mod types { } } } - impl TaskSubmitResult { pub fn id(mut self, value: T) -> Self where @@ -715,25 +636,21 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TaskSubmitResult { type Error = String; fn try_from(value: TaskSubmitResult) -> Result { Ok(Self { id: value.id? }) } } - impl From for TaskSubmitResult { fn from(value: super::TaskSubmitResult) -> Self { Self { id: Ok(value.id) } } } - #[derive(Clone, Debug)] pub struct UploadedChunk { id: Result, } - impl Default for UploadedChunk { fn default() -> Self { Self { @@ -741,7 +658,6 @@ pub mod types { } } } - impl UploadedChunk { pub fn id(mut self, value: T) -> Self where @@ -754,25 +670,21 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UploadedChunk { type Error = String; fn try_from(value: UploadedChunk) -> Result { Ok(Self { id: value.id? }) } } - impl From for UploadedChunk { fn from(value: super::UploadedChunk) -> Self { Self { id: Ok(value.id) } } } - #[derive(Clone, Debug)] pub struct UserCreate { name: Result, } - impl Default for UserCreate { fn default() -> Self { Self { @@ -780,7 +692,6 @@ pub mod types { } } } - impl UserCreate { pub fn name(mut self, value: T) -> Self where @@ -793,14 +704,12 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserCreate { type Error = String; fn try_from(value: UserCreate) -> Result { Ok(Self { name: value.name? }) } } - impl From for UserCreate { fn from(value: super::UserCreate) -> Self { Self { @@ -808,14 +717,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserCreateResult { id: Result, name: Result, token: Result, } - impl Default for UserCreateResult { fn default() -> Self { Self { @@ -825,7 +732,6 @@ pub mod types { } } } - impl UserCreateResult { pub fn id(mut self, value: T) -> Self where @@ -858,7 +764,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserCreateResult { type Error = String; fn try_from(value: UserCreateResult) -> Result { @@ -869,7 +774,6 @@ pub mod types { }) } } - impl From for UserCreateResult { fn from(value: super::UserCreateResult) -> Self { Self { @@ -879,13 +783,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WhoamiResult { id: Result, name: Result, } - impl Default for WhoamiResult { fn default() -> Self { Self { @@ -894,7 +796,6 @@ pub mod types { } } } - impl WhoamiResult { pub fn id(mut self, value: T) -> Self where @@ -917,7 +818,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WhoamiResult { type Error = String; fn try_from(value: WhoamiResult) -> Result { @@ -927,7 +827,6 @@ pub mod types { }) } } - impl From for WhoamiResult { fn from(value: super::WhoamiResult) -> Self { Self { @@ -936,7 +835,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Worker { deleted: Result, @@ -946,7 +844,6 @@ pub mod types { recycle: Result, tasks: Result, String>, } - impl Default for Worker { fn default() -> Self { Self { @@ -959,7 +856,6 @@ pub mod types { } } } - impl Worker { pub fn deleted(mut self, value: T) -> Self where @@ -1022,7 +918,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Worker { type Error = String; fn try_from(value: Worker) -> Result { @@ -1036,7 +931,6 @@ pub mod types { }) } } - impl From for Worker { fn from(value: super::Worker) -> Self { Self { @@ -1049,14 +943,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerAddOutput { chunks: Result, String>, path: Result, size: Result, } - impl Default for WorkerAddOutput { fn default() -> Self { Self { @@ -1066,7 +958,6 @@ pub mod types { } } } - impl WorkerAddOutput { pub fn chunks(mut self, value: T) -> Self where @@ -1099,7 +990,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerAddOutput { type Error = String; fn try_from(value: WorkerAddOutput) -> Result { @@ -1110,7 +1000,6 @@ pub mod types { }) } } - impl From for WorkerAddOutput { fn from(value: super::WorkerAddOutput) -> Self { Self { @@ -1120,14 +1009,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerAppendTask { payload: Result, stream: Result, time: Result, String>, } - impl Default for WorkerAppendTask { fn default() -> Self { Self { @@ -1137,7 +1024,6 @@ pub mod types { } } } - impl WorkerAppendTask { pub fn payload(mut self, value: T) -> Self where @@ -1170,7 +1056,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerAppendTask { type Error = String; fn try_from(value: WorkerAppendTask) -> Result { @@ -1181,7 +1066,6 @@ pub mod types { }) } } - impl From for WorkerAppendTask { fn from(value: super::WorkerAppendTask) -> Self { Self { @@ -1191,13 +1075,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerBootstrap { bootstrap: Result, token: Result, } - impl Default for WorkerBootstrap { fn default() -> Self { Self { @@ -1206,7 +1088,6 @@ pub mod types { } } } - impl WorkerBootstrap { pub fn bootstrap(mut self, value: T) -> Self where @@ -1229,7 +1110,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerBootstrap { type Error = String; fn try_from(value: WorkerBootstrap) -> Result { @@ -1239,7 +1119,6 @@ pub mod types { }) } } - impl From for WorkerBootstrap { fn from(value: super::WorkerBootstrap) -> Self { Self { @@ -1248,12 +1127,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerBootstrapResult { id: Result, } - impl Default for WorkerBootstrapResult { fn default() -> Self { Self { @@ -1261,7 +1138,6 @@ pub mod types { } } } - impl WorkerBootstrapResult { pub fn id(mut self, value: T) -> Self where @@ -1274,25 +1150,21 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerBootstrapResult { type Error = String; fn try_from(value: WorkerBootstrapResult) -> Result { Ok(Self { id: value.id? }) } } - impl From for WorkerBootstrapResult { fn from(value: super::WorkerBootstrapResult) -> Self { Self { id: Ok(value.id) } } } - #[derive(Clone, Debug)] pub struct WorkerCompleteTask { failed: Result, } - impl Default for WorkerCompleteTask { fn default() -> Self { Self { @@ -1300,7 +1172,6 @@ pub mod types { } } } - impl WorkerCompleteTask { pub fn failed(mut self, value: T) -> Self where @@ -1313,7 +1184,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerCompleteTask { type Error = String; fn try_from(value: WorkerCompleteTask) -> Result { @@ -1322,7 +1192,6 @@ pub mod types { }) } } - impl From for WorkerCompleteTask { fn from(value: super::WorkerCompleteTask) -> Self { Self { @@ -1330,13 +1199,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerPingResult { poweroff: Result, task: Result, String>, } - impl Default for WorkerPingResult { fn default() -> Self { Self { @@ -1345,7 +1212,6 @@ pub mod types { } } } - impl WorkerPingResult { pub fn poweroff(mut self, value: T) -> Self where @@ -1368,7 +1234,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerPingResult { type Error = String; fn try_from(value: WorkerPingResult) -> Result { @@ -1378,7 +1243,6 @@ pub mod types { }) } } - impl From for WorkerPingResult { fn from(value: super::WorkerPingResult) -> Self { Self { @@ -1387,14 +1251,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerPingTask { id: Result, output_rules: Result, String>, script: Result, } - impl Default for WorkerPingTask { fn default() -> Self { Self { @@ -1404,7 +1266,6 @@ pub mod types { } } } - impl WorkerPingTask { pub fn id(mut self, value: T) -> Self where @@ -1437,7 +1298,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerPingTask { type Error = String; fn try_from(value: WorkerPingTask) -> Result { @@ -1448,7 +1308,6 @@ pub mod types { }) } } - impl From for WorkerPingTask { fn from(value: super::WorkerPingTask) -> Self { Self { @@ -1458,14 +1317,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerTask { id: Result, name: Result, owner: Result, } - impl Default for WorkerTask { fn default() -> Self { Self { @@ -1475,7 +1332,6 @@ pub mod types { } } } - impl WorkerTask { pub fn id(mut self, value: T) -> Self where @@ -1508,7 +1364,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerTask { type Error = String; fn try_from(value: WorkerTask) -> Result { @@ -1519,7 +1374,6 @@ pub mod types { }) } } - impl From for WorkerTask { fn from(value: super::WorkerTask) -> Self { Self { @@ -1529,12 +1383,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkersResult { workers: Result, String>, } - impl Default for WorkersResult { fn default() -> Self { Self { @@ -1542,7 +1394,6 @@ pub mod types { } } } - impl WorkersResult { pub fn workers(mut self, value: T) -> Self where @@ -1555,7 +1406,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkersResult { type Error = String; fn try_from(value: WorkersResult) -> Result { @@ -1564,7 +1414,6 @@ pub mod types { }) } } - impl From for WorkersResult { fn from(value: super::WorkersResult) -> Self { Self { @@ -1574,7 +1423,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] ///Client for Buildomat /// @@ -1583,7 +1431,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -1599,7 +1446,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -1612,17 +1458,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -1631,7 +1474,6 @@ impl Client { "1.0" } } - impl Client { ///Sends a `POST` request to `/v1/control/hold` /// @@ -1643,7 +1485,6 @@ impl Client { pub fn control_hold(&self) -> builder::ControlHold { builder::ControlHold::new(self) } - ///Sends a `POST` request to `/v1/control/resume` /// ///```ignore @@ -1654,7 +1495,6 @@ impl Client { pub fn control_resume(&self) -> builder::ControlResume { builder::ControlResume::new(self) } - ///Sends a `GET` request to `/v1/task/{task}` /// ///```ignore @@ -1666,7 +1506,6 @@ impl Client { pub fn task_get(&self) -> builder::TaskGet { builder::TaskGet::new(self) } - ///Sends a `GET` request to `/v1/tasks` /// ///```ignore @@ -1677,7 +1516,6 @@ impl Client { pub fn tasks_get(&self) -> builder::TasksGet { builder::TasksGet::new(self) } - ///Sends a `POST` request to `/v1/tasks` /// ///```ignore @@ -1689,7 +1527,6 @@ impl Client { pub fn task_submit(&self) -> builder::TaskSubmit { builder::TaskSubmit::new(self) } - ///Sends a `GET` request to `/v1/tasks/{task}/events` /// ///```ignore @@ -1702,7 +1539,6 @@ impl Client { pub fn task_events_get(&self) -> builder::TaskEventsGet { builder::TaskEventsGet::new(self) } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs` /// ///```ignore @@ -1714,7 +1550,6 @@ impl Client { pub fn task_outputs_get(&self) -> builder::TaskOutputsGet { builder::TaskOutputsGet::new(self) } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs/{output}` /// ///```ignore @@ -1727,7 +1562,6 @@ impl Client { pub fn task_output_download(&self) -> builder::TaskOutputDownload { builder::TaskOutputDownload::new(self) } - ///Sends a `POST` request to `/v1/users` /// ///```ignore @@ -1739,7 +1573,6 @@ impl Client { pub fn user_create(&self) -> builder::UserCreate { builder::UserCreate::new(self) } - ///Sends a `GET` request to `/v1/whoami` /// ///```ignore @@ -1750,7 +1583,6 @@ impl Client { pub fn whoami(&self) -> builder::Whoami { builder::Whoami::new(self) } - ///Sends a `POST` request to `/v1/worker/bootstrap` /// ///```ignore @@ -1762,7 +1594,6 @@ impl Client { pub fn worker_bootstrap(&self) -> builder::WorkerBootstrap { builder::WorkerBootstrap::new(self) } - ///Sends a `GET` request to `/v1/worker/ping` /// ///```ignore @@ -1773,7 +1604,6 @@ impl Client { pub fn worker_ping(&self) -> builder::WorkerPing { builder::WorkerPing::new(self) } - ///Sends a `POST` request to `/v1/worker/task/{task}/append` /// ///```ignore @@ -1786,7 +1616,6 @@ impl Client { pub fn worker_task_append(&self) -> builder::WorkerTaskAppend { builder::WorkerTaskAppend::new(self) } - ///Sends a `POST` request to `/v1/worker/task/{task}/chunk` /// ///```ignore @@ -1799,7 +1628,6 @@ impl Client { pub fn worker_task_upload_chunk(&self) -> builder::WorkerTaskUploadChunk { builder::WorkerTaskUploadChunk::new(self) } - ///Sends a `POST` request to `/v1/worker/task/{task}/complete` /// ///```ignore @@ -1812,7 +1640,6 @@ impl Client { pub fn worker_task_complete(&self) -> builder::WorkerTaskComplete { builder::WorkerTaskComplete::new(self) } - ///Sends a `POST` request to `/v1/worker/task/{task}/output` /// ///```ignore @@ -1825,7 +1652,6 @@ impl Client { pub fn worker_task_add_output(&self) -> builder::WorkerTaskAddOutput { builder::WorkerTaskAddOutput::new(self) } - ///Sends a `GET` request to `/v1/workers` /// ///```ignore @@ -1836,7 +1662,6 @@ impl Client { pub fn workers_list(&self) -> builder::WorkersList { builder::WorkersList::new(self) } - ///Sends a `POST` request to `/v1/workers/recycle` /// ///```ignore @@ -1848,7 +1673,6 @@ impl Client { builder::WorkersRecycle::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -1862,12 +1686,10 @@ pub mod builder { pub struct ControlHold<'a> { client: &'a super::Client, } - impl<'a> ControlHold<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/control/hold` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -1881,7 +1703,6 @@ pub mod builder { } } } - ///Builder for [`Client::control_resume`] /// ///[`Client::control_resume`]: super::Client::control_resume @@ -1889,12 +1710,10 @@ pub mod builder { pub struct ControlResume<'a> { client: &'a super::Client, } - impl<'a> ControlResume<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/control/resume` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -1908,7 +1727,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_get`] /// ///[`Client::task_get`]: super::Client::task_get @@ -1917,7 +1735,6 @@ pub mod builder { client: &'a super::Client, task: Result, } - impl<'a> TaskGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1925,7 +1742,6 @@ pub mod builder { task: Err("task was not initialized".to_string()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1935,7 +1751,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - ///Sends a `GET` request to `/v1/task/{task}` pub async fn send(self) -> Result, Error<()>> { let Self { client, task } = self; @@ -1954,7 +1769,6 @@ pub mod builder { } } } - ///Builder for [`Client::tasks_get`] /// ///[`Client::tasks_get`]: super::Client::tasks_get @@ -1962,12 +1776,10 @@ pub mod builder { pub struct TasksGet<'a> { client: &'a super::Client, } - impl<'a> TasksGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/tasks` pub async fn send(self) -> Result>, Error<()>> { let Self { client } = self; @@ -1981,7 +1793,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_submit`] /// ///[`Client::task_submit`]: super::Client::task_submit @@ -1990,7 +1801,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> TaskSubmit<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1998,7 +1808,6 @@ pub mod builder { body: Ok(types::builder::TaskSubmit::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2009,7 +1818,6 @@ pub mod builder { .map_err(|_| "conversion to `TaskSubmit` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::TaskSubmit) -> types::builder::TaskSubmit, @@ -2017,7 +1825,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/tasks` pub async fn send(self) -> Result, Error<()>> { let Self { client, body } = self; @@ -2034,7 +1841,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_events_get`] /// ///[`Client::task_events_get`]: super::Client::task_events_get @@ -2044,7 +1850,6 @@ pub mod builder { task: Result, minseq: Result, String>, } - impl<'a> TaskEventsGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2053,7 +1858,6 @@ pub mod builder { minseq: Ok(None), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2063,7 +1867,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn minseq(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2074,7 +1877,6 @@ pub mod builder { .map_err(|_| "conversion to `u32` for minseq failed".to_string()); self } - ///Sends a `GET` request to `/v1/tasks/{task}/events` pub async fn send(self) -> Result>, Error<()>> { let Self { @@ -2102,7 +1904,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_outputs_get`] /// ///[`Client::task_outputs_get`]: super::Client::task_outputs_get @@ -2111,7 +1912,6 @@ pub mod builder { client: &'a super::Client, task: Result, } - impl<'a> TaskOutputsGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2119,7 +1919,6 @@ pub mod builder { task: Err("task was not initialized".to_string()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2129,7 +1928,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs` pub async fn send(self) -> Result>, Error<()>> { let Self { client, task } = self; @@ -2148,7 +1946,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_output_download`] /// ///[`Client::task_output_download`]: super::Client::task_output_download @@ -2158,7 +1955,6 @@ pub mod builder { task: Result, output: Result, } - impl<'a> TaskOutputDownload<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2167,7 +1963,6 @@ pub mod builder { output: Err("output was not initialized".to_string()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2177,7 +1972,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn output(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2187,7 +1981,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for output failed".to_string()); self } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs/{output}` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -2212,7 +2005,6 @@ pub mod builder { } } } - ///Builder for [`Client::user_create`] /// ///[`Client::user_create`]: super::Client::user_create @@ -2221,7 +2013,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> UserCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2229,7 +2020,6 @@ pub mod builder { body: Ok(types::builder::UserCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2240,7 +2030,6 @@ pub mod builder { .map_err(|_| "conversion to `UserCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::UserCreate) -> types::builder::UserCreate, @@ -2248,7 +2037,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/users` pub async fn send(self) -> Result, Error<()>> { let Self { client, body } = self; @@ -2265,7 +2053,6 @@ pub mod builder { } } } - ///Builder for [`Client::whoami`] /// ///[`Client::whoami`]: super::Client::whoami @@ -2273,12 +2060,10 @@ pub mod builder { pub struct Whoami<'a> { client: &'a super::Client, } - impl<'a> Whoami<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/whoami` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -2292,7 +2077,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_bootstrap`] /// ///[`Client::worker_bootstrap`]: super::Client::worker_bootstrap @@ -2301,7 +2085,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> WorkerBootstrap<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2309,7 +2092,6 @@ pub mod builder { body: Ok(types::builder::WorkerBootstrap::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2320,7 +2102,6 @@ pub mod builder { .map_err(|_| "conversion to `WorkerBootstrap` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::WorkerBootstrap) -> types::builder::WorkerBootstrap, @@ -2328,7 +2109,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/worker/bootstrap` pub async fn send(self) -> Result, Error<()>> { let Self { client, body } = self; @@ -2345,7 +2125,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_ping`] /// ///[`Client::worker_ping`]: super::Client::worker_ping @@ -2353,12 +2132,10 @@ pub mod builder { pub struct WorkerPing<'a> { client: &'a super::Client, } - impl<'a> WorkerPing<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/worker/ping` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -2372,7 +2149,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_task_append`] /// ///[`Client::worker_task_append`]: super::Client::worker_task_append @@ -2382,7 +2158,6 @@ pub mod builder { task: Result, body: Result, } - impl<'a> WorkerTaskAppend<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2391,7 +2166,6 @@ pub mod builder { body: Ok(types::builder::WorkerAppendTask::default()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2401,7 +2175,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2412,7 +2185,6 @@ pub mod builder { .map_err(|_| "conversion to `WorkerAppendTask` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2422,7 +2194,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/worker/task/{task}/append` pub async fn send(self) -> Result, Error<()>> { let Self { client, task, body } = self; @@ -2444,7 +2215,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_task_upload_chunk`] /// ///[`Client::worker_task_upload_chunk`]: super::Client::worker_task_upload_chunk @@ -2454,7 +2224,6 @@ pub mod builder { task: Result, body: Result, } - impl<'a> WorkerTaskUploadChunk<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2463,7 +2232,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2473,7 +2241,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn body(mut self, value: B) -> Self where B: std::convert::TryInto, @@ -2483,7 +2250,6 @@ pub mod builder { .map_err(|_| "conversion to `reqwest::Body` for body failed".to_string()); self } - ///Sends a `POST` request to `/v1/worker/task/{task}/chunk` pub async fn send(self) -> Result, Error<()>> { let Self { client, task, body } = self; @@ -2511,7 +2277,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_task_complete`] /// ///[`Client::worker_task_complete`]: super::Client::worker_task_complete @@ -2521,7 +2286,6 @@ pub mod builder { task: Result, body: Result, } - impl<'a> WorkerTaskComplete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2530,7 +2294,6 @@ pub mod builder { body: Ok(types::builder::WorkerCompleteTask::default()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2540,7 +2303,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2551,7 +2313,6 @@ pub mod builder { .map_err(|_| "conversion to `WorkerCompleteTask` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2561,7 +2322,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/worker/task/{task}/complete` pub async fn send(self) -> Result, Error<()>> { let Self { client, task, body } = self; @@ -2583,7 +2343,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_task_add_output`] /// ///[`Client::worker_task_add_output`]: super::Client::worker_task_add_output @@ -2593,7 +2352,6 @@ pub mod builder { task: Result, body: Result, } - impl<'a> WorkerTaskAddOutput<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2602,7 +2360,6 @@ pub mod builder { body: Ok(types::builder::WorkerAddOutput::default()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2612,7 +2369,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2623,7 +2379,6 @@ pub mod builder { .map_err(|_| "conversion to `WorkerAddOutput` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::WorkerAddOutput) -> types::builder::WorkerAddOutput, @@ -2631,7 +2386,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/worker/task/{task}/output` pub async fn send(self) -> Result, Error<()>> { let Self { client, task, body } = self; @@ -2653,7 +2407,6 @@ pub mod builder { } } } - ///Builder for [`Client::workers_list`] /// ///[`Client::workers_list`]: super::Client::workers_list @@ -2661,12 +2414,10 @@ pub mod builder { pub struct WorkersList<'a> { client: &'a super::Client, } - impl<'a> WorkersList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/workers` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -2680,7 +2431,6 @@ pub mod builder { } } } - ///Builder for [`Client::workers_recycle`] /// ///[`Client::workers_recycle`]: super::Client::workers_recycle @@ -2688,12 +2438,10 @@ pub mod builder { pub struct WorkersRecycle<'a> { client: &'a super::Client, } - impl<'a> WorkersRecycle<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/workers/recycle` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -2708,7 +2456,6 @@ pub mod builder { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/buildomat-builder.out b/progenitor-impl/tests/output/buildomat-builder.out index 8204f13c..cd9f2d77 100644 --- a/progenitor-impl/tests/output/buildomat-builder.out +++ b/progenitor-impl/tests/output/buildomat-builder.out @@ -15,19 +15,16 @@ pub mod types { pub script: String, pub state: String, } - impl From<&Task> for Task { fn from(value: &Task) -> Self { value.clone() } } - impl Task { pub fn builder() -> builder::Task { builder::Task::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct TaskEvent { pub payload: String, @@ -35,38 +32,32 @@ pub mod types { pub stream: String, pub time: chrono::DateTime, } - impl From<&TaskEvent> for TaskEvent { fn from(value: &TaskEvent) -> Self { value.clone() } } - impl TaskEvent { pub fn builder() -> builder::TaskEvent { builder::TaskEvent::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct TaskOutput { pub id: String, pub path: String, pub size: u64, } - impl From<&TaskOutput> for TaskOutput { fn from(value: &TaskOutput) -> Self { value.clone() } } - impl TaskOutput { pub fn builder() -> builder::TaskOutput { builder::TaskOutput::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct TaskSubmit { pub name: String, @@ -74,107 +65,89 @@ pub mod types { pub output_rules: Vec, pub script: String, } - impl From<&TaskSubmit> for TaskSubmit { fn from(value: &TaskSubmit) -> Self { value.clone() } } - impl TaskSubmit { pub fn builder() -> builder::TaskSubmit { builder::TaskSubmit::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct TaskSubmitResult { pub id: String, } - impl From<&TaskSubmitResult> for TaskSubmitResult { fn from(value: &TaskSubmitResult) -> Self { value.clone() } } - impl TaskSubmitResult { pub fn builder() -> builder::TaskSubmitResult { builder::TaskSubmitResult::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UploadedChunk { pub id: String, } - impl From<&UploadedChunk> for UploadedChunk { fn from(value: &UploadedChunk) -> Self { value.clone() } } - impl UploadedChunk { pub fn builder() -> builder::UploadedChunk { builder::UploadedChunk::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UserCreate { pub name: String, } - impl From<&UserCreate> for UserCreate { fn from(value: &UserCreate) -> Self { value.clone() } } - impl UserCreate { pub fn builder() -> builder::UserCreate { builder::UserCreate::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UserCreateResult { pub id: String, pub name: String, pub token: String, } - impl From<&UserCreateResult> for UserCreateResult { fn from(value: &UserCreateResult) -> Self { value.clone() } } - impl UserCreateResult { pub fn builder() -> builder::UserCreateResult { builder::UserCreateResult::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WhoamiResult { pub id: String, pub name: String, } - impl From<&WhoamiResult> for WhoamiResult { fn from(value: &WhoamiResult) -> Self { value.clone() } } - impl WhoamiResult { pub fn builder() -> builder::WhoamiResult { builder::WhoamiResult::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Worker { pub deleted: bool, @@ -186,183 +159,153 @@ pub mod types { pub recycle: bool, pub tasks: Vec, } - impl From<&Worker> for Worker { fn from(value: &Worker) -> Self { value.clone() } } - impl Worker { pub fn builder() -> builder::Worker { builder::Worker::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkerAddOutput { pub chunks: Vec, pub path: String, pub size: i64, } - impl From<&WorkerAddOutput> for WorkerAddOutput { fn from(value: &WorkerAddOutput) -> Self { value.clone() } } - impl WorkerAddOutput { pub fn builder() -> builder::WorkerAddOutput { builder::WorkerAddOutput::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkerAppendTask { pub payload: String, pub stream: String, pub time: chrono::DateTime, } - impl From<&WorkerAppendTask> for WorkerAppendTask { fn from(value: &WorkerAppendTask) -> Self { value.clone() } } - impl WorkerAppendTask { pub fn builder() -> builder::WorkerAppendTask { builder::WorkerAppendTask::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkerBootstrap { pub bootstrap: String, pub token: String, } - impl From<&WorkerBootstrap> for WorkerBootstrap { fn from(value: &WorkerBootstrap) -> Self { value.clone() } } - impl WorkerBootstrap { pub fn builder() -> builder::WorkerBootstrap { builder::WorkerBootstrap::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkerBootstrapResult { pub id: String, } - impl From<&WorkerBootstrapResult> for WorkerBootstrapResult { fn from(value: &WorkerBootstrapResult) -> Self { value.clone() } } - impl WorkerBootstrapResult { pub fn builder() -> builder::WorkerBootstrapResult { builder::WorkerBootstrapResult::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkerCompleteTask { pub failed: bool, } - impl From<&WorkerCompleteTask> for WorkerCompleteTask { fn from(value: &WorkerCompleteTask) -> Self { value.clone() } } - impl WorkerCompleteTask { pub fn builder() -> builder::WorkerCompleteTask { builder::WorkerCompleteTask::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkerPingResult { pub poweroff: bool, #[serde(default, skip_serializing_if = "Option::is_none")] pub task: Option, } - impl From<&WorkerPingResult> for WorkerPingResult { fn from(value: &WorkerPingResult) -> Self { value.clone() } } - impl WorkerPingResult { pub fn builder() -> builder::WorkerPingResult { builder::WorkerPingResult::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkerPingTask { pub id: String, pub output_rules: Vec, pub script: String, } - impl From<&WorkerPingTask> for WorkerPingTask { fn from(value: &WorkerPingTask) -> Self { value.clone() } } - impl WorkerPingTask { pub fn builder() -> builder::WorkerPingTask { builder::WorkerPingTask::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkerTask { pub id: String, pub name: String, pub owner: String, } - impl From<&WorkerTask> for WorkerTask { fn from(value: &WorkerTask) -> Self { value.clone() } } - impl WorkerTask { pub fn builder() -> builder::WorkerTask { builder::WorkerTask::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct WorkersResult { pub workers: Vec, } - impl From<&WorkersResult> for WorkersResult { fn from(value: &WorkersResult) -> Self { value.clone() } } - impl WorkersResult { pub fn builder() -> builder::WorkersResult { builder::WorkersResult::default() } } - pub mod builder { #[derive(Clone, Debug)] pub struct Task { @@ -372,7 +315,6 @@ pub mod types { script: Result, state: Result, } - impl Default for Task { fn default() -> Self { Self { @@ -384,7 +326,6 @@ pub mod types { } } } - impl Task { pub fn id(mut self, value: T) -> Self where @@ -437,7 +378,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Task { type Error = String; fn try_from(value: Task) -> Result { @@ -450,7 +390,6 @@ pub mod types { }) } } - impl From for Task { fn from(value: super::Task) -> Self { Self { @@ -462,7 +401,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TaskEvent { payload: Result, @@ -470,7 +408,6 @@ pub mod types { stream: Result, time: Result, String>, } - impl Default for TaskEvent { fn default() -> Self { Self { @@ -481,7 +418,6 @@ pub mod types { } } } - impl TaskEvent { pub fn payload(mut self, value: T) -> Self where @@ -524,7 +460,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TaskEvent { type Error = String; fn try_from(value: TaskEvent) -> Result { @@ -536,7 +471,6 @@ pub mod types { }) } } - impl From for TaskEvent { fn from(value: super::TaskEvent) -> Self { Self { @@ -547,14 +481,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TaskOutput { id: Result, path: Result, size: Result, } - impl Default for TaskOutput { fn default() -> Self { Self { @@ -564,7 +496,6 @@ pub mod types { } } } - impl TaskOutput { pub fn id(mut self, value: T) -> Self where @@ -597,7 +528,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TaskOutput { type Error = String; fn try_from(value: TaskOutput) -> Result { @@ -608,7 +538,6 @@ pub mod types { }) } } - impl From for TaskOutput { fn from(value: super::TaskOutput) -> Self { Self { @@ -618,14 +547,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TaskSubmit { name: Result, output_rules: Result, String>, script: Result, } - impl Default for TaskSubmit { fn default() -> Self { Self { @@ -635,7 +562,6 @@ pub mod types { } } } - impl TaskSubmit { pub fn name(mut self, value: T) -> Self where @@ -668,7 +594,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TaskSubmit { type Error = String; fn try_from(value: TaskSubmit) -> Result { @@ -679,7 +604,6 @@ pub mod types { }) } } - impl From for TaskSubmit { fn from(value: super::TaskSubmit) -> Self { Self { @@ -689,12 +613,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TaskSubmitResult { id: Result, } - impl Default for TaskSubmitResult { fn default() -> Self { Self { @@ -702,7 +624,6 @@ pub mod types { } } } - impl TaskSubmitResult { pub fn id(mut self, value: T) -> Self where @@ -715,25 +636,21 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TaskSubmitResult { type Error = String; fn try_from(value: TaskSubmitResult) -> Result { Ok(Self { id: value.id? }) } } - impl From for TaskSubmitResult { fn from(value: super::TaskSubmitResult) -> Self { Self { id: Ok(value.id) } } } - #[derive(Clone, Debug)] pub struct UploadedChunk { id: Result, } - impl Default for UploadedChunk { fn default() -> Self { Self { @@ -741,7 +658,6 @@ pub mod types { } } } - impl UploadedChunk { pub fn id(mut self, value: T) -> Self where @@ -754,25 +670,21 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UploadedChunk { type Error = String; fn try_from(value: UploadedChunk) -> Result { Ok(Self { id: value.id? }) } } - impl From for UploadedChunk { fn from(value: super::UploadedChunk) -> Self { Self { id: Ok(value.id) } } } - #[derive(Clone, Debug)] pub struct UserCreate { name: Result, } - impl Default for UserCreate { fn default() -> Self { Self { @@ -780,7 +692,6 @@ pub mod types { } } } - impl UserCreate { pub fn name(mut self, value: T) -> Self where @@ -793,14 +704,12 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserCreate { type Error = String; fn try_from(value: UserCreate) -> Result { Ok(Self { name: value.name? }) } } - impl From for UserCreate { fn from(value: super::UserCreate) -> Self { Self { @@ -808,14 +717,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserCreateResult { id: Result, name: Result, token: Result, } - impl Default for UserCreateResult { fn default() -> Self { Self { @@ -825,7 +732,6 @@ pub mod types { } } } - impl UserCreateResult { pub fn id(mut self, value: T) -> Self where @@ -858,7 +764,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserCreateResult { type Error = String; fn try_from(value: UserCreateResult) -> Result { @@ -869,7 +774,6 @@ pub mod types { }) } } - impl From for UserCreateResult { fn from(value: super::UserCreateResult) -> Self { Self { @@ -879,13 +783,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WhoamiResult { id: Result, name: Result, } - impl Default for WhoamiResult { fn default() -> Self { Self { @@ -894,7 +796,6 @@ pub mod types { } } } - impl WhoamiResult { pub fn id(mut self, value: T) -> Self where @@ -917,7 +818,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WhoamiResult { type Error = String; fn try_from(value: WhoamiResult) -> Result { @@ -927,7 +827,6 @@ pub mod types { }) } } - impl From for WhoamiResult { fn from(value: super::WhoamiResult) -> Self { Self { @@ -936,7 +835,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Worker { deleted: Result, @@ -946,7 +844,6 @@ pub mod types { recycle: Result, tasks: Result, String>, } - impl Default for Worker { fn default() -> Self { Self { @@ -959,7 +856,6 @@ pub mod types { } } } - impl Worker { pub fn deleted(mut self, value: T) -> Self where @@ -1022,7 +918,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Worker { type Error = String; fn try_from(value: Worker) -> Result { @@ -1036,7 +931,6 @@ pub mod types { }) } } - impl From for Worker { fn from(value: super::Worker) -> Self { Self { @@ -1049,14 +943,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerAddOutput { chunks: Result, String>, path: Result, size: Result, } - impl Default for WorkerAddOutput { fn default() -> Self { Self { @@ -1066,7 +958,6 @@ pub mod types { } } } - impl WorkerAddOutput { pub fn chunks(mut self, value: T) -> Self where @@ -1099,7 +990,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerAddOutput { type Error = String; fn try_from(value: WorkerAddOutput) -> Result { @@ -1110,7 +1000,6 @@ pub mod types { }) } } - impl From for WorkerAddOutput { fn from(value: super::WorkerAddOutput) -> Self { Self { @@ -1120,14 +1009,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerAppendTask { payload: Result, stream: Result, time: Result, String>, } - impl Default for WorkerAppendTask { fn default() -> Self { Self { @@ -1137,7 +1024,6 @@ pub mod types { } } } - impl WorkerAppendTask { pub fn payload(mut self, value: T) -> Self where @@ -1170,7 +1056,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerAppendTask { type Error = String; fn try_from(value: WorkerAppendTask) -> Result { @@ -1181,7 +1066,6 @@ pub mod types { }) } } - impl From for WorkerAppendTask { fn from(value: super::WorkerAppendTask) -> Self { Self { @@ -1191,13 +1075,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerBootstrap { bootstrap: Result, token: Result, } - impl Default for WorkerBootstrap { fn default() -> Self { Self { @@ -1206,7 +1088,6 @@ pub mod types { } } } - impl WorkerBootstrap { pub fn bootstrap(mut self, value: T) -> Self where @@ -1229,7 +1110,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerBootstrap { type Error = String; fn try_from(value: WorkerBootstrap) -> Result { @@ -1239,7 +1119,6 @@ pub mod types { }) } } - impl From for WorkerBootstrap { fn from(value: super::WorkerBootstrap) -> Self { Self { @@ -1248,12 +1127,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerBootstrapResult { id: Result, } - impl Default for WorkerBootstrapResult { fn default() -> Self { Self { @@ -1261,7 +1138,6 @@ pub mod types { } } } - impl WorkerBootstrapResult { pub fn id(mut self, value: T) -> Self where @@ -1274,25 +1150,21 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerBootstrapResult { type Error = String; fn try_from(value: WorkerBootstrapResult) -> Result { Ok(Self { id: value.id? }) } } - impl From for WorkerBootstrapResult { fn from(value: super::WorkerBootstrapResult) -> Self { Self { id: Ok(value.id) } } } - #[derive(Clone, Debug)] pub struct WorkerCompleteTask { failed: Result, } - impl Default for WorkerCompleteTask { fn default() -> Self { Self { @@ -1300,7 +1172,6 @@ pub mod types { } } } - impl WorkerCompleteTask { pub fn failed(mut self, value: T) -> Self where @@ -1313,7 +1184,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerCompleteTask { type Error = String; fn try_from(value: WorkerCompleteTask) -> Result { @@ -1322,7 +1192,6 @@ pub mod types { }) } } - impl From for WorkerCompleteTask { fn from(value: super::WorkerCompleteTask) -> Self { Self { @@ -1330,13 +1199,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerPingResult { poweroff: Result, task: Result, String>, } - impl Default for WorkerPingResult { fn default() -> Self { Self { @@ -1345,7 +1212,6 @@ pub mod types { } } } - impl WorkerPingResult { pub fn poweroff(mut self, value: T) -> Self where @@ -1368,7 +1234,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerPingResult { type Error = String; fn try_from(value: WorkerPingResult) -> Result { @@ -1378,7 +1243,6 @@ pub mod types { }) } } - impl From for WorkerPingResult { fn from(value: super::WorkerPingResult) -> Self { Self { @@ -1387,14 +1251,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerPingTask { id: Result, output_rules: Result, String>, script: Result, } - impl Default for WorkerPingTask { fn default() -> Self { Self { @@ -1404,7 +1266,6 @@ pub mod types { } } } - impl WorkerPingTask { pub fn id(mut self, value: T) -> Self where @@ -1437,7 +1298,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerPingTask { type Error = String; fn try_from(value: WorkerPingTask) -> Result { @@ -1448,7 +1308,6 @@ pub mod types { }) } } - impl From for WorkerPingTask { fn from(value: super::WorkerPingTask) -> Self { Self { @@ -1458,14 +1317,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkerTask { id: Result, name: Result, owner: Result, } - impl Default for WorkerTask { fn default() -> Self { Self { @@ -1475,7 +1332,6 @@ pub mod types { } } } - impl WorkerTask { pub fn id(mut self, value: T) -> Self where @@ -1508,7 +1364,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkerTask { type Error = String; fn try_from(value: WorkerTask) -> Result { @@ -1519,7 +1374,6 @@ pub mod types { }) } } - impl From for WorkerTask { fn from(value: super::WorkerTask) -> Self { Self { @@ -1529,12 +1383,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct WorkersResult { workers: Result, String>, } - impl Default for WorkersResult { fn default() -> Self { Self { @@ -1542,7 +1394,6 @@ pub mod types { } } } - impl WorkersResult { pub fn workers(mut self, value: T) -> Self where @@ -1555,7 +1406,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::WorkersResult { type Error = String; fn try_from(value: WorkersResult) -> Result { @@ -1564,7 +1414,6 @@ pub mod types { }) } } - impl From for WorkersResult { fn from(value: super::WorkersResult) -> Self { Self { @@ -1574,7 +1423,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] ///Client for Buildomat /// @@ -1583,7 +1431,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -1599,7 +1446,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -1612,17 +1458,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -1631,7 +1474,6 @@ impl Client { "1.0" } } - impl Client { ///Sends a `POST` request to `/v1/control/hold` /// @@ -1643,7 +1485,6 @@ impl Client { pub fn control_hold(&self) -> builder::ControlHold { builder::ControlHold::new(self) } - ///Sends a `POST` request to `/v1/control/resume` /// ///```ignore @@ -1654,7 +1495,6 @@ impl Client { pub fn control_resume(&self) -> builder::ControlResume { builder::ControlResume::new(self) } - ///Sends a `GET` request to `/v1/task/{task}` /// ///```ignore @@ -1666,7 +1506,6 @@ impl Client { pub fn task_get(&self) -> builder::TaskGet { builder::TaskGet::new(self) } - ///Sends a `GET` request to `/v1/tasks` /// ///```ignore @@ -1677,7 +1516,6 @@ impl Client { pub fn tasks_get(&self) -> builder::TasksGet { builder::TasksGet::new(self) } - ///Sends a `POST` request to `/v1/tasks` /// ///```ignore @@ -1689,7 +1527,6 @@ impl Client { pub fn task_submit(&self) -> builder::TaskSubmit { builder::TaskSubmit::new(self) } - ///Sends a `GET` request to `/v1/tasks/{task}/events` /// ///```ignore @@ -1702,7 +1539,6 @@ impl Client { pub fn task_events_get(&self) -> builder::TaskEventsGet { builder::TaskEventsGet::new(self) } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs` /// ///```ignore @@ -1714,7 +1550,6 @@ impl Client { pub fn task_outputs_get(&self) -> builder::TaskOutputsGet { builder::TaskOutputsGet::new(self) } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs/{output}` /// ///```ignore @@ -1727,7 +1562,6 @@ impl Client { pub fn task_output_download(&self) -> builder::TaskOutputDownload { builder::TaskOutputDownload::new(self) } - ///Sends a `POST` request to `/v1/users` /// ///```ignore @@ -1739,7 +1573,6 @@ impl Client { pub fn user_create(&self) -> builder::UserCreate { builder::UserCreate::new(self) } - ///Sends a `GET` request to `/v1/whoami` /// ///```ignore @@ -1750,7 +1583,6 @@ impl Client { pub fn whoami(&self) -> builder::Whoami { builder::Whoami::new(self) } - ///Sends a `POST` request to `/v1/worker/bootstrap` /// ///```ignore @@ -1762,7 +1594,6 @@ impl Client { pub fn worker_bootstrap(&self) -> builder::WorkerBootstrap { builder::WorkerBootstrap::new(self) } - ///Sends a `GET` request to `/v1/worker/ping` /// ///```ignore @@ -1773,7 +1604,6 @@ impl Client { pub fn worker_ping(&self) -> builder::WorkerPing { builder::WorkerPing::new(self) } - ///Sends a `POST` request to `/v1/worker/task/{task}/append` /// ///```ignore @@ -1786,7 +1616,6 @@ impl Client { pub fn worker_task_append(&self) -> builder::WorkerTaskAppend { builder::WorkerTaskAppend::new(self) } - ///Sends a `POST` request to `/v1/worker/task/{task}/chunk` /// ///```ignore @@ -1799,7 +1628,6 @@ impl Client { pub fn worker_task_upload_chunk(&self) -> builder::WorkerTaskUploadChunk { builder::WorkerTaskUploadChunk::new(self) } - ///Sends a `POST` request to `/v1/worker/task/{task}/complete` /// ///```ignore @@ -1812,7 +1640,6 @@ impl Client { pub fn worker_task_complete(&self) -> builder::WorkerTaskComplete { builder::WorkerTaskComplete::new(self) } - ///Sends a `POST` request to `/v1/worker/task/{task}/output` /// ///```ignore @@ -1825,7 +1652,6 @@ impl Client { pub fn worker_task_add_output(&self) -> builder::WorkerTaskAddOutput { builder::WorkerTaskAddOutput::new(self) } - ///Sends a `GET` request to `/v1/workers` /// ///```ignore @@ -1836,7 +1662,6 @@ impl Client { pub fn workers_list(&self) -> builder::WorkersList { builder::WorkersList::new(self) } - ///Sends a `POST` request to `/v1/workers/recycle` /// ///```ignore @@ -1848,7 +1673,6 @@ impl Client { builder::WorkersRecycle::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -1862,12 +1686,10 @@ pub mod builder { pub struct ControlHold<'a> { client: &'a super::Client, } - impl<'a> ControlHold<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/control/hold` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -1881,7 +1703,6 @@ pub mod builder { } } } - ///Builder for [`Client::control_resume`] /// ///[`Client::control_resume`]: super::Client::control_resume @@ -1889,12 +1710,10 @@ pub mod builder { pub struct ControlResume<'a> { client: &'a super::Client, } - impl<'a> ControlResume<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/control/resume` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -1908,7 +1727,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_get`] /// ///[`Client::task_get`]: super::Client::task_get @@ -1917,7 +1735,6 @@ pub mod builder { client: &'a super::Client, task: Result, } - impl<'a> TaskGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1925,7 +1742,6 @@ pub mod builder { task: Err("task was not initialized".to_string()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1935,7 +1751,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - ///Sends a `GET` request to `/v1/task/{task}` pub async fn send(self) -> Result, Error<()>> { let Self { client, task } = self; @@ -1954,7 +1769,6 @@ pub mod builder { } } } - ///Builder for [`Client::tasks_get`] /// ///[`Client::tasks_get`]: super::Client::tasks_get @@ -1962,12 +1776,10 @@ pub mod builder { pub struct TasksGet<'a> { client: &'a super::Client, } - impl<'a> TasksGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/tasks` pub async fn send(self) -> Result>, Error<()>> { let Self { client } = self; @@ -1981,7 +1793,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_submit`] /// ///[`Client::task_submit`]: super::Client::task_submit @@ -1990,7 +1801,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> TaskSubmit<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1998,7 +1808,6 @@ pub mod builder { body: Ok(types::builder::TaskSubmit::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2009,7 +1818,6 @@ pub mod builder { .map_err(|_| "conversion to `TaskSubmit` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::TaskSubmit) -> types::builder::TaskSubmit, @@ -2017,7 +1825,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/tasks` pub async fn send(self) -> Result, Error<()>> { let Self { client, body } = self; @@ -2034,7 +1841,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_events_get`] /// ///[`Client::task_events_get`]: super::Client::task_events_get @@ -2044,7 +1850,6 @@ pub mod builder { task: Result, minseq: Result, String>, } - impl<'a> TaskEventsGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2053,7 +1858,6 @@ pub mod builder { minseq: Ok(None), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2063,7 +1867,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn minseq(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2074,7 +1877,6 @@ pub mod builder { .map_err(|_| "conversion to `u32` for minseq failed".to_string()); self } - ///Sends a `GET` request to `/v1/tasks/{task}/events` pub async fn send(self) -> Result>, Error<()>> { let Self { @@ -2102,7 +1904,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_outputs_get`] /// ///[`Client::task_outputs_get`]: super::Client::task_outputs_get @@ -2111,7 +1912,6 @@ pub mod builder { client: &'a super::Client, task: Result, } - impl<'a> TaskOutputsGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2119,7 +1919,6 @@ pub mod builder { task: Err("task was not initialized".to_string()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2129,7 +1928,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs` pub async fn send(self) -> Result>, Error<()>> { let Self { client, task } = self; @@ -2148,7 +1946,6 @@ pub mod builder { } } } - ///Builder for [`Client::task_output_download`] /// ///[`Client::task_output_download`]: super::Client::task_output_download @@ -2158,7 +1955,6 @@ pub mod builder { task: Result, output: Result, } - impl<'a> TaskOutputDownload<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2167,7 +1963,6 @@ pub mod builder { output: Err("output was not initialized".to_string()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2177,7 +1972,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn output(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2187,7 +1981,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for output failed".to_string()); self } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs/{output}` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -2212,7 +2005,6 @@ pub mod builder { } } } - ///Builder for [`Client::user_create`] /// ///[`Client::user_create`]: super::Client::user_create @@ -2221,7 +2013,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> UserCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2229,7 +2020,6 @@ pub mod builder { body: Ok(types::builder::UserCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2240,7 +2030,6 @@ pub mod builder { .map_err(|_| "conversion to `UserCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::UserCreate) -> types::builder::UserCreate, @@ -2248,7 +2037,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/users` pub async fn send(self) -> Result, Error<()>> { let Self { client, body } = self; @@ -2265,7 +2053,6 @@ pub mod builder { } } } - ///Builder for [`Client::whoami`] /// ///[`Client::whoami`]: super::Client::whoami @@ -2273,12 +2060,10 @@ pub mod builder { pub struct Whoami<'a> { client: &'a super::Client, } - impl<'a> Whoami<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/whoami` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -2292,7 +2077,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_bootstrap`] /// ///[`Client::worker_bootstrap`]: super::Client::worker_bootstrap @@ -2301,7 +2085,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> WorkerBootstrap<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2309,7 +2092,6 @@ pub mod builder { body: Ok(types::builder::WorkerBootstrap::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2320,7 +2102,6 @@ pub mod builder { .map_err(|_| "conversion to `WorkerBootstrap` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::WorkerBootstrap) -> types::builder::WorkerBootstrap, @@ -2328,7 +2109,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/worker/bootstrap` pub async fn send(self) -> Result, Error<()>> { let Self { client, body } = self; @@ -2345,7 +2125,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_ping`] /// ///[`Client::worker_ping`]: super::Client::worker_ping @@ -2353,12 +2132,10 @@ pub mod builder { pub struct WorkerPing<'a> { client: &'a super::Client, } - impl<'a> WorkerPing<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/worker/ping` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -2372,7 +2149,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_task_append`] /// ///[`Client::worker_task_append`]: super::Client::worker_task_append @@ -2382,7 +2158,6 @@ pub mod builder { task: Result, body: Result, } - impl<'a> WorkerTaskAppend<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2391,7 +2166,6 @@ pub mod builder { body: Ok(types::builder::WorkerAppendTask::default()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2401,7 +2175,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2412,7 +2185,6 @@ pub mod builder { .map_err(|_| "conversion to `WorkerAppendTask` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2422,7 +2194,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/worker/task/{task}/append` pub async fn send(self) -> Result, Error<()>> { let Self { client, task, body } = self; @@ -2444,7 +2215,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_task_upload_chunk`] /// ///[`Client::worker_task_upload_chunk`]: super::Client::worker_task_upload_chunk @@ -2454,7 +2224,6 @@ pub mod builder { task: Result, body: Result, } - impl<'a> WorkerTaskUploadChunk<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2463,7 +2232,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2473,7 +2241,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn body(mut self, value: B) -> Self where B: std::convert::TryInto, @@ -2483,7 +2250,6 @@ pub mod builder { .map_err(|_| "conversion to `reqwest::Body` for body failed".to_string()); self } - ///Sends a `POST` request to `/v1/worker/task/{task}/chunk` pub async fn send(self) -> Result, Error<()>> { let Self { client, task, body } = self; @@ -2511,7 +2277,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_task_complete`] /// ///[`Client::worker_task_complete`]: super::Client::worker_task_complete @@ -2521,7 +2286,6 @@ pub mod builder { task: Result, body: Result, } - impl<'a> WorkerTaskComplete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2530,7 +2294,6 @@ pub mod builder { body: Ok(types::builder::WorkerCompleteTask::default()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2540,7 +2303,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2551,7 +2313,6 @@ pub mod builder { .map_err(|_| "conversion to `WorkerCompleteTask` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2561,7 +2322,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/worker/task/{task}/complete` pub async fn send(self) -> Result, Error<()>> { let Self { client, task, body } = self; @@ -2583,7 +2343,6 @@ pub mod builder { } } } - ///Builder for [`Client::worker_task_add_output`] /// ///[`Client::worker_task_add_output`]: super::Client::worker_task_add_output @@ -2593,7 +2352,6 @@ pub mod builder { task: Result, body: Result, } - impl<'a> WorkerTaskAddOutput<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2602,7 +2360,6 @@ pub mod builder { body: Ok(types::builder::WorkerAddOutput::default()), } } - pub fn task(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2612,7 +2369,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for task failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2623,7 +2379,6 @@ pub mod builder { .map_err(|_| "conversion to `WorkerAddOutput` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::WorkerAddOutput) -> types::builder::WorkerAddOutput, @@ -2631,7 +2386,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/worker/task/{task}/output` pub async fn send(self) -> Result, Error<()>> { let Self { client, task, body } = self; @@ -2653,7 +2407,6 @@ pub mod builder { } } } - ///Builder for [`Client::workers_list`] /// ///[`Client::workers_list`]: super::Client::workers_list @@ -2661,12 +2414,10 @@ pub mod builder { pub struct WorkersList<'a> { client: &'a super::Client, } - impl<'a> WorkersList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/workers` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -2680,7 +2431,6 @@ pub mod builder { } } } - ///Builder for [`Client::workers_recycle`] /// ///[`Client::workers_recycle`]: super::Client::workers_recycle @@ -2688,12 +2438,10 @@ pub mod builder { pub struct WorkersRecycle<'a> { client: &'a super::Client, } - impl<'a> WorkersRecycle<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/workers/recycle` pub async fn send(self) -> Result, Error<()>> { let Self { client } = self; @@ -2708,7 +2456,6 @@ pub mod builder { } } } - pub mod prelude { pub use self::super::Client; } diff --git a/progenitor-impl/tests/output/buildomat-cli.out b/progenitor-impl/tests/output/buildomat-cli.out index 3e56cdfb..fa8274e3 100644 --- a/progenitor-impl/tests/output/buildomat-cli.out +++ b/progenitor-impl/tests/output/buildomat-cli.out @@ -1,854 +1 @@ -pub struct Cli { - client: sdk::Client, - over: T, -} - -impl Cli { - pub fn new(client: sdk::Client) -> Self { - Self { client, over: () } - } - - pub fn get_command(cmd: CliCommand) -> clap::Command { - match cmd { - CliCommand::ControlHold => Self::cli_control_hold(), - CliCommand::ControlResume => Self::cli_control_resume(), - CliCommand::TaskGet => Self::cli_task_get(), - CliCommand::TasksGet => Self::cli_tasks_get(), - CliCommand::TaskSubmit => Self::cli_task_submit(), - CliCommand::TaskEventsGet => Self::cli_task_events_get(), - CliCommand::TaskOutputsGet => Self::cli_task_outputs_get(), - CliCommand::TaskOutputDownload => Self::cli_task_output_download(), - CliCommand::UserCreate => Self::cli_user_create(), - CliCommand::Whoami => Self::cli_whoami(), - CliCommand::WorkerBootstrap => Self::cli_worker_bootstrap(), - CliCommand::WorkerPing => Self::cli_worker_ping(), - CliCommand::WorkerTaskAppend => Self::cli_worker_task_append(), - CliCommand::WorkerTaskUploadChunk => Self::cli_worker_task_upload_chunk(), - CliCommand::WorkerTaskComplete => Self::cli_worker_task_complete(), - CliCommand::WorkerTaskAddOutput => Self::cli_worker_task_add_output(), - CliCommand::WorkersList => Self::cli_workers_list(), - CliCommand::WorkersRecycle => Self::cli_workers_recycle(), - } - } - - pub fn cli_control_hold() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_control_resume() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_task_get() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("task") - .long("task") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_tasks_get() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_task_submit() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("script") - .long("script") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_task_events_get() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("task") - .long("task") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("minseq") - .long("minseq") - .required(false) - .value_parser(clap::value_parser!(u32)), - ) - } - - pub fn cli_task_outputs_get() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("task") - .long("task") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_task_output_download() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("task") - .long("task") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("output") - .long("output") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_user_create() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_whoami() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_worker_bootstrap() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("bootstrap") - .long("bootstrap") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("token") - .long("token") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_worker_ping() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_worker_task_append() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("task") - .long("task") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("payload") - .long("payload") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("stream") - .long("stream") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("time") - .long("time") - .required(true) - .value_parser(clap::value_parser!(chrono::DateTime)), - ) - } - - pub fn cli_worker_task_upload_chunk() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("task") - .long("task") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_worker_task_complete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("task") - .long("task") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("failed") - .long("failed") - .required(true) - .value_parser(clap::value_parser!(bool)), - ) - } - - pub fn cli_worker_task_add_output() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("task") - .long("task") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("path") - .long("path") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("size") - .long("size") - .required(true) - .value_parser(clap::value_parser!(i64)), - ) - } - - pub fn cli_workers_list() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_workers_recycle() -> clap::Command { - clap::Command::new("") - } -} - -impl Cli { - pub fn new_with_override(client: sdk::Client, over: T) -> Self { - Self { client, over } - } - - pub async fn execute(&self, cmd: CliCommand, matches: &clap::ArgMatches) { - match cmd { - CliCommand::ControlHold => { - self.execute_control_hold(matches).await; - } - CliCommand::ControlResume => { - self.execute_control_resume(matches).await; - } - CliCommand::TaskGet => { - self.execute_task_get(matches).await; - } - CliCommand::TasksGet => { - self.execute_tasks_get(matches).await; - } - CliCommand::TaskSubmit => { - self.execute_task_submit(matches).await; - } - CliCommand::TaskEventsGet => { - self.execute_task_events_get(matches).await; - } - CliCommand::TaskOutputsGet => { - self.execute_task_outputs_get(matches).await; - } - CliCommand::TaskOutputDownload => { - self.execute_task_output_download(matches).await; - } - CliCommand::UserCreate => { - self.execute_user_create(matches).await; - } - CliCommand::Whoami => { - self.execute_whoami(matches).await; - } - CliCommand::WorkerBootstrap => { - self.execute_worker_bootstrap(matches).await; - } - CliCommand::WorkerPing => { - self.execute_worker_ping(matches).await; - } - CliCommand::WorkerTaskAppend => { - self.execute_worker_task_append(matches).await; - } - CliCommand::WorkerTaskUploadChunk => { - self.execute_worker_task_upload_chunk(matches).await; - } - CliCommand::WorkerTaskComplete => { - self.execute_worker_task_complete(matches).await; - } - CliCommand::WorkerTaskAddOutput => { - self.execute_worker_task_add_output(matches).await; - } - CliCommand::WorkersList => { - self.execute_workers_list(matches).await; - } - CliCommand::WorkersRecycle => { - self.execute_workers_recycle(matches).await; - } - } - } - - pub async fn execute_control_hold(&self, matches: &clap::ArgMatches) { - let mut request = self.client.control_hold(); - self.over - .execute_control_hold(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_control_resume(&self, matches: &clap::ArgMatches) { - let mut request = self.client.control_resume(); - self.over - .execute_control_resume(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_task_get(&self, matches: &clap::ArgMatches) { - let mut request = self.client.task_get(); - if let Some(value) = matches.get_one::("task") { - request = request.task(value.clone()); - } - - self.over.execute_task_get(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_tasks_get(&self, matches: &clap::ArgMatches) { - let mut request = self.client.tasks_get(); - self.over.execute_tasks_get(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_task_submit(&self, matches: &clap::ArgMatches) { - let mut request = self.client.task_submit(); - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("script") { - request = request.body_map(|body| body.script(value.clone())) - } - - self.over - .execute_task_submit(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_task_events_get(&self, matches: &clap::ArgMatches) { - let mut request = self.client.task_events_get(); - if let Some(value) = matches.get_one::("task") { - request = request.task(value.clone()); - } - - if let Some(value) = matches.get_one::("minseq") { - request = request.minseq(value.clone()); - } - - self.over - .execute_task_events_get(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_task_outputs_get(&self, matches: &clap::ArgMatches) { - let mut request = self.client.task_outputs_get(); - if let Some(value) = matches.get_one::("task") { - request = request.task(value.clone()); - } - - self.over - .execute_task_outputs_get(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_task_output_download(&self, matches: &clap::ArgMatches) { - let mut request = self.client.task_output_download(); - if let Some(value) = matches.get_one::("task") { - request = request.task(value.clone()); - } - - if let Some(value) = matches.get_one::("output") { - request = request.output(value.clone()); - } - - self.over - .execute_task_output_download(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_user_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.user_create(); - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_user_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_whoami(&self, matches: &clap::ArgMatches) { - let mut request = self.client.whoami(); - self.over.execute_whoami(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_worker_bootstrap(&self, matches: &clap::ArgMatches) { - let mut request = self.client.worker_bootstrap(); - if let Some(value) = matches.get_one::("bootstrap") { - request = request.body_map(|body| body.bootstrap(value.clone())) - } - - if let Some(value) = matches.get_one::("token") { - request = request.body_map(|body| body.token(value.clone())) - } - - self.over - .execute_worker_bootstrap(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_worker_ping(&self, matches: &clap::ArgMatches) { - let mut request = self.client.worker_ping(); - self.over - .execute_worker_ping(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_worker_task_append(&self, matches: &clap::ArgMatches) { - let mut request = self.client.worker_task_append(); - if let Some(value) = matches.get_one::("task") { - request = request.task(value.clone()); - } - - if let Some(value) = matches.get_one::("payload") { - request = request.body_map(|body| body.payload(value.clone())) - } - - if let Some(value) = matches.get_one::("stream") { - request = request.body_map(|body| body.stream(value.clone())) - } - - if let Some(value) = matches.get_one::>("time") { - request = request.body_map(|body| body.time(value.clone())) - } - - self.over - .execute_worker_task_append(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_worker_task_upload_chunk(&self, matches: &clap::ArgMatches) { - let mut request = self.client.worker_task_upload_chunk(); - if let Some(value) = matches.get_one::("task") { - request = request.task(value.clone()); - } - - self.over - .execute_worker_task_upload_chunk(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_worker_task_complete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.worker_task_complete(); - if let Some(value) = matches.get_one::("task") { - request = request.task(value.clone()); - } - - if let Some(value) = matches.get_one::("failed") { - request = request.body_map(|body| body.failed(value.clone())) - } - - self.over - .execute_worker_task_complete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_worker_task_add_output(&self, matches: &clap::ArgMatches) { - let mut request = self.client.worker_task_add_output(); - if let Some(value) = matches.get_one::("task") { - request = request.task(value.clone()); - } - - if let Some(value) = matches.get_one::("path") { - request = request.body_map(|body| body.path(value.clone())) - } - - if let Some(value) = matches.get_one::("size") { - request = request.body_map(|body| body.size(value.clone())) - } - - self.over - .execute_worker_task_add_output(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_workers_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.workers_list(); - self.over - .execute_workers_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_workers_recycle(&self, matches: &clap::ArgMatches) { - let mut request = self.client.workers_recycle(); - self.over - .execute_workers_recycle(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } -} - -pub trait CliOverride { - fn execute_control_hold( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ControlHold, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_control_resume( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ControlResume, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_task_get( - &self, - matches: &clap::ArgMatches, - request: &mut builder::TaskGet, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_tasks_get( - &self, - matches: &clap::ArgMatches, - request: &mut builder::TasksGet, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_task_submit( - &self, - matches: &clap::ArgMatches, - request: &mut builder::TaskSubmit, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_task_events_get( - &self, - matches: &clap::ArgMatches, - request: &mut builder::TaskEventsGet, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_task_outputs_get( - &self, - matches: &clap::ArgMatches, - request: &mut builder::TaskOutputsGet, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_task_output_download( - &self, - matches: &clap::ArgMatches, - request: &mut builder::TaskOutputDownload, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_user_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::UserCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_whoami( - &self, - matches: &clap::ArgMatches, - request: &mut builder::Whoami, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_worker_bootstrap( - &self, - matches: &clap::ArgMatches, - request: &mut builder::WorkerBootstrap, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_worker_ping( - &self, - matches: &clap::ArgMatches, - request: &mut builder::WorkerPing, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_worker_task_append( - &self, - matches: &clap::ArgMatches, - request: &mut builder::WorkerTaskAppend, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_worker_task_upload_chunk( - &self, - matches: &clap::ArgMatches, - request: &mut builder::WorkerTaskUploadChunk, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_worker_task_complete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::WorkerTaskComplete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_worker_task_add_output( - &self, - matches: &clap::ArgMatches, - request: &mut builder::WorkerTaskAddOutput, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_workers_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::WorkersList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_workers_recycle( - &self, - matches: &clap::ArgMatches, - request: &mut builder::WorkersRecycle, - ) -> Result<(), String> { - Ok(()) - } -} - -impl CliOverride for () {} - -#[derive(Copy, Clone, Debug)] -pub enum CliCommand { - ControlHold, - ControlResume, - TaskGet, - TasksGet, - TaskSubmit, - TaskEventsGet, - TaskOutputsGet, - TaskOutputDownload, - UserCreate, - Whoami, - WorkerBootstrap, - WorkerPing, - WorkerTaskAppend, - WorkerTaskUploadChunk, - WorkerTaskComplete, - WorkerTaskAddOutput, - WorkersList, - WorkersRecycle, -} - -impl CliCommand { - pub fn iter() -> impl Iterator { - vec![ - CliCommand::ControlHold, - CliCommand::ControlResume, - CliCommand::TaskGet, - CliCommand::TasksGet, - CliCommand::TaskSubmit, - CliCommand::TaskEventsGet, - CliCommand::TaskOutputsGet, - CliCommand::TaskOutputDownload, - CliCommand::UserCreate, - CliCommand::Whoami, - CliCommand::WorkerBootstrap, - CliCommand::WorkerPing, - CliCommand::WorkerTaskAppend, - CliCommand::WorkerTaskUploadChunk, - CliCommand::WorkerTaskComplete, - CliCommand::WorkerTaskAddOutput, - CliCommand::WorkersList, - CliCommand::WorkersRecycle, - ] - .into_iter() - } -} +pub struct Cli < T : CliOverride = () > { client : sdk :: Client , over : T , } impl Cli { pub fn new (client : sdk :: Client) -> Self { Self { client , over : () } } pub fn get_command (cmd : CliCommand) -> clap :: Command { match cmd { CliCommand :: ControlHold => Self :: cli_control_hold () , CliCommand :: ControlResume => Self :: cli_control_resume () , CliCommand :: TaskGet => Self :: cli_task_get () , CliCommand :: TasksGet => Self :: cli_tasks_get () , CliCommand :: TaskSubmit => Self :: cli_task_submit () , CliCommand :: TaskEventsGet => Self :: cli_task_events_get () , CliCommand :: TaskOutputsGet => Self :: cli_task_outputs_get () , CliCommand :: TaskOutputDownload => Self :: cli_task_output_download () , CliCommand :: UserCreate => Self :: cli_user_create () , CliCommand :: Whoami => Self :: cli_whoami () , CliCommand :: WorkerBootstrap => Self :: cli_worker_bootstrap () , CliCommand :: WorkerPing => Self :: cli_worker_ping () , CliCommand :: WorkerTaskAppend => Self :: cli_worker_task_append () , CliCommand :: WorkerTaskUploadChunk => Self :: cli_worker_task_upload_chunk () , CliCommand :: WorkerTaskComplete => Self :: cli_worker_task_complete () , CliCommand :: WorkerTaskAddOutput => Self :: cli_worker_task_add_output () , CliCommand :: WorkersList => Self :: cli_workers_list () , CliCommand :: WorkersRecycle => Self :: cli_workers_recycle () , } } pub fn cli_control_hold () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_control_resume () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_task_get () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("task") . long ("task") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_tasks_get () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_task_submit () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("script") . long ("script") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_task_events_get () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("task") . long ("task") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("minseq") . long ("minseq") . required (false) . value_parser (clap :: value_parser ! (u32))) } pub fn cli_task_outputs_get () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("task") . long ("task") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_task_output_download () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("task") . long ("task") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("output") . long ("output") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_user_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_whoami () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_worker_bootstrap () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("bootstrap") . long ("bootstrap") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("token") . long ("token") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_worker_ping () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_worker_task_append () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("task") . long ("task") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("payload") . long ("payload") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("stream") . long ("stream") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("time") . long ("time") . required (true) . value_parser (clap :: value_parser ! (chrono :: DateTime < chrono :: offset :: Utc >))) } pub fn cli_worker_task_upload_chunk () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("task") . long ("task") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_worker_task_complete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("task") . long ("task") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("failed") . long ("failed") . required (true) . value_parser (clap :: value_parser ! (bool))) } pub fn cli_worker_task_add_output () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("task") . long ("task") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("path") . long ("path") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("size") . long ("size") . required (true) . value_parser (clap :: value_parser ! (i64))) } pub fn cli_workers_list () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_workers_recycle () -> clap :: Command { clap :: Command :: new ("") } } impl < T : CliOverride > Cli < T > { pub fn new_with_override (client : sdk :: Client , over : T ,) -> Self { Self { client , over } } pub async fn execute (& self , cmd : CliCommand , matches : & clap :: ArgMatches ,) { match cmd { CliCommand :: ControlHold => { self . execute_control_hold (matches) . await ; } CliCommand :: ControlResume => { self . execute_control_resume (matches) . await ; } CliCommand :: TaskGet => { self . execute_task_get (matches) . await ; } CliCommand :: TasksGet => { self . execute_tasks_get (matches) . await ; } CliCommand :: TaskSubmit => { self . execute_task_submit (matches) . await ; } CliCommand :: TaskEventsGet => { self . execute_task_events_get (matches) . await ; } CliCommand :: TaskOutputsGet => { self . execute_task_outputs_get (matches) . await ; } CliCommand :: TaskOutputDownload => { self . execute_task_output_download (matches) . await ; } CliCommand :: UserCreate => { self . execute_user_create (matches) . await ; } CliCommand :: Whoami => { self . execute_whoami (matches) . await ; } CliCommand :: WorkerBootstrap => { self . execute_worker_bootstrap (matches) . await ; } CliCommand :: WorkerPing => { self . execute_worker_ping (matches) . await ; } CliCommand :: WorkerTaskAppend => { self . execute_worker_task_append (matches) . await ; } CliCommand :: WorkerTaskUploadChunk => { self . execute_worker_task_upload_chunk (matches) . await ; } CliCommand :: WorkerTaskComplete => { self . execute_worker_task_complete (matches) . await ; } CliCommand :: WorkerTaskAddOutput => { self . execute_worker_task_add_output (matches) . await ; } CliCommand :: WorkersList => { self . execute_workers_list (matches) . await ; } CliCommand :: WorkersRecycle => { self . execute_workers_recycle (matches) . await ; } } } pub async fn execute_control_hold (& self , matches : & clap :: ArgMatches) { let mut request = self . client . control_hold () ; self . over . execute_control_hold (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_control_resume (& self , matches : & clap :: ArgMatches) { let mut request = self . client . control_resume () ; self . over . execute_control_resume (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_task_get (& self , matches : & clap :: ArgMatches) { let mut request = self . client . task_get () ; if let Some (value) = matches . get_one :: < String > ("task") { request = request . task (value . clone ()) ; } self . over . execute_task_get (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_tasks_get (& self , matches : & clap :: ArgMatches) { let mut request = self . client . tasks_get () ; self . over . execute_tasks_get (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_task_submit (& self , matches : & clap :: ArgMatches) { let mut request = self . client . task_submit () ; if let Some (value) = matches . get_one :: < String > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("script" ,) { request = request . body_map (| body | { body . script (value . clone ()) }) } self . over . execute_task_submit (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_task_events_get (& self , matches : & clap :: ArgMatches) { let mut request = self . client . task_events_get () ; if let Some (value) = matches . get_one :: < String > ("task") { request = request . task (value . clone ()) ; } if let Some (value) = matches . get_one :: < u32 > ("minseq") { request = request . minseq (value . clone ()) ; } self . over . execute_task_events_get (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_task_outputs_get (& self , matches : & clap :: ArgMatches) { let mut request = self . client . task_outputs_get () ; if let Some (value) = matches . get_one :: < String > ("task") { request = request . task (value . clone ()) ; } self . over . execute_task_outputs_get (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_task_output_download (& self , matches : & clap :: ArgMatches) { let mut request = self . client . task_output_download () ; if let Some (value) = matches . get_one :: < String > ("task") { request = request . task (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("output") { request = request . output (value . clone ()) ; } self . over . execute_task_output_download (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_user_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . user_create () ; if let Some (value) = matches . get_one :: < String > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_user_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_whoami (& self , matches : & clap :: ArgMatches) { let mut request = self . client . whoami () ; self . over . execute_whoami (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_worker_bootstrap (& self , matches : & clap :: ArgMatches) { let mut request = self . client . worker_bootstrap () ; if let Some (value) = matches . get_one :: < String > ("bootstrap" ,) { request = request . body_map (| body | { body . bootstrap (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("token" ,) { request = request . body_map (| body | { body . token (value . clone ()) }) } self . over . execute_worker_bootstrap (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_worker_ping (& self , matches : & clap :: ArgMatches) { let mut request = self . client . worker_ping () ; self . over . execute_worker_ping (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_worker_task_append (& self , matches : & clap :: ArgMatches) { let mut request = self . client . worker_task_append () ; if let Some (value) = matches . get_one :: < String > ("task") { request = request . task (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("payload" ,) { request = request . body_map (| body | { body . payload (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("stream" ,) { request = request . body_map (| body | { body . stream (value . clone ()) }) } if let Some (value) = matches . get_one :: < chrono :: DateTime < chrono :: offset :: Utc > > ("time" ,) { request = request . body_map (| body | { body . time (value . clone ()) }) } self . over . execute_worker_task_append (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_worker_task_upload_chunk (& self , matches : & clap :: ArgMatches) { let mut request = self . client . worker_task_upload_chunk () ; if let Some (value) = matches . get_one :: < String > ("task") { request = request . task (value . clone ()) ; } self . over . execute_worker_task_upload_chunk (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_worker_task_complete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . worker_task_complete () ; if let Some (value) = matches . get_one :: < String > ("task") { request = request . task (value . clone ()) ; } if let Some (value) = matches . get_one :: < bool > ("failed" ,) { request = request . body_map (| body | { body . failed (value . clone ()) }) } self . over . execute_worker_task_complete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_worker_task_add_output (& self , matches : & clap :: ArgMatches) { let mut request = self . client . worker_task_add_output () ; if let Some (value) = matches . get_one :: < String > ("task") { request = request . task (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("path" ,) { request = request . body_map (| body | { body . path (value . clone ()) }) } if let Some (value) = matches . get_one :: < i64 > ("size" ,) { request = request . body_map (| body | { body . size (value . clone ()) }) } self . over . execute_worker_task_add_output (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_workers_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . workers_list () ; self . over . execute_workers_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_workers_recycle (& self , matches : & clap :: ArgMatches) { let mut request = self . client . workers_recycle () ; self . over . execute_workers_recycle (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } } pub trait CliOverride { fn execute_control_hold (& self , matches : & clap :: ArgMatches , request : & mut builder :: ControlHold ,) -> Result < () , String > { Ok (()) } fn execute_control_resume (& self , matches : & clap :: ArgMatches , request : & mut builder :: ControlResume ,) -> Result < () , String > { Ok (()) } fn execute_task_get (& self , matches : & clap :: ArgMatches , request : & mut builder :: TaskGet ,) -> Result < () , String > { Ok (()) } fn execute_tasks_get (& self , matches : & clap :: ArgMatches , request : & mut builder :: TasksGet ,) -> Result < () , String > { Ok (()) } fn execute_task_submit (& self , matches : & clap :: ArgMatches , request : & mut builder :: TaskSubmit ,) -> Result < () , String > { Ok (()) } fn execute_task_events_get (& self , matches : & clap :: ArgMatches , request : & mut builder :: TaskEventsGet ,) -> Result < () , String > { Ok (()) } fn execute_task_outputs_get (& self , matches : & clap :: ArgMatches , request : & mut builder :: TaskOutputsGet ,) -> Result < () , String > { Ok (()) } fn execute_task_output_download (& self , matches : & clap :: ArgMatches , request : & mut builder :: TaskOutputDownload ,) -> Result < () , String > { Ok (()) } fn execute_user_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: UserCreate ,) -> Result < () , String > { Ok (()) } fn execute_whoami (& self , matches : & clap :: ArgMatches , request : & mut builder :: Whoami ,) -> Result < () , String > { Ok (()) } fn execute_worker_bootstrap (& self , matches : & clap :: ArgMatches , request : & mut builder :: WorkerBootstrap ,) -> Result < () , String > { Ok (()) } fn execute_worker_ping (& self , matches : & clap :: ArgMatches , request : & mut builder :: WorkerPing ,) -> Result < () , String > { Ok (()) } fn execute_worker_task_append (& self , matches : & clap :: ArgMatches , request : & mut builder :: WorkerTaskAppend ,) -> Result < () , String > { Ok (()) } fn execute_worker_task_upload_chunk (& self , matches : & clap :: ArgMatches , request : & mut builder :: WorkerTaskUploadChunk ,) -> Result < () , String > { Ok (()) } fn execute_worker_task_complete (& self , matches : & clap :: ArgMatches , request : & mut builder :: WorkerTaskComplete ,) -> Result < () , String > { Ok (()) } fn execute_worker_task_add_output (& self , matches : & clap :: ArgMatches , request : & mut builder :: WorkerTaskAddOutput ,) -> Result < () , String > { Ok (()) } fn execute_workers_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: WorkersList ,) -> Result < () , String > { Ok (()) } fn execute_workers_recycle (& self , matches : & clap :: ArgMatches , request : & mut builder :: WorkersRecycle ,) -> Result < () , String > { Ok (()) } } impl CliOverride for () { } # [derive (Copy , Clone , Debug)] pub enum CliCommand { ControlHold , ControlResume , TaskGet , TasksGet , TaskSubmit , TaskEventsGet , TaskOutputsGet , TaskOutputDownload , UserCreate , Whoami , WorkerBootstrap , WorkerPing , WorkerTaskAppend , WorkerTaskUploadChunk , WorkerTaskComplete , WorkerTaskAddOutput , WorkersList , WorkersRecycle , } impl CliCommand { pub fn iter () -> impl Iterator < Item = CliCommand > { vec ! [CliCommand :: ControlHold , CliCommand :: ControlResume , CliCommand :: TaskGet , CliCommand :: TasksGet , CliCommand :: TaskSubmit , CliCommand :: TaskEventsGet , CliCommand :: TaskOutputsGet , CliCommand :: TaskOutputDownload , CliCommand :: UserCreate , CliCommand :: Whoami , CliCommand :: WorkerBootstrap , CliCommand :: WorkerPing , CliCommand :: WorkerTaskAppend , CliCommand :: WorkerTaskUploadChunk , CliCommand :: WorkerTaskComplete , CliCommand :: WorkerTaskAddOutput , CliCommand :: WorkersList , CliCommand :: WorkersRecycle ,] . into_iter () } } \ No newline at end of file diff --git a/progenitor-impl/tests/output/buildomat-positional.out b/progenitor-impl/tests/output/buildomat-positional.out index c67f7518..c7cc03db 100644 --- a/progenitor-impl/tests/output/buildomat-positional.out +++ b/progenitor-impl/tests/output/buildomat-positional.out @@ -15,13 +15,11 @@ pub mod types { pub script: String, pub state: String, } - impl From<&Task> for Task { fn from(value: &Task) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskEvent { pub payload: String, @@ -29,26 +27,22 @@ pub mod types { pub stream: String, pub time: chrono::DateTime, } - impl From<&TaskEvent> for TaskEvent { fn from(value: &TaskEvent) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskOutput { pub id: String, pub path: String, pub size: u64, } - impl From<&TaskOutput> for TaskOutput { fn from(value: &TaskOutput) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskSubmit { pub name: String, @@ -56,71 +50,59 @@ pub mod types { pub output_rules: Vec, pub script: String, } - impl From<&TaskSubmit> for TaskSubmit { fn from(value: &TaskSubmit) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TaskSubmitResult { pub id: String, } - impl From<&TaskSubmitResult> for TaskSubmitResult { fn from(value: &TaskSubmitResult) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UploadedChunk { pub id: String, } - impl From<&UploadedChunk> for UploadedChunk { fn from(value: &UploadedChunk) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreate { pub name: String, } - impl From<&UserCreate> for UserCreate { fn from(value: &UserCreate) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreateResult { pub id: String, pub name: String, pub token: String, } - impl From<&UserCreateResult> for UserCreateResult { fn from(value: &UserCreateResult) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WhoamiResult { pub id: String, pub name: String, } - impl From<&WhoamiResult> for WhoamiResult { fn from(value: &WhoamiResult) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Worker { pub deleted: bool, @@ -132,124 +114,104 @@ pub mod types { pub recycle: bool, pub tasks: Vec, } - impl From<&Worker> for Worker { fn from(value: &Worker) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerAddOutput { pub chunks: Vec, pub path: String, pub size: i64, } - impl From<&WorkerAddOutput> for WorkerAddOutput { fn from(value: &WorkerAddOutput) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerAppendTask { pub payload: String, pub stream: String, pub time: chrono::DateTime, } - impl From<&WorkerAppendTask> for WorkerAppendTask { fn from(value: &WorkerAppendTask) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerBootstrap { pub bootstrap: String, pub token: String, } - impl From<&WorkerBootstrap> for WorkerBootstrap { fn from(value: &WorkerBootstrap) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerBootstrapResult { pub id: String, } - impl From<&WorkerBootstrapResult> for WorkerBootstrapResult { fn from(value: &WorkerBootstrapResult) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerCompleteTask { pub failed: bool, } - impl From<&WorkerCompleteTask> for WorkerCompleteTask { fn from(value: &WorkerCompleteTask) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerPingResult { pub poweroff: bool, #[serde(default, skip_serializing_if = "Option::is_none")] pub task: Option, } - impl From<&WorkerPingResult> for WorkerPingResult { fn from(value: &WorkerPingResult) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerPingTask { pub id: String, pub output_rules: Vec, pub script: String, } - impl From<&WorkerPingTask> for WorkerPingTask { fn from(value: &WorkerPingTask) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkerTask { pub id: String, pub name: String, pub owner: String, } - impl From<&WorkerTask> for WorkerTask { fn from(value: &WorkerTask) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct WorkersResult { pub workers: Vec, } - impl From<&WorkersResult> for WorkersResult { fn from(value: &WorkersResult) -> Self { value.clone() } } } - #[derive(Clone, Debug)] ///Client for Buildomat /// @@ -258,7 +220,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -274,7 +235,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -287,17 +247,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -306,7 +263,6 @@ impl Client { "1.0" } } - impl Client { ///Sends a `POST` request to `/v1/control/hold` pub async fn control_hold<'a>(&'a self) -> Result, Error<()>> { @@ -319,7 +275,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/control/resume` pub async fn control_resume<'a>(&'a self) -> Result, Error<()>> { let url = format!("{}/v1/control/resume", self.baseurl,); @@ -331,7 +286,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/v1/task/{task}` pub async fn task_get<'a>( &'a self, @@ -350,7 +304,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/v1/tasks` pub async fn tasks_get<'a>(&'a self) -> Result>, Error<()>> { let url = format!("{}/v1/tasks", self.baseurl,); @@ -362,7 +315,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/tasks` pub async fn task_submit<'a>( &'a self, @@ -377,7 +329,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/v1/tasks/{task}/events` pub async fn task_events_get<'a>( &'a self, @@ -393,7 +344,6 @@ impl Client { if let Some(v) = &minseq { query.push(("minseq", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -402,7 +352,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs` pub async fn task_outputs_get<'a>( &'a self, @@ -421,7 +370,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/v1/tasks/{task}/outputs/{output}` pub async fn task_output_download<'a>( &'a self, @@ -442,7 +390,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/users` pub async fn user_create<'a>( &'a self, @@ -457,7 +404,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/v1/whoami` pub async fn whoami<'a>(&'a self) -> Result, Error<()>> { let url = format!("{}/v1/whoami", self.baseurl,); @@ -469,7 +415,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/worker/bootstrap` pub async fn worker_bootstrap<'a>( &'a self, @@ -484,7 +429,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/v1/worker/ping` pub async fn worker_ping<'a>( &'a self, @@ -498,7 +442,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/worker/task/{task}/append` pub async fn worker_task_append<'a>( &'a self, @@ -518,7 +461,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/worker/task/{task}/chunk` pub async fn worker_task_upload_chunk<'a, B: Into>( &'a self, @@ -546,7 +488,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/worker/task/{task}/complete` pub async fn worker_task_complete<'a>( &'a self, @@ -566,7 +507,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/worker/task/{task}/output` pub async fn worker_task_add_output<'a>( &'a self, @@ -586,7 +526,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/v1/workers` pub async fn workers_list<'a>( &'a self, @@ -600,7 +539,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/v1/workers/recycle` pub async fn workers_recycle<'a>(&'a self) -> Result, Error<()>> { let url = format!("{}/v1/workers/recycle", self.baseurl,); @@ -613,7 +551,6 @@ impl Client { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/keeper-builder-tagged.out b/progenitor-impl/tests/output/keeper-builder-tagged.out index 10c5f5f8..08cf4d94 100644 --- a/progenitor-impl/tests/output/keeper-builder-tagged.out +++ b/progenitor-impl/tests/output/keeper-builder-tagged.out @@ -12,73 +12,61 @@ pub mod types { pub host: String, pub key: String, } - impl From<&EnrolBody> for EnrolBody { fn from(value: &EnrolBody) -> Self { value.clone() } } - impl EnrolBody { pub fn builder() -> builder::EnrolBody { builder::EnrolBody::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalJobsResult { pub summary: Vec, } - impl From<&GlobalJobsResult> for GlobalJobsResult { fn from(value: &GlobalJobsResult) -> Self { value.clone() } } - impl GlobalJobsResult { pub fn builder() -> builder::GlobalJobsResult { builder::GlobalJobsResult::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct OutputRecord { pub msg: String, pub stream: String, pub time: chrono::DateTime, } - impl From<&OutputRecord> for OutputRecord { fn from(value: &OutputRecord) -> Self { value.clone() } } - impl OutputRecord { pub fn builder() -> builder::OutputRecord { builder::OutputRecord::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct PingResult { pub host: String, pub ok: bool, } - impl From<&PingResult> for PingResult { fn from(value: &PingResult) -> Self { value.clone() } } - impl PingResult { pub fn builder() -> builder::PingResult { builder::PingResult::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportFinishBody { pub duration_millis: i32, @@ -86,19 +74,16 @@ pub mod types { pub exit_status: i32, pub id: ReportId, } - impl From<&ReportFinishBody> for ReportFinishBody { fn from(value: &ReportFinishBody) -> Self { value.clone() } } - impl ReportFinishBody { pub fn builder() -> builder::ReportFinishBody { builder::ReportFinishBody::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportId { pub host: String, @@ -107,73 +92,61 @@ pub mod types { pub time: chrono::DateTime, pub uuid: String, } - impl From<&ReportId> for ReportId { fn from(value: &ReportId) -> Self { value.clone() } } - impl ReportId { pub fn builder() -> builder::ReportId { builder::ReportId::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportOutputBody { pub id: ReportId, pub record: OutputRecord, } - impl From<&ReportOutputBody> for ReportOutputBody { fn from(value: &ReportOutputBody) -> Self { value.clone() } } - impl ReportOutputBody { pub fn builder() -> builder::ReportOutputBody { builder::ReportOutputBody::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportResult { pub existed_already: bool, } - impl From<&ReportResult> for ReportResult { fn from(value: &ReportResult) -> Self { value.clone() } } - impl ReportResult { pub fn builder() -> builder::ReportResult { builder::ReportResult::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportStartBody { pub id: ReportId, pub script: String, pub start_time: chrono::DateTime, } - impl From<&ReportStartBody> for ReportStartBody { fn from(value: &ReportStartBody) -> Self { value.clone() } } - impl ReportStartBody { pub fn builder() -> builder::ReportStartBody { builder::ReportStartBody::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportSummary { pub age_seconds: i32, @@ -183,26 +156,22 @@ pub mod types { pub status: i32, pub when: chrono::DateTime, } - impl From<&ReportSummary> for ReportSummary { fn from(value: &ReportSummary) -> Self { value.clone() } } - impl ReportSummary { pub fn builder() -> builder::ReportSummary { builder::ReportSummary::default() } } - pub mod builder { #[derive(Clone, Debug)] pub struct EnrolBody { host: Result, key: Result, } - impl Default for EnrolBody { fn default() -> Self { Self { @@ -211,7 +180,6 @@ pub mod types { } } } - impl EnrolBody { pub fn host(mut self, value: T) -> Self where @@ -234,7 +202,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::EnrolBody { type Error = String; fn try_from(value: EnrolBody) -> Result { @@ -244,7 +211,6 @@ pub mod types { }) } } - impl From for EnrolBody { fn from(value: super::EnrolBody) -> Self { Self { @@ -253,12 +219,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GlobalJobsResult { summary: Result, String>, } - impl Default for GlobalJobsResult { fn default() -> Self { Self { @@ -266,7 +230,6 @@ pub mod types { } } } - impl GlobalJobsResult { pub fn summary(mut self, value: T) -> Self where @@ -279,7 +242,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GlobalJobsResult { type Error = String; fn try_from(value: GlobalJobsResult) -> Result { @@ -288,7 +250,6 @@ pub mod types { }) } } - impl From for GlobalJobsResult { fn from(value: super::GlobalJobsResult) -> Self { Self { @@ -296,14 +257,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OutputRecord { msg: Result, stream: Result, time: Result, String>, } - impl Default for OutputRecord { fn default() -> Self { Self { @@ -313,7 +272,6 @@ pub mod types { } } } - impl OutputRecord { pub fn msg(mut self, value: T) -> Self where @@ -346,7 +304,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OutputRecord { type Error = String; fn try_from(value: OutputRecord) -> Result { @@ -357,7 +314,6 @@ pub mod types { }) } } - impl From for OutputRecord { fn from(value: super::OutputRecord) -> Self { Self { @@ -367,13 +323,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct PingResult { host: Result, ok: Result, } - impl Default for PingResult { fn default() -> Self { Self { @@ -382,7 +336,6 @@ pub mod types { } } } - impl PingResult { pub fn host(mut self, value: T) -> Self where @@ -405,7 +358,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::PingResult { type Error = String; fn try_from(value: PingResult) -> Result { @@ -415,7 +367,6 @@ pub mod types { }) } } - impl From for PingResult { fn from(value: super::PingResult) -> Self { Self { @@ -424,7 +375,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportFinishBody { duration_millis: Result, @@ -432,7 +382,6 @@ pub mod types { exit_status: Result, id: Result, } - impl Default for ReportFinishBody { fn default() -> Self { Self { @@ -443,7 +392,6 @@ pub mod types { } } } - impl ReportFinishBody { pub fn duration_millis(mut self, value: T) -> Self where @@ -486,7 +434,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportFinishBody { type Error = String; fn try_from(value: ReportFinishBody) -> Result { @@ -498,7 +445,6 @@ pub mod types { }) } } - impl From for ReportFinishBody { fn from(value: super::ReportFinishBody) -> Self { Self { @@ -509,7 +455,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportId { host: Result, @@ -518,7 +463,6 @@ pub mod types { time: Result, String>, uuid: Result, } - impl Default for ReportId { fn default() -> Self { Self { @@ -530,7 +474,6 @@ pub mod types { } } } - impl ReportId { pub fn host(mut self, value: T) -> Self where @@ -583,7 +526,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportId { type Error = String; fn try_from(value: ReportId) -> Result { @@ -596,7 +538,6 @@ pub mod types { }) } } - impl From for ReportId { fn from(value: super::ReportId) -> Self { Self { @@ -608,13 +549,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportOutputBody { id: Result, record: Result, } - impl Default for ReportOutputBody { fn default() -> Self { Self { @@ -623,7 +562,6 @@ pub mod types { } } } - impl ReportOutputBody { pub fn id(mut self, value: T) -> Self where @@ -646,7 +584,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportOutputBody { type Error = String; fn try_from(value: ReportOutputBody) -> Result { @@ -656,7 +593,6 @@ pub mod types { }) } } - impl From for ReportOutputBody { fn from(value: super::ReportOutputBody) -> Self { Self { @@ -665,12 +601,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportResult { existed_already: Result, } - impl Default for ReportResult { fn default() -> Self { Self { @@ -678,7 +612,6 @@ pub mod types { } } } - impl ReportResult { pub fn existed_already(mut self, value: T) -> Self where @@ -691,7 +624,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportResult { type Error = String; fn try_from(value: ReportResult) -> Result { @@ -700,7 +632,6 @@ pub mod types { }) } } - impl From for ReportResult { fn from(value: super::ReportResult) -> Self { Self { @@ -708,14 +639,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportStartBody { id: Result, script: Result, start_time: Result, String>, } - impl Default for ReportStartBody { fn default() -> Self { Self { @@ -725,7 +654,6 @@ pub mod types { } } } - impl ReportStartBody { pub fn id(mut self, value: T) -> Self where @@ -758,7 +686,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportStartBody { type Error = String; fn try_from(value: ReportStartBody) -> Result { @@ -769,7 +696,6 @@ pub mod types { }) } } - impl From for ReportStartBody { fn from(value: super::ReportStartBody) -> Self { Self { @@ -779,7 +705,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportSummary { age_seconds: Result, @@ -789,7 +714,6 @@ pub mod types { status: Result, when: Result, String>, } - impl Default for ReportSummary { fn default() -> Self { Self { @@ -802,7 +726,6 @@ pub mod types { } } } - impl ReportSummary { pub fn age_seconds(mut self, value: T) -> Self where @@ -868,7 +791,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportSummary { type Error = String; fn try_from(value: ReportSummary) -> Result { @@ -882,7 +804,6 @@ pub mod types { }) } } - impl From for ReportSummary { fn from(value: super::ReportSummary) -> Self { Self { @@ -897,7 +818,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] ///Client for Keeper API /// @@ -908,7 +828,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -924,7 +843,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -937,17 +855,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -956,7 +871,6 @@ impl Client { "1.0" } } - impl Client { ///Sends a `POST` request to `/enrol` /// @@ -973,7 +887,6 @@ impl Client { pub fn enrol(&self) -> builder::Enrol { builder::Enrol::new(self) } - ///Sends a `GET` request to `/global/jobs` /// ///Arguments: @@ -987,7 +900,6 @@ impl Client { pub fn global_jobs(&self) -> builder::GlobalJobs { builder::GlobalJobs::new(self) } - ///Sends a `GET` request to `/ping` /// ///Arguments: @@ -1001,7 +913,6 @@ impl Client { pub fn ping(&self) -> builder::Ping { builder::Ping::new(self) } - ///Sends a `POST` request to `/report/finish` /// ///Arguments: @@ -1017,7 +928,6 @@ impl Client { pub fn report_finish(&self) -> builder::ReportFinish { builder::ReportFinish::new(self) } - ///Sends a `POST` request to `/report/output` /// ///Arguments: @@ -1033,7 +943,6 @@ impl Client { pub fn report_output(&self) -> builder::ReportOutput { builder::ReportOutput::new(self) } - ///Sends a `POST` request to `/report/start` /// ///Arguments: @@ -1050,7 +959,6 @@ impl Client { builder::ReportStart::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -1066,7 +974,6 @@ pub mod builder { authorization: Result, body: Result, } - impl<'a> Enrol<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1075,7 +982,6 @@ pub mod builder { body: Ok(types::builder::EnrolBody::default()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1085,7 +991,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1096,7 +1001,6 @@ pub mod builder { .map_err(|_| "conversion to `EnrolBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::EnrolBody) -> types::builder::EnrolBody, @@ -1104,7 +1008,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/enrol` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1133,7 +1036,6 @@ pub mod builder { } } } - ///Builder for [`Client::global_jobs`] /// ///[`Client::global_jobs`]: super::Client::global_jobs @@ -1142,7 +1044,6 @@ pub mod builder { client: &'a super::Client, authorization: Result, } - impl<'a> GlobalJobs<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1150,7 +1051,6 @@ pub mod builder { authorization: Err("authorization was not initialized".to_string()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1160,7 +1060,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - ///Sends a `GET` request to `/global/jobs` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1180,7 +1079,6 @@ pub mod builder { } } } - ///Builder for [`Client::ping`] /// ///[`Client::ping`]: super::Client::ping @@ -1189,7 +1087,6 @@ pub mod builder { client: &'a super::Client, authorization: Result, } - impl<'a> Ping<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1197,7 +1094,6 @@ pub mod builder { authorization: Err("authorization was not initialized".to_string()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1207,7 +1103,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - ///Sends a `GET` request to `/ping` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1227,7 +1122,6 @@ pub mod builder { } } } - ///Builder for [`Client::report_finish`] /// ///[`Client::report_finish`]: super::Client::report_finish @@ -1237,7 +1131,6 @@ pub mod builder { authorization: Result, body: Result, } - impl<'a> ReportFinish<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1246,7 +1139,6 @@ pub mod builder { body: Ok(types::builder::ReportFinishBody::default()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1256,7 +1148,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1267,7 +1158,6 @@ pub mod builder { .map_err(|_| "conversion to `ReportFinishBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -1277,7 +1167,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/report/finish` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1306,7 +1195,6 @@ pub mod builder { } } } - ///Builder for [`Client::report_output`] /// ///[`Client::report_output`]: super::Client::report_output @@ -1316,7 +1204,6 @@ pub mod builder { authorization: Result, body: Result, } - impl<'a> ReportOutput<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1325,7 +1212,6 @@ pub mod builder { body: Ok(types::builder::ReportOutputBody::default()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1335,7 +1221,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1346,7 +1231,6 @@ pub mod builder { .map_err(|_| "conversion to `ReportOutputBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -1356,7 +1240,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/report/output` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1385,7 +1268,6 @@ pub mod builder { } } } - ///Builder for [`Client::report_start`] /// ///[`Client::report_start`]: super::Client::report_start @@ -1395,7 +1277,6 @@ pub mod builder { authorization: Result, body: Result, } - impl<'a> ReportStart<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1404,7 +1285,6 @@ pub mod builder { body: Ok(types::builder::ReportStartBody::default()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1414,7 +1294,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1425,7 +1304,6 @@ pub mod builder { .map_err(|_| "conversion to `ReportStartBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ReportStartBody) -> types::builder::ReportStartBody, @@ -1433,7 +1311,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/report/start` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1463,7 +1340,6 @@ pub mod builder { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/keeper-builder.out b/progenitor-impl/tests/output/keeper-builder.out index 2d95b36c..4eac88eb 100644 --- a/progenitor-impl/tests/output/keeper-builder.out +++ b/progenitor-impl/tests/output/keeper-builder.out @@ -12,73 +12,61 @@ pub mod types { pub host: String, pub key: String, } - impl From<&EnrolBody> for EnrolBody { fn from(value: &EnrolBody) -> Self { value.clone() } } - impl EnrolBody { pub fn builder() -> builder::EnrolBody { builder::EnrolBody::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct GlobalJobsResult { pub summary: Vec, } - impl From<&GlobalJobsResult> for GlobalJobsResult { fn from(value: &GlobalJobsResult) -> Self { value.clone() } } - impl GlobalJobsResult { pub fn builder() -> builder::GlobalJobsResult { builder::GlobalJobsResult::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct OutputRecord { pub msg: String, pub stream: String, pub time: chrono::DateTime, } - impl From<&OutputRecord> for OutputRecord { fn from(value: &OutputRecord) -> Self { value.clone() } } - impl OutputRecord { pub fn builder() -> builder::OutputRecord { builder::OutputRecord::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct PingResult { pub host: String, pub ok: bool, } - impl From<&PingResult> for PingResult { fn from(value: &PingResult) -> Self { value.clone() } } - impl PingResult { pub fn builder() -> builder::PingResult { builder::PingResult::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ReportFinishBody { pub duration_millis: usize, @@ -86,19 +74,16 @@ pub mod types { pub exit_status: usize, pub id: ReportId, } - impl From<&ReportFinishBody> for ReportFinishBody { fn from(value: &ReportFinishBody) -> Self { value.clone() } } - impl ReportFinishBody { pub fn builder() -> builder::ReportFinishBody { builder::ReportFinishBody::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ReportId { pub host: String, @@ -107,73 +92,61 @@ pub mod types { pub time: chrono::DateTime, pub uuid: String, } - impl From<&ReportId> for ReportId { fn from(value: &ReportId) -> Self { value.clone() } } - impl ReportId { pub fn builder() -> builder::ReportId { builder::ReportId::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ReportOutputBody { pub id: ReportId, pub record: OutputRecord, } - impl From<&ReportOutputBody> for ReportOutputBody { fn from(value: &ReportOutputBody) -> Self { value.clone() } } - impl ReportOutputBody { pub fn builder() -> builder::ReportOutputBody { builder::ReportOutputBody::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ReportResult { pub existed_already: bool, } - impl From<&ReportResult> for ReportResult { fn from(value: &ReportResult) -> Self { value.clone() } } - impl ReportResult { pub fn builder() -> builder::ReportResult { builder::ReportResult::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ReportStartBody { pub id: ReportId, pub script: String, pub start_time: chrono::DateTime, } - impl From<&ReportStartBody> for ReportStartBody { fn from(value: &ReportStartBody) -> Self { value.clone() } } - impl ReportStartBody { pub fn builder() -> builder::ReportStartBody { builder::ReportStartBody::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ReportSummary { pub age_seconds: usize, @@ -183,26 +156,22 @@ pub mod types { pub status: usize, pub when: chrono::DateTime, } - impl From<&ReportSummary> for ReportSummary { fn from(value: &ReportSummary) -> Self { value.clone() } } - impl ReportSummary { pub fn builder() -> builder::ReportSummary { builder::ReportSummary::default() } } - pub mod builder { #[derive(Clone, Debug)] pub struct EnrolBody { host: Result, key: Result, } - impl Default for EnrolBody { fn default() -> Self { Self { @@ -211,7 +180,6 @@ pub mod types { } } } - impl EnrolBody { pub fn host(mut self, value: T) -> Self where @@ -234,7 +202,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::EnrolBody { type Error = String; fn try_from(value: EnrolBody) -> Result { @@ -244,7 +211,6 @@ pub mod types { }) } } - impl From for EnrolBody { fn from(value: super::EnrolBody) -> Self { Self { @@ -253,12 +219,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GlobalJobsResult { summary: Result, String>, } - impl Default for GlobalJobsResult { fn default() -> Self { Self { @@ -266,7 +230,6 @@ pub mod types { } } } - impl GlobalJobsResult { pub fn summary(mut self, value: T) -> Self where @@ -279,7 +242,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GlobalJobsResult { type Error = String; fn try_from(value: GlobalJobsResult) -> Result { @@ -288,7 +250,6 @@ pub mod types { }) } } - impl From for GlobalJobsResult { fn from(value: super::GlobalJobsResult) -> Self { Self { @@ -296,14 +257,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OutputRecord { msg: Result, stream: Result, time: Result, String>, } - impl Default for OutputRecord { fn default() -> Self { Self { @@ -313,7 +272,6 @@ pub mod types { } } } - impl OutputRecord { pub fn msg(mut self, value: T) -> Self where @@ -346,7 +304,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OutputRecord { type Error = String; fn try_from(value: OutputRecord) -> Result { @@ -357,7 +314,6 @@ pub mod types { }) } } - impl From for OutputRecord { fn from(value: super::OutputRecord) -> Self { Self { @@ -367,13 +323,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct PingResult { host: Result, ok: Result, } - impl Default for PingResult { fn default() -> Self { Self { @@ -382,7 +336,6 @@ pub mod types { } } } - impl PingResult { pub fn host(mut self, value: T) -> Self where @@ -405,7 +358,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::PingResult { type Error = String; fn try_from(value: PingResult) -> Result { @@ -415,7 +367,6 @@ pub mod types { }) } } - impl From for PingResult { fn from(value: super::PingResult) -> Self { Self { @@ -424,7 +375,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportFinishBody { duration_millis: Result, @@ -432,7 +382,6 @@ pub mod types { exit_status: Result, id: Result, } - impl Default for ReportFinishBody { fn default() -> Self { Self { @@ -443,7 +392,6 @@ pub mod types { } } } - impl ReportFinishBody { pub fn duration_millis(mut self, value: T) -> Self where @@ -486,7 +434,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportFinishBody { type Error = String; fn try_from(value: ReportFinishBody) -> Result { @@ -498,7 +445,6 @@ pub mod types { }) } } - impl From for ReportFinishBody { fn from(value: super::ReportFinishBody) -> Self { Self { @@ -509,7 +455,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportId { host: Result, @@ -518,7 +463,6 @@ pub mod types { time: Result, String>, uuid: Result, } - impl Default for ReportId { fn default() -> Self { Self { @@ -530,7 +474,6 @@ pub mod types { } } } - impl ReportId { pub fn host(mut self, value: T) -> Self where @@ -583,7 +526,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportId { type Error = String; fn try_from(value: ReportId) -> Result { @@ -596,7 +538,6 @@ pub mod types { }) } } - impl From for ReportId { fn from(value: super::ReportId) -> Self { Self { @@ -608,13 +549,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportOutputBody { id: Result, record: Result, } - impl Default for ReportOutputBody { fn default() -> Self { Self { @@ -623,7 +562,6 @@ pub mod types { } } } - impl ReportOutputBody { pub fn id(mut self, value: T) -> Self where @@ -646,7 +584,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportOutputBody { type Error = String; fn try_from(value: ReportOutputBody) -> Result { @@ -656,7 +593,6 @@ pub mod types { }) } } - impl From for ReportOutputBody { fn from(value: super::ReportOutputBody) -> Self { Self { @@ -665,12 +601,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportResult { existed_already: Result, } - impl Default for ReportResult { fn default() -> Self { Self { @@ -678,7 +612,6 @@ pub mod types { } } } - impl ReportResult { pub fn existed_already(mut self, value: T) -> Self where @@ -691,7 +624,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportResult { type Error = String; fn try_from(value: ReportResult) -> Result { @@ -700,7 +632,6 @@ pub mod types { }) } } - impl From for ReportResult { fn from(value: super::ReportResult) -> Self { Self { @@ -708,14 +639,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportStartBody { id: Result, script: Result, start_time: Result, String>, } - impl Default for ReportStartBody { fn default() -> Self { Self { @@ -725,7 +654,6 @@ pub mod types { } } } - impl ReportStartBody { pub fn id(mut self, value: T) -> Self where @@ -758,7 +686,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportStartBody { type Error = String; fn try_from(value: ReportStartBody) -> Result { @@ -769,7 +696,6 @@ pub mod types { }) } } - impl From for ReportStartBody { fn from(value: super::ReportStartBody) -> Self { Self { @@ -779,7 +705,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ReportSummary { age_seconds: Result, @@ -789,7 +714,6 @@ pub mod types { status: Result, when: Result, String>, } - impl Default for ReportSummary { fn default() -> Self { Self { @@ -802,7 +726,6 @@ pub mod types { } } } - impl ReportSummary { pub fn age_seconds(mut self, value: T) -> Self where @@ -868,7 +791,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ReportSummary { type Error = String; fn try_from(value: ReportSummary) -> Result { @@ -882,7 +804,6 @@ pub mod types { }) } } - impl From for ReportSummary { fn from(value: super::ReportSummary) -> Self { Self { @@ -897,7 +818,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] ///Client for Keeper API /// @@ -908,7 +828,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -924,7 +843,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -937,17 +855,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -956,7 +871,6 @@ impl Client { "1.0" } } - impl Client { ///Sends a `POST` request to `/enrol` /// @@ -973,7 +887,6 @@ impl Client { pub fn enrol(&self) -> builder::Enrol { builder::Enrol::new(self) } - ///Sends a `GET` request to `/global/jobs` /// ///Arguments: @@ -987,7 +900,6 @@ impl Client { pub fn global_jobs(&self) -> builder::GlobalJobs { builder::GlobalJobs::new(self) } - ///Sends a `GET` request to `/ping` /// ///Arguments: @@ -1001,7 +913,6 @@ impl Client { pub fn ping(&self) -> builder::Ping { builder::Ping::new(self) } - ///Sends a `POST` request to `/report/finish` /// ///Arguments: @@ -1017,7 +928,6 @@ impl Client { pub fn report_finish(&self) -> builder::ReportFinish { builder::ReportFinish::new(self) } - ///Sends a `POST` request to `/report/output` /// ///Arguments: @@ -1033,7 +943,6 @@ impl Client { pub fn report_output(&self) -> builder::ReportOutput { builder::ReportOutput::new(self) } - ///Sends a `POST` request to `/report/start` /// ///Arguments: @@ -1050,7 +959,6 @@ impl Client { builder::ReportStart::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -1066,7 +974,6 @@ pub mod builder { authorization: Result, body: Result, } - impl<'a> Enrol<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1075,7 +982,6 @@ pub mod builder { body: Ok(types::builder::EnrolBody::default()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1085,7 +991,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1096,7 +1001,6 @@ pub mod builder { .map_err(|_| "conversion to `EnrolBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::EnrolBody) -> types::builder::EnrolBody, @@ -1104,7 +1008,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/enrol` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1133,7 +1036,6 @@ pub mod builder { } } } - ///Builder for [`Client::global_jobs`] /// ///[`Client::global_jobs`]: super::Client::global_jobs @@ -1142,7 +1044,6 @@ pub mod builder { client: &'a super::Client, authorization: Result, } - impl<'a> GlobalJobs<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1150,7 +1051,6 @@ pub mod builder { authorization: Err("authorization was not initialized".to_string()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1160,7 +1060,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - ///Sends a `GET` request to `/global/jobs` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1180,7 +1079,6 @@ pub mod builder { } } } - ///Builder for [`Client::ping`] /// ///[`Client::ping`]: super::Client::ping @@ -1189,7 +1087,6 @@ pub mod builder { client: &'a super::Client, authorization: Result, } - impl<'a> Ping<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1197,7 +1094,6 @@ pub mod builder { authorization: Err("authorization was not initialized".to_string()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1207,7 +1103,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - ///Sends a `GET` request to `/ping` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1227,7 +1122,6 @@ pub mod builder { } } } - ///Builder for [`Client::report_finish`] /// ///[`Client::report_finish`]: super::Client::report_finish @@ -1237,7 +1131,6 @@ pub mod builder { authorization: Result, body: Result, } - impl<'a> ReportFinish<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1246,7 +1139,6 @@ pub mod builder { body: Ok(types::builder::ReportFinishBody::default()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1256,7 +1148,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1267,7 +1158,6 @@ pub mod builder { .map_err(|_| "conversion to `ReportFinishBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -1277,7 +1167,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/report/finish` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1306,7 +1195,6 @@ pub mod builder { } } } - ///Builder for [`Client::report_output`] /// ///[`Client::report_output`]: super::Client::report_output @@ -1316,7 +1204,6 @@ pub mod builder { authorization: Result, body: Result, } - impl<'a> ReportOutput<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1325,7 +1212,6 @@ pub mod builder { body: Ok(types::builder::ReportOutputBody::default()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1335,7 +1221,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1346,7 +1231,6 @@ pub mod builder { .map_err(|_| "conversion to `ReportOutputBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -1356,7 +1240,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/report/output` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1385,7 +1268,6 @@ pub mod builder { } } } - ///Builder for [`Client::report_start`] /// ///[`Client::report_start`]: super::Client::report_start @@ -1395,7 +1277,6 @@ pub mod builder { authorization: Result, body: Result, } - impl<'a> ReportStart<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -1404,7 +1285,6 @@ pub mod builder { body: Ok(types::builder::ReportStartBody::default()), } } - pub fn authorization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1414,7 +1294,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for authorization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -1425,7 +1304,6 @@ pub mod builder { .map_err(|_| "conversion to `ReportStartBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ReportStartBody) -> types::builder::ReportStartBody, @@ -1433,7 +1311,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/report/start` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -1463,7 +1340,6 @@ pub mod builder { } } } - pub mod prelude { pub use self::super::Client; } diff --git a/progenitor-impl/tests/output/keeper-cli.out b/progenitor-impl/tests/output/keeper-cli.out index a46827f1..640bda7c 100644 --- a/progenitor-impl/tests/output/keeper-cli.out +++ b/progenitor-impl/tests/output/keeper-cli.out @@ -1,376 +1 @@ -pub struct Cli { - client: sdk::Client, - over: T, -} - -impl Cli { - pub fn new(client: sdk::Client) -> Self { - Self { client, over: () } - } - - pub fn get_command(cmd: CliCommand) -> clap::Command { - match cmd { - CliCommand::Enrol => Self::cli_enrol(), - CliCommand::GlobalJobs => Self::cli_global_jobs(), - CliCommand::Ping => Self::cli_ping(), - CliCommand::ReportFinish => Self::cli_report_finish(), - CliCommand::ReportOutput => Self::cli_report_output(), - CliCommand::ReportStart => Self::cli_report_start(), - } - } - - pub fn cli_enrol() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("authorization") - .long("authorization") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("Authorization header (bearer token)"), - ) - .arg( - clap::Arg::new("host") - .long("host") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("key") - .long("key") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_global_jobs() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("authorization") - .long("authorization") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("Authorization header (bearer token)"), - ) - } - - pub fn cli_ping() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("authorization") - .long("authorization") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("Authorization header (bearer token)"), - ) - } - - pub fn cli_report_finish() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("authorization") - .long("authorization") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("Authorization header (bearer token)"), - ) - .arg( - clap::Arg::new("duration-millis") - .long("duration-millis") - .required(true) - .value_parser(clap::value_parser!(i32)), - ) - .arg( - clap::Arg::new("end-time") - .long("end-time") - .required(true) - .value_parser(clap::value_parser!(chrono::DateTime)), - ) - .arg( - clap::Arg::new("exit-status") - .long("exit-status") - .required(true) - .value_parser(clap::value_parser!(i32)), - ) - } - - pub fn cli_report_output() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("authorization") - .long("authorization") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("Authorization header (bearer token)"), - ) - } - - pub fn cli_report_start() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("authorization") - .long("authorization") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("Authorization header (bearer token)"), - ) - .arg( - clap::Arg::new("script") - .long("script") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("start-time") - .long("start-time") - .required(true) - .value_parser(clap::value_parser!(chrono::DateTime)), - ) - } -} - -impl Cli { - pub fn new_with_override(client: sdk::Client, over: T) -> Self { - Self { client, over } - } - - pub async fn execute(&self, cmd: CliCommand, matches: &clap::ArgMatches) { - match cmd { - CliCommand::Enrol => { - self.execute_enrol(matches).await; - } - CliCommand::GlobalJobs => { - self.execute_global_jobs(matches).await; - } - CliCommand::Ping => { - self.execute_ping(matches).await; - } - CliCommand::ReportFinish => { - self.execute_report_finish(matches).await; - } - CliCommand::ReportOutput => { - self.execute_report_output(matches).await; - } - CliCommand::ReportStart => { - self.execute_report_start(matches).await; - } - } - } - - pub async fn execute_enrol(&self, matches: &clap::ArgMatches) { - let mut request = self.client.enrol(); - if let Some(value) = matches.get_one::("authorization") { - request = request.authorization(value.clone()); - } - - if let Some(value) = matches.get_one::("host") { - request = request.body_map(|body| body.host(value.clone())) - } - - if let Some(value) = matches.get_one::("key") { - request = request.body_map(|body| body.key(value.clone())) - } - - self.over.execute_enrol(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_global_jobs(&self, matches: &clap::ArgMatches) { - let mut request = self.client.global_jobs(); - if let Some(value) = matches.get_one::("authorization") { - request = request.authorization(value.clone()); - } - - self.over - .execute_global_jobs(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_ping(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ping(); - if let Some(value) = matches.get_one::("authorization") { - request = request.authorization(value.clone()); - } - - self.over.execute_ping(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_report_finish(&self, matches: &clap::ArgMatches) { - let mut request = self.client.report_finish(); - if let Some(value) = matches.get_one::("authorization") { - request = request.authorization(value.clone()); - } - - if let Some(value) = matches.get_one::("duration-millis") { - request = request.body_map(|body| body.duration_millis(value.clone())) - } - - if let Some(value) = matches.get_one::>("end-time") { - request = request.body_map(|body| body.end_time(value.clone())) - } - - if let Some(value) = matches.get_one::("exit-status") { - request = request.body_map(|body| body.exit_status(value.clone())) - } - - self.over - .execute_report_finish(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_report_output(&self, matches: &clap::ArgMatches) { - let mut request = self.client.report_output(); - if let Some(value) = matches.get_one::("authorization") { - request = request.authorization(value.clone()); - } - - self.over - .execute_report_output(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } - - pub async fn execute_report_start(&self, matches: &clap::ArgMatches) { - let mut request = self.client.report_start(); - if let Some(value) = matches.get_one::("authorization") { - request = request.authorization(value.clone()); - } - - if let Some(value) = matches.get_one::("script") { - request = request.body_map(|body| body.script(value.clone())) - } - - if let Some(value) = matches.get_one::>("start-time") - { - request = request.body_map(|body| body.start_time(value.clone())) - } - - self.over - .execute_report_start(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } -} - -pub trait CliOverride { - fn execute_enrol( - &self, - matches: &clap::ArgMatches, - request: &mut builder::Enrol, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_global_jobs( - &self, - matches: &clap::ArgMatches, - request: &mut builder::GlobalJobs, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ping( - &self, - matches: &clap::ArgMatches, - request: &mut builder::Ping, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_report_finish( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ReportFinish, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_report_output( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ReportOutput, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_report_start( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ReportStart, - ) -> Result<(), String> { - Ok(()) - } -} - -impl CliOverride for () {} - -#[derive(Copy, Clone, Debug)] -pub enum CliCommand { - Enrol, - GlobalJobs, - Ping, - ReportFinish, - ReportOutput, - ReportStart, -} - -impl CliCommand { - pub fn iter() -> impl Iterator { - vec![ - CliCommand::Enrol, - CliCommand::GlobalJobs, - CliCommand::Ping, - CliCommand::ReportFinish, - CliCommand::ReportOutput, - CliCommand::ReportStart, - ] - .into_iter() - } -} +pub struct Cli < T : CliOverride = () > { client : sdk :: Client , over : T , } impl Cli { pub fn new (client : sdk :: Client) -> Self { Self { client , over : () } } pub fn get_command (cmd : CliCommand) -> clap :: Command { match cmd { CliCommand :: Enrol => Self :: cli_enrol () , CliCommand :: GlobalJobs => Self :: cli_global_jobs () , CliCommand :: Ping => Self :: cli_ping () , CliCommand :: ReportFinish => Self :: cli_report_finish () , CliCommand :: ReportOutput => Self :: cli_report_output () , CliCommand :: ReportStart => Self :: cli_report_start () , } } pub fn cli_enrol () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("authorization") . long ("authorization") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("Authorization header (bearer token)")) . arg (clap :: Arg :: new ("host") . long ("host") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("key") . long ("key") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_global_jobs () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("authorization") . long ("authorization") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("Authorization header (bearer token)")) } pub fn cli_ping () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("authorization") . long ("authorization") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("Authorization header (bearer token)")) } pub fn cli_report_finish () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("authorization") . long ("authorization") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("Authorization header (bearer token)")) . arg (clap :: Arg :: new ("duration-millis") . long ("duration-millis") . required (true) . value_parser (clap :: value_parser ! (i32))) . arg (clap :: Arg :: new ("end-time") . long ("end-time") . required (true) . value_parser (clap :: value_parser ! (chrono :: DateTime < chrono :: offset :: Utc >))) . arg (clap :: Arg :: new ("exit-status") . long ("exit-status") . required (true) . value_parser (clap :: value_parser ! (i32))) } pub fn cli_report_output () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("authorization") . long ("authorization") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("Authorization header (bearer token)")) } pub fn cli_report_start () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("authorization") . long ("authorization") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("Authorization header (bearer token)")) . arg (clap :: Arg :: new ("script") . long ("script") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("start-time") . long ("start-time") . required (true) . value_parser (clap :: value_parser ! (chrono :: DateTime < chrono :: offset :: Utc >))) } } impl < T : CliOverride > Cli < T > { pub fn new_with_override (client : sdk :: Client , over : T ,) -> Self { Self { client , over } } pub async fn execute (& self , cmd : CliCommand , matches : & clap :: ArgMatches ,) { match cmd { CliCommand :: Enrol => { self . execute_enrol (matches) . await ; } CliCommand :: GlobalJobs => { self . execute_global_jobs (matches) . await ; } CliCommand :: Ping => { self . execute_ping (matches) . await ; } CliCommand :: ReportFinish => { self . execute_report_finish (matches) . await ; } CliCommand :: ReportOutput => { self . execute_report_output (matches) . await ; } CliCommand :: ReportStart => { self . execute_report_start (matches) . await ; } } } pub async fn execute_enrol (& self , matches : & clap :: ArgMatches) { let mut request = self . client . enrol () ; if let Some (value) = matches . get_one :: < String > ("authorization") { request = request . authorization (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("host" ,) { request = request . body_map (| body | { body . host (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("key" ,) { request = request . body_map (| body | { body . key (value . clone ()) }) } self . over . execute_enrol (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_global_jobs (& self , matches : & clap :: ArgMatches) { let mut request = self . client . global_jobs () ; if let Some (value) = matches . get_one :: < String > ("authorization") { request = request . authorization (value . clone ()) ; } self . over . execute_global_jobs (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_ping (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ping () ; if let Some (value) = matches . get_one :: < String > ("authorization") { request = request . authorization (value . clone ()) ; } self . over . execute_ping (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_report_finish (& self , matches : & clap :: ArgMatches) { let mut request = self . client . report_finish () ; if let Some (value) = matches . get_one :: < String > ("authorization") { request = request . authorization (value . clone ()) ; } if let Some (value) = matches . get_one :: < i32 > ("duration-millis" ,) { request = request . body_map (| body | { body . duration_millis (value . clone ()) }) } if let Some (value) = matches . get_one :: < chrono :: DateTime < chrono :: offset :: Utc > > ("end-time" ,) { request = request . body_map (| body | { body . end_time (value . clone ()) }) } if let Some (value) = matches . get_one :: < i32 > ("exit-status" ,) { request = request . body_map (| body | { body . exit_status (value . clone ()) }) } self . over . execute_report_finish (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_report_output (& self , matches : & clap :: ArgMatches) { let mut request = self . client . report_output () ; if let Some (value) = matches . get_one :: < String > ("authorization") { request = request . authorization (value . clone ()) ; } self . over . execute_report_output (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } pub async fn execute_report_start (& self , matches : & clap :: ArgMatches) { let mut request = self . client . report_start () ; if let Some (value) = matches . get_one :: < String > ("authorization") { request = request . authorization (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("script" ,) { request = request . body_map (| body | { body . script (value . clone ()) }) } if let Some (value) = matches . get_one :: < chrono :: DateTime < chrono :: offset :: Utc > > ("start-time" ,) { request = request . body_map (| body | { body . start_time (value . clone ()) }) } self . over . execute_report_start (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } } pub trait CliOverride { fn execute_enrol (& self , matches : & clap :: ArgMatches , request : & mut builder :: Enrol ,) -> Result < () , String > { Ok (()) } fn execute_global_jobs (& self , matches : & clap :: ArgMatches , request : & mut builder :: GlobalJobs ,) -> Result < () , String > { Ok (()) } fn execute_ping (& self , matches : & clap :: ArgMatches , request : & mut builder :: Ping ,) -> Result < () , String > { Ok (()) } fn execute_report_finish (& self , matches : & clap :: ArgMatches , request : & mut builder :: ReportFinish ,) -> Result < () , String > { Ok (()) } fn execute_report_output (& self , matches : & clap :: ArgMatches , request : & mut builder :: ReportOutput ,) -> Result < () , String > { Ok (()) } fn execute_report_start (& self , matches : & clap :: ArgMatches , request : & mut builder :: ReportStart ,) -> Result < () , String > { Ok (()) } } impl CliOverride for () { } # [derive (Copy , Clone , Debug)] pub enum CliCommand { Enrol , GlobalJobs , Ping , ReportFinish , ReportOutput , ReportStart , } impl CliCommand { pub fn iter () -> impl Iterator < Item = CliCommand > { vec ! [CliCommand :: Enrol , CliCommand :: GlobalJobs , CliCommand :: Ping , CliCommand :: ReportFinish , CliCommand :: ReportOutput , CliCommand :: ReportStart ,] . into_iter () } } \ No newline at end of file diff --git a/progenitor-impl/tests/output/keeper-positional.out b/progenitor-impl/tests/output/keeper-positional.out index 7524b0e4..6f3368e2 100644 --- a/progenitor-impl/tests/output/keeper-positional.out +++ b/progenitor-impl/tests/output/keeper-positional.out @@ -12,49 +12,41 @@ pub mod types { pub host: String, pub key: String, } - impl From<&EnrolBody> for EnrolBody { fn from(value: &EnrolBody) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalJobsResult { pub summary: Vec, } - impl From<&GlobalJobsResult> for GlobalJobsResult { fn from(value: &GlobalJobsResult) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct OutputRecord { pub msg: String, pub stream: String, pub time: chrono::DateTime, } - impl From<&OutputRecord> for OutputRecord { fn from(value: &OutputRecord) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct PingResult { pub host: String, pub ok: bool, } - impl From<&PingResult> for PingResult { fn from(value: &PingResult) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportFinishBody { pub duration_millis: i32, @@ -62,13 +54,11 @@ pub mod types { pub exit_status: i32, pub id: ReportId, } - impl From<&ReportFinishBody> for ReportFinishBody { fn from(value: &ReportFinishBody) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportId { pub host: String, @@ -77,49 +67,41 @@ pub mod types { pub time: chrono::DateTime, pub uuid: String, } - impl From<&ReportId> for ReportId { fn from(value: &ReportId) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportOutputBody { pub id: ReportId, pub record: OutputRecord, } - impl From<&ReportOutputBody> for ReportOutputBody { fn from(value: &ReportOutputBody) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportResult { pub existed_already: bool, } - impl From<&ReportResult> for ReportResult { fn from(value: &ReportResult) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportStartBody { pub id: ReportId, pub script: String, pub start_time: chrono::DateTime, } - impl From<&ReportStartBody> for ReportStartBody { fn from(value: &ReportStartBody) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ReportSummary { pub age_seconds: i32, @@ -129,14 +111,12 @@ pub mod types { pub status: i32, pub when: chrono::DateTime, } - impl From<&ReportSummary> for ReportSummary { fn from(value: &ReportSummary) -> Self { value.clone() } } } - #[derive(Clone, Debug)] ///Client for Keeper API /// @@ -147,7 +127,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -163,7 +142,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -176,17 +154,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -195,7 +170,6 @@ impl Client { "1.0" } } - impl Client { ///Sends a `POST` request to `/enrol` /// @@ -223,7 +197,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/global/jobs` /// ///Arguments: @@ -243,7 +216,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/ping` /// ///Arguments: @@ -263,7 +235,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/report/finish` /// ///Arguments: @@ -290,7 +261,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/report/output` /// ///Arguments: @@ -317,7 +287,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/report/start` /// ///Arguments: @@ -345,7 +314,6 @@ impl Client { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/nexus-builder-tagged.out b/progenitor-impl/tests/output/nexus-builder-tagged.out index 0201241d..5fdff015 100644 --- a/progenitor-impl/tests/output/nexus-builder-tagged.out +++ b/progenitor-impl/tests/output/nexus-builder-tagged.out @@ -14,19 +14,16 @@ pub mod types { pub revision: i64, pub serial: String, } - impl From<&Baseboard> for Baseboard { fn from(value: &Baseboard) -> Self { value.clone() } } - impl Baseboard { pub fn builder() -> builder::Baseboard { builder::Baseboard::default() } } - ///A type storing a range over `T`. /// ///This type supports ranges similar to the `RangeTo`, `Range` and @@ -46,13 +43,11 @@ pub mod types { #[serde(rename = "range_from")] RangeFrom { start: f64 }, } - impl From<&BinRangedouble> for BinRangedouble { fn from(value: &BinRangedouble) -> Self { value.clone() } } - ///A type storing a range over `T`. /// ///This type supports ranges similar to the `RangeTo`, `Range` and @@ -72,13 +67,11 @@ pub mod types { #[serde(rename = "range_from")] RangeFrom { start: i64 }, } - impl From<&BinRangeint64> for BinRangeint64 { fn from(value: &BinRangeint64) -> Self { value.clone() } } - ///Type storing bin edges and a count of samples within it. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Bindouble { @@ -87,19 +80,16 @@ pub mod types { ///The range of the support covered by this bin. pub range: BinRangedouble, } - impl From<&Bindouble> for Bindouble { fn from(value: &Bindouble) -> Self { value.clone() } } - impl Bindouble { pub fn builder() -> builder::Bindouble { builder::Bindouble::default() } } - ///Type storing bin edges and a count of samples within it. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Binint64 { @@ -108,19 +98,16 @@ pub mod types { ///The range of the support covered by this bin. pub range: BinRangeint64, } - impl From<&Binint64> for Binint64 { fn from(value: &Binint64) -> Self { value.clone() } } - impl Binint64 { pub fn builder() -> builder::Binint64 { builder::Binint64::default() } } - #[derive(Clone, Debug, Serialize)] pub struct BlockSize(i64); impl std::ops::Deref for BlockSize { @@ -129,19 +116,16 @@ pub mod types { &self.0 } } - impl From for i64 { fn from(value: BlockSize) -> Self { value.0 } } - impl From<&BlockSize> for BlockSize { fn from(value: &BlockSize) -> Self { value.clone() } } - impl std::convert::TryFrom for BlockSize { type Error = &'static str; fn try_from(value: i64) -> Result { @@ -152,7 +136,6 @@ pub mod types { } } } - impl<'de> serde::Deserialize<'de> for BlockSize { fn deserialize(deserializer: D) -> Result where @@ -162,7 +145,6 @@ pub mod types { .map_err(|e| ::custom(e.to_string())) } } - ///A count of bytes, typically used either for memory or storage capacity /// ///The maximum supported byte count is [`i64::MAX`]. This makes it @@ -178,59 +160,50 @@ pub mod types { &self.0 } } - impl From for u64 { fn from(value: ByteCount) -> Self { value.0 } } - impl From<&ByteCount> for ByteCount { fn from(value: &ByteCount) -> Self { value.clone() } } - impl From for ByteCount { fn from(value: u64) -> Self { Self(value) } } - impl std::str::FromStr for ByteCount { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for ByteCount { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ByteCount { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ByteCount { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for ByteCount { fn to_string(&self) -> String { self.0.to_string() } } - ///Client view of a [`Certificate`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Certificate { @@ -246,19 +219,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Certificate> for Certificate { fn from(value: &Certificate) -> Self { value.clone() } } - impl Certificate { pub fn builder() -> builder::Certificate { builder::Certificate::default() } } - ///Create-time parameters for a /// [`Certificate`](crate::external_api::views::Certificate) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -272,19 +242,16 @@ pub mod types { ///The service using this certificate pub service: ServiceUsingCertificate, } - impl From<&CertificateCreate> for CertificateCreate { fn from(value: &CertificateCreate) -> Self { value.clone() } } - impl CertificateCreate { pub fn builder() -> builder::CertificateCreate { builder::CertificateCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct CertificateResultsPage { @@ -294,19 +261,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&CertificateResultsPage> for CertificateResultsPage { fn from(value: &CertificateResultsPage) -> Self { value.clone() } } - impl CertificateResultsPage { pub fn builder() -> builder::CertificateResultsPage { builder::CertificateResultsPage::default() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -320,19 +284,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&ComponentUpdate> for ComponentUpdate { fn from(value: &ComponentUpdate) -> Self { value.clone() } } - impl ComponentUpdate { pub fn builder() -> builder::ComponentUpdate { builder::ComponentUpdate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ComponentUpdateResultsPage { @@ -342,57 +303,48 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ComponentUpdateResultsPage> for ComponentUpdateResultsPage { fn from(value: &ComponentUpdateResultsPage) -> Self { value.clone() } } - impl ComponentUpdateResultsPage { pub fn builder() -> builder::ComponentUpdateResultsPage { builder::ComponentUpdateResultsPage::default() } } - ///A cumulative or counter data type. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cumulativedouble { pub start_time: chrono::DateTime, pub value: f64, } - impl From<&Cumulativedouble> for Cumulativedouble { fn from(value: &Cumulativedouble) -> Self { value.clone() } } - impl Cumulativedouble { pub fn builder() -> builder::Cumulativedouble { builder::Cumulativedouble::default() } } - ///A cumulative or counter data type. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cumulativeint64 { pub start_time: chrono::DateTime, pub value: i64, } - impl From<&Cumulativeint64> for Cumulativeint64 { fn from(value: &Cumulativeint64) -> Self { value.clone() } } - impl Cumulativeint64 { pub fn builder() -> builder::Cumulativeint64 { builder::Cumulativeint64::default() } } - ///A `Datum` is a single sampled data point from a metric. #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "datum")] @@ -416,61 +368,51 @@ pub mod types { #[serde(rename = "histogram_f64")] HistogramF64(Histogramdouble), } - impl From<&Datum> for Datum { fn from(value: &Datum) -> Self { value.clone() } } - impl From for Datum { fn from(value: bool) -> Self { Self::Bool(value) } } - impl From for Datum { fn from(value: i64) -> Self { Self::I64(value) } } - impl From for Datum { fn from(value: f64) -> Self { Self::F64(value) } } - impl From> for Datum { fn from(value: Vec) -> Self { Self::Bytes(value) } } - impl From for Datum { fn from(value: Cumulativeint64) -> Self { Self::CumulativeI64(value) } } - impl From for Datum { fn from(value: Cumulativedouble) -> Self { Self::CumulativeF64(value) } } - impl From for Datum { fn from(value: Histogramint64) -> Self { Self::HistogramI64(value) } } - impl From for Datum { fn from(value: Histogramdouble) -> Self { Self::HistogramF64(value) } } - ///The type of an individual datum of a metric. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum DatumType { @@ -493,13 +435,11 @@ pub mod types { #[serde(rename = "histogram_f64")] HistogramF64, } - impl From<&DatumType> for DatumType { fn from(value: &DatumType) -> Self { value.clone() } } - impl ToString for DatumType { fn to_string(&self) -> String { match *self { @@ -515,7 +455,6 @@ pub mod types { } } } - impl std::str::FromStr for DatumType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -533,28 +472,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for DatumType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for DatumType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for DatumType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DerEncodedKeyPair { ///request signing private key (base64 encoded der file) @@ -562,85 +497,71 @@ pub mod types { ///request signing public certificate (base64 encoded der file) pub public_cert: String, } - impl From<&DerEncodedKeyPair> for DerEncodedKeyPair { fn from(value: &DerEncodedKeyPair) -> Self { value.clone() } } - impl DerEncodedKeyPair { pub fn builder() -> builder::DerEncodedKeyPair { builder::DerEncodedKeyPair::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAccessTokenRequest { pub client_id: uuid::Uuid, pub device_code: String, pub grant_type: String, } - impl From<&DeviceAccessTokenRequest> for DeviceAccessTokenRequest { fn from(value: &DeviceAccessTokenRequest) -> Self { value.clone() } } - impl DeviceAccessTokenRequest { pub fn builder() -> builder::DeviceAccessTokenRequest { builder::DeviceAccessTokenRequest::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAuthRequest { pub client_id: uuid::Uuid, } - impl From<&DeviceAuthRequest> for DeviceAuthRequest { fn from(value: &DeviceAuthRequest) -> Self { value.clone() } } - impl DeviceAuthRequest { pub fn builder() -> builder::DeviceAuthRequest { builder::DeviceAuthRequest::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAuthVerify { pub user_code: String, } - impl From<&DeviceAuthVerify> for DeviceAuthVerify { fn from(value: &DeviceAuthVerify) -> Self { value.clone() } } - impl DeviceAuthVerify { pub fn builder() -> builder::DeviceAuthVerify { builder::DeviceAuthVerify::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum Digest { #[serde(rename = "sha256")] Sha256(String), } - impl From<&Digest> for Digest { fn from(value: &Digest) -> Self { value.clone() } } - ///Client view of a [`Disk`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Disk { @@ -664,19 +585,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Disk> for Disk { fn from(value: &Disk) -> Self { value.clone() } } - impl Disk { pub fn builder() -> builder::Disk { builder::Disk::default() } } - ///Create-time parameters for a /// [`Disk`](omicron_common::api::external::Disk) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -688,19 +606,16 @@ pub mod types { ///total size of the Disk in bytes pub size: ByteCount, } - impl From<&DiskCreate> for DiskCreate { fn from(value: &DiskCreate) -> Self { value.clone() } } - impl DiskCreate { pub fn builder() -> builder::DiskCreate { builder::DiskCreate::default() } } - ///TODO-v1: Delete this Parameters for the /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached /// to an instance @@ -708,19 +623,16 @@ pub mod types { pub struct DiskIdentifier { pub name: Name, } - impl From<&DiskIdentifier> for DiskIdentifier { fn from(value: &DiskIdentifier) -> Self { value.clone() } } - impl DiskIdentifier { pub fn builder() -> builder::DiskIdentifier { builder::DiskIdentifier::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum DiskMetricName { #[serde(rename = "activated")] @@ -736,13 +648,11 @@ pub mod types { #[serde(rename = "write_bytes")] WriteBytes, } - impl From<&DiskMetricName> for DiskMetricName { fn from(value: &DiskMetricName) -> Self { value.clone() } } - impl ToString for DiskMetricName { fn to_string(&self) -> String { match *self { @@ -755,7 +665,6 @@ pub mod types { } } } - impl std::str::FromStr for DiskMetricName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -770,45 +679,38 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for DiskMetricName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for DiskMetricName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for DiskMetricName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskPath { pub disk: NameOrId, } - impl From<&DiskPath> for DiskPath { fn from(value: &DiskPath) -> Self { value.clone() } } - impl DiskPath { pub fn builder() -> builder::DiskPath { builder::DiskPath::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskResultsPage { @@ -818,19 +720,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&DiskResultsPage> for DiskResultsPage { fn from(value: &DiskResultsPage) -> Self { value.clone() } } - impl DiskResultsPage { pub fn builder() -> builder::DiskResultsPage { builder::DiskResultsPage::default() } } - ///Different sources for a disk #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] @@ -852,13 +751,11 @@ pub mod types { #[serde(rename = "global_image")] GlobalImage { image_id: uuid::Uuid }, } - impl From<&DiskSource> for DiskSource { fn from(value: &DiskSource) -> Self { value.clone() } } - ///State of a Disk (primarily: attached or not) #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "state", content = "instance")] @@ -881,13 +778,11 @@ pub mod types { #[serde(rename = "faulted")] Faulted, } - impl From<&DiskState> for DiskState { fn from(value: &DiskState) -> Self { value.clone() } } - ///OS image distribution #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Distribution { @@ -896,19 +791,16 @@ pub mod types { ///The version of the distribution (e.g. "3.10" or "18.04") pub version: String, } - impl From<&Distribution> for Distribution { fn from(value: &Distribution) -> Self { value.clone() } } - impl Distribution { pub fn builder() -> builder::Distribution { builder::Distribution::default() } } - ///Error information from a response. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { @@ -917,37 +809,31 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } - impl Error { pub fn builder() -> builder::Error { builder::Error::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ExternalIp { pub ip: std::net::IpAddr, pub kind: IpKind, } - impl From<&ExternalIp> for ExternalIp { fn from(value: &ExternalIp) -> Self { value.clone() } } - impl ExternalIp { pub fn builder() -> builder::ExternalIp { builder::ExternalIp::default() } } - ///Parameters for creating an external IP address for instances. #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] @@ -961,13 +847,11 @@ pub mod types { pool_name: Option, }, } - impl From<&ExternalIpCreate> for ExternalIpCreate { fn from(value: &ExternalIpCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ExternalIpResultsPage { @@ -977,19 +861,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ExternalIpResultsPage> for ExternalIpResultsPage { fn from(value: &ExternalIpResultsPage) -> Self { value.clone() } } - impl ExternalIpResultsPage { pub fn builder() -> builder::ExternalIpResultsPage { builder::ExternalIpResultsPage::default() } } - ///The name and type information for a field of a timeseries schema. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct FieldSchema { @@ -997,19 +878,16 @@ pub mod types { pub source: FieldSource, pub ty: FieldType, } - impl From<&FieldSchema> for FieldSchema { fn from(value: &FieldSchema) -> Self { value.clone() } } - impl FieldSchema { pub fn builder() -> builder::FieldSchema { builder::FieldSchema::default() } } - ///The source from which a field is derived, the target or metric. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FieldSource { @@ -1018,13 +896,11 @@ pub mod types { #[serde(rename = "metric")] Metric, } - impl From<&FieldSource> for FieldSource { fn from(value: &FieldSource) -> Self { value.clone() } } - impl ToString for FieldSource { fn to_string(&self) -> String { match *self { @@ -1033,7 +909,6 @@ pub mod types { } } } - impl std::str::FromStr for FieldSource { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1044,28 +919,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FieldSource { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FieldSource { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FieldSource { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///The `FieldType` identifies the data type of a target or metric field. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FieldType { @@ -1080,13 +951,11 @@ pub mod types { #[serde(rename = "bool")] Bool, } - impl From<&FieldType> for FieldType { fn from(value: &FieldType) -> Self { value.clone() } } - impl ToString for FieldType { fn to_string(&self) -> String { match *self { @@ -1098,7 +967,6 @@ pub mod types { } } } - impl std::str::FromStr for FieldType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1112,28 +980,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FieldType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FieldType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FieldType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FleetRole { #[serde(rename = "admin")] @@ -1143,13 +1007,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&FleetRole> for FleetRole { fn from(value: &FleetRole) -> Self { value.clone() } } - impl ToString for FleetRole { fn to_string(&self) -> String { match *self { @@ -1159,7 +1021,6 @@ pub mod types { } } } - impl std::str::FromStr for FleetRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1171,28 +1032,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FleetRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FleetRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FleetRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -1204,19 +1061,16 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&FleetRolePolicy> for FleetRolePolicy { fn from(value: &FleetRolePolicy) -> Self { value.clone() } } - impl FleetRolePolicy { pub fn builder() -> builder::FleetRolePolicy { builder::FleetRolePolicy::default() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -1229,19 +1083,16 @@ pub mod types { pub identity_type: IdentityType, pub role_name: FleetRole, } - impl From<&FleetRoleRoleAssignment> for FleetRoleRoleAssignment { fn from(value: &FleetRoleRoleAssignment) -> Self { value.clone() } } - impl FleetRoleRoleAssignment { pub fn builder() -> builder::FleetRoleRoleAssignment { builder::FleetRoleRoleAssignment::default() } } - ///Client view of global Images #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImage { @@ -1270,19 +1121,16 @@ pub mod types { ///Image version pub version: String, } - impl From<&GlobalImage> for GlobalImage { fn from(value: &GlobalImage) -> Self { value.clone() } } - impl GlobalImage { pub fn builder() -> builder::GlobalImage { builder::GlobalImage::default() } } - ///Create-time parameters for an /// [`GlobalImage`](crate::external_api::views::GlobalImage) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -1296,19 +1144,16 @@ pub mod types { ///The source of the image's contents. pub source: ImageSource, } - impl From<&GlobalImageCreate> for GlobalImageCreate { fn from(value: &GlobalImageCreate) -> Self { value.clone() } } - impl GlobalImageCreate { pub fn builder() -> builder::GlobalImageCreate { builder::GlobalImageCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImageResultsPage { @@ -1318,19 +1163,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&GlobalImageResultsPage> for GlobalImageResultsPage { fn from(value: &GlobalImageResultsPage) -> Self { value.clone() } } - impl GlobalImageResultsPage { pub fn builder() -> builder::GlobalImageResultsPage { builder::GlobalImageResultsPage::default() } } - ///Client view of a [`Group`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Group { @@ -1340,19 +1182,16 @@ pub mod types { ///Uuid of the silo to which this group belongs pub silo_id: uuid::Uuid, } - impl From<&Group> for Group { fn from(value: &Group) -> Self { value.clone() } } - impl Group { pub fn builder() -> builder::Group { builder::Group::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GroupResultsPage { @@ -1362,19 +1201,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&GroupResultsPage> for GroupResultsPage { fn from(value: &GroupResultsPage) -> Self { value.clone() } } - impl GroupResultsPage { pub fn builder() -> builder::GroupResultsPage { builder::GroupResultsPage::default() } } - ///A simple type for managing a histogram metric. /// ///A histogram maintains the count of any number of samples, over a set of @@ -1423,19 +1259,16 @@ pub mod types { pub n_samples: u64, pub start_time: chrono::DateTime, } - impl From<&Histogramdouble> for Histogramdouble { fn from(value: &Histogramdouble) -> Self { value.clone() } } - impl Histogramdouble { pub fn builder() -> builder::Histogramdouble { builder::Histogramdouble::default() } } - ///A simple type for managing a histogram metric. /// ///A histogram maintains the count of any number of samples, over a set of @@ -1484,19 +1317,16 @@ pub mod types { pub n_samples: u64, pub start_time: chrono::DateTime, } - impl From<&Histogramint64> for Histogramint64 { fn from(value: &Histogramint64) -> Self { value.clone() } } - impl Histogramint64 { pub fn builder() -> builder::Histogramint64 { builder::Histogramint64::default() } } - ///Supported set of sort modes for scanning by id only. /// ///Currently, we only support scanning in ascending order. @@ -1506,13 +1336,11 @@ pub mod types { #[serde(rename = "id_ascending")] IdAscending, } - impl From<&IdSortMode> for IdSortMode { fn from(value: &IdSortMode) -> Self { value.clone() } } - impl ToString for IdSortMode { fn to_string(&self) -> String { match *self { @@ -1520,7 +1348,6 @@ pub mod types { } } } - impl std::str::FromStr for IdSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1530,28 +1357,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of an [`IdentityProvider`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProvider { @@ -1568,19 +1391,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&IdentityProvider> for IdentityProvider { fn from(value: &IdentityProvider) -> Self { value.clone() } } - impl IdentityProvider { pub fn builder() -> builder::IdentityProvider { builder::IdentityProvider::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProviderResultsPage { @@ -1590,32 +1410,27 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IdentityProviderResultsPage> for IdentityProviderResultsPage { fn from(value: &IdentityProviderResultsPage) -> Self { value.clone() } } - impl IdentityProviderResultsPage { pub fn builder() -> builder::IdentityProviderResultsPage { builder::IdentityProviderResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdentityProviderType { ///SAML identity provider #[serde(rename = "saml")] Saml, } - impl From<&IdentityProviderType> for IdentityProviderType { fn from(value: &IdentityProviderType) -> Self { value.clone() } } - impl ToString for IdentityProviderType { fn to_string(&self) -> String { match *self { @@ -1623,7 +1438,6 @@ pub mod types { } } } - impl std::str::FromStr for IdentityProviderType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1633,28 +1447,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdentityProviderType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdentityProviderType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdentityProviderType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Describes what kind of identity is described by an id #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdentityType { @@ -1663,13 +1473,11 @@ pub mod types { #[serde(rename = "silo_group")] SiloGroup, } - impl From<&IdentityType> for IdentityType { fn from(value: &IdentityType) -> Self { value.clone() } } - impl ToString for IdentityType { fn to_string(&self) -> String { match *self { @@ -1678,7 +1486,6 @@ pub mod types { } } } - impl std::str::FromStr for IdentityType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1689,28 +1496,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdentityType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdentityType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdentityType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum IdpMetadataSource { @@ -1719,13 +1522,11 @@ pub mod types { #[serde(rename = "base64_encoded_xml")] Base64EncodedXml { data: String }, } - impl From<&IdpMetadataSource> for IdpMetadataSource { fn from(value: &IdpMetadataSource) -> Self { value.clone() } } - ///Client view of project Images #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Image { @@ -1755,19 +1556,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub version: Option, } - impl From<&Image> for Image { fn from(value: &Image) -> Self { value.clone() } } - impl Image { pub fn builder() -> builder::Image { builder::Image::default() } } - ///Create-time parameters for an /// [`Image`](crate::external_api::views::Image) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -1779,19 +1577,16 @@ pub mod types { ///The source of the image's contents. pub source: ImageSource, } - impl From<&ImageCreate> for ImageCreate { fn from(value: &ImageCreate) -> Self { value.clone() } } - impl ImageCreate { pub fn builder() -> builder::ImageCreate { builder::ImageCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ImageResultsPage { @@ -1801,19 +1596,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ImageResultsPage> for ImageResultsPage { fn from(value: &ImageResultsPage) -> Self { value.clone() } } - impl ImageResultsPage { pub fn builder() -> builder::ImageResultsPage { builder::ImageResultsPage::default() } } - ///The source of the underlying image. #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] @@ -1825,13 +1617,11 @@ pub mod types { #[serde(rename = "you_can_boot_anything_as_long_as_its_alpine")] YouCanBootAnythingAsLongAsItsAlpine, } - impl From<&ImageSource> for ImageSource { fn from(value: &ImageSource) -> Self { value.clone() } } - ///Client view of an [`Instance`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Instance { @@ -1856,19 +1646,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub time_run_state_updated: chrono::DateTime, } - impl From<&Instance> for Instance { fn from(value: &Instance) -> Self { value.clone() } } - impl Instance { pub fn builder() -> builder::Instance { builder::Instance::default() } } - ///The number of CPUs in an Instance #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceCpuCount(pub u16); @@ -1878,59 +1665,50 @@ pub mod types { &self.0 } } - impl From for u16 { fn from(value: InstanceCpuCount) -> Self { value.0 } } - impl From<&InstanceCpuCount> for InstanceCpuCount { fn from(value: &InstanceCpuCount) -> Self { value.clone() } } - impl From for InstanceCpuCount { fn from(value: u16) -> Self { Self(value) } } - impl std::str::FromStr for InstanceCpuCount { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for InstanceCpuCount { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceCpuCount { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceCpuCount { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for InstanceCpuCount { fn to_string(&self) -> String { self.0.to_string() } } - ///Create-time parameters for an /// [`Instance`](omicron_common::api::external::Instance) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -1963,19 +1741,16 @@ pub mod types { #[serde(default)] pub user_data: String, } - impl From<&InstanceCreate> for InstanceCreate { fn from(value: &InstanceCreate) -> Self { value.clone() } } - impl InstanceCreate { pub fn builder() -> builder::InstanceCreate { builder::InstanceCreate::default() } } - ///Describe the instance's disks at creation time #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] @@ -1997,32 +1772,27 @@ pub mod types { name: Name, }, } - impl From<&InstanceDiskAttachment> for InstanceDiskAttachment { fn from(value: &InstanceDiskAttachment) -> Self { value.clone() } } - ///Migration parameters for an /// [`Instance`](omicron_common::api::external::Instance) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrate { pub dst_sled_id: uuid::Uuid, } - impl From<&InstanceMigrate> for InstanceMigrate { fn from(value: &InstanceMigrate) -> Self { value.clone() } } - impl InstanceMigrate { pub fn builder() -> builder::InstanceMigrate { builder::InstanceMigrate::default() } } - ///Describes an attachment of a `NetworkInterface` to an `Instance`, at the /// time the instance is created. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -2039,19 +1809,16 @@ pub mod types { #[serde(rename = "none")] None, } - impl From<&InstanceNetworkInterfaceAttachment> for InstanceNetworkInterfaceAttachment { fn from(value: &InstanceNetworkInterfaceAttachment) -> Self { value.clone() } } - impl From> for InstanceNetworkInterfaceAttachment { fn from(value: Vec) -> Self { Self::Create(value) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceResultsPage { @@ -2061,19 +1828,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&InstanceResultsPage> for InstanceResultsPage { fn from(value: &InstanceResultsPage) -> Self { value.clone() } } - impl InstanceResultsPage { pub fn builder() -> builder::InstanceResultsPage { builder::InstanceResultsPage::default() } } - ///Contents of an Instance's serial console buffer. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceSerialConsoleData { @@ -2085,19 +1849,16 @@ pub mod types { /// a subsequent request) of the last byte returned in `data`. pub last_byte_offset: u64, } - impl From<&InstanceSerialConsoleData> for InstanceSerialConsoleData { fn from(value: &InstanceSerialConsoleData) -> Self { value.clone() } } - impl InstanceSerialConsoleData { pub fn builder() -> builder::InstanceSerialConsoleData { builder::InstanceSerialConsoleData::default() } } - ///Running state of an Instance (primarily: booted or stopped) /// ///This typically reflects whether it's starting, running, stopping, or @@ -2139,13 +1900,11 @@ pub mod types { #[serde(rename = "destroyed")] Destroyed, } - impl From<&InstanceState> for InstanceState { fn from(value: &InstanceState) -> Self { value.clone() } } - impl ToString for InstanceState { fn to_string(&self) -> String { match *self { @@ -2162,7 +1921,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2181,28 +1939,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///The kind of an external IP address for an instance #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IpKind { @@ -2211,13 +1965,11 @@ pub mod types { #[serde(rename = "floating")] Floating, } - impl From<&IpKind> for IpKind { fn from(value: &IpKind) -> Self { value.clone() } } - impl ToString for IpKind { fn to_string(&self) -> String { match *self { @@ -2226,7 +1978,6 @@ pub mod types { } } } - impl std::str::FromStr for IpKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2237,41 +1988,35 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IpKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IpKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IpKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum IpNet { V4(Ipv4Net), V6(Ipv6Net), } - impl From<&IpNet> for IpNet { fn from(value: &IpNet) -> Self { value.clone() } } - impl std::str::FromStr for IpNet { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2284,28 +2029,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IpNet { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IpNet { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IpNet { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for IpNet { fn to_string(&self) -> String { match self { @@ -2314,19 +2055,16 @@ pub mod types { } } } - impl From for IpNet { fn from(value: Ipv4Net) -> Self { Self::V4(value) } } - impl From for IpNet { fn from(value: Ipv6Net) -> Self { Self::V6(value) } } - ///Identity-related metadata that's included in nearly all public API /// objects #[derive(Clone, Debug, Deserialize, Serialize)] @@ -2342,19 +2080,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&IpPool> for IpPool { fn from(value: &IpPool) -> Self { value.clone() } } - impl IpPool { pub fn builder() -> builder::IpPool { builder::IpPool::default() } } - ///Create-time parameters for an IP Pool. /// ///See [`IpPool`](crate::external_api::views::IpPool) @@ -2363,38 +2098,32 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&IpPoolCreate> for IpPoolCreate { fn from(value: &IpPoolCreate) -> Self { value.clone() } } - impl IpPoolCreate { pub fn builder() -> builder::IpPoolCreate { builder::IpPoolCreate::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolRange { pub id: uuid::Uuid, pub range: IpRange, pub time_created: chrono::DateTime, } - impl From<&IpPoolRange> for IpPoolRange { fn from(value: &IpPoolRange) -> Self { value.clone() } } - impl IpPoolRange { pub fn builder() -> builder::IpPoolRange { builder::IpPoolRange::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolRangeResultsPage { @@ -2404,19 +2133,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IpPoolRangeResultsPage> for IpPoolRangeResultsPage { fn from(value: &IpPoolRangeResultsPage) -> Self { value.clone() } } - impl IpPoolRangeResultsPage { pub fn builder() -> builder::IpPoolRangeResultsPage { builder::IpPoolRangeResultsPage::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolResultsPage { @@ -2426,19 +2152,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IpPoolResultsPage> for IpPoolResultsPage { fn from(value: &IpPoolResultsPage) -> Self { value.clone() } } - impl IpPoolResultsPage { pub fn builder() -> builder::IpPoolResultsPage { builder::IpPoolResultsPage::default() } } - ///Parameters for updating an IP Pool #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolUpdate { @@ -2447,44 +2170,37 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&IpPoolUpdate> for IpPoolUpdate { fn from(value: &IpPoolUpdate) -> Self { value.clone() } } - impl IpPoolUpdate { pub fn builder() -> builder::IpPoolUpdate { builder::IpPoolUpdate::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum IpRange { V4(Ipv4Range), V6(Ipv6Range), } - impl From<&IpRange> for IpRange { fn from(value: &IpRange) -> Self { value.clone() } } - impl From for IpRange { fn from(value: Ipv4Range) -> Self { Self::V4(value) } } - impl From for IpRange { fn from(value: Ipv6Range) -> Self { Self::V6(value) } } - ///An IPv4 subnet, including prefix and subnet mask #[derive(Clone, Debug, Serialize)] pub struct Ipv4Net(String); @@ -2494,19 +2210,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Ipv4Net) -> Self { value.0 } } - impl From<&Ipv4Net> for Ipv4Net { fn from(value: &Ipv4Net) -> Self { value.clone() } } - impl std::str::FromStr for Ipv4Net { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2514,28 +2227,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Ipv4Net { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Ipv4Net { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Ipv4Net { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Ipv4Net { fn deserialize(deserializer: D) -> Result where @@ -2546,7 +2255,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A non-decreasing IPv4 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. @@ -2555,19 +2263,16 @@ pub mod types { pub first: std::net::Ipv4Addr, pub last: std::net::Ipv4Addr, } - impl From<&Ipv4Range> for Ipv4Range { fn from(value: &Ipv4Range) -> Self { value.clone() } } - impl Ipv4Range { pub fn builder() -> builder::Ipv4Range { builder::Ipv4Range::default() } } - ///An IPv6 subnet, including prefix and subnet mask #[derive(Clone, Debug, Serialize)] pub struct Ipv6Net(String); @@ -2577,19 +2282,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Ipv6Net) -> Self { value.0 } } - impl From<&Ipv6Net> for Ipv6Net { fn from(value: &Ipv6Net) -> Self { value.clone() } } - impl std::str::FromStr for Ipv6Net { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2597,28 +2299,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Ipv6Net { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Ipv6Net { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Ipv6Net { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Ipv6Net { fn deserialize(deserializer: D) -> Result where @@ -2629,7 +2327,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A non-decreasing IPv6 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. @@ -2638,19 +2335,16 @@ pub mod types { pub first: std::net::Ipv6Addr, pub last: std::net::Ipv6Addr, } - impl From<&Ipv6Range> for Ipv6Range { fn from(value: &Ipv6Range) -> Self { value.clone() } } - impl Ipv6Range { pub fn builder() -> builder::Ipv6Range { builder::Ipv6Range::default() } } - ///An inclusive-inclusive range of IP ports. The second port may be omitted /// to represent a single port #[derive(Clone, Debug, Serialize)] @@ -2661,19 +2355,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: L4PortRange) -> Self { value.0 } } - impl From<&L4PortRange> for L4PortRange { fn from(value: &L4PortRange) -> Self { value.clone() } } - impl std::str::FromStr for L4PortRange { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2693,28 +2384,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for L4PortRange { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for L4PortRange { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for L4PortRange { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for L4PortRange { fn deserialize(deserializer: D) -> Result where @@ -2725,7 +2412,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A Media Access Control address, in EUI-48 format #[derive(Clone, Debug, Serialize)] pub struct MacAddr(String); @@ -2735,19 +2421,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: MacAddr) -> Self { value.0 } } - impl From<&MacAddr> for MacAddr { fn from(value: &MacAddr) -> Self { value.clone() } } - impl std::str::FromStr for MacAddr { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2767,28 +2450,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for MacAddr { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for MacAddr { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for MacAddr { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for MacAddr { fn deserialize(deserializer: D) -> Result where @@ -2799,26 +2478,22 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A `Measurement` is a timestamped datum from a single metric #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Measurement { pub datum: Datum, pub timestamp: chrono::DateTime, } - impl From<&Measurement> for Measurement { fn from(value: &Measurement) -> Self { value.clone() } } - impl Measurement { pub fn builder() -> builder::Measurement { builder::Measurement::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct MeasurementResultsPage { @@ -2828,19 +2503,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&MeasurementResultsPage> for MeasurementResultsPage { fn from(value: &MeasurementResultsPage) -> Self { value.clone() } } - impl MeasurementResultsPage { pub fn builder() -> builder::MeasurementResultsPage { builder::MeasurementResultsPage::default() } } - ///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. @@ -2852,19 +2524,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Name) -> Self { value.0 } } - impl From<&Name> for Name { fn from(value: &Name) -> Self { value.clone() } } - impl std::str::FromStr for Name { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2875,28 +2544,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Name { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Name { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Name { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Name { fn deserialize(deserializer: D) -> Result where @@ -2907,20 +2572,17 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum NameOrId { Id(uuid::Uuid), Name(Name), } - impl From<&NameOrId> for NameOrId { fn from(value: &NameOrId) -> Self { value.clone() } } - impl std::str::FromStr for NameOrId { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2933,28 +2595,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameOrId { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameOrId { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameOrId { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for NameOrId { fn to_string(&self) -> String { match self { @@ -2963,19 +2621,16 @@ pub mod types { } } } - impl From for NameOrId { fn from(value: uuid::Uuid) -> Self { Self::Id(value) } } - impl From for NameOrId { fn from(value: Name) -> Self { Self::Name(value) } } - ///Supported set of sort modes for scanning by name or id #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum NameOrIdSortMode { @@ -2989,13 +2644,11 @@ pub mod types { #[serde(rename = "id_ascending")] IdAscending, } - impl From<&NameOrIdSortMode> for NameOrIdSortMode { fn from(value: &NameOrIdSortMode) -> Self { value.clone() } } - impl ToString for NameOrIdSortMode { fn to_string(&self) -> String { match *self { @@ -3005,7 +2658,6 @@ pub mod types { } } } - impl std::str::FromStr for NameOrIdSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3017,28 +2669,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameOrIdSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameOrIdSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameOrIdSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Supported set of sort modes for scanning by name only /// ///Currently, we only support scanning in ascending order. @@ -3048,13 +2696,11 @@ pub mod types { #[serde(rename = "name_ascending")] NameAscending, } - impl From<&NameSortMode> for NameSortMode { fn from(value: &NameSortMode) -> Self { value.clone() } } - impl ToString for NameSortMode { fn to_string(&self) -> String { match *self { @@ -3062,7 +2708,6 @@ pub mod types { } } } - impl std::str::FromStr for NameSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3072,28 +2717,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A `NetworkInterface` represents a virtual network interface device. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterface { @@ -3121,19 +2762,16 @@ pub mod types { ///The VPC to which the interface belongs. pub vpc_id: uuid::Uuid, } - impl From<&NetworkInterface> for NetworkInterface { fn from(value: &NetworkInterface) -> Self { value.clone() } } - impl NetworkInterface { pub fn builder() -> builder::NetworkInterface { builder::NetworkInterface::default() } } - ///Create-time parameters for a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3149,19 +2787,16 @@ pub mod types { ///The VPC in which to create the interface. pub vpc_name: Name, } - impl From<&NetworkInterfaceCreate> for NetworkInterfaceCreate { fn from(value: &NetworkInterfaceCreate) -> Self { value.clone() } } - impl NetworkInterfaceCreate { pub fn builder() -> builder::NetworkInterfaceCreate { builder::NetworkInterfaceCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceResultsPage { @@ -3171,19 +2806,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&NetworkInterfaceResultsPage> for NetworkInterfaceResultsPage { fn from(value: &NetworkInterfaceResultsPage) -> Self { value.clone() } } - impl NetworkInterfaceResultsPage { pub fn builder() -> builder::NetworkInterfaceResultsPage { builder::NetworkInterfaceResultsPage::default() } } - ///Parameters for updating a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface). /// @@ -3209,19 +2841,16 @@ pub mod types { #[serde(default)] pub primary: bool, } - impl From<&NetworkInterfaceUpdate> for NetworkInterfaceUpdate { fn from(value: &NetworkInterfaceUpdate) -> Self { value.clone() } } - impl NetworkInterfaceUpdate { pub fn builder() -> builder::NetworkInterfaceUpdate { builder::NetworkInterfaceUpdate::default() } } - ///Unique name for a saga [`Node`] /// ///Each node requires a string name that's unique within its DAG. The name @@ -3236,38 +2865,32 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: NodeName) -> Self { value.0 } } - impl From<&NodeName> for NodeName { fn from(value: &NodeName) -> Self { value.clone() } } - impl From for NodeName { fn from(value: String) -> Self { Self(value) } } - impl std::str::FromStr for NodeName { type Err = std::convert::Infallible; fn from_str(value: &str) -> Result { Ok(Self(value.to_string())) } } - impl ToString for NodeName { fn to_string(&self) -> String { self.0.to_string() } } - ///Client view of an [`Organization`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Organization { @@ -3282,19 +2905,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Organization> for Organization { fn from(value: &Organization) -> Self { value.clone() } } - impl Organization { pub fn builder() -> builder::Organization { builder::Organization::default() } } - ///Create-time parameters for an /// [`Organization`](crate::external_api::views::Organization) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3302,19 +2922,16 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&OrganizationCreate> for OrganizationCreate { fn from(value: &OrganizationCreate) -> Self { value.clone() } } - impl OrganizationCreate { pub fn builder() -> builder::OrganizationCreate { builder::OrganizationCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationResultsPage { @@ -3324,19 +2941,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&OrganizationResultsPage> for OrganizationResultsPage { fn from(value: &OrganizationResultsPage) -> Self { value.clone() } } - impl OrganizationResultsPage { pub fn builder() -> builder::OrganizationResultsPage { builder::OrganizationResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum OrganizationRole { #[serde(rename = "admin")] @@ -3346,13 +2960,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&OrganizationRole> for OrganizationRole { fn from(value: &OrganizationRole) -> Self { value.clone() } } - impl ToString for OrganizationRole { fn to_string(&self) -> String { match *self { @@ -3362,7 +2974,6 @@ pub mod types { } } } - impl std::str::FromStr for OrganizationRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3374,28 +2985,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for OrganizationRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for OrganizationRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for OrganizationRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -3407,19 +3014,16 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&OrganizationRolePolicy> for OrganizationRolePolicy { fn from(value: &OrganizationRolePolicy) -> Self { value.clone() } } - impl OrganizationRolePolicy { pub fn builder() -> builder::OrganizationRolePolicy { builder::OrganizationRolePolicy::default() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -3432,19 +3036,16 @@ pub mod types { pub identity_type: IdentityType, pub role_name: OrganizationRole, } - impl From<&OrganizationRoleRoleAssignment> for OrganizationRoleRoleAssignment { fn from(value: &OrganizationRoleRoleAssignment) -> Self { value.clone() } } - impl OrganizationRoleRoleAssignment { pub fn builder() -> builder::OrganizationRoleRoleAssignment { builder::OrganizationRoleRoleAssignment::default() } } - ///Updateable properties of an /// [`Organization`](crate::external_api::views::Organization) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3454,19 +3055,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&OrganizationUpdate> for OrganizationUpdate { fn from(value: &OrganizationUpdate) -> Self { value.clone() } } - impl OrganizationUpdate { pub fn builder() -> builder::OrganizationUpdate { builder::OrganizationUpdate::default() } } - ///Passwords may be subject to additional constraints. #[derive(Clone, Debug, Serialize)] pub struct Password(String); @@ -3476,19 +3074,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Password) -> Self { value.0 } } - impl From<&Password> for Password { fn from(value: &Password) -> Self { value.clone() } } - impl std::str::FromStr for Password { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3498,28 +3093,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Password { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Password { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Password { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Password { fn deserialize(deserializer: D) -> Result where @@ -3530,7 +3121,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///Client view of a [`PhysicalDisk`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhysicalDisk { @@ -3548,19 +3138,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub vendor: String, } - impl From<&PhysicalDisk> for PhysicalDisk { fn from(value: &PhysicalDisk) -> Self { value.clone() } } - impl PhysicalDisk { pub fn builder() -> builder::PhysicalDisk { builder::PhysicalDisk::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhysicalDiskResultsPage { @@ -3570,19 +3157,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&PhysicalDiskResultsPage> for PhysicalDiskResultsPage { fn from(value: &PhysicalDiskResultsPage) -> Self { value.clone() } } - impl PhysicalDiskResultsPage { pub fn builder() -> builder::PhysicalDiskResultsPage { builder::PhysicalDiskResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum PhysicalDiskType { #[serde(rename = "internal")] @@ -3590,13 +3174,11 @@ pub mod types { #[serde(rename = "external")] External, } - impl From<&PhysicalDiskType> for PhysicalDiskType { fn from(value: &PhysicalDiskType) -> Self { value.clone() } } - impl ToString for PhysicalDiskType { fn to_string(&self) -> String { match *self { @@ -3605,7 +3187,6 @@ pub mod types { } } } - impl std::str::FromStr for PhysicalDiskType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3616,28 +3197,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for PhysicalDiskType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for PhysicalDiskType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for PhysicalDiskType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Project`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Project { @@ -3653,19 +3230,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Project> for Project { fn from(value: &Project) -> Self { value.clone() } } - impl Project { pub fn builder() -> builder::Project { builder::Project::default() } } - ///Create-time parameters for a /// [`Project`](crate::external_api::views::Project) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3673,19 +3247,16 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&ProjectCreate> for ProjectCreate { fn from(value: &ProjectCreate) -> Self { value.clone() } } - impl ProjectCreate { pub fn builder() -> builder::ProjectCreate { builder::ProjectCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectResultsPage { @@ -3695,19 +3266,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ProjectResultsPage> for ProjectResultsPage { fn from(value: &ProjectResultsPage) -> Self { value.clone() } } - impl ProjectResultsPage { pub fn builder() -> builder::ProjectResultsPage { builder::ProjectResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum ProjectRole { #[serde(rename = "admin")] @@ -3717,13 +3285,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&ProjectRole> for ProjectRole { fn from(value: &ProjectRole) -> Self { value.clone() } } - impl ToString for ProjectRole { fn to_string(&self) -> String { match *self { @@ -3733,7 +3299,6 @@ pub mod types { } } } - impl std::str::FromStr for ProjectRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3745,28 +3310,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for ProjectRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ProjectRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ProjectRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -3778,19 +3339,16 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&ProjectRolePolicy> for ProjectRolePolicy { fn from(value: &ProjectRolePolicy) -> Self { value.clone() } } - impl ProjectRolePolicy { pub fn builder() -> builder::ProjectRolePolicy { builder::ProjectRolePolicy::default() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -3803,19 +3361,16 @@ pub mod types { pub identity_type: IdentityType, pub role_name: ProjectRole, } - impl From<&ProjectRoleRoleAssignment> for ProjectRoleRoleAssignment { fn from(value: &ProjectRoleRoleAssignment) -> Self { value.clone() } } - impl ProjectRoleRoleAssignment { pub fn builder() -> builder::ProjectRoleRoleAssignment { builder::ProjectRoleRoleAssignment::default() } } - ///Updateable properties of a /// [`Project`](crate::external_api::views::Project) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3825,19 +3380,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&ProjectUpdate> for ProjectUpdate { fn from(value: &ProjectUpdate) -> Self { value.clone() } } - impl ProjectUpdate { pub fn builder() -> builder::ProjectUpdate { builder::ProjectUpdate::default() } } - ///Client view of an [`Rack`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Rack { @@ -3848,19 +3400,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Rack> for Rack { fn from(value: &Rack) -> Self { value.clone() } } - impl Rack { pub fn builder() -> builder::Rack { builder::Rack::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RackResultsPage { @@ -3870,38 +3419,32 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RackResultsPage> for RackResultsPage { fn from(value: &RackResultsPage) -> Self { value.clone() } } - impl RackResultsPage { pub fn builder() -> builder::RackResultsPage { builder::RackResultsPage::default() } } - ///Client view of a [`Role`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Role { pub description: String, pub name: RoleName, } - impl From<&Role> for Role { fn from(value: &Role) -> Self { value.clone() } } - impl Role { pub fn builder() -> builder::Role { builder::Role::default() } } - ///Role names consist of two string components separated by dot ("."). #[derive(Clone, Debug, Serialize)] pub struct RoleName(String); @@ -3911,19 +3454,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: RoleName) -> Self { value.0 } } - impl From<&RoleName> for RoleName { fn from(value: &RoleName) -> Self { value.clone() } } - impl std::str::FromStr for RoleName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3940,28 +3480,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for RoleName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for RoleName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for RoleName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for RoleName { fn deserialize(deserializer: D) -> Result where @@ -3972,7 +3508,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RoleResultsPage { @@ -3982,19 +3517,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RoleResultsPage> for RoleResultsPage { fn from(value: &RoleResultsPage) -> Self { value.clone() } } - impl RoleResultsPage { pub fn builder() -> builder::RoleResultsPage { builder::RoleResultsPage::default() } } - ///A `RouteDestination` is used to match traffic with a routing rule, on /// the destination of that traffic. /// @@ -4017,25 +3549,21 @@ pub mod types { #[serde(rename = "subnet")] Subnet(Name), } - impl From<&RouteDestination> for RouteDestination { fn from(value: &RouteDestination) -> Self { value.clone() } } - impl From for RouteDestination { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for RouteDestination { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///A `RouteTarget` describes the possible locations that traffic matching a /// route destination can be sent. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4057,19 +3585,16 @@ pub mod types { #[serde(rename = "internet_gateway")] InternetGateway(Name), } - impl From<&RouteTarget> for RouteTarget { fn from(value: &RouteTarget) -> Self { value.clone() } } - impl From for RouteTarget { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - ///A route defines a rule that governs where traffic should be sent based /// on its destination. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4091,19 +3616,16 @@ pub mod types { ///The VPC Router to which the route belongs. pub vpc_router_id: uuid::Uuid, } - impl From<&RouterRoute> for RouterRoute { fn from(value: &RouterRoute) -> Self { value.clone() } } - impl RouterRoute { pub fn builder() -> builder::RouterRoute { builder::RouterRoute::default() } } - ///Create-time parameters for a [`RouterRoute`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteCreateParams { @@ -4112,19 +3634,16 @@ pub mod types { pub name: Name, pub target: RouteTarget, } - impl From<&RouterRouteCreateParams> for RouterRouteCreateParams { fn from(value: &RouterRouteCreateParams) -> Self { value.clone() } } - impl RouterRouteCreateParams { pub fn builder() -> builder::RouterRouteCreateParams { builder::RouterRouteCreateParams::default() } } - ///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. @@ -4154,13 +3673,11 @@ pub mod types { #[serde(rename = "custom")] Custom, } - impl From<&RouterRouteKind> for RouterRouteKind { fn from(value: &RouterRouteKind) -> Self { value.clone() } } - impl ToString for RouterRouteKind { fn to_string(&self) -> String { match *self { @@ -4171,7 +3688,6 @@ pub mod types { } } } - impl std::str::FromStr for RouterRouteKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4184,28 +3700,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for RouterRouteKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for RouterRouteKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for RouterRouteKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteResultsPage { @@ -4215,19 +3727,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RouterRouteResultsPage> for RouterRouteResultsPage { fn from(value: &RouterRouteResultsPage) -> Self { value.clone() } } - impl RouterRouteResultsPage { pub fn builder() -> builder::RouterRouteResultsPage { builder::RouterRouteResultsPage::default() } } - ///Updateable properties of a [`RouterRoute`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteUpdateParams { @@ -4238,37 +3747,31 @@ pub mod types { pub name: Option, pub target: RouteTarget, } - impl From<&RouterRouteUpdateParams> for RouterRouteUpdateParams { fn from(value: &RouterRouteUpdateParams) -> Self { value.clone() } } - impl RouterRouteUpdateParams { pub fn builder() -> builder::RouterRouteUpdateParams { builder::RouterRouteUpdateParams::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Saga { pub id: uuid::Uuid, pub state: SagaState, } - impl From<&Saga> for Saga { fn from(value: &Saga) -> Self { value.clone() } } - impl Saga { pub fn builder() -> builder::Saga { builder::Saga::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "error")] pub enum SagaErrorInfo { @@ -4283,13 +3786,11 @@ pub mod types { #[serde(rename = "subsaga_create_failed")] SubsagaCreateFailed { message: String }, } - impl From<&SagaErrorInfo> for SagaErrorInfo { fn from(value: &SagaErrorInfo) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SagaResultsPage { @@ -4299,19 +3800,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SagaResultsPage> for SagaResultsPage { fn from(value: &SagaResultsPage) -> Self { value.clone() } } - impl SagaResultsPage { pub fn builder() -> builder::SagaResultsPage { builder::SagaResultsPage::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "state")] pub enum SagaState { @@ -4325,13 +3823,11 @@ pub mod types { error_node_name: NodeName, }, } - impl From<&SagaState> for SagaState { fn from(value: &SagaState) -> Self { value.clone() } } - ///Identity-related metadata that's included in nearly all public API /// objects #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4361,19 +3857,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&SamlIdentityProvider> for SamlIdentityProvider { fn from(value: &SamlIdentityProvider) -> Self { value.clone() } } - impl SamlIdentityProvider { pub fn builder() -> builder::SamlIdentityProvider { builder::SamlIdentityProvider::default() } } - ///Create-time identity-related parameters #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SamlIdentityProviderCreate { @@ -4400,19 +3893,16 @@ pub mod types { ///customer's technical contact for saml configuration pub technical_contact_email: String, } - impl From<&SamlIdentityProviderCreate> for SamlIdentityProviderCreate { fn from(value: &SamlIdentityProviderCreate) -> Self { value.clone() } } - impl SamlIdentityProviderCreate { pub fn builder() -> builder::SamlIdentityProviderCreate { builder::SamlIdentityProviderCreate::default() } } - #[derive(Clone, Debug, Serialize)] pub struct SemverVersion(String); impl std::ops::Deref for SemverVersion { @@ -4421,19 +3911,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: SemverVersion) -> Self { value.0 } } - impl From<&SemverVersion> for SemverVersion { fn from(value: &SemverVersion) -> Self { value.clone() } } - impl std::str::FromStr for SemverVersion { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4447,28 +3934,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for SemverVersion { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SemverVersion { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SemverVersion { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for SemverVersion { fn deserialize(deserializer: D) -> Result where @@ -4479,7 +3962,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///The service intended to use this certificate. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum ServiceUsingCertificate { @@ -4487,13 +3969,11 @@ pub mod types { #[serde(rename = "external_api")] ExternalApi, } - impl From<&ServiceUsingCertificate> for ServiceUsingCertificate { fn from(value: &ServiceUsingCertificate) -> Self { value.clone() } } - impl ToString for ServiceUsingCertificate { fn to_string(&self) -> String { match *self { @@ -4501,7 +3981,6 @@ pub mod types { } } } - impl std::str::FromStr for ServiceUsingCertificate { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4511,28 +3990,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a ['Silo'] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Silo { @@ -4552,19 +4027,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Silo> for Silo { fn from(value: &Silo) -> Self { value.clone() } } - impl Silo { pub fn builder() -> builder::Silo { builder::Silo::default() } } - ///Create-time parameters for a [`Silo`](crate::external_api::views::Silo) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloCreate { @@ -4583,19 +4055,16 @@ pub mod types { pub identity_mode: SiloIdentityMode, pub name: Name, } - impl From<&SiloCreate> for SiloCreate { fn from(value: &SiloCreate) -> Self { value.clone() } } - impl SiloCreate { pub fn builder() -> builder::SiloCreate { builder::SiloCreate::default() } } - ///Describes how identities are managed and users are authenticated in this /// Silo #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] @@ -4611,13 +4080,11 @@ pub mod types { #[serde(rename = "local_only")] LocalOnly, } - impl From<&SiloIdentityMode> for SiloIdentityMode { fn from(value: &SiloIdentityMode) -> Self { value.clone() } } - impl ToString for SiloIdentityMode { fn to_string(&self) -> String { match *self { @@ -4626,7 +4093,6 @@ pub mod types { } } } - impl std::str::FromStr for SiloIdentityMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4637,28 +4103,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SiloIdentityMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SiloIdentityMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SiloIdentityMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloResultsPage { @@ -4668,19 +4130,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SiloResultsPage> for SiloResultsPage { fn from(value: &SiloResultsPage) -> Self { value.clone() } } - impl SiloResultsPage { pub fn builder() -> builder::SiloResultsPage { builder::SiloResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SiloRole { #[serde(rename = "admin")] @@ -4690,13 +4149,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&SiloRole> for SiloRole { fn from(value: &SiloRole) -> Self { value.clone() } } - impl ToString for SiloRole { fn to_string(&self) -> String { match *self { @@ -4706,7 +4163,6 @@ pub mod types { } } } - impl std::str::FromStr for SiloRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4718,28 +4174,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SiloRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SiloRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SiloRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -4751,19 +4203,16 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&SiloRolePolicy> for SiloRolePolicy { fn from(value: &SiloRolePolicy) -> Self { value.clone() } } - impl SiloRolePolicy { pub fn builder() -> builder::SiloRolePolicy { builder::SiloRolePolicy::default() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -4776,19 +4225,16 @@ pub mod types { pub identity_type: IdentityType, pub role_name: SiloRole, } - impl From<&SiloRoleRoleAssignment> for SiloRoleRoleAssignment { fn from(value: &SiloRoleRoleAssignment) -> Self { value.clone() } } - impl SiloRoleRoleAssignment { pub fn builder() -> builder::SiloRoleRoleAssignment { builder::SiloRoleRoleAssignment::default() } } - ///Client view of a [`Sled`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Sled { @@ -4801,19 +4247,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Sled> for Sled { fn from(value: &Sled) -> Self { value.clone() } } - impl Sled { pub fn builder() -> builder::Sled { builder::Sled::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SledResultsPage { @@ -4823,19 +4266,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SledResultsPage> for SledResultsPage { fn from(value: &SledResultsPage) -> Self { value.clone() } } - impl SledResultsPage { pub fn builder() -> builder::SledResultsPage { builder::SledResultsPage::default() } } - ///Client view of a Snapshot #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Snapshot { @@ -4854,19 +4294,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Snapshot> for Snapshot { fn from(value: &Snapshot) -> Self { value.clone() } } - impl Snapshot { pub fn builder() -> builder::Snapshot { builder::Snapshot::default() } } - ///Create-time parameters for a /// [`Snapshot`](crate::external_api::views::Snapshot) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4876,19 +4313,16 @@ pub mod types { pub disk: Name, pub name: Name, } - impl From<&SnapshotCreate> for SnapshotCreate { fn from(value: &SnapshotCreate) -> Self { value.clone() } } - impl SnapshotCreate { pub fn builder() -> builder::SnapshotCreate { builder::SnapshotCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SnapshotResultsPage { @@ -4898,19 +4332,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SnapshotResultsPage> for SnapshotResultsPage { fn from(value: &SnapshotResultsPage) -> Self { value.clone() } } - impl SnapshotResultsPage { pub fn builder() -> builder::SnapshotResultsPage { builder::SnapshotResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SnapshotState { #[serde(rename = "creating")] @@ -4922,13 +4353,11 @@ pub mod types { #[serde(rename = "destroyed")] Destroyed, } - impl From<&SnapshotState> for SnapshotState { fn from(value: &SnapshotState) -> Self { value.clone() } } - impl ToString for SnapshotState { fn to_string(&self) -> String { match *self { @@ -4939,7 +4368,6 @@ pub mod types { } } } - impl std::str::FromStr for SnapshotState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4952,45 +4380,38 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SnapshotState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SnapshotState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SnapshotState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SpoofLoginBody { pub username: String, } - impl From<&SpoofLoginBody> for SpoofLoginBody { fn from(value: &SpoofLoginBody) -> Self { value.clone() } } - impl SpoofLoginBody { pub fn builder() -> builder::SpoofLoginBody { builder::SpoofLoginBody::default() } } - ///Client view of a [`SshKey`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKey { @@ -5009,19 +4430,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&SshKey> for SshKey { fn from(value: &SshKey) -> Self { value.clone() } } - impl SshKey { pub fn builder() -> builder::SshKey { builder::SshKey::default() } } - ///Create-time parameters for an /// [`SshKey`](crate::external_api::views::SshKey) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5031,19 +4449,16 @@ pub mod types { ///SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` pub public_key: String, } - impl From<&SshKeyCreate> for SshKeyCreate { fn from(value: &SshKeyCreate) -> Self { value.clone() } } - impl SshKeyCreate { pub fn builder() -> builder::SshKeyCreate { builder::SshKeyCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKeyResultsPage { @@ -5053,19 +4468,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SshKeyResultsPage> for SshKeyResultsPage { fn from(value: &SshKeyResultsPage) -> Self { value.clone() } } - impl SshKeyResultsPage { pub fn builder() -> builder::SshKeyResultsPage { builder::SshKeyResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SystemMetricName { #[serde(rename = "virtual_disk_space_provisioned")] @@ -5075,13 +4487,11 @@ pub mod types { #[serde(rename = "ram_provisioned")] RamProvisioned, } - impl From<&SystemMetricName> for SystemMetricName { fn from(value: &SystemMetricName) -> Self { value.clone() } } - impl ToString for SystemMetricName { fn to_string(&self) -> String { match *self { @@ -5091,7 +4501,6 @@ pub mod types { } } } - impl std::str::FromStr for SystemMetricName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5103,28 +4512,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SystemMetricName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SystemMetricName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SystemMetricName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5137,19 +4542,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&SystemUpdate> for SystemUpdate { fn from(value: &SystemUpdate) -> Self { value.clone() } } - impl SystemUpdate { pub fn builder() -> builder::SystemUpdate { builder::SystemUpdate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdateResultsPage { @@ -5159,54 +4561,45 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SystemUpdateResultsPage> for SystemUpdateResultsPage { fn from(value: &SystemUpdateResultsPage) -> Self { value.clone() } } - impl SystemUpdateResultsPage { pub fn builder() -> builder::SystemUpdateResultsPage { builder::SystemUpdateResultsPage::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdateStart { pub version: SemverVersion, } - impl From<&SystemUpdateStart> for SystemUpdateStart { fn from(value: &SystemUpdateStart) -> Self { value.clone() } } - impl SystemUpdateStart { pub fn builder() -> builder::SystemUpdateStart { builder::SystemUpdateStart::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemVersion { pub status: UpdateStatus, pub version_range: VersionRange, } - impl From<&SystemVersion> for SystemVersion { fn from(value: &SystemVersion) -> Self { value.clone() } } - impl SystemVersion { pub fn builder() -> builder::SystemVersion { builder::SystemVersion::default() } } - ///Names are constructed by concatenating the target and metric names with /// ':'. Target and metric names must be lowercase alphanumeric characters /// with '_' separating words. @@ -5218,19 +4611,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: TimeseriesName) -> Self { value.0 } } - impl From<&TimeseriesName> for TimeseriesName { fn from(value: &TimeseriesName) -> Self { value.clone() } } - impl std::str::FromStr for TimeseriesName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5246,28 +4636,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for TimeseriesName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for TimeseriesName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for TimeseriesName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for TimeseriesName { fn deserialize(deserializer: D) -> Result where @@ -5278,7 +4664,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///The schema for a timeseries. /// ///This includes the name of the timeseries, as well as the datum type of @@ -5290,19 +4675,16 @@ pub mod types { pub field_schema: Vec, pub timeseries_name: TimeseriesName, } - impl From<&TimeseriesSchema> for TimeseriesSchema { fn from(value: &TimeseriesSchema) -> Self { value.clone() } } - impl TimeseriesSchema { pub fn builder() -> builder::TimeseriesSchema { builder::TimeseriesSchema::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TimeseriesSchemaResultsPage { @@ -5312,19 +4694,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&TimeseriesSchemaResultsPage> for TimeseriesSchemaResultsPage { fn from(value: &TimeseriesSchemaResultsPage) -> Self { value.clone() } } - impl TimeseriesSchemaResultsPage { pub fn builder() -> builder::TimeseriesSchemaResultsPage { builder::TimeseriesSchemaResultsPage::default() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5338,19 +4717,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&UpdateDeployment> for UpdateDeployment { fn from(value: &UpdateDeployment) -> Self { value.clone() } } - impl UpdateDeployment { pub fn builder() -> builder::UpdateDeployment { builder::UpdateDeployment::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateDeploymentResultsPage { @@ -5360,19 +4736,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UpdateDeploymentResultsPage> for UpdateDeploymentResultsPage { fn from(value: &UpdateDeploymentResultsPage) -> Self { value.clone() } } - impl UpdateDeploymentResultsPage { pub fn builder() -> builder::UpdateDeploymentResultsPage { builder::UpdateDeploymentResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] #[serde(tag = "status")] pub enum UpdateStatus { @@ -5381,13 +4754,11 @@ pub mod types { #[serde(rename = "steady")] Steady, } - impl From<&UpdateStatus> for UpdateStatus { fn from(value: &UpdateStatus) -> Self { value.clone() } } - impl ToString for UpdateStatus { fn to_string(&self) -> String { match *self { @@ -5396,7 +4767,6 @@ pub mod types { } } } - impl std::str::FromStr for UpdateStatus { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5407,28 +4777,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for UpdateStatus { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UpdateStatus { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UpdateStatus { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5445,19 +4811,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&UpdateableComponent> for UpdateableComponent { fn from(value: &UpdateableComponent) -> Self { value.clone() } } - impl UpdateableComponent { pub fn builder() -> builder::UpdateableComponent { builder::UpdateableComponent::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateableComponentResultsPage { @@ -5467,19 +4830,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UpdateableComponentResultsPage> for UpdateableComponentResultsPage { fn from(value: &UpdateableComponentResultsPage) -> Self { value.clone() } } - impl UpdateableComponentResultsPage { pub fn builder() -> builder::UpdateableComponentResultsPage { builder::UpdateableComponentResultsPage::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum UpdateableComponentType { #[serde(rename = "bootloader_for_rot")] @@ -5507,13 +4867,11 @@ pub mod types { #[serde(rename = "host_omicron")] HostOmicron, } - impl From<&UpdateableComponentType> for UpdateableComponentType { fn from(value: &UpdateableComponentType) -> Self { value.clone() } } - impl ToString for UpdateableComponentType { fn to_string(&self) -> String { match *self { @@ -5532,7 +4890,6 @@ pub mod types { } } } - impl std::str::FromStr for UpdateableComponentType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5553,28 +4910,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for UpdateableComponentType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UpdateableComponentType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UpdateableComponentType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`User`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct User { @@ -5584,19 +4937,16 @@ pub mod types { ///Uuid of the silo to which this user belongs pub silo_id: uuid::Uuid, } - impl From<&User> for User { fn from(value: &User) -> Self { value.clone() } } - impl User { pub fn builder() -> builder::User { builder::User::default() } } - ///Client view of a [`UserBuiltin`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserBuiltin { @@ -5611,19 +4961,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&UserBuiltin> for UserBuiltin { fn from(value: &UserBuiltin) -> Self { value.clone() } } - impl UserBuiltin { pub fn builder() -> builder::UserBuiltin { builder::UserBuiltin::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserBuiltinResultsPage { @@ -5633,19 +4980,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UserBuiltinResultsPage> for UserBuiltinResultsPage { fn from(value: &UserBuiltinResultsPage) -> Self { value.clone() } } - impl UserBuiltinResultsPage { pub fn builder() -> builder::UserBuiltinResultsPage { builder::UserBuiltinResultsPage::default() } } - ///Create-time parameters for a [`User`](crate::external_api::views::User) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreate { @@ -5654,19 +4998,16 @@ pub mod types { ///password used to log in pub password: UserPassword, } - impl From<&UserCreate> for UserCreate { fn from(value: &UserCreate) -> Self { value.clone() } } - impl UserCreate { pub fn builder() -> builder::UserCreate { builder::UserCreate::default() } } - ///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. @@ -5678,19 +5019,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: UserId) -> Self { value.0 } } - impl From<&UserId> for UserId { fn from(value: &UserId) -> Self { value.clone() } } - impl std::str::FromStr for UserId { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5701,28 +5039,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for UserId { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UserId { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UserId { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for UserId { fn deserialize(deserializer: D) -> Result where @@ -5733,7 +5067,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///Parameters for setting a user's password #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "user_password_value", content = "details")] @@ -5744,19 +5077,16 @@ pub mod types { #[serde(rename = "invalid_password")] InvalidPassword, } - impl From<&UserPassword> for UserPassword { fn from(value: &UserPassword) -> Self { value.clone() } } - impl From for UserPassword { fn from(value: Password) -> Self { Self::Password(value) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserResultsPage { @@ -5766,56 +5096,47 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UserResultsPage> for UserResultsPage { fn from(value: &UserResultsPage) -> Self { value.clone() } } - impl UserResultsPage { pub fn builder() -> builder::UserResultsPage { builder::UserResultsPage::default() } } - ///Credentials for local user login #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UsernamePasswordCredentials { pub password: Password, pub username: UserId, } - impl From<&UsernamePasswordCredentials> for UsernamePasswordCredentials { fn from(value: &UsernamePasswordCredentials) -> Self { value.clone() } } - impl UsernamePasswordCredentials { pub fn builder() -> builder::UsernamePasswordCredentials { builder::UsernamePasswordCredentials::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VersionRange { pub high: SemverVersion, pub low: SemverVersion, } - impl From<&VersionRange> for VersionRange { fn from(value: &VersionRange) -> Self { value.clone() } } - impl VersionRange { pub fn builder() -> builder::VersionRange { builder::VersionRange::default() } } - ///Client view of a [`Vpc`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Vpc { @@ -5838,19 +5159,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Vpc> for Vpc { fn from(value: &Vpc) -> Self { value.clone() } } - impl Vpc { pub fn builder() -> builder::Vpc { builder::Vpc::default() } } - ///Create-time parameters for a [`Vpc`](crate::external_api::views::Vpc) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcCreate { @@ -5866,19 +5184,16 @@ pub mod types { pub ipv6_prefix: Option, pub name: Name, } - impl From<&VpcCreate> for VpcCreate { fn from(value: &VpcCreate) -> Self { value.clone() } } - impl VpcCreate { pub fn builder() -> builder::VpcCreate { builder::VpcCreate::default() } } - ///A single rule in a VPC firewall #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRule { @@ -5907,19 +5222,16 @@ pub mod types { ///the VPC to which this rule belongs pub vpc_id: uuid::Uuid, } - impl From<&VpcFirewallRule> for VpcFirewallRule { fn from(value: &VpcFirewallRule) -> Self { value.clone() } } - impl VpcFirewallRule { pub fn builder() -> builder::VpcFirewallRule { builder::VpcFirewallRule::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleAction { #[serde(rename = "allow")] @@ -5927,13 +5239,11 @@ pub mod types { #[serde(rename = "deny")] Deny, } - impl From<&VpcFirewallRuleAction> for VpcFirewallRuleAction { fn from(value: &VpcFirewallRuleAction) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleAction { fn to_string(&self) -> String { match *self { @@ -5942,7 +5252,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleAction { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5953,28 +5262,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleDirection { #[serde(rename = "inbound")] @@ -5982,13 +5287,11 @@ pub mod types { #[serde(rename = "outbound")] Outbound, } - impl From<&VpcFirewallRuleDirection> for VpcFirewallRuleDirection { fn from(value: &VpcFirewallRuleDirection) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleDirection { fn to_string(&self) -> String { match *self { @@ -5997,7 +5300,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleDirection { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6008,28 +5310,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///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. @@ -6046,19 +5344,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub protocols: Option>, } - impl From<&VpcFirewallRuleFilter> for VpcFirewallRuleFilter { fn from(value: &VpcFirewallRuleFilter) -> Self { value.clone() } } - impl VpcFirewallRuleFilter { pub fn builder() -> builder::VpcFirewallRuleFilter { builder::VpcFirewallRuleFilter::default() } } - ///The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis /// of its source or destination host. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -6080,25 +5375,21 @@ pub mod types { #[serde(rename = "ip_net")] IpNet(IpNet), } - impl From<&VpcFirewallRuleHostFilter> for VpcFirewallRuleHostFilter { fn from(value: &VpcFirewallRuleHostFilter) -> Self { value.clone() } } - impl From for VpcFirewallRuleHostFilter { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for VpcFirewallRuleHostFilter { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///The protocols that may be specified in a firewall rule's filter #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleProtocol { @@ -6109,13 +5400,11 @@ pub mod types { #[serde(rename = "ICMP")] Icmp, } - impl From<&VpcFirewallRuleProtocol> for VpcFirewallRuleProtocol { fn from(value: &VpcFirewallRuleProtocol) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleProtocol { fn to_string(&self) -> String { match *self { @@ -6125,7 +5414,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleProtocol { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6137,28 +5425,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleStatus { #[serde(rename = "disabled")] @@ -6166,13 +5450,11 @@ pub mod types { #[serde(rename = "enabled")] Enabled, } - impl From<&VpcFirewallRuleStatus> for VpcFirewallRuleStatus { fn from(value: &VpcFirewallRuleStatus) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleStatus { fn to_string(&self) -> String { match *self { @@ -6181,7 +5463,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleStatus { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6192,28 +5473,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A `VpcFirewallRuleTarget` is used to specify the set of [`Instance`]s to /// which a firewall rule applies. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -6235,25 +5512,21 @@ pub mod types { #[serde(rename = "ip_net")] IpNet(IpNet), } - impl From<&VpcFirewallRuleTarget> for VpcFirewallRuleTarget { fn from(value: &VpcFirewallRuleTarget) -> Self { value.clone() } } - impl From for VpcFirewallRuleTarget { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for VpcFirewallRuleTarget { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///A single rule in a VPC firewall #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRuleUpdate { @@ -6274,19 +5547,16 @@ pub mod types { ///list of sets of instances that the rule applies to pub targets: Vec, } - impl From<&VpcFirewallRuleUpdate> for VpcFirewallRuleUpdate { fn from(value: &VpcFirewallRuleUpdate) -> Self { value.clone() } } - impl VpcFirewallRuleUpdate { pub fn builder() -> builder::VpcFirewallRuleUpdate { builder::VpcFirewallRuleUpdate::default() } } - ///Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules /// are implicitly created along with a Vpc, so there is no explicit /// creation. @@ -6294,37 +5564,31 @@ pub mod types { pub struct VpcFirewallRuleUpdateParams { pub rules: Vec, } - impl From<&VpcFirewallRuleUpdateParams> for VpcFirewallRuleUpdateParams { fn from(value: &VpcFirewallRuleUpdateParams) -> Self { value.clone() } } - impl VpcFirewallRuleUpdateParams { pub fn builder() -> builder::VpcFirewallRuleUpdateParams { builder::VpcFirewallRuleUpdateParams::default() } } - ///Collection of a Vpc's firewall rules #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRules { pub rules: Vec, } - impl From<&VpcFirewallRules> for VpcFirewallRules { fn from(value: &VpcFirewallRules) -> Self { value.clone() } } - impl VpcFirewallRules { pub fn builder() -> builder::VpcFirewallRules { builder::VpcFirewallRules::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcResultsPage { @@ -6334,19 +5598,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcResultsPage> for VpcResultsPage { fn from(value: &VpcResultsPage) -> Self { value.clone() } } - impl VpcResultsPage { pub fn builder() -> builder::VpcResultsPage { builder::VpcResultsPage::default() } } - ///A VPC router defines a series of rules that indicate where traffic /// should be sent depending on its destination. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -6365,19 +5626,16 @@ pub mod types { ///The VPC to which the router belongs. pub vpc_id: uuid::Uuid, } - impl From<&VpcRouter> for VpcRouter { fn from(value: &VpcRouter) -> Self { value.clone() } } - impl VpcRouter { pub fn builder() -> builder::VpcRouter { builder::VpcRouter::default() } } - ///Create-time parameters for a /// [`VpcRouter`](crate::external_api::views::VpcRouter) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -6385,19 +5643,16 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&VpcRouterCreate> for VpcRouterCreate { fn from(value: &VpcRouterCreate) -> Self { value.clone() } } - impl VpcRouterCreate { pub fn builder() -> builder::VpcRouterCreate { builder::VpcRouterCreate::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcRouterKind { #[serde(rename = "system")] @@ -6405,13 +5660,11 @@ pub mod types { #[serde(rename = "custom")] Custom, } - impl From<&VpcRouterKind> for VpcRouterKind { fn from(value: &VpcRouterKind) -> Self { value.clone() } } - impl ToString for VpcRouterKind { fn to_string(&self) -> String { match *self { @@ -6420,7 +5673,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcRouterKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6431,28 +5683,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcRouterKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcRouterKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcRouterKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouterResultsPage { @@ -6462,19 +5710,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcRouterResultsPage> for VpcRouterResultsPage { fn from(value: &VpcRouterResultsPage) -> Self { value.clone() } } - impl VpcRouterResultsPage { pub fn builder() -> builder::VpcRouterResultsPage { builder::VpcRouterResultsPage::default() } } - ///Updateable properties of a /// [`VpcRouter`](crate::external_api::views::VpcRouter) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -6484,19 +5729,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcRouterUpdate> for VpcRouterUpdate { fn from(value: &VpcRouterUpdate) -> Self { value.clone() } } - impl VpcRouterUpdate { pub fn builder() -> builder::VpcRouterUpdate { builder::VpcRouterUpdate::default() } } - ///A VPC subnet represents a logical grouping for instances that allows /// network traffic between them, within a IPv4 subnetwork or optionall an /// IPv6 subnetwork. @@ -6519,19 +5761,16 @@ pub mod types { ///The VPC to which the subnet belongs. pub vpc_id: uuid::Uuid, } - impl From<&VpcSubnet> for VpcSubnet { fn from(value: &VpcSubnet) -> Self { value.clone() } } - impl VpcSubnet { pub fn builder() -> builder::VpcSubnet { builder::VpcSubnet::default() } } - ///Create-time parameters for a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -6552,19 +5791,16 @@ pub mod types { pub ipv6_block: Option, pub name: Name, } - impl From<&VpcSubnetCreate> for VpcSubnetCreate { fn from(value: &VpcSubnetCreate) -> Self { value.clone() } } - impl VpcSubnetCreate { pub fn builder() -> builder::VpcSubnetCreate { builder::VpcSubnetCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnetResultsPage { @@ -6574,19 +5810,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcSubnetResultsPage> for VpcSubnetResultsPage { fn from(value: &VpcSubnetResultsPage) -> Self { value.clone() } } - impl VpcSubnetResultsPage { pub fn builder() -> builder::VpcSubnetResultsPage { builder::VpcSubnetResultsPage::default() } } - ///Updateable properties of a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -6596,19 +5829,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcSubnetUpdate> for VpcSubnetUpdate { fn from(value: &VpcSubnetUpdate) -> Self { value.clone() } } - impl VpcSubnetUpdate { pub fn builder() -> builder::VpcSubnetUpdate { builder::VpcSubnetUpdate::default() } } - ///Updateable properties of a [`Vpc`](crate::external_api::views::Vpc) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcUpdate { @@ -6619,19 +5849,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcUpdate> for VpcUpdate { fn from(value: &VpcUpdate) -> Self { value.clone() } } - impl VpcUpdate { pub fn builder() -> builder::VpcUpdate { builder::VpcUpdate::default() } } - pub mod builder { #[derive(Clone, Debug)] pub struct Baseboard { @@ -6639,7 +5866,6 @@ pub mod types { revision: Result, serial: Result, } - impl Default for Baseboard { fn default() -> Self { Self { @@ -6649,7 +5875,6 @@ pub mod types { } } } - impl Baseboard { pub fn part(mut self, value: T) -> Self where @@ -6682,7 +5907,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Baseboard { type Error = String; fn try_from(value: Baseboard) -> Result { @@ -6693,7 +5917,6 @@ pub mod types { }) } } - impl From for Baseboard { fn from(value: super::Baseboard) -> Self { Self { @@ -6703,13 +5926,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Bindouble { count: Result, range: Result, } - impl Default for Bindouble { fn default() -> Self { Self { @@ -6718,7 +5939,6 @@ pub mod types { } } } - impl Bindouble { pub fn count(mut self, value: T) -> Self where @@ -6741,7 +5961,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Bindouble { type Error = String; fn try_from(value: Bindouble) -> Result { @@ -6751,7 +5970,6 @@ pub mod types { }) } } - impl From for Bindouble { fn from(value: super::Bindouble) -> Self { Self { @@ -6760,13 +5978,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Binint64 { count: Result, range: Result, } - impl Default for Binint64 { fn default() -> Self { Self { @@ -6775,7 +5991,6 @@ pub mod types { } } } - impl Binint64 { pub fn count(mut self, value: T) -> Self where @@ -6798,7 +6013,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Binint64 { type Error = String; fn try_from(value: Binint64) -> Result { @@ -6808,7 +6022,6 @@ pub mod types { }) } } - impl From for Binint64 { fn from(value: super::Binint64) -> Self { Self { @@ -6817,7 +6030,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Certificate { description: Result, @@ -6827,7 +6039,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Certificate { fn default() -> Self { Self { @@ -6840,7 +6051,6 @@ pub mod types { } } } - impl Certificate { pub fn description(mut self, value: T) -> Self where @@ -6903,7 +6113,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Certificate { type Error = String; fn try_from(value: Certificate) -> Result { @@ -6917,7 +6126,6 @@ pub mod types { }) } } - impl From for Certificate { fn from(value: super::Certificate) -> Self { Self { @@ -6930,7 +6138,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct CertificateCreate { cert: Result, String>, @@ -6939,7 +6146,6 @@ pub mod types { name: Result, service: Result, } - impl Default for CertificateCreate { fn default() -> Self { Self { @@ -6951,7 +6157,6 @@ pub mod types { } } } - impl CertificateCreate { pub fn cert(mut self, value: T) -> Self where @@ -7004,7 +6209,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::CertificateCreate { type Error = String; fn try_from(value: CertificateCreate) -> Result { @@ -7017,7 +6221,6 @@ pub mod types { }) } } - impl From for CertificateCreate { fn from(value: super::CertificateCreate) -> Self { Self { @@ -7029,13 +6232,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct CertificateResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for CertificateResultsPage { fn default() -> Self { Self { @@ -7044,7 +6245,6 @@ pub mod types { } } } - impl CertificateResultsPage { pub fn items(mut self, value: T) -> Self where @@ -7067,7 +6267,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::CertificateResultsPage { type Error = String; fn try_from(value: CertificateResultsPage) -> Result { @@ -7077,7 +6276,6 @@ pub mod types { }) } } - impl From for CertificateResultsPage { fn from(value: super::CertificateResultsPage) -> Self { Self { @@ -7086,7 +6284,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ComponentUpdate { component_type: Result, @@ -7095,7 +6292,6 @@ pub mod types { time_modified: Result, String>, version: Result, } - impl Default for ComponentUpdate { fn default() -> Self { Self { @@ -7107,7 +6303,6 @@ pub mod types { } } } - impl ComponentUpdate { pub fn component_type(mut self, value: T) -> Self where @@ -7160,7 +6355,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ComponentUpdate { type Error = String; fn try_from(value: ComponentUpdate) -> Result { @@ -7173,7 +6367,6 @@ pub mod types { }) } } - impl From for ComponentUpdate { fn from(value: super::ComponentUpdate) -> Self { Self { @@ -7185,13 +6378,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ComponentUpdateResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for ComponentUpdateResultsPage { fn default() -> Self { Self { @@ -7200,7 +6391,6 @@ pub mod types { } } } - impl ComponentUpdateResultsPage { pub fn items(mut self, value: T) -> Self where @@ -7223,7 +6413,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ComponentUpdateResultsPage { type Error = String; fn try_from(value: ComponentUpdateResultsPage) -> Result { @@ -7233,7 +6422,6 @@ pub mod types { }) } } - impl From for ComponentUpdateResultsPage { fn from(value: super::ComponentUpdateResultsPage) -> Self { Self { @@ -7242,13 +6430,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Cumulativedouble { start_time: Result, String>, value: Result, } - impl Default for Cumulativedouble { fn default() -> Self { Self { @@ -7257,7 +6443,6 @@ pub mod types { } } } - impl Cumulativedouble { pub fn start_time(mut self, value: T) -> Self where @@ -7280,7 +6465,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Cumulativedouble { type Error = String; fn try_from(value: Cumulativedouble) -> Result { @@ -7290,7 +6474,6 @@ pub mod types { }) } } - impl From for Cumulativedouble { fn from(value: super::Cumulativedouble) -> Self { Self { @@ -7299,13 +6482,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Cumulativeint64 { start_time: Result, String>, value: Result, } - impl Default for Cumulativeint64 { fn default() -> Self { Self { @@ -7314,7 +6495,6 @@ pub mod types { } } } - impl Cumulativeint64 { pub fn start_time(mut self, value: T) -> Self where @@ -7337,7 +6517,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Cumulativeint64 { type Error = String; fn try_from(value: Cumulativeint64) -> Result { @@ -7347,7 +6526,6 @@ pub mod types { }) } } - impl From for Cumulativeint64 { fn from(value: super::Cumulativeint64) -> Self { Self { @@ -7356,13 +6534,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DerEncodedKeyPair { private_key: Result, public_cert: Result, } - impl Default for DerEncodedKeyPair { fn default() -> Self { Self { @@ -7371,7 +6547,6 @@ pub mod types { } } } - impl DerEncodedKeyPair { pub fn private_key(mut self, value: T) -> Self where @@ -7394,7 +6569,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DerEncodedKeyPair { type Error = String; fn try_from(value: DerEncodedKeyPair) -> Result { @@ -7404,7 +6578,6 @@ pub mod types { }) } } - impl From for DerEncodedKeyPair { fn from(value: super::DerEncodedKeyPair) -> Self { Self { @@ -7413,14 +6586,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DeviceAccessTokenRequest { client_id: Result, device_code: Result, grant_type: Result, } - impl Default for DeviceAccessTokenRequest { fn default() -> Self { Self { @@ -7430,7 +6601,6 @@ pub mod types { } } } - impl DeviceAccessTokenRequest { pub fn client_id(mut self, value: T) -> Self where @@ -7463,7 +6633,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DeviceAccessTokenRequest { type Error = String; fn try_from(value: DeviceAccessTokenRequest) -> Result { @@ -7474,7 +6643,6 @@ pub mod types { }) } } - impl From for DeviceAccessTokenRequest { fn from(value: super::DeviceAccessTokenRequest) -> Self { Self { @@ -7484,12 +6652,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DeviceAuthRequest { client_id: Result, } - impl Default for DeviceAuthRequest { fn default() -> Self { Self { @@ -7497,7 +6663,6 @@ pub mod types { } } } - impl DeviceAuthRequest { pub fn client_id(mut self, value: T) -> Self where @@ -7510,7 +6675,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DeviceAuthRequest { type Error = String; fn try_from(value: DeviceAuthRequest) -> Result { @@ -7519,7 +6683,6 @@ pub mod types { }) } } - impl From for DeviceAuthRequest { fn from(value: super::DeviceAuthRequest) -> Self { Self { @@ -7527,12 +6690,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DeviceAuthVerify { user_code: Result, } - impl Default for DeviceAuthVerify { fn default() -> Self { Self { @@ -7540,7 +6701,6 @@ pub mod types { } } } - impl DeviceAuthVerify { pub fn user_code(mut self, value: T) -> Self where @@ -7553,7 +6713,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DeviceAuthVerify { type Error = String; fn try_from(value: DeviceAuthVerify) -> Result { @@ -7562,7 +6721,6 @@ pub mod types { }) } } - impl From for DeviceAuthVerify { fn from(value: super::DeviceAuthVerify) -> Self { Self { @@ -7570,7 +6728,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Disk { block_size: Result, @@ -7586,7 +6743,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Disk { fn default() -> Self { Self { @@ -7605,7 +6761,6 @@ pub mod types { } } } - impl Disk { pub fn block_size(mut self, value: T) -> Self where @@ -7728,7 +6883,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Disk { type Error = String; fn try_from(value: Disk) -> Result { @@ -7748,7 +6902,6 @@ pub mod types { }) } } - impl From for Disk { fn from(value: super::Disk) -> Self { Self { @@ -7767,7 +6920,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskCreate { description: Result, @@ -7775,7 +6927,6 @@ pub mod types { name: Result, size: Result, } - impl Default for DiskCreate { fn default() -> Self { Self { @@ -7786,7 +6937,6 @@ pub mod types { } } } - impl DiskCreate { pub fn description(mut self, value: T) -> Self where @@ -7829,7 +6979,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskCreate { type Error = String; fn try_from(value: DiskCreate) -> Result { @@ -7841,7 +6990,6 @@ pub mod types { }) } } - impl From for DiskCreate { fn from(value: super::DiskCreate) -> Self { Self { @@ -7852,12 +7000,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskIdentifier { name: Result, } - impl Default for DiskIdentifier { fn default() -> Self { Self { @@ -7865,7 +7011,6 @@ pub mod types { } } } - impl DiskIdentifier { pub fn name(mut self, value: T) -> Self where @@ -7878,14 +7023,12 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskIdentifier { type Error = String; fn try_from(value: DiskIdentifier) -> Result { Ok(Self { name: value.name? }) } } - impl From for DiskIdentifier { fn from(value: super::DiskIdentifier) -> Self { Self { @@ -7893,12 +7036,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskPath { disk: Result, } - impl Default for DiskPath { fn default() -> Self { Self { @@ -7906,7 +7047,6 @@ pub mod types { } } } - impl DiskPath { pub fn disk(mut self, value: T) -> Self where @@ -7919,14 +7059,12 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskPath { type Error = String; fn try_from(value: DiskPath) -> Result { Ok(Self { disk: value.disk? }) } } - impl From for DiskPath { fn from(value: super::DiskPath) -> Self { Self { @@ -7934,13 +7072,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for DiskResultsPage { fn default() -> Self { Self { @@ -7949,7 +7085,6 @@ pub mod types { } } } - impl DiskResultsPage { pub fn items(mut self, value: T) -> Self where @@ -7972,7 +7107,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskResultsPage { type Error = String; fn try_from(value: DiskResultsPage) -> Result { @@ -7982,7 +7116,6 @@ pub mod types { }) } } - impl From for DiskResultsPage { fn from(value: super::DiskResultsPage) -> Self { Self { @@ -7991,13 +7124,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Distribution { name: Result, version: Result, } - impl Default for Distribution { fn default() -> Self { Self { @@ -8006,7 +7137,6 @@ pub mod types { } } } - impl Distribution { pub fn name(mut self, value: T) -> Self where @@ -8029,7 +7159,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Distribution { type Error = String; fn try_from(value: Distribution) -> Result { @@ -8039,7 +7168,6 @@ pub mod types { }) } } - impl From for Distribution { fn from(value: super::Distribution) -> Self { Self { @@ -8048,14 +7176,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Error { error_code: Result, String>, message: Result, request_id: Result, } - impl Default for Error { fn default() -> Self { Self { @@ -8065,7 +7191,6 @@ pub mod types { } } } - impl Error { pub fn error_code(mut self, value: T) -> Self where @@ -8098,7 +7223,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Error { type Error = String; fn try_from(value: Error) -> Result { @@ -8109,7 +7233,6 @@ pub mod types { }) } } - impl From for Error { fn from(value: super::Error) -> Self { Self { @@ -8119,13 +7242,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ExternalIp { ip: Result, kind: Result, } - impl Default for ExternalIp { fn default() -> Self { Self { @@ -8134,7 +7255,6 @@ pub mod types { } } } - impl ExternalIp { pub fn ip(mut self, value: T) -> Self where @@ -8157,7 +7277,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ExternalIp { type Error = String; fn try_from(value: ExternalIp) -> Result { @@ -8167,7 +7286,6 @@ pub mod types { }) } } - impl From for ExternalIp { fn from(value: super::ExternalIp) -> Self { Self { @@ -8176,13 +7294,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ExternalIpResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for ExternalIpResultsPage { fn default() -> Self { Self { @@ -8191,7 +7307,6 @@ pub mod types { } } } - impl ExternalIpResultsPage { pub fn items(mut self, value: T) -> Self where @@ -8214,7 +7329,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ExternalIpResultsPage { type Error = String; fn try_from(value: ExternalIpResultsPage) -> Result { @@ -8224,7 +7338,6 @@ pub mod types { }) } } - impl From for ExternalIpResultsPage { fn from(value: super::ExternalIpResultsPage) -> Self { Self { @@ -8233,14 +7346,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct FieldSchema { name: Result, source: Result, ty: Result, } - impl Default for FieldSchema { fn default() -> Self { Self { @@ -8250,7 +7361,6 @@ pub mod types { } } } - impl FieldSchema { pub fn name(mut self, value: T) -> Self where @@ -8283,7 +7393,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::FieldSchema { type Error = String; fn try_from(value: FieldSchema) -> Result { @@ -8294,7 +7403,6 @@ pub mod types { }) } } - impl From for FieldSchema { fn from(value: super::FieldSchema) -> Self { Self { @@ -8304,12 +7412,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct FleetRolePolicy { role_assignments: Result, String>, } - impl Default for FleetRolePolicy { fn default() -> Self { Self { @@ -8317,7 +7423,6 @@ pub mod types { } } } - impl FleetRolePolicy { pub fn role_assignments(mut self, value: T) -> Self where @@ -8333,7 +7438,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::FleetRolePolicy { type Error = String; fn try_from(value: FleetRolePolicy) -> Result { @@ -8342,7 +7446,6 @@ pub mod types { }) } } - impl From for FleetRolePolicy { fn from(value: super::FleetRolePolicy) -> Self { Self { @@ -8350,14 +7453,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct FleetRoleRoleAssignment { identity_id: Result, identity_type: Result, role_name: Result, } - impl Default for FleetRoleRoleAssignment { fn default() -> Self { Self { @@ -8367,7 +7468,6 @@ pub mod types { } } } - impl FleetRoleRoleAssignment { pub fn identity_id(mut self, value: T) -> Self where @@ -8400,7 +7500,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::FleetRoleRoleAssignment { type Error = String; fn try_from(value: FleetRoleRoleAssignment) -> Result { @@ -8411,7 +7510,6 @@ pub mod types { }) } } - impl From for FleetRoleRoleAssignment { fn from(value: super::FleetRoleRoleAssignment) -> Self { Self { @@ -8421,7 +7519,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GlobalImage { block_size: Result, @@ -8436,7 +7533,6 @@ pub mod types { url: Result, String>, version: Result, } - impl Default for GlobalImage { fn default() -> Self { Self { @@ -8454,7 +7550,6 @@ pub mod types { } } } - impl GlobalImage { pub fn block_size(mut self, value: T) -> Self where @@ -8567,7 +7662,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GlobalImage { type Error = String; fn try_from(value: GlobalImage) -> Result { @@ -8586,7 +7680,6 @@ pub mod types { }) } } - impl From for GlobalImage { fn from(value: super::GlobalImage) -> Self { Self { @@ -8604,7 +7697,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GlobalImageCreate { block_size: Result, @@ -8613,7 +7705,6 @@ pub mod types { name: Result, source: Result, } - impl Default for GlobalImageCreate { fn default() -> Self { Self { @@ -8625,7 +7716,6 @@ pub mod types { } } } - impl GlobalImageCreate { pub fn block_size(mut self, value: T) -> Self where @@ -8678,7 +7768,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GlobalImageCreate { type Error = String; fn try_from(value: GlobalImageCreate) -> Result { @@ -8691,7 +7780,6 @@ pub mod types { }) } } - impl From for GlobalImageCreate { fn from(value: super::GlobalImageCreate) -> Self { Self { @@ -8703,13 +7791,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GlobalImageResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for GlobalImageResultsPage { fn default() -> Self { Self { @@ -8718,7 +7804,6 @@ pub mod types { } } } - impl GlobalImageResultsPage { pub fn items(mut self, value: T) -> Self where @@ -8741,7 +7826,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GlobalImageResultsPage { type Error = String; fn try_from(value: GlobalImageResultsPage) -> Result { @@ -8751,7 +7835,6 @@ pub mod types { }) } } - impl From for GlobalImageResultsPage { fn from(value: super::GlobalImageResultsPage) -> Self { Self { @@ -8760,14 +7843,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Group { display_name: Result, id: Result, silo_id: Result, } - impl Default for Group { fn default() -> Self { Self { @@ -8777,7 +7858,6 @@ pub mod types { } } } - impl Group { pub fn display_name(mut self, value: T) -> Self where @@ -8810,7 +7890,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Group { type Error = String; fn try_from(value: Group) -> Result { @@ -8821,7 +7900,6 @@ pub mod types { }) } } - impl From for Group { fn from(value: super::Group) -> Self { Self { @@ -8831,13 +7909,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GroupResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for GroupResultsPage { fn default() -> Self { Self { @@ -8846,7 +7922,6 @@ pub mod types { } } } - impl GroupResultsPage { pub fn items(mut self, value: T) -> Self where @@ -8869,7 +7944,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GroupResultsPage { type Error = String; fn try_from(value: GroupResultsPage) -> Result { @@ -8879,7 +7953,6 @@ pub mod types { }) } } - impl From for GroupResultsPage { fn from(value: super::GroupResultsPage) -> Self { Self { @@ -8888,14 +7961,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Histogramdouble { bins: Result, String>, n_samples: Result, start_time: Result, String>, } - impl Default for Histogramdouble { fn default() -> Self { Self { @@ -8905,7 +7976,6 @@ pub mod types { } } } - impl Histogramdouble { pub fn bins(mut self, value: T) -> Self where @@ -8938,7 +8008,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Histogramdouble { type Error = String; fn try_from(value: Histogramdouble) -> Result { @@ -8949,7 +8018,6 @@ pub mod types { }) } } - impl From for Histogramdouble { fn from(value: super::Histogramdouble) -> Self { Self { @@ -8959,14 +8027,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Histogramint64 { bins: Result, String>, n_samples: Result, start_time: Result, String>, } - impl Default for Histogramint64 { fn default() -> Self { Self { @@ -8976,7 +8042,6 @@ pub mod types { } } } - impl Histogramint64 { pub fn bins(mut self, value: T) -> Self where @@ -9009,7 +8074,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Histogramint64 { type Error = String; fn try_from(value: Histogramint64) -> Result { @@ -9020,7 +8084,6 @@ pub mod types { }) } } - impl From for Histogramint64 { fn from(value: super::Histogramint64) -> Self { Self { @@ -9030,7 +8093,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IdentityProvider { description: Result, @@ -9040,7 +8102,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for IdentityProvider { fn default() -> Self { Self { @@ -9053,7 +8114,6 @@ pub mod types { } } } - impl IdentityProvider { pub fn description(mut self, value: T) -> Self where @@ -9116,7 +8176,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IdentityProvider { type Error = String; fn try_from(value: IdentityProvider) -> Result { @@ -9130,7 +8189,6 @@ pub mod types { }) } } - impl From for IdentityProvider { fn from(value: super::IdentityProvider) -> Self { Self { @@ -9143,13 +8201,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IdentityProviderResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for IdentityProviderResultsPage { fn default() -> Self { Self { @@ -9158,7 +8214,6 @@ pub mod types { } } } - impl IdentityProviderResultsPage { pub fn items(mut self, value: T) -> Self where @@ -9181,7 +8236,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IdentityProviderResultsPage { type Error = String; fn try_from(value: IdentityProviderResultsPage) -> Result { @@ -9191,7 +8245,6 @@ pub mod types { }) } } - impl From for IdentityProviderResultsPage { fn from(value: super::IdentityProviderResultsPage) -> Self { Self { @@ -9200,7 +8253,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Image { block_size: Result, @@ -9215,7 +8267,6 @@ pub mod types { url: Result, String>, version: Result, String>, } - impl Default for Image { fn default() -> Self { Self { @@ -9233,7 +8284,6 @@ pub mod types { } } } - impl Image { pub fn block_size(mut self, value: T) -> Self where @@ -9346,7 +8396,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Image { type Error = String; fn try_from(value: Image) -> Result { @@ -9365,7 +8414,6 @@ pub mod types { }) } } - impl From for Image { fn from(value: super::Image) -> Self { Self { @@ -9383,7 +8431,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ImageCreate { block_size: Result, @@ -9391,7 +8438,6 @@ pub mod types { name: Result, source: Result, } - impl Default for ImageCreate { fn default() -> Self { Self { @@ -9402,7 +8448,6 @@ pub mod types { } } } - impl ImageCreate { pub fn block_size(mut self, value: T) -> Self where @@ -9445,7 +8490,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ImageCreate { type Error = String; fn try_from(value: ImageCreate) -> Result { @@ -9457,7 +8501,6 @@ pub mod types { }) } } - impl From for ImageCreate { fn from(value: super::ImageCreate) -> Self { Self { @@ -9468,13 +8511,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ImageResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for ImageResultsPage { fn default() -> Self { Self { @@ -9483,7 +8524,6 @@ pub mod types { } } } - impl ImageResultsPage { pub fn items(mut self, value: T) -> Self where @@ -9506,7 +8546,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ImageResultsPage { type Error = String; fn try_from(value: ImageResultsPage) -> Result { @@ -9516,7 +8555,6 @@ pub mod types { }) } } - impl From for ImageResultsPage { fn from(value: super::ImageResultsPage) -> Self { Self { @@ -9525,7 +8563,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Instance { description: Result, @@ -9540,7 +8577,6 @@ pub mod types { time_modified: Result, String>, time_run_state_updated: Result, String>, } - impl Default for Instance { fn default() -> Self { Self { @@ -9560,7 +8596,6 @@ pub mod types { } } } - impl Instance { pub fn description(mut self, value: T) -> Self where @@ -9676,7 +8711,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Instance { type Error = String; fn try_from(value: Instance) -> Result { @@ -9695,7 +8729,6 @@ pub mod types { }) } } - impl From for Instance { fn from(value: super::Instance) -> Self { Self { @@ -9713,7 +8746,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceCreate { description: Result, @@ -9727,7 +8759,6 @@ pub mod types { start: Result, user_data: Result, } - impl Default for InstanceCreate { fn default() -> Self { Self { @@ -9744,7 +8775,6 @@ pub mod types { } } } - impl InstanceCreate { pub fn description(mut self, value: T) -> Self where @@ -9850,7 +8880,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceCreate { type Error = String; fn try_from(value: InstanceCreate) -> Result { @@ -9868,7 +8897,6 @@ pub mod types { }) } } - impl From for InstanceCreate { fn from(value: super::InstanceCreate) -> Self { Self { @@ -9885,12 +8913,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrate { dst_sled_id: Result, } - impl Default for InstanceMigrate { fn default() -> Self { Self { @@ -9898,7 +8924,6 @@ pub mod types { } } } - impl InstanceMigrate { pub fn dst_sled_id(mut self, value: T) -> Self where @@ -9911,7 +8936,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrate { type Error = String; fn try_from(value: InstanceMigrate) -> Result { @@ -9920,7 +8944,6 @@ pub mod types { }) } } - impl From for InstanceMigrate { fn from(value: super::InstanceMigrate) -> Self { Self { @@ -9928,13 +8951,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for InstanceResultsPage { fn default() -> Self { Self { @@ -9943,7 +8964,6 @@ pub mod types { } } } - impl InstanceResultsPage { pub fn items(mut self, value: T) -> Self where @@ -9966,7 +8986,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceResultsPage { type Error = String; fn try_from(value: InstanceResultsPage) -> Result { @@ -9976,7 +8995,6 @@ pub mod types { }) } } - impl From for InstanceResultsPage { fn from(value: super::InstanceResultsPage) -> Self { Self { @@ -9985,13 +9003,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceSerialConsoleData { data: Result, String>, last_byte_offset: Result, } - impl Default for InstanceSerialConsoleData { fn default() -> Self { Self { @@ -10000,7 +9016,6 @@ pub mod types { } } } - impl InstanceSerialConsoleData { pub fn data(mut self, value: T) -> Self where @@ -10026,7 +9041,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceSerialConsoleData { type Error = String; fn try_from(value: InstanceSerialConsoleData) -> Result { @@ -10036,7 +9050,6 @@ pub mod types { }) } } - impl From for InstanceSerialConsoleData { fn from(value: super::InstanceSerialConsoleData) -> Self { Self { @@ -10045,7 +9058,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPool { description: Result, @@ -10054,7 +9066,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for IpPool { fn default() -> Self { Self { @@ -10066,7 +9077,6 @@ pub mod types { } } } - impl IpPool { pub fn description(mut self, value: T) -> Self where @@ -10119,7 +9129,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPool { type Error = String; fn try_from(value: IpPool) -> Result { @@ -10132,7 +9141,6 @@ pub mod types { }) } } - impl From for IpPool { fn from(value: super::IpPool) -> Self { Self { @@ -10144,13 +9152,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolCreate { description: Result, name: Result, } - impl Default for IpPoolCreate { fn default() -> Self { Self { @@ -10159,7 +9165,6 @@ pub mod types { } } } - impl IpPoolCreate { pub fn description(mut self, value: T) -> Self where @@ -10182,7 +9187,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolCreate { type Error = String; fn try_from(value: IpPoolCreate) -> Result { @@ -10192,7 +9196,6 @@ pub mod types { }) } } - impl From for IpPoolCreate { fn from(value: super::IpPoolCreate) -> Self { Self { @@ -10201,14 +9204,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolRange { id: Result, range: Result, time_created: Result, String>, } - impl Default for IpPoolRange { fn default() -> Self { Self { @@ -10218,7 +9219,6 @@ pub mod types { } } } - impl IpPoolRange { pub fn id(mut self, value: T) -> Self where @@ -10251,7 +9251,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolRange { type Error = String; fn try_from(value: IpPoolRange) -> Result { @@ -10262,7 +9261,6 @@ pub mod types { }) } } - impl From for IpPoolRange { fn from(value: super::IpPoolRange) -> Self { Self { @@ -10272,13 +9270,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolRangeResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for IpPoolRangeResultsPage { fn default() -> Self { Self { @@ -10287,7 +9283,6 @@ pub mod types { } } } - impl IpPoolRangeResultsPage { pub fn items(mut self, value: T) -> Self where @@ -10310,7 +9305,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolRangeResultsPage { type Error = String; fn try_from(value: IpPoolRangeResultsPage) -> Result { @@ -10320,7 +9314,6 @@ pub mod types { }) } } - impl From for IpPoolRangeResultsPage { fn from(value: super::IpPoolRangeResultsPage) -> Self { Self { @@ -10329,13 +9322,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for IpPoolResultsPage { fn default() -> Self { Self { @@ -10344,7 +9335,6 @@ pub mod types { } } } - impl IpPoolResultsPage { pub fn items(mut self, value: T) -> Self where @@ -10367,7 +9357,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolResultsPage { type Error = String; fn try_from(value: IpPoolResultsPage) -> Result { @@ -10377,7 +9366,6 @@ pub mod types { }) } } - impl From for IpPoolResultsPage { fn from(value: super::IpPoolResultsPage) -> Self { Self { @@ -10386,13 +9374,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolUpdate { description: Result, String>, name: Result, String>, } - impl Default for IpPoolUpdate { fn default() -> Self { Self { @@ -10401,7 +9387,6 @@ pub mod types { } } } - impl IpPoolUpdate { pub fn description(mut self, value: T) -> Self where @@ -10424,7 +9409,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolUpdate { type Error = String; fn try_from(value: IpPoolUpdate) -> Result { @@ -10434,7 +9418,6 @@ pub mod types { }) } } - impl From for IpPoolUpdate { fn from(value: super::IpPoolUpdate) -> Self { Self { @@ -10443,13 +9426,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Ipv4Range { first: Result, last: Result, } - impl Default for Ipv4Range { fn default() -> Self { Self { @@ -10458,7 +9439,6 @@ pub mod types { } } } - impl Ipv4Range { pub fn first(mut self, value: T) -> Self where @@ -10481,7 +9461,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Ipv4Range { type Error = String; fn try_from(value: Ipv4Range) -> Result { @@ -10491,7 +9470,6 @@ pub mod types { }) } } - impl From for Ipv4Range { fn from(value: super::Ipv4Range) -> Self { Self { @@ -10500,13 +9478,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Ipv6Range { first: Result, last: Result, } - impl Default for Ipv6Range { fn default() -> Self { Self { @@ -10515,7 +9491,6 @@ pub mod types { } } } - impl Ipv6Range { pub fn first(mut self, value: T) -> Self where @@ -10538,7 +9513,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Ipv6Range { type Error = String; fn try_from(value: Ipv6Range) -> Result { @@ -10548,7 +9522,6 @@ pub mod types { }) } } - impl From for Ipv6Range { fn from(value: super::Ipv6Range) -> Self { Self { @@ -10557,13 +9530,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Measurement { datum: Result, timestamp: Result, String>, } - impl Default for Measurement { fn default() -> Self { Self { @@ -10572,7 +9543,6 @@ pub mod types { } } } - impl Measurement { pub fn datum(mut self, value: T) -> Self where @@ -10595,7 +9565,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Measurement { type Error = String; fn try_from(value: Measurement) -> Result { @@ -10605,7 +9574,6 @@ pub mod types { }) } } - impl From for Measurement { fn from(value: super::Measurement) -> Self { Self { @@ -10614,13 +9582,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct MeasurementResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for MeasurementResultsPage { fn default() -> Self { Self { @@ -10629,7 +9595,6 @@ pub mod types { } } } - impl MeasurementResultsPage { pub fn items(mut self, value: T) -> Self where @@ -10652,7 +9617,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::MeasurementResultsPage { type Error = String; fn try_from(value: MeasurementResultsPage) -> Result { @@ -10662,7 +9626,6 @@ pub mod types { }) } } - impl From for MeasurementResultsPage { fn from(value: super::MeasurementResultsPage) -> Self { Self { @@ -10671,7 +9634,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterface { description: Result, @@ -10686,7 +9648,6 @@ pub mod types { time_modified: Result, String>, vpc_id: Result, } - impl Default for NetworkInterface { fn default() -> Self { Self { @@ -10704,7 +9665,6 @@ pub mod types { } } } - impl NetworkInterface { pub fn description(mut self, value: T) -> Self where @@ -10817,7 +9777,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterface { type Error = String; fn try_from(value: NetworkInterface) -> Result { @@ -10836,7 +9795,6 @@ pub mod types { }) } } - impl From for NetworkInterface { fn from(value: super::NetworkInterface) -> Self { Self { @@ -10854,7 +9812,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterfaceCreate { description: Result, @@ -10863,7 +9820,6 @@ pub mod types { subnet_name: Result, vpc_name: Result, } - impl Default for NetworkInterfaceCreate { fn default() -> Self { Self { @@ -10875,7 +9831,6 @@ pub mod types { } } } - impl NetworkInterfaceCreate { pub fn description(mut self, value: T) -> Self where @@ -10928,7 +9883,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterfaceCreate { type Error = String; fn try_from(value: NetworkInterfaceCreate) -> Result { @@ -10941,7 +9895,6 @@ pub mod types { }) } } - impl From for NetworkInterfaceCreate { fn from(value: super::NetworkInterfaceCreate) -> Self { Self { @@ -10953,13 +9906,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterfaceResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for NetworkInterfaceResultsPage { fn default() -> Self { Self { @@ -10968,7 +9919,6 @@ pub mod types { } } } - impl NetworkInterfaceResultsPage { pub fn items(mut self, value: T) -> Self where @@ -10991,7 +9941,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterfaceResultsPage { type Error = String; fn try_from(value: NetworkInterfaceResultsPage) -> Result { @@ -11001,7 +9950,6 @@ pub mod types { }) } } - impl From for NetworkInterfaceResultsPage { fn from(value: super::NetworkInterfaceResultsPage) -> Self { Self { @@ -11010,14 +9958,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterfaceUpdate { description: Result, String>, name: Result, String>, primary: Result, } - impl Default for NetworkInterfaceUpdate { fn default() -> Self { Self { @@ -11027,7 +9973,6 @@ pub mod types { } } } - impl NetworkInterfaceUpdate { pub fn description(mut self, value: T) -> Self where @@ -11060,7 +10005,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterfaceUpdate { type Error = String; fn try_from(value: NetworkInterfaceUpdate) -> Result { @@ -11071,7 +10015,6 @@ pub mod types { }) } } - impl From for NetworkInterfaceUpdate { fn from(value: super::NetworkInterfaceUpdate) -> Self { Self { @@ -11081,7 +10024,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Organization { description: Result, @@ -11090,7 +10032,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Organization { fn default() -> Self { Self { @@ -11102,7 +10043,6 @@ pub mod types { } } } - impl Organization { pub fn description(mut self, value: T) -> Self where @@ -11155,7 +10095,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Organization { type Error = String; fn try_from(value: Organization) -> Result { @@ -11168,7 +10107,6 @@ pub mod types { }) } } - impl From for Organization { fn from(value: super::Organization) -> Self { Self { @@ -11180,13 +10118,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationCreate { description: Result, name: Result, } - impl Default for OrganizationCreate { fn default() -> Self { Self { @@ -11195,7 +10131,6 @@ pub mod types { } } } - impl OrganizationCreate { pub fn description(mut self, value: T) -> Self where @@ -11218,7 +10153,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationCreate { type Error = String; fn try_from(value: OrganizationCreate) -> Result { @@ -11228,7 +10162,6 @@ pub mod types { }) } } - impl From for OrganizationCreate { fn from(value: super::OrganizationCreate) -> Self { Self { @@ -11237,13 +10170,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for OrganizationResultsPage { fn default() -> Self { Self { @@ -11252,7 +10183,6 @@ pub mod types { } } } - impl OrganizationResultsPage { pub fn items(mut self, value: T) -> Self where @@ -11275,7 +10205,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationResultsPage { type Error = String; fn try_from(value: OrganizationResultsPage) -> Result { @@ -11285,7 +10214,6 @@ pub mod types { }) } } - impl From for OrganizationResultsPage { fn from(value: super::OrganizationResultsPage) -> Self { Self { @@ -11294,12 +10222,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationRolePolicy { role_assignments: Result, String>, } - impl Default for OrganizationRolePolicy { fn default() -> Self { Self { @@ -11307,7 +10233,6 @@ pub mod types { } } } - impl OrganizationRolePolicy { pub fn role_assignments(mut self, value: T) -> Self where @@ -11323,7 +10248,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationRolePolicy { type Error = String; fn try_from(value: OrganizationRolePolicy) -> Result { @@ -11332,7 +10256,6 @@ pub mod types { }) } } - impl From for OrganizationRolePolicy { fn from(value: super::OrganizationRolePolicy) -> Self { Self { @@ -11340,14 +10263,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationRoleRoleAssignment { identity_id: Result, identity_type: Result, role_name: Result, } - impl Default for OrganizationRoleRoleAssignment { fn default() -> Self { Self { @@ -11357,7 +10278,6 @@ pub mod types { } } } - impl OrganizationRoleRoleAssignment { pub fn identity_id(mut self, value: T) -> Self where @@ -11390,7 +10310,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationRoleRoleAssignment { @@ -11403,7 +10322,6 @@ pub mod types { }) } } - impl From for OrganizationRoleRoleAssignment { fn from(value: super::OrganizationRoleRoleAssignment) -> Self { Self { @@ -11413,13 +10331,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationUpdate { description: Result, String>, name: Result, String>, } - impl Default for OrganizationUpdate { fn default() -> Self { Self { @@ -11428,7 +10344,6 @@ pub mod types { } } } - impl OrganizationUpdate { pub fn description(mut self, value: T) -> Self where @@ -11451,7 +10366,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationUpdate { type Error = String; fn try_from(value: OrganizationUpdate) -> Result { @@ -11461,7 +10375,6 @@ pub mod types { }) } } - impl From for OrganizationUpdate { fn from(value: super::OrganizationUpdate) -> Self { Self { @@ -11470,7 +10383,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct PhysicalDisk { disk_type: Result, @@ -11482,7 +10394,6 @@ pub mod types { time_modified: Result, String>, vendor: Result, } - impl Default for PhysicalDisk { fn default() -> Self { Self { @@ -11497,7 +10408,6 @@ pub mod types { } } } - impl PhysicalDisk { pub fn disk_type(mut self, value: T) -> Self where @@ -11580,7 +10490,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::PhysicalDisk { type Error = String; fn try_from(value: PhysicalDisk) -> Result { @@ -11596,7 +10505,6 @@ pub mod types { }) } } - impl From for PhysicalDisk { fn from(value: super::PhysicalDisk) -> Self { Self { @@ -11611,13 +10519,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct PhysicalDiskResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for PhysicalDiskResultsPage { fn default() -> Self { Self { @@ -11626,7 +10532,6 @@ pub mod types { } } } - impl PhysicalDiskResultsPage { pub fn items(mut self, value: T) -> Self where @@ -11649,7 +10554,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::PhysicalDiskResultsPage { type Error = String; fn try_from(value: PhysicalDiskResultsPage) -> Result { @@ -11659,7 +10563,6 @@ pub mod types { }) } } - impl From for PhysicalDiskResultsPage { fn from(value: super::PhysicalDiskResultsPage) -> Self { Self { @@ -11668,7 +10571,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Project { description: Result, @@ -11678,7 +10580,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Project { fn default() -> Self { Self { @@ -11691,7 +10592,6 @@ pub mod types { } } } - impl Project { pub fn description(mut self, value: T) -> Self where @@ -11754,7 +10654,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Project { type Error = String; fn try_from(value: Project) -> Result { @@ -11768,7 +10667,6 @@ pub mod types { }) } } - impl From for Project { fn from(value: super::Project) -> Self { Self { @@ -11781,13 +10679,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectCreate { description: Result, name: Result, } - impl Default for ProjectCreate { fn default() -> Self { Self { @@ -11796,7 +10692,6 @@ pub mod types { } } } - impl ProjectCreate { pub fn description(mut self, value: T) -> Self where @@ -11819,7 +10714,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectCreate { type Error = String; fn try_from(value: ProjectCreate) -> Result { @@ -11829,7 +10723,6 @@ pub mod types { }) } } - impl From for ProjectCreate { fn from(value: super::ProjectCreate) -> Self { Self { @@ -11838,13 +10731,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for ProjectResultsPage { fn default() -> Self { Self { @@ -11853,7 +10744,6 @@ pub mod types { } } } - impl ProjectResultsPage { pub fn items(mut self, value: T) -> Self where @@ -11876,7 +10766,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectResultsPage { type Error = String; fn try_from(value: ProjectResultsPage) -> Result { @@ -11886,7 +10775,6 @@ pub mod types { }) } } - impl From for ProjectResultsPage { fn from(value: super::ProjectResultsPage) -> Self { Self { @@ -11895,12 +10783,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectRolePolicy { role_assignments: Result, String>, } - impl Default for ProjectRolePolicy { fn default() -> Self { Self { @@ -11908,7 +10794,6 @@ pub mod types { } } } - impl ProjectRolePolicy { pub fn role_assignments(mut self, value: T) -> Self where @@ -11924,7 +10809,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectRolePolicy { type Error = String; fn try_from(value: ProjectRolePolicy) -> Result { @@ -11933,7 +10817,6 @@ pub mod types { }) } } - impl From for ProjectRolePolicy { fn from(value: super::ProjectRolePolicy) -> Self { Self { @@ -11941,14 +10824,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectRoleRoleAssignment { identity_id: Result, identity_type: Result, role_name: Result, } - impl Default for ProjectRoleRoleAssignment { fn default() -> Self { Self { @@ -11958,7 +10839,6 @@ pub mod types { } } } - impl ProjectRoleRoleAssignment { pub fn identity_id(mut self, value: T) -> Self where @@ -11991,7 +10871,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectRoleRoleAssignment { type Error = String; fn try_from(value: ProjectRoleRoleAssignment) -> Result { @@ -12002,7 +10881,6 @@ pub mod types { }) } } - impl From for ProjectRoleRoleAssignment { fn from(value: super::ProjectRoleRoleAssignment) -> Self { Self { @@ -12012,13 +10890,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectUpdate { description: Result, String>, name: Result, String>, } - impl Default for ProjectUpdate { fn default() -> Self { Self { @@ -12027,7 +10903,6 @@ pub mod types { } } } - impl ProjectUpdate { pub fn description(mut self, value: T) -> Self where @@ -12050,7 +10925,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectUpdate { type Error = String; fn try_from(value: ProjectUpdate) -> Result { @@ -12060,7 +10934,6 @@ pub mod types { }) } } - impl From for ProjectUpdate { fn from(value: super::ProjectUpdate) -> Self { Self { @@ -12069,14 +10942,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Rack { id: Result, time_created: Result, String>, time_modified: Result, String>, } - impl Default for Rack { fn default() -> Self { Self { @@ -12086,7 +10957,6 @@ pub mod types { } } } - impl Rack { pub fn id(mut self, value: T) -> Self where @@ -12119,7 +10989,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Rack { type Error = String; fn try_from(value: Rack) -> Result { @@ -12130,7 +10999,6 @@ pub mod types { }) } } - impl From for Rack { fn from(value: super::Rack) -> Self { Self { @@ -12140,13 +11008,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RackResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for RackResultsPage { fn default() -> Self { Self { @@ -12155,7 +11021,6 @@ pub mod types { } } } - impl RackResultsPage { pub fn items(mut self, value: T) -> Self where @@ -12178,7 +11043,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RackResultsPage { type Error = String; fn try_from(value: RackResultsPage) -> Result { @@ -12188,7 +11052,6 @@ pub mod types { }) } } - impl From for RackResultsPage { fn from(value: super::RackResultsPage) -> Self { Self { @@ -12197,13 +11060,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Role { description: Result, name: Result, } - impl Default for Role { fn default() -> Self { Self { @@ -12212,7 +11073,6 @@ pub mod types { } } } - impl Role { pub fn description(mut self, value: T) -> Self where @@ -12235,7 +11095,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Role { type Error = String; fn try_from(value: Role) -> Result { @@ -12245,7 +11104,6 @@ pub mod types { }) } } - impl From for Role { fn from(value: super::Role) -> Self { Self { @@ -12254,13 +11112,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RoleResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for RoleResultsPage { fn default() -> Self { Self { @@ -12269,7 +11125,6 @@ pub mod types { } } } - impl RoleResultsPage { pub fn items(mut self, value: T) -> Self where @@ -12292,7 +11147,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RoleResultsPage { type Error = String; fn try_from(value: RoleResultsPage) -> Result { @@ -12302,7 +11156,6 @@ pub mod types { }) } } - impl From for RoleResultsPage { fn from(value: super::RoleResultsPage) -> Self { Self { @@ -12311,7 +11164,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RouterRoute { description: Result, @@ -12324,7 +11176,6 @@ pub mod types { time_modified: Result, String>, vpc_router_id: Result, } - impl Default for RouterRoute { fn default() -> Self { Self { @@ -12340,7 +11191,6 @@ pub mod types { } } } - impl RouterRoute { pub fn description(mut self, value: T) -> Self where @@ -12433,7 +11283,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RouterRoute { type Error = String; fn try_from(value: RouterRoute) -> Result { @@ -12450,7 +11299,6 @@ pub mod types { }) } } - impl From for RouterRoute { fn from(value: super::RouterRoute) -> Self { Self { @@ -12466,7 +11314,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RouterRouteCreateParams { description: Result, @@ -12474,7 +11321,6 @@ pub mod types { name: Result, target: Result, } - impl Default for RouterRouteCreateParams { fn default() -> Self { Self { @@ -12485,7 +11331,6 @@ pub mod types { } } } - impl RouterRouteCreateParams { pub fn description(mut self, value: T) -> Self where @@ -12528,7 +11373,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RouterRouteCreateParams { type Error = String; fn try_from(value: RouterRouteCreateParams) -> Result { @@ -12540,7 +11384,6 @@ pub mod types { }) } } - impl From for RouterRouteCreateParams { fn from(value: super::RouterRouteCreateParams) -> Self { Self { @@ -12551,13 +11394,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RouterRouteResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for RouterRouteResultsPage { fn default() -> Self { Self { @@ -12566,7 +11407,6 @@ pub mod types { } } } - impl RouterRouteResultsPage { pub fn items(mut self, value: T) -> Self where @@ -12589,7 +11429,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RouterRouteResultsPage { type Error = String; fn try_from(value: RouterRouteResultsPage) -> Result { @@ -12599,7 +11438,6 @@ pub mod types { }) } } - impl From for RouterRouteResultsPage { fn from(value: super::RouterRouteResultsPage) -> Self { Self { @@ -12608,7 +11446,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RouterRouteUpdateParams { description: Result, String>, @@ -12616,7 +11453,6 @@ pub mod types { name: Result, String>, target: Result, } - impl Default for RouterRouteUpdateParams { fn default() -> Self { Self { @@ -12627,7 +11463,6 @@ pub mod types { } } } - impl RouterRouteUpdateParams { pub fn description(mut self, value: T) -> Self where @@ -12670,7 +11505,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RouterRouteUpdateParams { type Error = String; fn try_from(value: RouterRouteUpdateParams) -> Result { @@ -12682,7 +11516,6 @@ pub mod types { }) } } - impl From for RouterRouteUpdateParams { fn from(value: super::RouterRouteUpdateParams) -> Self { Self { @@ -12693,13 +11526,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Saga { id: Result, state: Result, } - impl Default for Saga { fn default() -> Self { Self { @@ -12708,7 +11539,6 @@ pub mod types { } } } - impl Saga { pub fn id(mut self, value: T) -> Self where @@ -12731,7 +11561,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Saga { type Error = String; fn try_from(value: Saga) -> Result { @@ -12741,7 +11570,6 @@ pub mod types { }) } } - impl From for Saga { fn from(value: super::Saga) -> Self { Self { @@ -12750,13 +11578,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SagaResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SagaResultsPage { fn default() -> Self { Self { @@ -12765,7 +11591,6 @@ pub mod types { } } } - impl SagaResultsPage { pub fn items(mut self, value: T) -> Self where @@ -12788,7 +11613,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SagaResultsPage { type Error = String; fn try_from(value: SagaResultsPage) -> Result { @@ -12798,7 +11622,6 @@ pub mod types { }) } } - impl From for SagaResultsPage { fn from(value: super::SagaResultsPage) -> Self { Self { @@ -12807,7 +11630,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SamlIdentityProvider { acs_url: Result, @@ -12822,7 +11644,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for SamlIdentityProvider { fn default() -> Self { Self { @@ -12842,7 +11663,6 @@ pub mod types { } } } - impl SamlIdentityProvider { pub fn acs_url(mut self, value: T) -> Self where @@ -12958,7 +11778,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SamlIdentityProvider { type Error = String; fn try_from(value: SamlIdentityProvider) -> Result { @@ -12977,7 +11796,6 @@ pub mod types { }) } } - impl From for SamlIdentityProvider { fn from(value: super::SamlIdentityProvider) -> Self { Self { @@ -12995,7 +11813,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SamlIdentityProviderCreate { acs_url: Result, @@ -13009,7 +11826,6 @@ pub mod types { sp_client_id: Result, technical_contact_email: Result, } - impl Default for SamlIdentityProviderCreate { fn default() -> Self { Self { @@ -13030,7 +11846,6 @@ pub mod types { } } } - impl SamlIdentityProviderCreate { pub fn acs_url(mut self, value: T) -> Self where @@ -13142,7 +11957,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SamlIdentityProviderCreate { type Error = String; fn try_from(value: SamlIdentityProviderCreate) -> Result { @@ -13160,7 +11974,6 @@ pub mod types { }) } } - impl From for SamlIdentityProviderCreate { fn from(value: super::SamlIdentityProviderCreate) -> Self { Self { @@ -13177,7 +11990,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Silo { description: Result, @@ -13188,7 +12000,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Silo { fn default() -> Self { Self { @@ -13202,7 +12013,6 @@ pub mod types { } } } - impl Silo { pub fn description(mut self, value: T) -> Self where @@ -13275,7 +12085,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Silo { type Error = String; fn try_from(value: Silo) -> Result { @@ -13290,7 +12099,6 @@ pub mod types { }) } } - impl From for Silo { fn from(value: super::Silo) -> Self { Self { @@ -13304,7 +12112,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SiloCreate { admin_group_name: Result, String>, @@ -13313,7 +12120,6 @@ pub mod types { identity_mode: Result, name: Result, } - impl Default for SiloCreate { fn default() -> Self { Self { @@ -13325,7 +12131,6 @@ pub mod types { } } } - impl SiloCreate { pub fn admin_group_name(mut self, value: T) -> Self where @@ -13381,7 +12186,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SiloCreate { type Error = String; fn try_from(value: SiloCreate) -> Result { @@ -13394,7 +12198,6 @@ pub mod types { }) } } - impl From for SiloCreate { fn from(value: super::SiloCreate) -> Self { Self { @@ -13406,13 +12209,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SiloResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SiloResultsPage { fn default() -> Self { Self { @@ -13421,7 +12222,6 @@ pub mod types { } } } - impl SiloResultsPage { pub fn items(mut self, value: T) -> Self where @@ -13444,7 +12244,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SiloResultsPage { type Error = String; fn try_from(value: SiloResultsPage) -> Result { @@ -13454,7 +12253,6 @@ pub mod types { }) } } - impl From for SiloResultsPage { fn from(value: super::SiloResultsPage) -> Self { Self { @@ -13463,12 +12261,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SiloRolePolicy { role_assignments: Result, String>, } - impl Default for SiloRolePolicy { fn default() -> Self { Self { @@ -13476,7 +12272,6 @@ pub mod types { } } } - impl SiloRolePolicy { pub fn role_assignments(mut self, value: T) -> Self where @@ -13492,7 +12287,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SiloRolePolicy { type Error = String; fn try_from(value: SiloRolePolicy) -> Result { @@ -13501,7 +12295,6 @@ pub mod types { }) } } - impl From for SiloRolePolicy { fn from(value: super::SiloRolePolicy) -> Self { Self { @@ -13509,14 +12302,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SiloRoleRoleAssignment { identity_id: Result, identity_type: Result, role_name: Result, } - impl Default for SiloRoleRoleAssignment { fn default() -> Self { Self { @@ -13526,7 +12317,6 @@ pub mod types { } } } - impl SiloRoleRoleAssignment { pub fn identity_id(mut self, value: T) -> Self where @@ -13559,7 +12349,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SiloRoleRoleAssignment { type Error = String; fn try_from(value: SiloRoleRoleAssignment) -> Result { @@ -13570,7 +12359,6 @@ pub mod types { }) } } - impl From for SiloRoleRoleAssignment { fn from(value: super::SiloRoleRoleAssignment) -> Self { Self { @@ -13580,7 +12368,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Sled { baseboard: Result, @@ -13589,7 +12376,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Sled { fn default() -> Self { Self { @@ -13601,7 +12387,6 @@ pub mod types { } } } - impl Sled { pub fn baseboard(mut self, value: T) -> Self where @@ -13654,7 +12439,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Sled { type Error = String; fn try_from(value: Sled) -> Result { @@ -13667,7 +12451,6 @@ pub mod types { }) } } - impl From for Sled { fn from(value: super::Sled) -> Self { Self { @@ -13679,13 +12462,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SledResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SledResultsPage { fn default() -> Self { Self { @@ -13694,7 +12475,6 @@ pub mod types { } } } - impl SledResultsPage { pub fn items(mut self, value: T) -> Self where @@ -13717,7 +12497,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SledResultsPage { type Error = String; fn try_from(value: SledResultsPage) -> Result { @@ -13727,7 +12506,6 @@ pub mod types { }) } } - impl From for SledResultsPage { fn from(value: super::SledResultsPage) -> Self { Self { @@ -13736,7 +12514,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Snapshot { description: Result, @@ -13749,7 +12526,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Snapshot { fn default() -> Self { Self { @@ -13765,7 +12541,6 @@ pub mod types { } } } - impl Snapshot { pub fn description(mut self, value: T) -> Self where @@ -13858,7 +12633,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Snapshot { type Error = String; fn try_from(value: Snapshot) -> Result { @@ -13875,7 +12649,6 @@ pub mod types { }) } } - impl From for Snapshot { fn from(value: super::Snapshot) -> Self { Self { @@ -13891,14 +12664,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SnapshotCreate { description: Result, disk: Result, name: Result, } - impl Default for SnapshotCreate { fn default() -> Self { Self { @@ -13908,7 +12679,6 @@ pub mod types { } } } - impl SnapshotCreate { pub fn description(mut self, value: T) -> Self where @@ -13941,7 +12711,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SnapshotCreate { type Error = String; fn try_from(value: SnapshotCreate) -> Result { @@ -13952,7 +12721,6 @@ pub mod types { }) } } - impl From for SnapshotCreate { fn from(value: super::SnapshotCreate) -> Self { Self { @@ -13962,13 +12730,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SnapshotResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SnapshotResultsPage { fn default() -> Self { Self { @@ -13977,7 +12743,6 @@ pub mod types { } } } - impl SnapshotResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14000,7 +12765,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SnapshotResultsPage { type Error = String; fn try_from(value: SnapshotResultsPage) -> Result { @@ -14010,7 +12774,6 @@ pub mod types { }) } } - impl From for SnapshotResultsPage { fn from(value: super::SnapshotResultsPage) -> Self { Self { @@ -14019,12 +12782,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SpoofLoginBody { username: Result, } - impl Default for SpoofLoginBody { fn default() -> Self { Self { @@ -14032,7 +12793,6 @@ pub mod types { } } } - impl SpoofLoginBody { pub fn username(mut self, value: T) -> Self where @@ -14045,7 +12805,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SpoofLoginBody { type Error = String; fn try_from(value: SpoofLoginBody) -> Result { @@ -14054,7 +12813,6 @@ pub mod types { }) } } - impl From for SpoofLoginBody { fn from(value: super::SpoofLoginBody) -> Self { Self { @@ -14062,7 +12820,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SshKey { description: Result, @@ -14073,7 +12830,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for SshKey { fn default() -> Self { Self { @@ -14087,7 +12843,6 @@ pub mod types { } } } - impl SshKey { pub fn description(mut self, value: T) -> Self where @@ -14160,7 +12915,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SshKey { type Error = String; fn try_from(value: SshKey) -> Result { @@ -14175,7 +12929,6 @@ pub mod types { }) } } - impl From for SshKey { fn from(value: super::SshKey) -> Self { Self { @@ -14189,14 +12942,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SshKeyCreate { description: Result, name: Result, public_key: Result, } - impl Default for SshKeyCreate { fn default() -> Self { Self { @@ -14206,7 +12957,6 @@ pub mod types { } } } - impl SshKeyCreate { pub fn description(mut self, value: T) -> Self where @@ -14239,7 +12989,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SshKeyCreate { type Error = String; fn try_from(value: SshKeyCreate) -> Result { @@ -14250,7 +12999,6 @@ pub mod types { }) } } - impl From for SshKeyCreate { fn from(value: super::SshKeyCreate) -> Self { Self { @@ -14260,13 +13008,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SshKeyResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SshKeyResultsPage { fn default() -> Self { Self { @@ -14275,7 +13021,6 @@ pub mod types { } } } - impl SshKeyResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14298,7 +13043,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SshKeyResultsPage { type Error = String; fn try_from(value: SshKeyResultsPage) -> Result { @@ -14308,7 +13052,6 @@ pub mod types { }) } } - impl From for SshKeyResultsPage { fn from(value: super::SshKeyResultsPage) -> Self { Self { @@ -14317,7 +13060,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SystemUpdate { id: Result, @@ -14325,7 +13067,6 @@ pub mod types { time_modified: Result, String>, version: Result, } - impl Default for SystemUpdate { fn default() -> Self { Self { @@ -14336,7 +13077,6 @@ pub mod types { } } } - impl SystemUpdate { pub fn id(mut self, value: T) -> Self where @@ -14379,7 +13119,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SystemUpdate { type Error = String; fn try_from(value: SystemUpdate) -> Result { @@ -14391,7 +13130,6 @@ pub mod types { }) } } - impl From for SystemUpdate { fn from(value: super::SystemUpdate) -> Self { Self { @@ -14402,13 +13140,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SystemUpdateResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SystemUpdateResultsPage { fn default() -> Self { Self { @@ -14417,7 +13153,6 @@ pub mod types { } } } - impl SystemUpdateResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14440,7 +13175,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SystemUpdateResultsPage { type Error = String; fn try_from(value: SystemUpdateResultsPage) -> Result { @@ -14450,7 +13184,6 @@ pub mod types { }) } } - impl From for SystemUpdateResultsPage { fn from(value: super::SystemUpdateResultsPage) -> Self { Self { @@ -14459,12 +13192,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SystemUpdateStart { version: Result, } - impl Default for SystemUpdateStart { fn default() -> Self { Self { @@ -14472,7 +13203,6 @@ pub mod types { } } } - impl SystemUpdateStart { pub fn version(mut self, value: T) -> Self where @@ -14485,7 +13215,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SystemUpdateStart { type Error = String; fn try_from(value: SystemUpdateStart) -> Result { @@ -14494,7 +13223,6 @@ pub mod types { }) } } - impl From for SystemUpdateStart { fn from(value: super::SystemUpdateStart) -> Self { Self { @@ -14502,13 +13230,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SystemVersion { status: Result, version_range: Result, } - impl Default for SystemVersion { fn default() -> Self { Self { @@ -14517,7 +13243,6 @@ pub mod types { } } } - impl SystemVersion { pub fn status(mut self, value: T) -> Self where @@ -14540,7 +13265,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SystemVersion { type Error = String; fn try_from(value: SystemVersion) -> Result { @@ -14550,7 +13274,6 @@ pub mod types { }) } } - impl From for SystemVersion { fn from(value: super::SystemVersion) -> Self { Self { @@ -14559,7 +13282,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TimeseriesSchema { created: Result, String>, @@ -14567,7 +13289,6 @@ pub mod types { field_schema: Result, String>, timeseries_name: Result, } - impl Default for TimeseriesSchema { fn default() -> Self { Self { @@ -14578,7 +13299,6 @@ pub mod types { } } } - impl TimeseriesSchema { pub fn created(mut self, value: T) -> Self where @@ -14621,7 +13341,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TimeseriesSchema { type Error = String; fn try_from(value: TimeseriesSchema) -> Result { @@ -14633,7 +13352,6 @@ pub mod types { }) } } - impl From for TimeseriesSchema { fn from(value: super::TimeseriesSchema) -> Self { Self { @@ -14644,13 +13362,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TimeseriesSchemaResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for TimeseriesSchemaResultsPage { fn default() -> Self { Self { @@ -14659,7 +13375,6 @@ pub mod types { } } } - impl TimeseriesSchemaResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14682,7 +13397,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TimeseriesSchemaResultsPage { type Error = String; fn try_from(value: TimeseriesSchemaResultsPage) -> Result { @@ -14692,7 +13406,6 @@ pub mod types { }) } } - impl From for TimeseriesSchemaResultsPage { fn from(value: super::TimeseriesSchemaResultsPage) -> Self { Self { @@ -14701,7 +13414,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UpdateDeployment { id: Result, @@ -14710,7 +13422,6 @@ pub mod types { time_modified: Result, String>, version: Result, } - impl Default for UpdateDeployment { fn default() -> Self { Self { @@ -14722,7 +13433,6 @@ pub mod types { } } } - impl UpdateDeployment { pub fn id(mut self, value: T) -> Self where @@ -14775,7 +13485,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UpdateDeployment { type Error = String; fn try_from(value: UpdateDeployment) -> Result { @@ -14788,7 +13497,6 @@ pub mod types { }) } } - impl From for UpdateDeployment { fn from(value: super::UpdateDeployment) -> Self { Self { @@ -14800,13 +13508,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UpdateDeploymentResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for UpdateDeploymentResultsPage { fn default() -> Self { Self { @@ -14815,7 +13521,6 @@ pub mod types { } } } - impl UpdateDeploymentResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14838,7 +13543,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UpdateDeploymentResultsPage { type Error = String; fn try_from(value: UpdateDeploymentResultsPage) -> Result { @@ -14848,7 +13552,6 @@ pub mod types { }) } } - impl From for UpdateDeploymentResultsPage { fn from(value: super::UpdateDeploymentResultsPage) -> Self { Self { @@ -14857,7 +13560,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UpdateableComponent { component_type: Result, @@ -14869,7 +13571,6 @@ pub mod types { time_modified: Result, String>, version: Result, } - impl Default for UpdateableComponent { fn default() -> Self { Self { @@ -14884,7 +13585,6 @@ pub mod types { } } } - impl UpdateableComponent { pub fn component_type(mut self, value: T) -> Self where @@ -14967,7 +13667,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UpdateableComponent { type Error = String; fn try_from(value: UpdateableComponent) -> Result { @@ -14983,7 +13682,6 @@ pub mod types { }) } } - impl From for UpdateableComponent { fn from(value: super::UpdateableComponent) -> Self { Self { @@ -14998,13 +13696,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UpdateableComponentResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for UpdateableComponentResultsPage { fn default() -> Self { Self { @@ -15013,7 +13709,6 @@ pub mod types { } } } - impl UpdateableComponentResultsPage { pub fn items(mut self, value: T) -> Self where @@ -15036,7 +13731,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UpdateableComponentResultsPage { @@ -15048,7 +13742,6 @@ pub mod types { }) } } - impl From for UpdateableComponentResultsPage { fn from(value: super::UpdateableComponentResultsPage) -> Self { Self { @@ -15057,14 +13750,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct User { display_name: Result, id: Result, silo_id: Result, } - impl Default for User { fn default() -> Self { Self { @@ -15074,7 +13765,6 @@ pub mod types { } } } - impl User { pub fn display_name(mut self, value: T) -> Self where @@ -15107,7 +13797,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::User { type Error = String; fn try_from(value: User) -> Result { @@ -15118,7 +13807,6 @@ pub mod types { }) } } - impl From for User { fn from(value: super::User) -> Self { Self { @@ -15128,7 +13816,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserBuiltin { description: Result, @@ -15137,7 +13824,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for UserBuiltin { fn default() -> Self { Self { @@ -15149,7 +13835,6 @@ pub mod types { } } } - impl UserBuiltin { pub fn description(mut self, value: T) -> Self where @@ -15202,7 +13887,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserBuiltin { type Error = String; fn try_from(value: UserBuiltin) -> Result { @@ -15215,7 +13899,6 @@ pub mod types { }) } } - impl From for UserBuiltin { fn from(value: super::UserBuiltin) -> Self { Self { @@ -15227,13 +13910,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserBuiltinResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for UserBuiltinResultsPage { fn default() -> Self { Self { @@ -15242,7 +13923,6 @@ pub mod types { } } } - impl UserBuiltinResultsPage { pub fn items(mut self, value: T) -> Self where @@ -15265,7 +13945,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserBuiltinResultsPage { type Error = String; fn try_from(value: UserBuiltinResultsPage) -> Result { @@ -15275,7 +13954,6 @@ pub mod types { }) } } - impl From for UserBuiltinResultsPage { fn from(value: super::UserBuiltinResultsPage) -> Self { Self { @@ -15284,13 +13962,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserCreate { external_id: Result, password: Result, } - impl Default for UserCreate { fn default() -> Self { Self { @@ -15299,7 +13975,6 @@ pub mod types { } } } - impl UserCreate { pub fn external_id(mut self, value: T) -> Self where @@ -15322,7 +13997,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserCreate { type Error = String; fn try_from(value: UserCreate) -> Result { @@ -15332,7 +14006,6 @@ pub mod types { }) } } - impl From for UserCreate { fn from(value: super::UserCreate) -> Self { Self { @@ -15341,13 +14014,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for UserResultsPage { fn default() -> Self { Self { @@ -15356,7 +14027,6 @@ pub mod types { } } } - impl UserResultsPage { pub fn items(mut self, value: T) -> Self where @@ -15379,7 +14049,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserResultsPage { type Error = String; fn try_from(value: UserResultsPage) -> Result { @@ -15389,7 +14058,6 @@ pub mod types { }) } } - impl From for UserResultsPage { fn from(value: super::UserResultsPage) -> Self { Self { @@ -15398,13 +14066,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UsernamePasswordCredentials { password: Result, username: Result, } - impl Default for UsernamePasswordCredentials { fn default() -> Self { Self { @@ -15413,7 +14079,6 @@ pub mod types { } } } - impl UsernamePasswordCredentials { pub fn password(mut self, value: T) -> Self where @@ -15436,7 +14101,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UsernamePasswordCredentials { type Error = String; fn try_from(value: UsernamePasswordCredentials) -> Result { @@ -15446,7 +14110,6 @@ pub mod types { }) } } - impl From for UsernamePasswordCredentials { fn from(value: super::UsernamePasswordCredentials) -> Self { Self { @@ -15455,13 +14118,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VersionRange { high: Result, low: Result, } - impl Default for VersionRange { fn default() -> Self { Self { @@ -15470,7 +14131,6 @@ pub mod types { } } } - impl VersionRange { pub fn high(mut self, value: T) -> Self where @@ -15493,7 +14153,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VersionRange { type Error = String; fn try_from(value: VersionRange) -> Result { @@ -15503,7 +14162,6 @@ pub mod types { }) } } - impl From for VersionRange { fn from(value: super::VersionRange) -> Self { Self { @@ -15512,7 +14170,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Vpc { description: Result, @@ -15525,7 +14182,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Vpc { fn default() -> Self { Self { @@ -15541,7 +14197,6 @@ pub mod types { } } } - impl Vpc { pub fn description(mut self, value: T) -> Self where @@ -15637,7 +14292,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Vpc { type Error = String; fn try_from(value: Vpc) -> Result { @@ -15654,7 +14308,6 @@ pub mod types { }) } } - impl From for Vpc { fn from(value: super::Vpc) -> Self { Self { @@ -15670,7 +14323,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcCreate { description: Result, @@ -15678,7 +14330,6 @@ pub mod types { ipv6_prefix: Result, String>, name: Result, } - impl Default for VpcCreate { fn default() -> Self { Self { @@ -15689,7 +14340,6 @@ pub mod types { } } } - impl VpcCreate { pub fn description(mut self, value: T) -> Self where @@ -15732,7 +14382,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcCreate { type Error = String; fn try_from(value: VpcCreate) -> Result { @@ -15744,7 +14393,6 @@ pub mod types { }) } } - impl From for VpcCreate { fn from(value: super::VpcCreate) -> Self { Self { @@ -15755,7 +14403,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRule { action: Result, @@ -15771,7 +14418,6 @@ pub mod types { time_modified: Result, String>, vpc_id: Result, } - impl Default for VpcFirewallRule { fn default() -> Self { Self { @@ -15790,7 +14436,6 @@ pub mod types { } } } - impl VpcFirewallRule { pub fn action(mut self, value: T) -> Self where @@ -15913,7 +14558,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRule { type Error = String; fn try_from(value: VpcFirewallRule) -> Result { @@ -15933,7 +14577,6 @@ pub mod types { }) } } - impl From for VpcFirewallRule { fn from(value: super::VpcFirewallRule) -> Self { Self { @@ -15952,14 +14595,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRuleFilter { hosts: Result>, String>, ports: Result>, String>, protocols: Result>, String>, } - impl Default for VpcFirewallRuleFilter { fn default() -> Self { Self { @@ -15969,7 +14610,6 @@ pub mod types { } } } - impl VpcFirewallRuleFilter { pub fn hosts(mut self, value: T) -> Self where @@ -16002,7 +14642,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRuleFilter { type Error = String; fn try_from(value: VpcFirewallRuleFilter) -> Result { @@ -16013,7 +14652,6 @@ pub mod types { }) } } - impl From for VpcFirewallRuleFilter { fn from(value: super::VpcFirewallRuleFilter) -> Self { Self { @@ -16023,7 +14661,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRuleUpdate { action: Result, @@ -16035,7 +14672,6 @@ pub mod types { status: Result, targets: Result, String>, } - impl Default for VpcFirewallRuleUpdate { fn default() -> Self { Self { @@ -16050,7 +14686,6 @@ pub mod types { } } } - impl VpcFirewallRuleUpdate { pub fn action(mut self, value: T) -> Self where @@ -16133,7 +14768,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRuleUpdate { type Error = String; fn try_from(value: VpcFirewallRuleUpdate) -> Result { @@ -16149,7 +14783,6 @@ pub mod types { }) } } - impl From for VpcFirewallRuleUpdate { fn from(value: super::VpcFirewallRuleUpdate) -> Self { Self { @@ -16164,12 +14797,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRuleUpdateParams { rules: Result, String>, } - impl Default for VpcFirewallRuleUpdateParams { fn default() -> Self { Self { @@ -16177,7 +14808,6 @@ pub mod types { } } } - impl VpcFirewallRuleUpdateParams { pub fn rules(mut self, value: T) -> Self where @@ -16190,7 +14820,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRuleUpdateParams { type Error = String; fn try_from(value: VpcFirewallRuleUpdateParams) -> Result { @@ -16199,7 +14828,6 @@ pub mod types { }) } } - impl From for VpcFirewallRuleUpdateParams { fn from(value: super::VpcFirewallRuleUpdateParams) -> Self { Self { @@ -16207,12 +14835,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRules { rules: Result, String>, } - impl Default for VpcFirewallRules { fn default() -> Self { Self { @@ -16220,7 +14846,6 @@ pub mod types { } } } - impl VpcFirewallRules { pub fn rules(mut self, value: T) -> Self where @@ -16233,7 +14858,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRules { type Error = String; fn try_from(value: VpcFirewallRules) -> Result { @@ -16242,7 +14866,6 @@ pub mod types { }) } } - impl From for VpcFirewallRules { fn from(value: super::VpcFirewallRules) -> Self { Self { @@ -16250,13 +14873,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for VpcResultsPage { fn default() -> Self { Self { @@ -16265,7 +14886,6 @@ pub mod types { } } } - impl VpcResultsPage { pub fn items(mut self, value: T) -> Self where @@ -16288,7 +14908,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcResultsPage { type Error = String; fn try_from(value: VpcResultsPage) -> Result { @@ -16298,7 +14917,6 @@ pub mod types { }) } } - impl From for VpcResultsPage { fn from(value: super::VpcResultsPage) -> Self { Self { @@ -16307,7 +14925,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcRouter { description: Result, @@ -16318,7 +14935,6 @@ pub mod types { time_modified: Result, String>, vpc_id: Result, } - impl Default for VpcRouter { fn default() -> Self { Self { @@ -16332,7 +14948,6 @@ pub mod types { } } } - impl VpcRouter { pub fn description(mut self, value: T) -> Self where @@ -16405,7 +15020,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcRouter { type Error = String; fn try_from(value: VpcRouter) -> Result { @@ -16420,7 +15034,6 @@ pub mod types { }) } } - impl From for VpcRouter { fn from(value: super::VpcRouter) -> Self { Self { @@ -16434,13 +15047,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcRouterCreate { description: Result, name: Result, } - impl Default for VpcRouterCreate { fn default() -> Self { Self { @@ -16449,7 +15060,6 @@ pub mod types { } } } - impl VpcRouterCreate { pub fn description(mut self, value: T) -> Self where @@ -16472,7 +15082,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcRouterCreate { type Error = String; fn try_from(value: VpcRouterCreate) -> Result { @@ -16482,7 +15091,6 @@ pub mod types { }) } } - impl From for VpcRouterCreate { fn from(value: super::VpcRouterCreate) -> Self { Self { @@ -16491,13 +15099,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcRouterResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for VpcRouterResultsPage { fn default() -> Self { Self { @@ -16506,7 +15112,6 @@ pub mod types { } } } - impl VpcRouterResultsPage { pub fn items(mut self, value: T) -> Self where @@ -16529,7 +15134,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcRouterResultsPage { type Error = String; fn try_from(value: VpcRouterResultsPage) -> Result { @@ -16539,7 +15143,6 @@ pub mod types { }) } } - impl From for VpcRouterResultsPage { fn from(value: super::VpcRouterResultsPage) -> Self { Self { @@ -16548,13 +15151,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcRouterUpdate { description: Result, String>, name: Result, String>, } - impl Default for VpcRouterUpdate { fn default() -> Self { Self { @@ -16563,7 +15164,6 @@ pub mod types { } } } - impl VpcRouterUpdate { pub fn description(mut self, value: T) -> Self where @@ -16586,7 +15186,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcRouterUpdate { type Error = String; fn try_from(value: VpcRouterUpdate) -> Result { @@ -16596,7 +15195,6 @@ pub mod types { }) } } - impl From for VpcRouterUpdate { fn from(value: super::VpcRouterUpdate) -> Self { Self { @@ -16605,7 +15203,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcSubnet { description: Result, @@ -16617,7 +15214,6 @@ pub mod types { time_modified: Result, String>, vpc_id: Result, } - impl Default for VpcSubnet { fn default() -> Self { Self { @@ -16632,7 +15228,6 @@ pub mod types { } } } - impl VpcSubnet { pub fn description(mut self, value: T) -> Self where @@ -16715,7 +15310,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcSubnet { type Error = String; fn try_from(value: VpcSubnet) -> Result { @@ -16731,7 +15325,6 @@ pub mod types { }) } } - impl From for VpcSubnet { fn from(value: super::VpcSubnet) -> Self { Self { @@ -16746,7 +15339,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcSubnetCreate { description: Result, @@ -16754,7 +15346,6 @@ pub mod types { ipv6_block: Result, String>, name: Result, } - impl Default for VpcSubnetCreate { fn default() -> Self { Self { @@ -16765,7 +15356,6 @@ pub mod types { } } } - impl VpcSubnetCreate { pub fn description(mut self, value: T) -> Self where @@ -16808,7 +15398,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcSubnetCreate { type Error = String; fn try_from(value: VpcSubnetCreate) -> Result { @@ -16820,7 +15409,6 @@ pub mod types { }) } } - impl From for VpcSubnetCreate { fn from(value: super::VpcSubnetCreate) -> Self { Self { @@ -16831,13 +15419,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcSubnetResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for VpcSubnetResultsPage { fn default() -> Self { Self { @@ -16846,7 +15432,6 @@ pub mod types { } } } - impl VpcSubnetResultsPage { pub fn items(mut self, value: T) -> Self where @@ -16869,7 +15454,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcSubnetResultsPage { type Error = String; fn try_from(value: VpcSubnetResultsPage) -> Result { @@ -16879,7 +15463,6 @@ pub mod types { }) } } - impl From for VpcSubnetResultsPage { fn from(value: super::VpcSubnetResultsPage) -> Self { Self { @@ -16888,13 +15471,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcSubnetUpdate { description: Result, String>, name: Result, String>, } - impl Default for VpcSubnetUpdate { fn default() -> Self { Self { @@ -16903,7 +15484,6 @@ pub mod types { } } } - impl VpcSubnetUpdate { pub fn description(mut self, value: T) -> Self where @@ -16926,7 +15506,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcSubnetUpdate { type Error = String; fn try_from(value: VpcSubnetUpdate) -> Result { @@ -16936,7 +15515,6 @@ pub mod types { }) } } - impl From for VpcSubnetUpdate { fn from(value: super::VpcSubnetUpdate) -> Self { Self { @@ -16945,14 +15523,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcUpdate { description: Result, String>, dns_name: Result, String>, name: Result, String>, } - impl Default for VpcUpdate { fn default() -> Self { Self { @@ -16962,7 +15538,6 @@ pub mod types { } } } - impl VpcUpdate { pub fn description(mut self, value: T) -> Self where @@ -16995,7 +15570,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcUpdate { type Error = String; fn try_from(value: VpcUpdate) -> Result { @@ -17006,7 +15580,6 @@ pub mod types { }) } } - impl From for VpcUpdate { fn from(value: super::VpcUpdate) -> Self { Self { @@ -17017,19 +15590,16 @@ pub mod types { } } } - pub mod defaults { pub(super) fn default_bool() -> bool { V } - pub(super) fn instance_create_network_interfaces( ) -> super::InstanceNetworkInterfaceAttachment { super::InstanceNetworkInterfaceAttachment::Default } } } - #[derive(Clone, Debug)] ///Client for Oxide Region API /// @@ -17040,7 +15610,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -17056,7 +15625,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -17069,17 +15637,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -17088,7 +15653,6 @@ impl Client { "0.0.1" } } - pub trait ClientDisksExt { ///Fetch a disk by id /// @@ -17270,49 +15834,38 @@ pub trait ClientDisksExt { /// ``` fn disk_delete_v1(&self) -> builder::DiskDeleteV1; } - impl ClientDisksExt for Client { fn disk_view_by_id(&self) -> builder::DiskViewById { builder::DiskViewById::new(self) } - fn disk_list(&self) -> builder::DiskList { builder::DiskList::new(self) } - fn disk_create(&self) -> builder::DiskCreate { builder::DiskCreate::new(self) } - fn disk_view(&self) -> builder::DiskView { builder::DiskView::new(self) } - fn disk_delete(&self) -> builder::DiskDelete { builder::DiskDelete::new(self) } - fn disk_metrics_list(&self) -> builder::DiskMetricsList { builder::DiskMetricsList::new(self) } - fn disk_list_v1(&self) -> builder::DiskListV1 { builder::DiskListV1::new(self) } - fn disk_create_v1(&self) -> builder::DiskCreateV1 { builder::DiskCreateV1::new(self) } - fn disk_view_v1(&self) -> builder::DiskViewV1 { builder::DiskViewV1::new(self) } - fn disk_delete_v1(&self) -> builder::DiskDeleteV1 { builder::DiskDeleteV1::new(self) } } - pub trait ClientHiddenExt { ///Start an OAuth 2.0 Device Authorization Grant /// @@ -17405,37 +15958,29 @@ pub trait ClientHiddenExt { /// ``` fn session_me_groups(&self) -> builder::SessionMeGroups; } - impl ClientHiddenExt for Client { fn device_auth_request(&self) -> builder::DeviceAuthRequest { builder::DeviceAuthRequest::new(self) } - fn device_auth_confirm(&self) -> builder::DeviceAuthConfirm { builder::DeviceAuthConfirm::new(self) } - fn device_access_token(&self) -> builder::DeviceAccessToken { builder::DeviceAccessToken::new(self) } - fn login_spoof(&self) -> builder::LoginSpoof { builder::LoginSpoof::new(self) } - fn logout(&self) -> builder::Logout { builder::Logout::new(self) } - fn session_me(&self) -> builder::SessionMe { builder::SessionMe::new(self) } - fn session_me_groups(&self) -> builder::SessionMeGroups { builder::SessionMeGroups::new(self) } } - pub trait ClientImagesExt { ///Fetch an image by id /// @@ -17531,29 +16076,23 @@ pub trait ClientImagesExt { /// ``` fn image_delete(&self) -> builder::ImageDelete; } - impl ClientImagesExt for Client { fn image_view_by_id(&self) -> builder::ImageViewById { builder::ImageViewById::new(self) } - fn image_list(&self) -> builder::ImageList { builder::ImageList::new(self) } - fn image_create(&self) -> builder::ImageCreate { builder::ImageCreate::new(self) } - fn image_view(&self) -> builder::ImageView { builder::ImageView::new(self) } - fn image_delete(&self) -> builder::ImageDelete { builder::ImageDelete::new(self) } } - pub trait ClientInstancesExt { ///Fetch an instance by id /// @@ -18160,145 +16699,110 @@ pub trait ClientInstancesExt { /// ``` fn instance_stop_v1(&self) -> builder::InstanceStopV1; } - impl ClientInstancesExt for Client { fn instance_view_by_id(&self) -> builder::InstanceViewById { builder::InstanceViewById::new(self) } - fn instance_network_interface_view_by_id(&self) -> builder::InstanceNetworkInterfaceViewById { builder::InstanceNetworkInterfaceViewById::new(self) } - fn instance_list(&self) -> builder::InstanceList { builder::InstanceList::new(self) } - fn instance_create(&self) -> builder::InstanceCreate { builder::InstanceCreate::new(self) } - fn instance_view(&self) -> builder::InstanceView { builder::InstanceView::new(self) } - fn instance_delete(&self) -> builder::InstanceDelete { builder::InstanceDelete::new(self) } - fn instance_disk_list(&self) -> builder::InstanceDiskList { builder::InstanceDiskList::new(self) } - fn instance_disk_attach(&self) -> builder::InstanceDiskAttach { builder::InstanceDiskAttach::new(self) } - fn instance_disk_detach(&self) -> builder::InstanceDiskDetach { builder::InstanceDiskDetach::new(self) } - fn instance_external_ip_list(&self) -> builder::InstanceExternalIpList { builder::InstanceExternalIpList::new(self) } - fn instance_migrate(&self) -> builder::InstanceMigrate { builder::InstanceMigrate::new(self) } - fn instance_network_interface_list(&self) -> builder::InstanceNetworkInterfaceList { builder::InstanceNetworkInterfaceList::new(self) } - fn instance_network_interface_create(&self) -> builder::InstanceNetworkInterfaceCreate { builder::InstanceNetworkInterfaceCreate::new(self) } - fn instance_network_interface_view(&self) -> builder::InstanceNetworkInterfaceView { builder::InstanceNetworkInterfaceView::new(self) } - fn instance_network_interface_update(&self) -> builder::InstanceNetworkInterfaceUpdate { builder::InstanceNetworkInterfaceUpdate::new(self) } - fn instance_network_interface_delete(&self) -> builder::InstanceNetworkInterfaceDelete { builder::InstanceNetworkInterfaceDelete::new(self) } - fn instance_reboot(&self) -> builder::InstanceReboot { builder::InstanceReboot::new(self) } - fn instance_serial_console(&self) -> builder::InstanceSerialConsole { builder::InstanceSerialConsole::new(self) } - fn instance_serial_console_stream(&self) -> builder::InstanceSerialConsoleStream { builder::InstanceSerialConsoleStream::new(self) } - fn instance_start(&self) -> builder::InstanceStart { builder::InstanceStart::new(self) } - fn instance_stop(&self) -> builder::InstanceStop { builder::InstanceStop::new(self) } - fn instance_list_v1(&self) -> builder::InstanceListV1 { builder::InstanceListV1::new(self) } - fn instance_create_v1(&self) -> builder::InstanceCreateV1 { builder::InstanceCreateV1::new(self) } - fn instance_view_v1(&self) -> builder::InstanceViewV1 { builder::InstanceViewV1::new(self) } - fn instance_delete_v1(&self) -> builder::InstanceDeleteV1 { builder::InstanceDeleteV1::new(self) } - fn instance_disk_list_v1(&self) -> builder::InstanceDiskListV1 { builder::InstanceDiskListV1::new(self) } - fn instance_disk_attach_v1(&self) -> builder::InstanceDiskAttachV1 { builder::InstanceDiskAttachV1::new(self) } - fn instance_disk_detach_v1(&self) -> builder::InstanceDiskDetachV1 { builder::InstanceDiskDetachV1::new(self) } - fn instance_migrate_v1(&self) -> builder::InstanceMigrateV1 { builder::InstanceMigrateV1::new(self) } - fn instance_reboot_v1(&self) -> builder::InstanceRebootV1 { builder::InstanceRebootV1::new(self) } - fn instance_serial_console_v1(&self) -> builder::InstanceSerialConsoleV1 { builder::InstanceSerialConsoleV1::new(self) } - fn instance_serial_console_stream_v1(&self) -> builder::InstanceSerialConsoleStreamV1 { builder::InstanceSerialConsoleStreamV1::new(self) } - fn instance_start_v1(&self) -> builder::InstanceStartV1 { builder::InstanceStartV1::new(self) } - fn instance_stop_v1(&self) -> builder::InstanceStopV1 { builder::InstanceStopV1::new(self) } } - pub trait ClientLoginExt { ///Authenticate a user (i.e., log in) via username and password /// @@ -18341,21 +16845,17 @@ pub trait ClientLoginExt { /// ``` fn login_saml(&self) -> builder::LoginSaml; } - impl ClientLoginExt for Client { fn login_local(&self) -> builder::LoginLocal { builder::LoginLocal::new(self) } - fn login_saml_begin(&self) -> builder::LoginSamlBegin { builder::LoginSamlBegin::new(self) } - fn login_saml(&self) -> builder::LoginSaml { builder::LoginSaml::new(self) } } - pub trait ClientMetricsExt { ///List timeseries schema /// @@ -18374,13 +16874,11 @@ pub trait ClientMetricsExt { /// ``` fn timeseries_schema_get(&self) -> builder::TimeseriesSchemaGet; } - impl ClientMetricsExt for Client { fn timeseries_schema_get(&self) -> builder::TimeseriesSchemaGet { builder::TimeseriesSchemaGet::new(self) } } - pub trait ClientOrganizationsExt { ///Fetch an organization by id /// @@ -18594,69 +17092,53 @@ pub trait ClientOrganizationsExt { /// ``` fn organization_policy_update_v1(&self) -> builder::OrganizationPolicyUpdateV1; } - impl ClientOrganizationsExt for Client { fn organization_view_by_id(&self) -> builder::OrganizationViewById { builder::OrganizationViewById::new(self) } - fn organization_list(&self) -> builder::OrganizationList { builder::OrganizationList::new(self) } - fn organization_create(&self) -> builder::OrganizationCreate { builder::OrganizationCreate::new(self) } - fn organization_view(&self) -> builder::OrganizationView { builder::OrganizationView::new(self) } - fn organization_update(&self) -> builder::OrganizationUpdate { builder::OrganizationUpdate::new(self) } - fn organization_delete(&self) -> builder::OrganizationDelete { builder::OrganizationDelete::new(self) } - fn organization_policy_view(&self) -> builder::OrganizationPolicyView { builder::OrganizationPolicyView::new(self) } - fn organization_policy_update(&self) -> builder::OrganizationPolicyUpdate { builder::OrganizationPolicyUpdate::new(self) } - fn organization_list_v1(&self) -> builder::OrganizationListV1 { builder::OrganizationListV1::new(self) } - fn organization_create_v1(&self) -> builder::OrganizationCreateV1 { builder::OrganizationCreateV1::new(self) } - fn organization_view_v1(&self) -> builder::OrganizationViewV1 { builder::OrganizationViewV1::new(self) } - fn organization_update_v1(&self) -> builder::OrganizationUpdateV1 { builder::OrganizationUpdateV1::new(self) } - fn organization_delete_v1(&self) -> builder::OrganizationDeleteV1 { builder::OrganizationDeleteV1::new(self) } - fn organization_policy_view_v1(&self) -> builder::OrganizationPolicyViewV1 { builder::OrganizationPolicyViewV1::new(self) } - fn organization_policy_update_v1(&self) -> builder::OrganizationPolicyUpdateV1 { builder::OrganizationPolicyUpdateV1::new(self) } } - pub trait ClientPolicyExt { ///Fetch the top-level IAM policy /// @@ -18680,17 +17162,14 @@ pub trait ClientPolicyExt { /// ``` fn system_policy_update(&self) -> builder::SystemPolicyUpdate; } - impl ClientPolicyExt for Client { fn system_policy_view(&self) -> builder::SystemPolicyView { builder::SystemPolicyView::new(self) } - fn system_policy_update(&self) -> builder::SystemPolicyUpdate { builder::SystemPolicyUpdate::new(self) } } - pub trait ClientProjectsExt { ///Fetch a project by id /// @@ -18931,69 +17410,53 @@ pub trait ClientProjectsExt { /// ``` fn project_policy_update_v1(&self) -> builder::ProjectPolicyUpdateV1; } - impl ClientProjectsExt for Client { fn project_view_by_id(&self) -> builder::ProjectViewById { builder::ProjectViewById::new(self) } - fn project_list(&self) -> builder::ProjectList { builder::ProjectList::new(self) } - fn project_create(&self) -> builder::ProjectCreate { builder::ProjectCreate::new(self) } - fn project_view(&self) -> builder::ProjectView { builder::ProjectView::new(self) } - fn project_update(&self) -> builder::ProjectUpdate { builder::ProjectUpdate::new(self) } - fn project_delete(&self) -> builder::ProjectDelete { builder::ProjectDelete::new(self) } - fn project_policy_view(&self) -> builder::ProjectPolicyView { builder::ProjectPolicyView::new(self) } - fn project_policy_update(&self) -> builder::ProjectPolicyUpdate { builder::ProjectPolicyUpdate::new(self) } - fn project_list_v1(&self) -> builder::ProjectListV1 { builder::ProjectListV1::new(self) } - fn project_create_v1(&self) -> builder::ProjectCreateV1 { builder::ProjectCreateV1::new(self) } - fn project_view_v1(&self) -> builder::ProjectViewV1 { builder::ProjectViewV1::new(self) } - fn project_update_v1(&self) -> builder::ProjectUpdateV1 { builder::ProjectUpdateV1::new(self) } - fn project_delete_v1(&self) -> builder::ProjectDeleteV1 { builder::ProjectDeleteV1::new(self) } - fn project_policy_view_v1(&self) -> builder::ProjectPolicyViewV1 { builder::ProjectPolicyViewV1::new(self) } - fn project_policy_update_v1(&self) -> builder::ProjectPolicyUpdateV1 { builder::ProjectPolicyUpdateV1::new(self) } } - pub trait ClientRolesExt { ///List built-in roles /// @@ -19025,17 +17488,14 @@ pub trait ClientRolesExt { /// ``` fn role_view(&self) -> builder::RoleView; } - impl ClientRolesExt for Client { fn role_list(&self) -> builder::RoleList { builder::RoleList::new(self) } - fn role_view(&self) -> builder::RoleView { builder::RoleView::new(self) } } - pub trait ClientSessionExt { ///List SSH public keys /// @@ -19099,25 +17559,20 @@ pub trait ClientSessionExt { /// ``` fn session_sshkey_delete(&self) -> builder::SessionSshkeyDelete; } - impl ClientSessionExt for Client { fn session_sshkey_list(&self) -> builder::SessionSshkeyList { builder::SessionSshkeyList::new(self) } - fn session_sshkey_create(&self) -> builder::SessionSshkeyCreate { builder::SessionSshkeyCreate::new(self) } - fn session_sshkey_view(&self) -> builder::SessionSshkeyView { builder::SessionSshkeyView::new(self) } - fn session_sshkey_delete(&self) -> builder::SessionSshkeyDelete { builder::SessionSshkeyDelete::new(self) } } - pub trait ClientSilosExt { ///List groups /// @@ -19177,25 +17632,20 @@ pub trait ClientSilosExt { /// ``` fn user_list(&self) -> builder::UserList; } - impl ClientSilosExt for Client { fn group_list(&self) -> builder::GroupList { builder::GroupList::new(self) } - fn policy_view(&self) -> builder::PolicyView { builder::PolicyView::new(self) } - fn policy_update(&self) -> builder::PolicyUpdate { builder::PolicyUpdate::new(self) } - fn user_list(&self) -> builder::UserList { builder::UserList::new(self) } } - pub trait ClientSnapshotsExt { ///Fetch a snapshot by id /// @@ -19282,29 +17732,23 @@ pub trait ClientSnapshotsExt { /// ``` fn snapshot_delete(&self) -> builder::SnapshotDelete; } - impl ClientSnapshotsExt for Client { fn snapshot_view_by_id(&self) -> builder::SnapshotViewById { builder::SnapshotViewById::new(self) } - fn snapshot_list(&self) -> builder::SnapshotList { builder::SnapshotList::new(self) } - fn snapshot_create(&self) -> builder::SnapshotCreate { builder::SnapshotCreate::new(self) } - fn snapshot_view(&self) -> builder::SnapshotView { builder::SnapshotView::new(self) } - fn snapshot_delete(&self) -> builder::SnapshotDelete { builder::SnapshotDelete::new(self) } } - pub trait ClientSystemExt { ///Fetch a system-wide image by id /// @@ -20172,241 +18616,182 @@ pub trait ClientSystemExt { /// ``` fn system_version(&self) -> builder::SystemVersion; } - impl ClientSystemExt for Client { fn system_image_view_by_id(&self) -> builder::SystemImageViewById { builder::SystemImageViewById::new(self) } - fn ip_pool_view_by_id(&self) -> builder::IpPoolViewById { builder::IpPoolViewById::new(self) } - fn silo_view_by_id(&self) -> builder::SiloViewById { builder::SiloViewById::new(self) } - fn certificate_list(&self) -> builder::CertificateList { builder::CertificateList::new(self) } - fn certificate_create(&self) -> builder::CertificateCreate { builder::CertificateCreate::new(self) } - fn certificate_view(&self) -> builder::CertificateView { builder::CertificateView::new(self) } - fn certificate_delete(&self) -> builder::CertificateDelete { builder::CertificateDelete::new(self) } - fn physical_disk_list(&self) -> builder::PhysicalDiskList { builder::PhysicalDiskList::new(self) } - fn rack_list(&self) -> builder::RackList { builder::RackList::new(self) } - fn rack_view(&self) -> builder::RackView { builder::RackView::new(self) } - fn sled_list(&self) -> builder::SledList { builder::SledList::new(self) } - fn sled_view(&self) -> builder::SledView { builder::SledView::new(self) } - fn sled_physical_disk_list(&self) -> builder::SledPhysicalDiskList { builder::SledPhysicalDiskList::new(self) } - fn system_image_list(&self) -> builder::SystemImageList { builder::SystemImageList::new(self) } - fn system_image_create(&self) -> builder::SystemImageCreate { builder::SystemImageCreate::new(self) } - fn system_image_view(&self) -> builder::SystemImageView { builder::SystemImageView::new(self) } - fn system_image_delete(&self) -> builder::SystemImageDelete { builder::SystemImageDelete::new(self) } - fn ip_pool_list(&self) -> builder::IpPoolList { builder::IpPoolList::new(self) } - fn ip_pool_create(&self) -> builder::IpPoolCreate { builder::IpPoolCreate::new(self) } - fn ip_pool_view(&self) -> builder::IpPoolView { builder::IpPoolView::new(self) } - fn ip_pool_update(&self) -> builder::IpPoolUpdate { builder::IpPoolUpdate::new(self) } - fn ip_pool_delete(&self) -> builder::IpPoolDelete { builder::IpPoolDelete::new(self) } - fn ip_pool_range_list(&self) -> builder::IpPoolRangeList { builder::IpPoolRangeList::new(self) } - fn ip_pool_range_add(&self) -> builder::IpPoolRangeAdd { builder::IpPoolRangeAdd::new(self) } - fn ip_pool_range_remove(&self) -> builder::IpPoolRangeRemove { builder::IpPoolRangeRemove::new(self) } - fn ip_pool_service_view(&self) -> builder::IpPoolServiceView { builder::IpPoolServiceView::new(self) } - fn ip_pool_service_range_list(&self) -> builder::IpPoolServiceRangeList { builder::IpPoolServiceRangeList::new(self) } - fn ip_pool_service_range_add(&self) -> builder::IpPoolServiceRangeAdd { builder::IpPoolServiceRangeAdd::new(self) } - fn ip_pool_service_range_remove(&self) -> builder::IpPoolServiceRangeRemove { builder::IpPoolServiceRangeRemove::new(self) } - fn system_metric(&self) -> builder::SystemMetric { builder::SystemMetric::new(self) } - fn saga_list(&self) -> builder::SagaList { builder::SagaList::new(self) } - fn saga_view(&self) -> builder::SagaView { builder::SagaView::new(self) } - fn silo_list(&self) -> builder::SiloList { builder::SiloList::new(self) } - fn silo_create(&self) -> builder::SiloCreate { builder::SiloCreate::new(self) } - fn silo_view(&self) -> builder::SiloView { builder::SiloView::new(self) } - fn silo_delete(&self) -> builder::SiloDelete { builder::SiloDelete::new(self) } - fn silo_identity_provider_list(&self) -> builder::SiloIdentityProviderList { builder::SiloIdentityProviderList::new(self) } - fn local_idp_user_create(&self) -> builder::LocalIdpUserCreate { builder::LocalIdpUserCreate::new(self) } - fn local_idp_user_delete(&self) -> builder::LocalIdpUserDelete { builder::LocalIdpUserDelete::new(self) } - fn local_idp_user_set_password(&self) -> builder::LocalIdpUserSetPassword { builder::LocalIdpUserSetPassword::new(self) } - fn saml_identity_provider_create(&self) -> builder::SamlIdentityProviderCreate { builder::SamlIdentityProviderCreate::new(self) } - fn saml_identity_provider_view(&self) -> builder::SamlIdentityProviderView { builder::SamlIdentityProviderView::new(self) } - fn silo_policy_view(&self) -> builder::SiloPolicyView { builder::SiloPolicyView::new(self) } - fn silo_policy_update(&self) -> builder::SiloPolicyUpdate { builder::SiloPolicyUpdate::new(self) } - fn silo_users_list(&self) -> builder::SiloUsersList { builder::SiloUsersList::new(self) } - fn silo_user_view(&self) -> builder::SiloUserView { builder::SiloUserView::new(self) } - fn system_user_list(&self) -> builder::SystemUserList { builder::SystemUserList::new(self) } - fn system_user_view(&self) -> builder::SystemUserView { builder::SystemUserView::new(self) } - fn system_component_version_list(&self) -> builder::SystemComponentVersionList { builder::SystemComponentVersionList::new(self) } - fn update_deployments_list(&self) -> builder::UpdateDeploymentsList { builder::UpdateDeploymentsList::new(self) } - fn update_deployment_view(&self) -> builder::UpdateDeploymentView { builder::UpdateDeploymentView::new(self) } - fn system_update_refresh(&self) -> builder::SystemUpdateRefresh { builder::SystemUpdateRefresh::new(self) } - fn system_update_start(&self) -> builder::SystemUpdateStart { builder::SystemUpdateStart::new(self) } - fn system_update_stop(&self) -> builder::SystemUpdateStop { builder::SystemUpdateStop::new(self) } - fn system_update_list(&self) -> builder::SystemUpdateList { builder::SystemUpdateList::new(self) } - fn system_update_view(&self) -> builder::SystemUpdateView { builder::SystemUpdateView::new(self) } - fn system_update_components_list(&self) -> builder::SystemUpdateComponentsList { builder::SystemUpdateComponentsList::new(self) } - fn system_version(&self) -> builder::SystemVersion { builder::SystemVersion::new(self) } } - pub trait ClientVpcsExt { ///Fetch a route by id /// @@ -20880,117 +19265,89 @@ pub trait ClientVpcsExt { /// ``` fn vpc_subnet_list_network_interfaces(&self) -> builder::VpcSubnetListNetworkInterfaces; } - impl ClientVpcsExt for Client { fn vpc_router_route_view_by_id(&self) -> builder::VpcRouterRouteViewById { builder::VpcRouterRouteViewById::new(self) } - fn vpc_router_view_by_id(&self) -> builder::VpcRouterViewById { builder::VpcRouterViewById::new(self) } - fn vpc_subnet_view_by_id(&self) -> builder::VpcSubnetViewById { builder::VpcSubnetViewById::new(self) } - fn vpc_view_by_id(&self) -> builder::VpcViewById { builder::VpcViewById::new(self) } - fn vpc_list(&self) -> builder::VpcList { builder::VpcList::new(self) } - fn vpc_create(&self) -> builder::VpcCreate { builder::VpcCreate::new(self) } - fn vpc_view(&self) -> builder::VpcView { builder::VpcView::new(self) } - fn vpc_update(&self) -> builder::VpcUpdate { builder::VpcUpdate::new(self) } - fn vpc_delete(&self) -> builder::VpcDelete { builder::VpcDelete::new(self) } - fn vpc_firewall_rules_view(&self) -> builder::VpcFirewallRulesView { builder::VpcFirewallRulesView::new(self) } - fn vpc_firewall_rules_update(&self) -> builder::VpcFirewallRulesUpdate { builder::VpcFirewallRulesUpdate::new(self) } - fn vpc_router_list(&self) -> builder::VpcRouterList { builder::VpcRouterList::new(self) } - fn vpc_router_create(&self) -> builder::VpcRouterCreate { builder::VpcRouterCreate::new(self) } - fn vpc_router_view(&self) -> builder::VpcRouterView { builder::VpcRouterView::new(self) } - fn vpc_router_update(&self) -> builder::VpcRouterUpdate { builder::VpcRouterUpdate::new(self) } - fn vpc_router_delete(&self) -> builder::VpcRouterDelete { builder::VpcRouterDelete::new(self) } - fn vpc_router_route_list(&self) -> builder::VpcRouterRouteList { builder::VpcRouterRouteList::new(self) } - fn vpc_router_route_create(&self) -> builder::VpcRouterRouteCreate { builder::VpcRouterRouteCreate::new(self) } - fn vpc_router_route_view(&self) -> builder::VpcRouterRouteView { builder::VpcRouterRouteView::new(self) } - fn vpc_router_route_update(&self) -> builder::VpcRouterRouteUpdate { builder::VpcRouterRouteUpdate::new(self) } - fn vpc_router_route_delete(&self) -> builder::VpcRouterRouteDelete { builder::VpcRouterRouteDelete::new(self) } - fn vpc_subnet_list(&self) -> builder::VpcSubnetList { builder::VpcSubnetList::new(self) } - fn vpc_subnet_create(&self) -> builder::VpcSubnetCreate { builder::VpcSubnetCreate::new(self) } - fn vpc_subnet_view(&self) -> builder::VpcSubnetView { builder::VpcSubnetView::new(self) } - fn vpc_subnet_update(&self) -> builder::VpcSubnetUpdate { builder::VpcSubnetUpdate::new(self) } - fn vpc_subnet_delete(&self) -> builder::VpcSubnetDelete { builder::VpcSubnetDelete::new(self) } - fn vpc_subnet_list_network_interfaces(&self) -> builder::VpcSubnetListNetworkInterfaces { builder::VpcSubnetListNetworkInterfaces::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -21005,7 +19362,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> DiskViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21013,7 +19369,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21023,7 +19378,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/disks/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21048,7 +19402,6 @@ pub mod builder { } } } - ///Builder for [`ClientImagesExt::image_view_by_id`] /// ///[`ClientImagesExt::image_view_by_id`]: super::ClientImagesExt::image_view_by_id @@ -21057,7 +19410,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> ImageViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21065,7 +19417,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21075,7 +19426,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/images/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21100,7 +19450,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_view_by_id`] /// ///[`ClientInstancesExt::instance_view_by_id`]: super::ClientInstancesExt::instance_view_by_id @@ -21109,7 +19458,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> InstanceViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21117,7 +19465,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21127,7 +19474,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/instances/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21152,7 +19498,6 @@ pub mod builder { } } } - ///Builder for /// [`ClientInstancesExt::instance_network_interface_view_by_id`] /// @@ -21162,7 +19507,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> InstanceNetworkInterfaceViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21170,7 +19514,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21180,7 +19523,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/network-interfaces/{id}` pub async fn send( self, @@ -21207,7 +19549,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_view_by_id`] /// ///[`ClientOrganizationsExt::organization_view_by_id`]: super::ClientOrganizationsExt::organization_view_by_id @@ -21216,7 +19557,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> OrganizationViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21224,7 +19564,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21234,7 +19573,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/organizations/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21259,7 +19597,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_view_by_id`] /// ///[`ClientProjectsExt::project_view_by_id`]: super::ClientProjectsExt::project_view_by_id @@ -21268,7 +19605,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> ProjectViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21276,7 +19612,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21286,7 +19621,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/projects/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21311,7 +19645,6 @@ pub mod builder { } } } - ///Builder for [`ClientSnapshotsExt::snapshot_view_by_id`] /// ///[`ClientSnapshotsExt::snapshot_view_by_id`]: super::ClientSnapshotsExt::snapshot_view_by_id @@ -21320,7 +19653,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> SnapshotViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21328,7 +19660,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21338,7 +19669,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/snapshots/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21363,7 +19693,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_route_view_by_id`] /// ///[`ClientVpcsExt::vpc_router_route_view_by_id`]: super::ClientVpcsExt::vpc_router_route_view_by_id @@ -21372,7 +19701,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> VpcRouterRouteViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21380,7 +19708,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21390,7 +19717,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/vpc-router-routes/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21415,7 +19741,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_view_by_id`] /// ///[`ClientVpcsExt::vpc_router_view_by_id`]: super::ClientVpcsExt::vpc_router_view_by_id @@ -21424,7 +19749,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> VpcRouterViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21432,7 +19756,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21442,7 +19765,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/vpc-routers/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21467,7 +19789,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_subnet_view_by_id`] /// ///[`ClientVpcsExt::vpc_subnet_view_by_id`]: super::ClientVpcsExt::vpc_subnet_view_by_id @@ -21476,7 +19797,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> VpcSubnetViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21484,7 +19804,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21494,7 +19813,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/vpc-subnets/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21519,7 +19837,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_view_by_id`] /// ///[`ClientVpcsExt::vpc_view_by_id`]: super::ClientVpcsExt::vpc_view_by_id @@ -21528,7 +19845,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> VpcViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21536,7 +19852,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21546,7 +19861,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/vpcs/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21571,7 +19885,6 @@ pub mod builder { } } } - ///Builder for [`ClientHiddenExt::device_auth_request`] /// ///[`ClientHiddenExt::device_auth_request`]: super::ClientHiddenExt::device_auth_request @@ -21580,7 +19893,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> DeviceAuthRequest<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21588,7 +19900,6 @@ pub mod builder { body: Ok(types::builder::DeviceAuthRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21599,7 +19910,6 @@ pub mod builder { .map_err(|_| "conversion to `DeviceAuthRequest` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -21609,7 +19919,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/device/auth` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -21626,7 +19935,6 @@ pub mod builder { } } } - ///Builder for [`ClientHiddenExt::device_auth_confirm`] /// ///[`ClientHiddenExt::device_auth_confirm`]: super::ClientHiddenExt::device_auth_confirm @@ -21635,7 +19943,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> DeviceAuthConfirm<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21643,7 +19950,6 @@ pub mod builder { body: Ok(types::builder::DeviceAuthVerify::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21654,7 +19960,6 @@ pub mod builder { .map_err(|_| "conversion to `DeviceAuthVerify` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -21664,7 +19969,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/device/confirm` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -21687,7 +19991,6 @@ pub mod builder { } } } - ///Builder for [`ClientHiddenExt::device_access_token`] /// ///[`ClientHiddenExt::device_access_token`]: super::ClientHiddenExt::device_access_token @@ -21696,7 +19999,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> DeviceAccessToken<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21704,7 +20006,6 @@ pub mod builder { body: Ok(types::builder::DeviceAccessTokenRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21714,7 +20015,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -21724,7 +20024,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/device/token` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -21741,7 +20040,6 @@ pub mod builder { } } } - ///Builder for [`ClientSilosExt::group_list`] /// ///[`ClientSilosExt::group_list`]: super::ClientSilosExt::group_list @@ -21752,7 +20050,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> GroupList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21762,7 +20059,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21772,7 +20068,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21783,7 +20078,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21794,7 +20088,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/groups` pub async fn send( self, @@ -21833,7 +20126,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/groups` pub fn stream( self, @@ -21881,7 +20173,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientHiddenExt::login_spoof`] /// ///[`ClientHiddenExt::login_spoof`]: super::ClientHiddenExt::login_spoof @@ -21890,7 +20181,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> LoginSpoof<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21898,7 +20188,6 @@ pub mod builder { body: Ok(types::builder::SpoofLoginBody::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21909,7 +20198,6 @@ pub mod builder { .map_err(|_| "conversion to `SpoofLoginBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SpoofLoginBody) -> types::builder::SpoofLoginBody, @@ -21917,7 +20205,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/login` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -21940,7 +20227,6 @@ pub mod builder { } } } - ///Builder for [`ClientLoginExt::login_local`] /// ///[`ClientLoginExt::login_local`]: super::ClientLoginExt::login_local @@ -21950,7 +20236,6 @@ pub mod builder { silo_name: Result, body: Result, } - impl<'a> LoginLocal<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21959,7 +20244,6 @@ pub mod builder { body: Ok(types::builder::UsernamePasswordCredentials::default()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21969,7 +20253,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21979,7 +20262,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -21989,7 +20271,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/login/{silo_name}/local` pub async fn send(self) -> Result, Error> { let Self { @@ -22021,7 +20302,6 @@ pub mod builder { } } } - ///Builder for [`ClientLoginExt::login_saml_begin`] /// ///[`ClientLoginExt::login_saml_begin`]: super::ClientLoginExt::login_saml_begin @@ -22031,7 +20311,6 @@ pub mod builder { silo_name: Result, provider_name: Result, } - impl<'a> LoginSamlBegin<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22040,7 +20319,6 @@ pub mod builder { provider_name: Err("provider_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22050,7 +20328,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn provider_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22060,7 +20337,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for provider_name failed".to_string()); self } - ///Sends a `GET` request to `/login/{silo_name}/saml/{provider_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -22091,7 +20367,6 @@ pub mod builder { } } } - ///Builder for [`ClientLoginExt::login_saml`] /// ///[`ClientLoginExt::login_saml`]: super::ClientLoginExt::login_saml @@ -22102,7 +20377,6 @@ pub mod builder { provider_name: Result, body: Result, } - impl<'a> LoginSaml<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22112,7 +20386,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22122,7 +20395,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn provider_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22132,7 +20404,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for provider_name failed".to_string()); self } - pub fn body(mut self, value: B) -> Self where B: std::convert::TryInto, @@ -22142,7 +20413,6 @@ pub mod builder { .map_err(|_| "conversion to `reqwest::Body` for body failed".to_string()); self } - ///Sends a `POST` request to `/login/{silo_name}/saml/{provider_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -22183,7 +20453,6 @@ pub mod builder { } } } - ///Builder for [`ClientHiddenExt::logout`] /// ///[`ClientHiddenExt::logout`]: super::ClientHiddenExt::logout @@ -22191,12 +20460,10 @@ pub mod builder { pub struct Logout<'a> { client: &'a super::Client, } - impl<'a> Logout<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/logout` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -22216,7 +20483,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_list`] /// ///[`ClientOrganizationsExt::organization_list`]: super::ClientOrganizationsExt::organization_list @@ -22227,7 +20493,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> OrganizationList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22237,7 +20502,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22247,7 +20511,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22258,7 +20521,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22269,7 +20531,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/organizations` pub async fn send( self, @@ -22308,7 +20569,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/organizations` pub fn stream( self, @@ -22356,7 +20616,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientOrganizationsExt::organization_create`] /// ///[`ClientOrganizationsExt::organization_create`]: super::ClientOrganizationsExt::organization_create @@ -22365,7 +20624,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> OrganizationCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22373,7 +20631,6 @@ pub mod builder { body: Ok(types::builder::OrganizationCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22384,7 +20641,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -22394,7 +20650,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/organizations` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -22417,7 +20672,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_view`] /// ///[`ClientOrganizationsExt::organization_view`]: super::ClientOrganizationsExt::organization_view @@ -22426,7 +20680,6 @@ pub mod builder { client: &'a super::Client, organization_name: Result, } - impl<'a> OrganizationView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22434,7 +20687,6 @@ pub mod builder { organization_name: Err("organization_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22444,7 +20696,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - ///Sends a `GET` request to `/organizations/{organization_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -22472,7 +20723,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_update`] /// ///[`ClientOrganizationsExt::organization_update`]: super::ClientOrganizationsExt::organization_update @@ -22482,7 +20732,6 @@ pub mod builder { organization_name: Result, body: Result, } - impl<'a> OrganizationUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22491,7 +20740,6 @@ pub mod builder { body: Ok(types::builder::OrganizationUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22501,7 +20749,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22512,7 +20759,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -22522,7 +20768,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/organizations/{organization_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -22554,7 +20799,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_delete`] /// ///[`ClientOrganizationsExt::organization_delete`]: super::ClientOrganizationsExt::organization_delete @@ -22563,7 +20807,6 @@ pub mod builder { client: &'a super::Client, organization_name: Result, } - impl<'a> OrganizationDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22571,7 +20814,6 @@ pub mod builder { organization_name: Err("organization_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22581,7 +20823,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - ///Sends a `DELETE` request to `/organizations/{organization_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -22609,7 +20850,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_policy_view`] /// ///[`ClientOrganizationsExt::organization_policy_view`]: super::ClientOrganizationsExt::organization_policy_view @@ -22618,7 +20858,6 @@ pub mod builder { client: &'a super::Client, organization_name: Result, } - impl<'a> OrganizationPolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22626,7 +20865,6 @@ pub mod builder { organization_name: Err("organization_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22636,7 +20874,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - ///Sends a `GET` request to `/organizations/{organization_name}/policy` pub async fn send( self, @@ -22666,7 +20903,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_policy_update`] /// ///[`ClientOrganizationsExt::organization_policy_update`]: super::ClientOrganizationsExt::organization_policy_update @@ -22676,7 +20912,6 @@ pub mod builder { organization_name: Result, body: Result, } - impl<'a> OrganizationPolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22685,7 +20920,6 @@ pub mod builder { body: Ok(types::builder::OrganizationRolePolicy::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22695,7 +20929,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22706,7 +20939,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -22716,7 +20948,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/organizations/{organization_name}/policy` pub async fn send( self, @@ -22750,7 +20981,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_list`] /// ///[`ClientProjectsExt::project_list`]: super::ClientProjectsExt::project_list @@ -22762,7 +20992,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> ProjectList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22773,7 +21002,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22783,7 +21011,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22793,7 +21020,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22804,7 +21030,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22815,7 +21040,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects` pub async fn send( @@ -22861,7 +21085,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects` pub fn stream( @@ -22910,7 +21133,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientProjectsExt::project_create`] /// ///[`ClientProjectsExt::project_create`]: super::ClientProjectsExt::project_create @@ -22920,7 +21142,6 @@ pub mod builder { organization_name: Result, body: Result, } - impl<'a> ProjectCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22929,7 +21150,6 @@ pub mod builder { body: Ok(types::builder::ProjectCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22939,7 +21159,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22950,7 +21169,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ProjectCreate) -> types::builder::ProjectCreate, @@ -22958,7 +21176,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects` pub async fn send(self) -> Result, Error> { @@ -22991,7 +21208,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_view`] /// ///[`ClientProjectsExt::project_view`]: super::ClientProjectsExt::project_view @@ -23001,7 +21217,6 @@ pub mod builder { organization_name: Result, project_name: Result, } - impl<'a> ProjectView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23010,7 +21225,6 @@ pub mod builder { project_name: Err("project_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23020,7 +21234,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23030,7 +21243,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}` pub async fn send(self) -> Result, Error> { @@ -23062,7 +21274,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_update`] /// ///[`ClientProjectsExt::project_update`]: super::ClientProjectsExt::project_update @@ -23073,7 +21284,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> ProjectUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23083,7 +21293,6 @@ pub mod builder { body: Ok(types::builder::ProjectUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23093,7 +21302,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23103,7 +21311,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23114,7 +21321,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ProjectUpdate) -> types::builder::ProjectUpdate, @@ -23122,7 +21328,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}` pub async fn send(self) -> Result, Error> { @@ -23158,7 +21363,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_delete`] /// ///[`ClientProjectsExt::project_delete`]: super::ClientProjectsExt::project_delete @@ -23168,7 +21372,6 @@ pub mod builder { organization_name: Result, project_name: Result, } - impl<'a> ProjectDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23177,7 +21380,6 @@ pub mod builder { project_name: Err("project_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23187,7 +21389,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23197,7 +21398,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}` pub async fn send(self) -> Result, Error> { @@ -23229,7 +21429,6 @@ pub mod builder { } } } - ///Builder for [`ClientDisksExt::disk_list`] /// ///[`ClientDisksExt::disk_list`]: super::ClientDisksExt::disk_list @@ -23242,7 +21441,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> DiskList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23254,7 +21452,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23264,7 +21461,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23274,7 +21470,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23284,7 +21479,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23295,7 +21489,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23306,7 +21499,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/disks` pub async fn send( @@ -23355,7 +21547,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/disks` pub fn stream( @@ -23404,7 +21595,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientDisksExt::disk_create`] /// ///[`ClientDisksExt::disk_create`]: super::ClientDisksExt::disk_create @@ -23415,7 +21605,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> DiskCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23425,7 +21614,6 @@ pub mod builder { body: Ok(types::builder::DiskCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23435,7 +21623,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23445,7 +21632,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23456,7 +21642,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskCreate) -> types::builder::DiskCreate, @@ -23464,7 +21649,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/disks` pub async fn send(self) -> Result, Error> { @@ -23500,7 +21684,6 @@ pub mod builder { } } } - ///Builder for [`ClientDisksExt::disk_view`] /// ///[`ClientDisksExt::disk_view`]: super::ClientDisksExt::disk_view @@ -23511,7 +21694,6 @@ pub mod builder { project_name: Result, disk_name: Result, } - impl<'a> DiskView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23521,7 +21703,6 @@ pub mod builder { disk_name: Err("disk_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23531,7 +21712,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23541,7 +21721,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn disk_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23551,7 +21730,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for disk_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/disks/ /// {disk_name}` @@ -23587,7 +21765,6 @@ pub mod builder { } } } - ///Builder for [`ClientDisksExt::disk_delete`] /// ///[`ClientDisksExt::disk_delete`]: super::ClientDisksExt::disk_delete @@ -23598,7 +21775,6 @@ pub mod builder { project_name: Result, disk_name: Result, } - impl<'a> DiskDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23608,7 +21784,6 @@ pub mod builder { disk_name: Err("disk_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23618,7 +21793,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23628,7 +21802,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn disk_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23638,7 +21811,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for disk_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/disks/ /// {disk_name}` @@ -23674,7 +21846,6 @@ pub mod builder { } } } - ///Builder for [`ClientDisksExt::disk_metrics_list`] /// ///[`ClientDisksExt::disk_metrics_list`]: super::ClientDisksExt::disk_metrics_list @@ -23690,7 +21861,6 @@ pub mod builder { page_token: Result, String>, start_time: Result>, String>, } - impl<'a> DiskMetricsList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23705,7 +21875,6 @@ pub mod builder { start_time: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23715,7 +21884,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23725,7 +21893,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn disk_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23735,7 +21902,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for disk_name failed".to_string()); self } - pub fn metric_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23745,7 +21911,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskMetricName` for metric_name failed".to_string()); self } - pub fn end_time(mut self, value: V) -> Self where V: std::convert::TryInto>, @@ -23753,7 +21918,6 @@ pub mod builder { self . end_time = value . try_into () . map (Some) . map_err (| _ | "conversion to `chrono :: DateTime < chrono :: offset :: Utc >` for end_time failed" . to_string ()) ; self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23763,7 +21927,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23774,7 +21937,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn start_time(mut self, value: V) -> Self where V: std::convert::TryInto>, @@ -23782,7 +21944,6 @@ pub mod builder { self . start_time = value . try_into () . map (Some) . map_err (| _ | "conversion to `chrono :: DateTime < chrono :: offset :: Utc >` for start_time failed" . to_string ()) ; self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/disks/ /// {disk_name}/metrics/{metric_name}` @@ -23843,7 +22004,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/disks/ /// {disk_name}/metrics/{metric_name}` @@ -23894,7 +22054,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientImagesExt::image_list`] /// ///[`ClientImagesExt::image_list`]: super::ClientImagesExt::image_list @@ -23907,7 +22066,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> ImageList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23919,7 +22077,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23929,7 +22086,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23939,7 +22095,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23949,7 +22104,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23960,7 +22114,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23971,7 +22124,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/images` pub async fn send( @@ -24020,7 +22172,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/images` pub fn stream( @@ -24069,7 +22220,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientImagesExt::image_create`] /// ///[`ClientImagesExt::image_create`]: super::ClientImagesExt::image_create @@ -24080,7 +22230,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> ImageCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24090,7 +22239,6 @@ pub mod builder { body: Ok(types::builder::ImageCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24100,7 +22248,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24110,7 +22257,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24121,7 +22267,6 @@ pub mod builder { .map_err(|_| "conversion to `ImageCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ImageCreate) -> types::builder::ImageCreate, @@ -24129,7 +22274,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/images` pub async fn send(self) -> Result, Error> { @@ -24165,7 +22309,6 @@ pub mod builder { } } } - ///Builder for [`ClientImagesExt::image_view`] /// ///[`ClientImagesExt::image_view`]: super::ClientImagesExt::image_view @@ -24176,7 +22319,6 @@ pub mod builder { project_name: Result, image_name: Result, } - impl<'a> ImageView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24186,7 +22328,6 @@ pub mod builder { image_name: Err("image_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24196,7 +22337,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24206,7 +22346,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn image_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24216,7 +22355,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for image_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/images/ /// {image_name}` @@ -24252,7 +22390,6 @@ pub mod builder { } } } - ///Builder for [`ClientImagesExt::image_delete`] /// ///[`ClientImagesExt::image_delete`]: super::ClientImagesExt::image_delete @@ -24263,7 +22400,6 @@ pub mod builder { project_name: Result, image_name: Result, } - impl<'a> ImageDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24273,7 +22409,6 @@ pub mod builder { image_name: Err("image_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24283,7 +22418,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24293,7 +22427,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn image_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24303,7 +22436,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for image_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/images/ /// {image_name}` @@ -24339,7 +22471,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_list`] /// ///[`ClientInstancesExt::instance_list`]: super::ClientInstancesExt::instance_list @@ -24352,7 +22483,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24364,7 +22494,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24374,7 +22503,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24384,7 +22512,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24394,7 +22521,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24405,7 +22531,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24416,7 +22541,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances` @@ -24466,7 +22590,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances` @@ -24516,7 +22639,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientInstancesExt::instance_create`] /// ///[`ClientInstancesExt::instance_create`]: super::ClientInstancesExt::instance_create @@ -24527,7 +22649,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> InstanceCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24537,7 +22658,6 @@ pub mod builder { body: Ok(types::builder::InstanceCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24547,7 +22667,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24557,7 +22676,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24568,7 +22686,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::InstanceCreate) -> types::builder::InstanceCreate, @@ -24576,7 +22693,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances` @@ -24613,7 +22729,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_view`] /// ///[`ClientInstancesExt::instance_view`]: super::ClientInstancesExt::instance_view @@ -24624,7 +22739,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24634,7 +22748,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24644,7 +22757,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24654,7 +22766,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24664,7 +22775,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}` @@ -24700,7 +22810,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_delete`] /// ///[`ClientInstancesExt::instance_delete`]: super::ClientInstancesExt::instance_delete @@ -24711,7 +22820,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24721,7 +22829,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24731,7 +22838,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24741,7 +22847,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24751,7 +22856,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}` @@ -24787,7 +22891,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_disk_list`] /// ///[`ClientInstancesExt::instance_disk_list`]: super::ClientInstancesExt::instance_disk_list @@ -24801,7 +22904,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceDiskList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24814,7 +22916,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24824,7 +22925,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24834,7 +22934,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24844,7 +22943,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24854,7 +22952,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24865,7 +22962,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24876,7 +22972,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/disks` @@ -24929,7 +23024,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/disks` @@ -24979,7 +23073,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientInstancesExt::instance_disk_attach`] /// ///[`ClientInstancesExt::instance_disk_attach`]: super::ClientInstancesExt::instance_disk_attach @@ -24991,7 +23084,6 @@ pub mod builder { instance_name: Result, body: Result, } - impl<'a> InstanceDiskAttach<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25002,7 +23094,6 @@ pub mod builder { body: Ok(types::builder::DiskIdentifier::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25012,7 +23103,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25022,7 +23112,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25032,7 +23121,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25043,7 +23131,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskIdentifier` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskIdentifier) -> types::builder::DiskIdentifier, @@ -25051,7 +23138,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/disks/attach` @@ -25091,7 +23177,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_disk_detach`] /// ///[`ClientInstancesExt::instance_disk_detach`]: super::ClientInstancesExt::instance_disk_detach @@ -25103,7 +23188,6 @@ pub mod builder { instance_name: Result, body: Result, } - impl<'a> InstanceDiskDetach<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25114,7 +23198,6 @@ pub mod builder { body: Ok(types::builder::DiskIdentifier::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25124,7 +23207,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25134,7 +23216,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25144,7 +23225,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25155,7 +23235,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskIdentifier` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskIdentifier) -> types::builder::DiskIdentifier, @@ -25163,7 +23242,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/disks/detach` @@ -25203,7 +23281,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_external_ip_list`] /// ///[`ClientInstancesExt::instance_external_ip_list`]: super::ClientInstancesExt::instance_external_ip_list @@ -25214,7 +23291,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceExternalIpList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25224,7 +23300,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25234,7 +23309,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25244,7 +23318,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25254,7 +23327,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/external-ips` @@ -25292,7 +23364,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_migrate`] /// ///[`ClientInstancesExt::instance_migrate`]: super::ClientInstancesExt::instance_migrate @@ -25304,7 +23375,6 @@ pub mod builder { instance_name: Result, body: Result, } - impl<'a> InstanceMigrate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25315,7 +23385,6 @@ pub mod builder { body: Ok(types::builder::InstanceMigrate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25325,7 +23394,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25335,7 +23403,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25345,7 +23412,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25356,7 +23422,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceMigrate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::InstanceMigrate) -> types::builder::InstanceMigrate, @@ -25364,7 +23429,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/migrate` @@ -25404,7 +23468,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_network_interface_list`] /// ///[`ClientInstancesExt::instance_network_interface_list`]: super::ClientInstancesExt::instance_network_interface_list @@ -25418,7 +23481,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceNetworkInterfaceList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25431,7 +23493,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25441,7 +23502,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25451,7 +23511,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25461,7 +23520,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25471,7 +23529,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25482,7 +23539,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25493,7 +23549,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces` @@ -25547,7 +23602,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces` @@ -25597,7 +23651,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientInstancesExt::instance_network_interface_create`] /// ///[`ClientInstancesExt::instance_network_interface_create`]: super::ClientInstancesExt::instance_network_interface_create @@ -25609,7 +23662,6 @@ pub mod builder { instance_name: Result, body: Result, } - impl<'a> InstanceNetworkInterfaceCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25620,7 +23672,6 @@ pub mod builder { body: Ok(types::builder::NetworkInterfaceCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25630,7 +23681,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25640,7 +23690,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25650,7 +23699,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25661,7 +23709,6 @@ pub mod builder { .map_err(|_| "conversion to `NetworkInterfaceCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -25671,7 +23718,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces` @@ -25713,7 +23759,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_network_interface_view`] /// ///[`ClientInstancesExt::instance_network_interface_view`]: super::ClientInstancesExt::instance_network_interface_view @@ -25725,7 +23770,6 @@ pub mod builder { instance_name: Result, interface_name: Result, } - impl<'a> InstanceNetworkInterfaceView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25736,7 +23780,6 @@ pub mod builder { interface_name: Err("interface_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25746,7 +23789,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25756,7 +23798,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25766,7 +23807,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn interface_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25776,7 +23816,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for interface_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces/{interface_name}` @@ -25817,7 +23856,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_network_interface_update`] /// ///[`ClientInstancesExt::instance_network_interface_update`]: super::ClientInstancesExt::instance_network_interface_update @@ -25830,7 +23868,6 @@ pub mod builder { interface_name: Result, body: Result, } - impl<'a> InstanceNetworkInterfaceUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25842,7 +23879,6 @@ pub mod builder { body: Ok(types::builder::NetworkInterfaceUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25852,7 +23888,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25862,7 +23897,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25872,7 +23906,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn interface_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25882,7 +23915,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for interface_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25893,7 +23925,6 @@ pub mod builder { .map_err(|_| "conversion to `NetworkInterfaceUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -25903,7 +23934,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces/{interface_name}` @@ -25948,7 +23978,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_network_interface_delete`] /// ///[`ClientInstancesExt::instance_network_interface_delete`]: super::ClientInstancesExt::instance_network_interface_delete @@ -25960,7 +23989,6 @@ pub mod builder { instance_name: Result, interface_name: Result, } - impl<'a> InstanceNetworkInterfaceDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25971,7 +23999,6 @@ pub mod builder { interface_name: Err("interface_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25981,7 +24008,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25991,7 +24017,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26001,7 +24026,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn interface_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26011,7 +24035,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for interface_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces/{interface_name}` @@ -26050,7 +24073,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_reboot`] /// ///[`ClientInstancesExt::instance_reboot`]: super::ClientInstancesExt::instance_reboot @@ -26061,7 +24083,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceReboot<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26071,7 +24092,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26081,7 +24101,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26091,7 +24110,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26101,7 +24119,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/reboot` @@ -26137,7 +24154,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_serial_console`] /// ///[`ClientInstancesExt::instance_serial_console`]: super::ClientInstancesExt::instance_serial_console @@ -26151,7 +24167,6 @@ pub mod builder { max_bytes: Result, String>, most_recent: Result, String>, } - impl<'a> InstanceSerialConsole<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26164,7 +24179,6 @@ pub mod builder { most_recent: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26174,7 +24188,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26184,7 +24197,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26194,7 +24206,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn from_start(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26205,7 +24216,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for from_start failed".to_string()); self } - pub fn max_bytes(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26216,7 +24226,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for max_bytes failed".to_string()); self } - pub fn most_recent(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26227,7 +24236,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for most_recent failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/serial-console` @@ -26281,7 +24289,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_serial_console_stream`] /// ///[`ClientInstancesExt::instance_serial_console_stream`]: super::ClientInstancesExt::instance_serial_console_stream @@ -26292,7 +24299,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceSerialConsoleStream<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26302,7 +24308,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26312,7 +24317,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26322,7 +24326,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26332,7 +24335,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/serial-console/stream` @@ -26378,7 +24380,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_start`] /// ///[`ClientInstancesExt::instance_start`]: super::ClientInstancesExt::instance_start @@ -26389,7 +24390,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceStart<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26399,7 +24399,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26409,7 +24408,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26419,7 +24417,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26429,7 +24426,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/start` @@ -26465,7 +24461,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_stop`] /// ///[`ClientInstancesExt::instance_stop`]: super::ClientInstancesExt::instance_stop @@ -26476,7 +24471,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceStop<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26486,7 +24480,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26496,7 +24489,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26506,7 +24498,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26516,7 +24507,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/stop` @@ -26552,7 +24542,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_policy_view`] /// ///[`ClientProjectsExt::project_policy_view`]: super::ClientProjectsExt::project_policy_view @@ -26562,7 +24551,6 @@ pub mod builder { organization_name: Result, project_name: Result, } - impl<'a> ProjectPolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26571,7 +24559,6 @@ pub mod builder { project_name: Err("project_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26581,7 +24568,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26591,7 +24577,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/policy` pub async fn send( @@ -26625,7 +24610,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_policy_update`] /// ///[`ClientProjectsExt::project_policy_update`]: super::ClientProjectsExt::project_policy_update @@ -26636,7 +24620,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> ProjectPolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26646,7 +24629,6 @@ pub mod builder { body: Ok(types::builder::ProjectRolePolicy::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26656,7 +24638,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26666,7 +24647,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26677,7 +24657,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -26687,7 +24666,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/policy` pub async fn send( @@ -26725,7 +24703,6 @@ pub mod builder { } } } - ///Builder for [`ClientSnapshotsExt::snapshot_list`] /// ///[`ClientSnapshotsExt::snapshot_list`]: super::ClientSnapshotsExt::snapshot_list @@ -26738,7 +24715,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SnapshotList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26750,7 +24726,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26760,7 +24735,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26770,7 +24744,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26780,7 +24753,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26791,7 +24763,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26802,7 +24773,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots` @@ -26852,7 +24822,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots` @@ -26902,7 +24871,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSnapshotsExt::snapshot_create`] /// ///[`ClientSnapshotsExt::snapshot_create`]: super::ClientSnapshotsExt::snapshot_create @@ -26913,7 +24881,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> SnapshotCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26923,7 +24890,6 @@ pub mod builder { body: Ok(types::builder::SnapshotCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26933,7 +24899,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26943,7 +24908,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26954,7 +24918,6 @@ pub mod builder { .map_err(|_| "conversion to `SnapshotCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SnapshotCreate) -> types::builder::SnapshotCreate, @@ -26962,7 +24925,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots` @@ -26999,7 +24961,6 @@ pub mod builder { } } } - ///Builder for [`ClientSnapshotsExt::snapshot_view`] /// ///[`ClientSnapshotsExt::snapshot_view`]: super::ClientSnapshotsExt::snapshot_view @@ -27010,7 +24971,6 @@ pub mod builder { project_name: Result, snapshot_name: Result, } - impl<'a> SnapshotView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27020,7 +24980,6 @@ pub mod builder { snapshot_name: Err("snapshot_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27030,7 +24989,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27040,7 +24998,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn snapshot_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27050,7 +25007,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for snapshot_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots/{snapshot_name}` @@ -27086,7 +25042,6 @@ pub mod builder { } } } - ///Builder for [`ClientSnapshotsExt::snapshot_delete`] /// ///[`ClientSnapshotsExt::snapshot_delete`]: super::ClientSnapshotsExt::snapshot_delete @@ -27097,7 +25052,6 @@ pub mod builder { project_name: Result, snapshot_name: Result, } - impl<'a> SnapshotDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27107,7 +25061,6 @@ pub mod builder { snapshot_name: Err("snapshot_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27117,7 +25070,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27127,7 +25079,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn snapshot_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27137,7 +25088,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for snapshot_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots/{snapshot_name}` @@ -27173,7 +25123,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_list`] /// ///[`ClientVpcsExt::vpc_list`]: super::ClientVpcsExt::vpc_list @@ -27186,7 +25135,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27198,7 +25146,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27208,7 +25155,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27218,7 +25164,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27228,7 +25173,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27239,7 +25183,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27250,7 +25193,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs` pub async fn send( @@ -27299,7 +25241,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs` pub fn stream( @@ -27348,7 +25289,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientVpcsExt::vpc_create`] /// ///[`ClientVpcsExt::vpc_create`]: super::ClientVpcsExt::vpc_create @@ -27359,7 +25299,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> VpcCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27369,7 +25308,6 @@ pub mod builder { body: Ok(types::builder::VpcCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27379,7 +25317,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27389,7 +25326,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27400,7 +25336,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcCreate) -> types::builder::VpcCreate, @@ -27408,7 +25343,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs` pub async fn send(self) -> Result, Error> { @@ -27444,7 +25378,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_view`] /// ///[`ClientVpcsExt::vpc_view`]: super::ClientVpcsExt::vpc_view @@ -27455,7 +25388,6 @@ pub mod builder { project_name: Result, vpc_name: Result, } - impl<'a> VpcView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27465,7 +25397,6 @@ pub mod builder { vpc_name: Err("vpc_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27475,7 +25406,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27485,7 +25415,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27495,7 +25424,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}` @@ -27531,7 +25459,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_update`] /// ///[`ClientVpcsExt::vpc_update`]: super::ClientVpcsExt::vpc_update @@ -27543,7 +25470,6 @@ pub mod builder { vpc_name: Result, body: Result, } - impl<'a> VpcUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27554,7 +25480,6 @@ pub mod builder { body: Ok(types::builder::VpcUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27564,7 +25489,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27574,7 +25498,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27584,7 +25507,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27595,7 +25517,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcUpdate) -> types::builder::VpcUpdate, @@ -27603,7 +25524,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}` @@ -27643,7 +25563,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_delete`] /// ///[`ClientVpcsExt::vpc_delete`]: super::ClientVpcsExt::vpc_delete @@ -27654,7 +25573,6 @@ pub mod builder { project_name: Result, vpc_name: Result, } - impl<'a> VpcDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27664,7 +25582,6 @@ pub mod builder { vpc_name: Err("vpc_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27674,7 +25591,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27684,7 +25600,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27694,7 +25609,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}` @@ -27730,7 +25644,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_firewall_rules_view`] /// ///[`ClientVpcsExt::vpc_firewall_rules_view`]: super::ClientVpcsExt::vpc_firewall_rules_view @@ -27741,7 +25654,6 @@ pub mod builder { project_name: Result, vpc_name: Result, } - impl<'a> VpcFirewallRulesView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27751,7 +25663,6 @@ pub mod builder { vpc_name: Err("vpc_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27761,7 +25672,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27771,7 +25681,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27781,7 +25690,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/firewall/rules` @@ -27819,7 +25727,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_firewall_rules_update`] /// ///[`ClientVpcsExt::vpc_firewall_rules_update`]: super::ClientVpcsExt::vpc_firewall_rules_update @@ -27831,7 +25738,6 @@ pub mod builder { vpc_name: Result, body: Result, } - impl<'a> VpcFirewallRulesUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27842,7 +25748,6 @@ pub mod builder { body: Ok(types::builder::VpcFirewallRuleUpdateParams::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27852,7 +25757,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27862,7 +25766,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27872,7 +25775,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27882,7 +25784,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -27892,7 +25793,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/firewall/rules` @@ -27934,7 +25834,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_list`] /// ///[`ClientVpcsExt::vpc_router_list`]: super::ClientVpcsExt::vpc_router_list @@ -27948,7 +25847,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcRouterList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27961,7 +25859,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27971,7 +25868,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27981,7 +25877,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27991,7 +25886,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28001,7 +25895,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28012,7 +25905,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28023,7 +25915,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers` @@ -28076,7 +25967,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers` @@ -28126,7 +26016,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientVpcsExt::vpc_router_create`] /// ///[`ClientVpcsExt::vpc_router_create`]: super::ClientVpcsExt::vpc_router_create @@ -28138,7 +26027,6 @@ pub mod builder { vpc_name: Result, body: Result, } - impl<'a> VpcRouterCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28149,7 +26037,6 @@ pub mod builder { body: Ok(types::builder::VpcRouterCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28159,7 +26046,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28169,7 +26055,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28179,7 +26064,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28190,7 +26074,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcRouterCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcRouterCreate) -> types::builder::VpcRouterCreate, @@ -28198,7 +26081,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers` @@ -28238,7 +26120,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_view`] /// ///[`ClientVpcsExt::vpc_router_view`]: super::ClientVpcsExt::vpc_router_view @@ -28250,7 +26131,6 @@ pub mod builder { vpc_name: Result, router_name: Result, } - impl<'a> VpcRouterView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28261,7 +26141,6 @@ pub mod builder { router_name: Err("router_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28271,7 +26150,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28281,7 +26159,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28291,7 +26168,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28301,7 +26177,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}` @@ -28340,7 +26215,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_update`] /// ///[`ClientVpcsExt::vpc_router_update`]: super::ClientVpcsExt::vpc_router_update @@ -28353,7 +26227,6 @@ pub mod builder { router_name: Result, body: Result, } - impl<'a> VpcRouterUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28365,7 +26238,6 @@ pub mod builder { body: Ok(types::builder::VpcRouterUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28375,7 +26247,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28385,7 +26256,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28395,7 +26265,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28405,7 +26274,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28416,7 +26284,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcRouterUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcRouterUpdate) -> types::builder::VpcRouterUpdate, @@ -28424,7 +26291,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}` @@ -28467,7 +26333,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_delete`] /// ///[`ClientVpcsExt::vpc_router_delete`]: super::ClientVpcsExt::vpc_router_delete @@ -28479,7 +26344,6 @@ pub mod builder { vpc_name: Result, router_name: Result, } - impl<'a> VpcRouterDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28490,7 +26354,6 @@ pub mod builder { router_name: Err("router_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28500,7 +26363,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28510,7 +26372,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28520,7 +26381,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28530,7 +26390,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}` @@ -28569,7 +26428,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_route_list`] /// ///[`ClientVpcsExt::vpc_router_route_list`]: super::ClientVpcsExt::vpc_router_route_list @@ -28584,7 +26442,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcRouterRouteList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28598,7 +26455,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28608,7 +26464,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28618,7 +26473,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28628,7 +26482,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28638,7 +26491,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28648,7 +26500,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28659,7 +26510,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28670,7 +26520,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes` @@ -28726,7 +26575,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes` @@ -28776,7 +26624,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientVpcsExt::vpc_router_route_create`] /// ///[`ClientVpcsExt::vpc_router_route_create`]: super::ClientVpcsExt::vpc_router_route_create @@ -28789,7 +26636,6 @@ pub mod builder { router_name: Result, body: Result, } - impl<'a> VpcRouterRouteCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28801,7 +26647,6 @@ pub mod builder { body: Ok(types::builder::RouterRouteCreateParams::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28811,7 +26656,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28821,7 +26665,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28831,7 +26674,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28841,7 +26683,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28852,7 +26693,6 @@ pub mod builder { .map_err(|_| "conversion to `RouterRouteCreateParams` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -28862,7 +26702,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes` @@ -28905,7 +26744,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_route_view`] /// ///[`ClientVpcsExt::vpc_router_route_view`]: super::ClientVpcsExt::vpc_router_route_view @@ -28918,7 +26756,6 @@ pub mod builder { router_name: Result, route_name: Result, } - impl<'a> VpcRouterRouteView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28930,7 +26767,6 @@ pub mod builder { route_name: Err("route_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28940,7 +26776,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28950,7 +26785,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28960,7 +26794,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28970,7 +26803,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn route_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28980,7 +26812,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for route_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes/{route_name}` @@ -29022,7 +26853,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_route_update`] /// ///[`ClientVpcsExt::vpc_router_route_update`]: super::ClientVpcsExt::vpc_router_route_update @@ -29036,7 +26866,6 @@ pub mod builder { route_name: Result, body: Result, } - impl<'a> VpcRouterRouteUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29049,7 +26878,6 @@ pub mod builder { body: Ok(types::builder::RouterRouteUpdateParams::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29059,7 +26887,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29069,7 +26896,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29079,7 +26905,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29089,7 +26914,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn route_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29099,7 +26923,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for route_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29110,7 +26933,6 @@ pub mod builder { .map_err(|_| "conversion to `RouterRouteUpdateParams` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -29120,7 +26942,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes/{route_name}` @@ -29166,7 +26987,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_router_route_delete`] /// ///[`ClientVpcsExt::vpc_router_route_delete`]: super::ClientVpcsExt::vpc_router_route_delete @@ -29179,7 +26999,6 @@ pub mod builder { router_name: Result, route_name: Result, } - impl<'a> VpcRouterRouteDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29191,7 +27010,6 @@ pub mod builder { route_name: Err("route_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29201,7 +27019,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29211,7 +27028,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29221,7 +27037,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29231,7 +27046,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn route_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29241,7 +27055,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for route_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes/{route_name}` @@ -29283,7 +27096,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_subnet_list`] /// ///[`ClientVpcsExt::vpc_subnet_list`]: super::ClientVpcsExt::vpc_subnet_list @@ -29297,7 +27109,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcSubnetList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29310,7 +27121,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29320,7 +27130,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29330,7 +27139,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29340,7 +27148,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29350,7 +27157,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29361,7 +27167,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29372,7 +27177,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets` @@ -29425,7 +27229,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets` @@ -29475,7 +27278,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientVpcsExt::vpc_subnet_create`] /// ///[`ClientVpcsExt::vpc_subnet_create`]: super::ClientVpcsExt::vpc_subnet_create @@ -29487,7 +27289,6 @@ pub mod builder { vpc_name: Result, body: Result, } - impl<'a> VpcSubnetCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29498,7 +27299,6 @@ pub mod builder { body: Ok(types::builder::VpcSubnetCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29508,7 +27308,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29518,7 +27317,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29528,7 +27326,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29539,7 +27336,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcSubnetCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcSubnetCreate) -> types::builder::VpcSubnetCreate, @@ -29547,7 +27343,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets` @@ -29587,7 +27382,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_subnet_view`] /// ///[`ClientVpcsExt::vpc_subnet_view`]: super::ClientVpcsExt::vpc_subnet_view @@ -29599,7 +27393,6 @@ pub mod builder { vpc_name: Result, subnet_name: Result, } - impl<'a> VpcSubnetView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29610,7 +27403,6 @@ pub mod builder { subnet_name: Err("subnet_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29620,7 +27412,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29630,7 +27421,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29640,7 +27430,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn subnet_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29650,7 +27439,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for subnet_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}` @@ -29689,7 +27477,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_subnet_update`] /// ///[`ClientVpcsExt::vpc_subnet_update`]: super::ClientVpcsExt::vpc_subnet_update @@ -29702,7 +27489,6 @@ pub mod builder { subnet_name: Result, body: Result, } - impl<'a> VpcSubnetUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29714,7 +27500,6 @@ pub mod builder { body: Ok(types::builder::VpcSubnetUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29724,7 +27509,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29734,7 +27518,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29744,7 +27527,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn subnet_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29754,7 +27536,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for subnet_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29765,7 +27546,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcSubnetUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcSubnetUpdate) -> types::builder::VpcSubnetUpdate, @@ -29773,7 +27553,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}` @@ -29816,7 +27595,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_subnet_delete`] /// ///[`ClientVpcsExt::vpc_subnet_delete`]: super::ClientVpcsExt::vpc_subnet_delete @@ -29828,7 +27606,6 @@ pub mod builder { vpc_name: Result, subnet_name: Result, } - impl<'a> VpcSubnetDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29839,7 +27616,6 @@ pub mod builder { subnet_name: Err("subnet_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29849,7 +27625,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29859,7 +27634,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29869,7 +27643,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn subnet_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29879,7 +27652,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for subnet_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}` @@ -29918,7 +27690,6 @@ pub mod builder { } } } - ///Builder for [`ClientVpcsExt::vpc_subnet_list_network_interfaces`] /// ///[`ClientVpcsExt::vpc_subnet_list_network_interfaces`]: super::ClientVpcsExt::vpc_subnet_list_network_interfaces @@ -29933,7 +27704,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcSubnetListNetworkInterfaces<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29947,7 +27717,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29957,7 +27726,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29967,7 +27735,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29977,7 +27744,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn subnet_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29987,7 +27753,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for subnet_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29997,7 +27762,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30008,7 +27772,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30019,7 +27782,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}/network-interfaces` @@ -30076,7 +27838,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}/network-interfaces` @@ -30126,7 +27887,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSilosExt::policy_view`] /// ///[`ClientSilosExt::policy_view`]: super::ClientSilosExt::policy_view @@ -30134,12 +27894,10 @@ pub mod builder { pub struct PolicyView<'a> { client: &'a super::Client, } - impl<'a> PolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/policy` pub async fn send( self, @@ -30161,7 +27919,6 @@ pub mod builder { } } } - ///Builder for [`ClientSilosExt::policy_update`] /// ///[`ClientSilosExt::policy_update`]: super::ClientSilosExt::policy_update @@ -30170,7 +27927,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> PolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30178,7 +27934,6 @@ pub mod builder { body: Ok(types::builder::SiloRolePolicy::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30189,7 +27944,6 @@ pub mod builder { .map_err(|_| "conversion to `SiloRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SiloRolePolicy) -> types::builder::SiloRolePolicy, @@ -30197,7 +27951,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/policy` pub async fn send( self, @@ -30222,7 +27975,6 @@ pub mod builder { } } } - ///Builder for [`ClientRolesExt::role_list`] /// ///[`ClientRolesExt::role_list`]: super::ClientRolesExt::role_list @@ -30232,7 +27984,6 @@ pub mod builder { limit: Result, String>, page_token: Result, String>, } - impl<'a> RoleList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30241,7 +27992,6 @@ pub mod builder { page_token: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30251,7 +28001,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30262,7 +28011,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - ///Sends a `GET` request to `/roles` pub async fn send( self, @@ -30296,7 +28044,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/roles` pub fn stream( self, @@ -30343,7 +28090,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientRolesExt::role_view`] /// ///[`ClientRolesExt::role_view`]: super::ClientRolesExt::role_view @@ -30352,7 +28098,6 @@ pub mod builder { client: &'a super::Client, role_name: Result, } - impl<'a> RoleView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30360,7 +28105,6 @@ pub mod builder { role_name: Err("role_name was not initialized".to_string()), } } - pub fn role_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30370,7 +28114,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for role_name failed".to_string()); self } - ///Sends a `GET` request to `/roles/{role_name}` pub async fn send(self) -> Result, Error> { let Self { client, role_name } = self; @@ -30395,7 +28138,6 @@ pub mod builder { } } } - ///Builder for [`ClientHiddenExt::session_me`] /// ///[`ClientHiddenExt::session_me`]: super::ClientHiddenExt::session_me @@ -30403,12 +28145,10 @@ pub mod builder { pub struct SessionMe<'a> { client: &'a super::Client, } - impl<'a> SessionMe<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/session/me` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -30428,7 +28168,6 @@ pub mod builder { } } } - ///Builder for [`ClientHiddenExt::session_me_groups`] /// ///[`ClientHiddenExt::session_me_groups`]: super::ClientHiddenExt::session_me_groups @@ -30439,7 +28178,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SessionMeGroups<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30449,7 +28187,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30459,7 +28196,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30470,7 +28206,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30481,7 +28216,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/session/me/groups` pub async fn send( self, @@ -30520,7 +28254,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/session/me/groups` pub fn stream( self, @@ -30568,7 +28301,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSessionExt::session_sshkey_list`] /// ///[`ClientSessionExt::session_sshkey_list`]: super::ClientSessionExt::session_sshkey_list @@ -30579,7 +28311,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SessionSshkeyList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30589,7 +28320,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30599,7 +28329,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30610,7 +28339,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30621,7 +28349,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/session/me/sshkeys` pub async fn send( self, @@ -30660,7 +28387,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/session/me/sshkeys` pub fn stream( self, @@ -30708,7 +28434,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSessionExt::session_sshkey_create`] /// ///[`ClientSessionExt::session_sshkey_create`]: super::ClientSessionExt::session_sshkey_create @@ -30717,7 +28442,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SessionSshkeyCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30725,7 +28449,6 @@ pub mod builder { body: Ok(types::builder::SshKeyCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30736,7 +28459,6 @@ pub mod builder { .map_err(|_| "conversion to `SshKeyCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SshKeyCreate) -> types::builder::SshKeyCreate, @@ -30744,7 +28466,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/session/me/sshkeys` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -30767,7 +28488,6 @@ pub mod builder { } } } - ///Builder for [`ClientSessionExt::session_sshkey_view`] /// ///[`ClientSessionExt::session_sshkey_view`]: super::ClientSessionExt::session_sshkey_view @@ -30776,7 +28496,6 @@ pub mod builder { client: &'a super::Client, ssh_key_name: Result, } - impl<'a> SessionSshkeyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30784,7 +28503,6 @@ pub mod builder { ssh_key_name: Err("ssh_key_name was not initialized".to_string()), } } - pub fn ssh_key_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30794,7 +28512,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for ssh_key_name failed".to_string()); self } - ///Sends a `GET` request to `/session/me/sshkeys/{ssh_key_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -30822,7 +28539,6 @@ pub mod builder { } } } - ///Builder for [`ClientSessionExt::session_sshkey_delete`] /// ///[`ClientSessionExt::session_sshkey_delete`]: super::ClientSessionExt::session_sshkey_delete @@ -30831,7 +28547,6 @@ pub mod builder { client: &'a super::Client, ssh_key_name: Result, } - impl<'a> SessionSshkeyDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30839,7 +28554,6 @@ pub mod builder { ssh_key_name: Err("ssh_key_name was not initialized".to_string()), } } - pub fn ssh_key_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30849,7 +28563,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for ssh_key_name failed".to_string()); self } - ///Sends a `DELETE` request to `/session/me/sshkeys/{ssh_key_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -30877,7 +28590,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_image_view_by_id`] /// ///[`ClientSystemExt::system_image_view_by_id`]: super::ClientSystemExt::system_image_view_by_id @@ -30886,7 +28598,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> SystemImageViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30894,7 +28605,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30904,7 +28614,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/system/by-id/images/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -30929,7 +28638,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_view_by_id`] /// ///[`ClientSystemExt::ip_pool_view_by_id`]: super::ClientSystemExt::ip_pool_view_by_id @@ -30938,7 +28646,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> IpPoolViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30946,7 +28653,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30956,7 +28662,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/system/by-id/ip-pools/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -30981,7 +28686,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::silo_view_by_id`] /// ///[`ClientSystemExt::silo_view_by_id`]: super::ClientSystemExt::silo_view_by_id @@ -30990,7 +28694,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> SiloViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30998,7 +28701,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31008,7 +28710,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/system/by-id/silos/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -31033,7 +28734,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::certificate_list`] /// ///[`ClientSystemExt::certificate_list`]: super::ClientSystemExt::certificate_list @@ -31044,7 +28744,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> CertificateList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31054,7 +28753,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31064,7 +28762,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31075,7 +28772,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31086,7 +28782,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/certificates` pub async fn send( self, @@ -31125,7 +28820,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/certificates` pub fn stream( self, @@ -31173,7 +28867,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::certificate_create`] /// ///[`ClientSystemExt::certificate_create`]: super::ClientSystemExt::certificate_create @@ -31182,7 +28875,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> CertificateCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31190,7 +28882,6 @@ pub mod builder { body: Ok(types::builder::CertificateCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31201,7 +28892,6 @@ pub mod builder { .map_err(|_| "conversion to `CertificateCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -31211,7 +28901,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/system/certificates` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -31234,7 +28923,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::certificate_view`] /// ///[`ClientSystemExt::certificate_view`]: super::ClientSystemExt::certificate_view @@ -31243,7 +28931,6 @@ pub mod builder { client: &'a super::Client, certificate: Result, } - impl<'a> CertificateView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31251,7 +28938,6 @@ pub mod builder { certificate: Err("certificate was not initialized".to_string()), } } - pub fn certificate(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31261,7 +28947,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for certificate failed".to_string()); self } - ///Sends a `GET` request to `/system/certificates/{certificate}` pub async fn send(self) -> Result, Error> { let Self { @@ -31289,7 +28974,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::certificate_delete`] /// ///[`ClientSystemExt::certificate_delete`]: super::ClientSystemExt::certificate_delete @@ -31298,7 +28982,6 @@ pub mod builder { client: &'a super::Client, certificate: Result, } - impl<'a> CertificateDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31306,7 +28989,6 @@ pub mod builder { certificate: Err("certificate was not initialized".to_string()), } } - pub fn certificate(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31316,7 +28998,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for certificate failed".to_string()); self } - ///Sends a `DELETE` request to `/system/certificates/{certificate}` pub async fn send(self) -> Result, Error> { let Self { @@ -31344,7 +29025,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::physical_disk_list`] /// ///[`ClientSystemExt::physical_disk_list`]: super::ClientSystemExt::physical_disk_list @@ -31355,7 +29035,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> PhysicalDiskList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31365,7 +29044,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31375,7 +29053,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31386,7 +29063,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31397,7 +29073,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/disks` pub async fn send( self, @@ -31436,7 +29111,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/hardware/disks` pub fn stream( self, @@ -31484,7 +29158,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::rack_list`] /// ///[`ClientSystemExt::rack_list`]: super::ClientSystemExt::rack_list @@ -31495,7 +29168,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> RackList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31505,7 +29177,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31515,7 +29186,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31526,7 +29196,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31537,7 +29206,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/racks` pub async fn send( self, @@ -31576,7 +29244,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/hardware/racks` pub fn stream( self, @@ -31624,7 +29291,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::rack_view`] /// ///[`ClientSystemExt::rack_view`]: super::ClientSystemExt::rack_view @@ -31633,7 +29299,6 @@ pub mod builder { client: &'a super::Client, rack_id: Result, } - impl<'a> RackView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31641,7 +29306,6 @@ pub mod builder { rack_id: Err("rack_id was not initialized".to_string()), } } - pub fn rack_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31651,7 +29315,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for rack_id failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/racks/{rack_id}` pub async fn send(self) -> Result, Error> { let Self { client, rack_id } = self; @@ -31676,7 +29339,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::sled_list`] /// ///[`ClientSystemExt::sled_list`]: super::ClientSystemExt::sled_list @@ -31687,7 +29349,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SledList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31697,7 +29358,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31707,7 +29367,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31718,7 +29377,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31729,7 +29387,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/sleds` pub async fn send( self, @@ -31768,7 +29425,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/hardware/sleds` pub fn stream( self, @@ -31816,7 +29472,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::sled_view`] /// ///[`ClientSystemExt::sled_view`]: super::ClientSystemExt::sled_view @@ -31825,7 +29480,6 @@ pub mod builder { client: &'a super::Client, sled_id: Result, } - impl<'a> SledView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31833,7 +29487,6 @@ pub mod builder { sled_id: Err("sled_id was not initialized".to_string()), } } - pub fn sled_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31843,7 +29496,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for sled_id failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/sleds/{sled_id}` pub async fn send(self) -> Result, Error> { let Self { client, sled_id } = self; @@ -31868,7 +29520,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::sled_physical_disk_list`] /// ///[`ClientSystemExt::sled_physical_disk_list`]: super::ClientSystemExt::sled_physical_disk_list @@ -31880,7 +29531,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SledPhysicalDiskList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31891,7 +29541,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn sled_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31901,7 +29550,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for sled_id failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31911,7 +29559,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31922,7 +29569,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31933,7 +29579,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/sleds/{sled_id}/disks` pub async fn send( self, @@ -31978,7 +29623,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/hardware/sleds/{sled_id}/disks` pub fn stream( self, @@ -32026,7 +29670,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::system_image_list`] /// ///[`ClientSystemExt::system_image_list`]: super::ClientSystemExt::system_image_list @@ -32037,7 +29680,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SystemImageList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32047,7 +29689,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32057,7 +29698,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32068,7 +29708,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32079,7 +29718,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/images` pub async fn send( self, @@ -32118,7 +29756,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/images` pub fn stream( self, @@ -32166,7 +29803,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::system_image_create`] /// ///[`ClientSystemExt::system_image_create`]: super::ClientSystemExt::system_image_create @@ -32175,7 +29811,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SystemImageCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32183,7 +29818,6 @@ pub mod builder { body: Ok(types::builder::GlobalImageCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32194,7 +29828,6 @@ pub mod builder { .map_err(|_| "conversion to `GlobalImageCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -32204,7 +29837,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/system/images` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -32227,7 +29859,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_image_view`] /// ///[`ClientSystemExt::system_image_view`]: super::ClientSystemExt::system_image_view @@ -32236,7 +29867,6 @@ pub mod builder { client: &'a super::Client, image_name: Result, } - impl<'a> SystemImageView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32244,7 +29874,6 @@ pub mod builder { image_name: Err("image_name was not initialized".to_string()), } } - pub fn image_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32254,7 +29883,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for image_name failed".to_string()); self } - ///Sends a `GET` request to `/system/images/{image_name}` pub async fn send(self) -> Result, Error> { let Self { client, image_name } = self; @@ -32279,7 +29907,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_image_delete`] /// ///[`ClientSystemExt::system_image_delete`]: super::ClientSystemExt::system_image_delete @@ -32288,7 +29915,6 @@ pub mod builder { client: &'a super::Client, image_name: Result, } - impl<'a> SystemImageDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32296,7 +29922,6 @@ pub mod builder { image_name: Err("image_name was not initialized".to_string()), } } - pub fn image_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32306,7 +29931,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for image_name failed".to_string()); self } - ///Sends a `DELETE` request to `/system/images/{image_name}` pub async fn send(self) -> Result, Error> { let Self { client, image_name } = self; @@ -32331,7 +29955,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_list`] /// ///[`ClientSystemExt::ip_pool_list`]: super::ClientSystemExt::ip_pool_list @@ -32342,7 +29965,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> IpPoolList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32352,7 +29974,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32362,7 +29983,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32373,7 +29993,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32384,7 +30003,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/ip-pools` pub async fn send( self, @@ -32423,7 +30041,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/ip-pools` pub fn stream( self, @@ -32471,7 +30088,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::ip_pool_create`] /// ///[`ClientSystemExt::ip_pool_create`]: super::ClientSystemExt::ip_pool_create @@ -32480,7 +30096,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> IpPoolCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32488,7 +30103,6 @@ pub mod builder { body: Ok(types::builder::IpPoolCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32499,7 +30113,6 @@ pub mod builder { .map_err(|_| "conversion to `IpPoolCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::IpPoolCreate) -> types::builder::IpPoolCreate, @@ -32507,7 +30120,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/system/ip-pools` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -32530,7 +30142,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_view`] /// ///[`ClientSystemExt::ip_pool_view`]: super::ClientSystemExt::ip_pool_view @@ -32539,7 +30150,6 @@ pub mod builder { client: &'a super::Client, pool_name: Result, } - impl<'a> IpPoolView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32547,7 +30157,6 @@ pub mod builder { pool_name: Err("pool_name was not initialized".to_string()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32557,7 +30166,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - ///Sends a `GET` request to `/system/ip-pools/{pool_name}` pub async fn send(self) -> Result, Error> { let Self { client, pool_name } = self; @@ -32582,7 +30190,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_update`] /// ///[`ClientSystemExt::ip_pool_update`]: super::ClientSystemExt::ip_pool_update @@ -32592,7 +30199,6 @@ pub mod builder { pool_name: Result, body: Result, } - impl<'a> IpPoolUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32601,7 +30207,6 @@ pub mod builder { body: Ok(types::builder::IpPoolUpdate::default()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32611,7 +30216,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32622,7 +30226,6 @@ pub mod builder { .map_err(|_| "conversion to `IpPoolUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::IpPoolUpdate) -> types::builder::IpPoolUpdate, @@ -32630,7 +30233,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/system/ip-pools/{pool_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -32662,7 +30264,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_delete`] /// ///[`ClientSystemExt::ip_pool_delete`]: super::ClientSystemExt::ip_pool_delete @@ -32671,7 +30272,6 @@ pub mod builder { client: &'a super::Client, pool_name: Result, } - impl<'a> IpPoolDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32679,7 +30279,6 @@ pub mod builder { pool_name: Err("pool_name was not initialized".to_string()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32689,7 +30288,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - ///Sends a `DELETE` request to `/system/ip-pools/{pool_name}` pub async fn send(self) -> Result, Error> { let Self { client, pool_name } = self; @@ -32714,7 +30312,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_range_list`] /// ///[`ClientSystemExt::ip_pool_range_list`]: super::ClientSystemExt::ip_pool_range_list @@ -32725,7 +30322,6 @@ pub mod builder { limit: Result, String>, page_token: Result, String>, } - impl<'a> IpPoolRangeList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32735,7 +30331,6 @@ pub mod builder { page_token: Ok(None), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32745,7 +30340,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32755,7 +30349,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32766,7 +30359,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - ///Sends a `GET` request to `/system/ip-pools/{pool_name}/ranges` pub async fn send( self, @@ -32806,7 +30398,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/ip-pools/{pool_name}/ranges` pub fn stream( self, @@ -32853,7 +30444,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::ip_pool_range_add`] /// ///[`ClientSystemExt::ip_pool_range_add`]: super::ClientSystemExt::ip_pool_range_add @@ -32863,7 +30453,6 @@ pub mod builder { pool_name: Result, body: Result, } - impl<'a> IpPoolRangeAdd<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32872,7 +30461,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32882,7 +30470,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32892,7 +30479,6 @@ pub mod builder { .map_err(|_| "conversion to `IpRange` for body failed".to_string()); self } - ///Sends a `POST` request to `/system/ip-pools/{pool_name}/ranges/add` pub async fn send(self) -> Result, Error> { let Self { @@ -32922,7 +30508,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_range_remove`] /// ///[`ClientSystemExt::ip_pool_range_remove`]: super::ClientSystemExt::ip_pool_range_remove @@ -32932,7 +30517,6 @@ pub mod builder { pool_name: Result, body: Result, } - impl<'a> IpPoolRangeRemove<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32941,7 +30525,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32951,7 +30534,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32961,7 +30543,6 @@ pub mod builder { .map_err(|_| "conversion to `IpRange` for body failed".to_string()); self } - ///Sends a `POST` request to /// `/system/ip-pools/{pool_name}/ranges/remove` pub async fn send(self) -> Result, Error> { @@ -32992,7 +30573,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_service_view`] /// ///[`ClientSystemExt::ip_pool_service_view`]: super::ClientSystemExt::ip_pool_service_view @@ -33000,12 +30580,10 @@ pub mod builder { pub struct IpPoolServiceView<'a> { client: &'a super::Client, } - impl<'a> IpPoolServiceView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/system/ip-pools-service` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -33025,7 +30603,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_service_range_list`] /// ///[`ClientSystemExt::ip_pool_service_range_list`]: super::ClientSystemExt::ip_pool_service_range_list @@ -33035,7 +30612,6 @@ pub mod builder { limit: Result, String>, page_token: Result, String>, } - impl<'a> IpPoolServiceRangeList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33044,7 +30620,6 @@ pub mod builder { page_token: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33054,7 +30629,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33065,7 +30639,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - ///Sends a `GET` request to `/system/ip-pools-service/ranges` pub async fn send( self, @@ -33099,7 +30672,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/ip-pools-service/ranges` pub fn stream( self, @@ -33146,7 +30718,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::ip_pool_service_range_add`] /// ///[`ClientSystemExt::ip_pool_service_range_add`]: super::ClientSystemExt::ip_pool_service_range_add @@ -33155,7 +30726,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> IpPoolServiceRangeAdd<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33163,7 +30733,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33173,7 +30742,6 @@ pub mod builder { .map_err(|_| "conversion to `IpRange` for body failed".to_string()); self } - ///Sends a `POST` request to `/system/ip-pools-service/ranges/add` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -33194,7 +30762,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::ip_pool_service_range_remove`] /// ///[`ClientSystemExt::ip_pool_service_range_remove`]: super::ClientSystemExt::ip_pool_service_range_remove @@ -33203,7 +30770,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> IpPoolServiceRangeRemove<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33211,7 +30777,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33221,7 +30786,6 @@ pub mod builder { .map_err(|_| "conversion to `IpRange` for body failed".to_string()); self } - ///Sends a `POST` request to `/system/ip-pools-service/ranges/remove` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -33242,7 +30806,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_metric`] /// ///[`ClientSystemExt::system_metric`]: super::ClientSystemExt::system_metric @@ -33256,7 +30819,6 @@ pub mod builder { page_token: Result, String>, start_time: Result>, String>, } - impl<'a> SystemMetric<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33269,7 +30831,6 @@ pub mod builder { start_time: Ok(None), } } - pub fn metric_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33279,7 +30840,6 @@ pub mod builder { .map_err(|_| "conversion to `SystemMetricName` for metric_name failed".to_string()); self } - pub fn end_time(mut self, value: V) -> Self where V: std::convert::TryInto>, @@ -33287,7 +30847,6 @@ pub mod builder { self . end_time = value . try_into () . map (Some) . map_err (| _ | "conversion to `chrono :: DateTime < chrono :: offset :: Utc >` for end_time failed" . to_string ()) ; self } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33297,7 +30856,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33307,7 +30865,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33318,7 +30875,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn start_time(mut self, value: V) -> Self where V: std::convert::TryInto>, @@ -33326,7 +30882,6 @@ pub mod builder { self . start_time = value . try_into () . map (Some) . map_err (| _ | "conversion to `chrono :: DateTime < chrono :: offset :: Utc >` for start_time failed" . to_string ()) ; self } - ///Sends a `GET` request to `/system/metrics/{metric_name}` pub async fn send( self, @@ -33380,7 +30935,6 @@ pub mod builder { } } } - ///Builder for [`ClientPolicyExt::system_policy_view`] /// ///[`ClientPolicyExt::system_policy_view`]: super::ClientPolicyExt::system_policy_view @@ -33388,12 +30942,10 @@ pub mod builder { pub struct SystemPolicyView<'a> { client: &'a super::Client, } - impl<'a> SystemPolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/system/policy` pub async fn send( self, @@ -33415,7 +30967,6 @@ pub mod builder { } } } - ///Builder for [`ClientPolicyExt::system_policy_update`] /// ///[`ClientPolicyExt::system_policy_update`]: super::ClientPolicyExt::system_policy_update @@ -33424,7 +30975,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SystemPolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33432,7 +30982,6 @@ pub mod builder { body: Ok(types::builder::FleetRolePolicy::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33443,7 +30992,6 @@ pub mod builder { .map_err(|_| "conversion to `FleetRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::FleetRolePolicy) -> types::builder::FleetRolePolicy, @@ -33451,7 +30999,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/system/policy` pub async fn send( self, @@ -33476,7 +31023,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::saga_list`] /// ///[`ClientSystemExt::saga_list`]: super::ClientSystemExt::saga_list @@ -33487,7 +31033,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SagaList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33497,7 +31042,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33507,7 +31051,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33518,7 +31061,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33529,7 +31071,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/sagas` pub async fn send( self, @@ -33568,7 +31109,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/sagas` pub fn stream( self, @@ -33616,7 +31156,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::saga_view`] /// ///[`ClientSystemExt::saga_view`]: super::ClientSystemExt::saga_view @@ -33625,7 +31164,6 @@ pub mod builder { client: &'a super::Client, saga_id: Result, } - impl<'a> SagaView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33633,7 +31171,6 @@ pub mod builder { saga_id: Err("saga_id was not initialized".to_string()), } } - pub fn saga_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33643,7 +31180,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for saga_id failed".to_string()); self } - ///Sends a `GET` request to `/system/sagas/{saga_id}` pub async fn send(self) -> Result, Error> { let Self { client, saga_id } = self; @@ -33668,7 +31204,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::silo_list`] /// ///[`ClientSystemExt::silo_list`]: super::ClientSystemExt::silo_list @@ -33679,7 +31214,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SiloList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33689,7 +31223,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33699,7 +31232,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33710,7 +31242,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33721,7 +31252,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/silos` pub async fn send( self, @@ -33760,7 +31290,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/silos` pub fn stream( self, @@ -33808,7 +31337,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::silo_create`] /// ///[`ClientSystemExt::silo_create`]: super::ClientSystemExt::silo_create @@ -33817,7 +31345,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SiloCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33825,7 +31352,6 @@ pub mod builder { body: Ok(types::builder::SiloCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33836,7 +31362,6 @@ pub mod builder { .map_err(|_| "conversion to `SiloCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SiloCreate) -> types::builder::SiloCreate, @@ -33844,7 +31369,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/system/silos` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -33867,7 +31391,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::silo_view`] /// ///[`ClientSystemExt::silo_view`]: super::ClientSystemExt::silo_view @@ -33876,7 +31399,6 @@ pub mod builder { client: &'a super::Client, silo_name: Result, } - impl<'a> SiloView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33884,7 +31406,6 @@ pub mod builder { silo_name: Err("silo_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33894,7 +31415,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - ///Sends a `GET` request to `/system/silos/{silo_name}` pub async fn send(self) -> Result, Error> { let Self { client, silo_name } = self; @@ -33919,7 +31439,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::silo_delete`] /// ///[`ClientSystemExt::silo_delete`]: super::ClientSystemExt::silo_delete @@ -33928,7 +31447,6 @@ pub mod builder { client: &'a super::Client, silo_name: Result, } - impl<'a> SiloDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33936,7 +31454,6 @@ pub mod builder { silo_name: Err("silo_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33946,7 +31463,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - ///Sends a `DELETE` request to `/system/silos/{silo_name}` pub async fn send(self) -> Result, Error> { let Self { client, silo_name } = self; @@ -33971,7 +31487,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::silo_identity_provider_list`] /// ///[`ClientSystemExt::silo_identity_provider_list`]: super::ClientSystemExt::silo_identity_provider_list @@ -33983,7 +31498,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SiloIdentityProviderList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33994,7 +31508,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34004,7 +31517,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34014,7 +31526,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34025,7 +31536,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34036,7 +31546,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/system/silos/{silo_name}/identity-providers` pub async fn send( @@ -34083,7 +31592,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/system/silos/{silo_name}/identity-providers` pub fn stream( @@ -34132,7 +31640,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::local_idp_user_create`] /// ///[`ClientSystemExt::local_idp_user_create`]: super::ClientSystemExt::local_idp_user_create @@ -34142,7 +31649,6 @@ pub mod builder { silo_name: Result, body: Result, } - impl<'a> LocalIdpUserCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34151,7 +31657,6 @@ pub mod builder { body: Ok(types::builder::UserCreate::default()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34161,7 +31666,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34172,7 +31676,6 @@ pub mod builder { .map_err(|_| "conversion to `UserCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::UserCreate) -> types::builder::UserCreate, @@ -34180,7 +31683,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/system/silos/{silo_name}/identity-providers/local/users` pub async fn send(self) -> Result, Error> { @@ -34213,7 +31715,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::local_idp_user_delete`] /// ///[`ClientSystemExt::local_idp_user_delete`]: super::ClientSystemExt::local_idp_user_delete @@ -34223,7 +31724,6 @@ pub mod builder { silo_name: Result, user_id: Result, } - impl<'a> LocalIdpUserDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34232,7 +31732,6 @@ pub mod builder { user_id: Err("user_id was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34242,7 +31741,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn user_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34252,7 +31750,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for user_id failed".to_string()); self } - ///Sends a `DELETE` request to /// `/system/silos/{silo_name}/identity-providers/local/users/{user_id}` pub async fn send(self) -> Result, Error> { @@ -34284,7 +31781,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::local_idp_user_set_password`] /// ///[`ClientSystemExt::local_idp_user_set_password`]: super::ClientSystemExt::local_idp_user_set_password @@ -34295,7 +31791,6 @@ pub mod builder { user_id: Result, body: Result, } - impl<'a> LocalIdpUserSetPassword<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34305,7 +31800,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34315,7 +31809,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn user_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34325,7 +31818,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for user_id failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34335,7 +31827,6 @@ pub mod builder { .map_err(|_| "conversion to `UserPassword` for body failed".to_string()); self } - ///Sends a `POST` request to /// `/system/silos/{silo_name}/identity-providers/local/users/{user_id}/ /// set-password` @@ -34370,7 +31861,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::saml_identity_provider_create`] /// ///[`ClientSystemExt::saml_identity_provider_create`]: super::ClientSystemExt::saml_identity_provider_create @@ -34380,7 +31870,6 @@ pub mod builder { silo_name: Result, body: Result, } - impl<'a> SamlIdentityProviderCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34389,7 +31878,6 @@ pub mod builder { body: Ok(types::builder::SamlIdentityProviderCreate::default()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34399,7 +31887,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34409,7 +31896,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -34419,7 +31905,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/system/silos/{silo_name}/identity-providers/saml` pub async fn send( @@ -34454,7 +31939,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::saml_identity_provider_view`] /// ///[`ClientSystemExt::saml_identity_provider_view`]: super::ClientSystemExt::saml_identity_provider_view @@ -34464,7 +31948,6 @@ pub mod builder { silo_name: Result, provider_name: Result, } - impl<'a> SamlIdentityProviderView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34473,7 +31956,6 @@ pub mod builder { provider_name: Err("provider_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34483,7 +31965,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn provider_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34493,7 +31974,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for provider_name failed".to_string()); self } - ///Sends a `GET` request to /// `/system/silos/{silo_name}/identity-providers/saml/{provider_name}` pub async fn send( @@ -34527,7 +32007,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::silo_policy_view`] /// ///[`ClientSystemExt::silo_policy_view`]: super::ClientSystemExt::silo_policy_view @@ -34536,7 +32015,6 @@ pub mod builder { client: &'a super::Client, silo_name: Result, } - impl<'a> SiloPolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34544,7 +32022,6 @@ pub mod builder { silo_name: Err("silo_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34554,7 +32031,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - ///Sends a `GET` request to `/system/silos/{silo_name}/policy` pub async fn send( self, @@ -34581,7 +32057,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::silo_policy_update`] /// ///[`ClientSystemExt::silo_policy_update`]: super::ClientSystemExt::silo_policy_update @@ -34591,7 +32066,6 @@ pub mod builder { silo_name: Result, body: Result, } - impl<'a> SiloPolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34600,7 +32074,6 @@ pub mod builder { body: Ok(types::builder::SiloRolePolicy::default()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34610,7 +32083,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34621,7 +32093,6 @@ pub mod builder { .map_err(|_| "conversion to `SiloRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SiloRolePolicy) -> types::builder::SiloRolePolicy, @@ -34629,7 +32100,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/system/silos/{silo_name}/policy` pub async fn send( self, @@ -34663,7 +32133,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::silo_users_list`] /// ///[`ClientSystemExt::silo_users_list`]: super::ClientSystemExt::silo_users_list @@ -34675,7 +32144,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SiloUsersList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34686,7 +32154,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34696,7 +32163,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34706,7 +32172,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34717,7 +32182,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34728,7 +32192,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/silos/{silo_name}/users/all` pub async fn send( self, @@ -34773,7 +32236,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/silos/{silo_name}/users/all` pub fn stream( self, @@ -34821,7 +32283,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::silo_user_view`] /// ///[`ClientSystemExt::silo_user_view`]: super::ClientSystemExt::silo_user_view @@ -34831,7 +32292,6 @@ pub mod builder { silo_name: Result, user_id: Result, } - impl<'a> SiloUserView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34840,7 +32300,6 @@ pub mod builder { user_id: Err("user_id was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34850,7 +32309,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn user_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34860,7 +32318,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for user_id failed".to_string()); self } - ///Sends a `GET` request to /// `/system/silos/{silo_name}/users/id/{user_id}` pub async fn send(self) -> Result, Error> { @@ -34892,7 +32349,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_user_list`] /// ///[`ClientSystemExt::system_user_list`]: super::ClientSystemExt::system_user_list @@ -34903,7 +32359,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SystemUserList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34913,7 +32368,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34923,7 +32377,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34934,7 +32387,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34945,7 +32397,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/user` pub async fn send( self, @@ -34984,7 +32435,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/user` pub fn stream( self, @@ -35032,7 +32482,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::system_user_view`] /// ///[`ClientSystemExt::system_user_view`]: super::ClientSystemExt::system_user_view @@ -35041,7 +32490,6 @@ pub mod builder { client: &'a super::Client, user_name: Result, } - impl<'a> SystemUserView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35049,7 +32497,6 @@ pub mod builder { user_name: Err("user_name was not initialized".to_string()), } } - pub fn user_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35059,7 +32506,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for user_name failed".to_string()); self } - ///Sends a `GET` request to `/system/user/{user_name}` pub async fn send(self) -> Result, Error> { let Self { client, user_name } = self; @@ -35084,7 +32530,6 @@ pub mod builder { } } } - ///Builder for [`ClientMetricsExt::timeseries_schema_get`] /// ///[`ClientMetricsExt::timeseries_schema_get`]: super::ClientMetricsExt::timeseries_schema_get @@ -35094,7 +32539,6 @@ pub mod builder { limit: Result, String>, page_token: Result, String>, } - impl<'a> TimeseriesSchemaGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35103,7 +32547,6 @@ pub mod builder { page_token: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35113,7 +32556,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35124,7 +32566,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - ///Sends a `GET` request to `/timeseries/schema` pub async fn send( self, @@ -35159,7 +32600,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/timeseries/schema` pub fn stream( self, @@ -35206,7 +32646,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSilosExt::user_list`] /// ///[`ClientSilosExt::user_list`]: super::ClientSilosExt::user_list @@ -35217,7 +32656,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> UserList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35227,7 +32665,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35237,7 +32674,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35248,7 +32684,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35259,7 +32694,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/users` pub async fn send( self, @@ -35298,7 +32732,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/users` pub fn stream( self, @@ -35346,7 +32779,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientDisksExt::disk_list_v1`] /// ///[`ClientDisksExt::disk_list_v1`]: super::ClientDisksExt::disk_list_v1 @@ -35359,7 +32791,6 @@ pub mod builder { project: Result, String>, sort_by: Result, String>, } - impl<'a> DiskListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35371,7 +32802,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35381,7 +32811,6 @@ pub mod builder { }); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35392,7 +32821,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35403,7 +32831,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35414,7 +32841,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35425,7 +32851,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/disks` pub async fn send( self, @@ -35474,7 +32899,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/disks` pub fn stream( self, @@ -35524,7 +32948,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientDisksExt::disk_create_v1`] /// ///[`ClientDisksExt::disk_create_v1`]: super::ClientDisksExt::disk_create_v1 @@ -35535,7 +32958,6 @@ pub mod builder { project: Result, body: Result, } - impl<'a> DiskCreateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35545,7 +32967,6 @@ pub mod builder { body: Ok(types::builder::DiskCreate::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35556,7 +32977,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35566,7 +32986,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35577,7 +32996,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskCreate) -> types::builder::DiskCreate, @@ -35585,7 +33003,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/disks` pub async fn send(self) -> Result, Error> { let Self { @@ -35620,7 +33037,6 @@ pub mod builder { } } } - ///Builder for [`ClientDisksExt::disk_view_v1`] /// ///[`ClientDisksExt::disk_view_v1`]: super::ClientDisksExt::disk_view_v1 @@ -35631,7 +33047,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> DiskViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35641,7 +33056,6 @@ pub mod builder { project: Ok(None), } } - pub fn disk(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35651,7 +33065,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for disk failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35662,7 +33075,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35673,7 +33085,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `GET` request to `/v1/disks/{disk}` pub async fn send(self) -> Result, Error> { let Self { @@ -35712,7 +33123,6 @@ pub mod builder { } } } - ///Builder for [`ClientDisksExt::disk_delete_v1`] /// ///[`ClientDisksExt::disk_delete_v1`]: super::ClientDisksExt::disk_delete_v1 @@ -35723,7 +33133,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> DiskDeleteV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35733,7 +33142,6 @@ pub mod builder { project: Ok(None), } } - pub fn disk(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35743,7 +33151,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for disk failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35754,7 +33161,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35765,7 +33171,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `DELETE` request to `/v1/disks/{disk}` pub async fn send(self) -> Result, Error> { let Self { @@ -35804,7 +33209,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_list_v1`] /// ///[`ClientInstancesExt::instance_list_v1`]: super::ClientInstancesExt::instance_list_v1 @@ -35817,7 +33221,6 @@ pub mod builder { project: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35829,7 +33232,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35839,7 +33241,6 @@ pub mod builder { }); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35850,7 +33251,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35861,7 +33261,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35872,7 +33271,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35883,7 +33281,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/instances` pub async fn send( self, @@ -35932,7 +33329,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/instances` pub fn stream( self, @@ -35982,7 +33378,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientInstancesExt::instance_create_v1`] /// ///[`ClientInstancesExt::instance_create_v1`]: super::ClientInstancesExt::instance_create_v1 @@ -35993,7 +33388,6 @@ pub mod builder { project: Result, body: Result, } - impl<'a> InstanceCreateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36003,7 +33397,6 @@ pub mod builder { body: Ok(types::builder::InstanceCreate::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36014,7 +33407,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36024,7 +33416,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36035,7 +33426,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::InstanceCreate) -> types::builder::InstanceCreate, @@ -36043,7 +33433,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/instances` pub async fn send(self) -> Result, Error> { let Self { @@ -36078,7 +33467,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_view_v1`] /// ///[`ClientInstancesExt::instance_view_v1`]: super::ClientInstancesExt::instance_view_v1 @@ -36089,7 +33477,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36099,7 +33486,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36109,7 +33495,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36120,7 +33505,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36131,7 +33515,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `GET` request to `/v1/instances/{instance}` pub async fn send(self) -> Result, Error> { let Self { @@ -36170,7 +33553,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_delete_v1`] /// ///[`ClientInstancesExt::instance_delete_v1`]: super::ClientInstancesExt::instance_delete_v1 @@ -36181,7 +33563,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceDeleteV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36191,7 +33572,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36201,7 +33581,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36212,7 +33591,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36223,7 +33601,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `DELETE` request to `/v1/instances/{instance}` pub async fn send(self) -> Result, Error> { let Self { @@ -36262,7 +33639,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_disk_list_v1`] /// ///[`ClientInstancesExt::instance_disk_list_v1`]: super::ClientInstancesExt::instance_disk_list_v1 @@ -36276,7 +33652,6 @@ pub mod builder { project: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceDiskListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36289,7 +33664,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36299,7 +33673,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36309,7 +33682,6 @@ pub mod builder { }); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36320,7 +33692,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36331,7 +33702,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36342,7 +33712,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36353,7 +33722,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/instances/{instance}/disks` pub async fn send( self, @@ -36408,7 +33776,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/instances/{instance}/disks` pub fn stream( self, @@ -36458,7 +33825,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientInstancesExt::instance_disk_attach_v1`] /// ///[`ClientInstancesExt::instance_disk_attach_v1`]: super::ClientInstancesExt::instance_disk_attach_v1 @@ -36470,7 +33836,6 @@ pub mod builder { project: Result, String>, body: Result, } - impl<'a> InstanceDiskAttachV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36481,7 +33846,6 @@ pub mod builder { body: Ok(types::builder::DiskPath::default()), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36491,7 +33855,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36502,7 +33865,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36513,7 +33875,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36524,7 +33885,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskPath` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskPath) -> types::builder::DiskPath, @@ -36532,7 +33892,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/instances/{instance}/disks/attach` pub async fn send(self) -> Result, Error> { let Self { @@ -36575,7 +33934,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_disk_detach_v1`] /// ///[`ClientInstancesExt::instance_disk_detach_v1`]: super::ClientInstancesExt::instance_disk_detach_v1 @@ -36587,7 +33945,6 @@ pub mod builder { project: Result, String>, body: Result, } - impl<'a> InstanceDiskDetachV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36598,7 +33955,6 @@ pub mod builder { body: Ok(types::builder::DiskPath::default()), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36608,7 +33964,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36619,7 +33974,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36630,7 +33984,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36641,7 +33994,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskPath` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskPath) -> types::builder::DiskPath, @@ -36649,7 +34001,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/instances/{instance}/disks/detach` pub async fn send(self) -> Result, Error> { let Self { @@ -36692,7 +34043,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_migrate_v1`] /// ///[`ClientInstancesExt::instance_migrate_v1`]: super::ClientInstancesExt::instance_migrate_v1 @@ -36704,7 +34054,6 @@ pub mod builder { project: Result, String>, body: Result, } - impl<'a> InstanceMigrateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36715,7 +34064,6 @@ pub mod builder { body: Ok(types::builder::InstanceMigrate::default()), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36725,7 +34073,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36736,7 +34083,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36747,7 +34093,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36758,7 +34103,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceMigrate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::InstanceMigrate) -> types::builder::InstanceMigrate, @@ -36766,7 +34110,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/instances/{instance}/migrate` pub async fn send(self) -> Result, Error> { let Self { @@ -36809,7 +34152,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_reboot_v1`] /// ///[`ClientInstancesExt::instance_reboot_v1`]: super::ClientInstancesExt::instance_reboot_v1 @@ -36820,7 +34162,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceRebootV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36830,7 +34171,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36840,7 +34180,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36851,7 +34190,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36862,7 +34200,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `POST` request to `/v1/instances/{instance}/reboot` pub async fn send(self) -> Result, Error> { let Self { @@ -36901,7 +34238,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_serial_console_v1`] /// ///[`ClientInstancesExt::instance_serial_console_v1`]: super::ClientInstancesExt::instance_serial_console_v1 @@ -36915,7 +34251,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceSerialConsoleV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36928,7 +34263,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36938,7 +34272,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn from_start(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36949,7 +34282,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for from_start failed".to_string()); self } - pub fn max_bytes(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36960,7 +34292,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for max_bytes failed".to_string()); self } - pub fn most_recent(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36971,7 +34302,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for most_recent failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36982,7 +34312,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36993,7 +34322,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `GET` request to `/v1/instances/{instance}/serial-console` pub async fn send( self, @@ -37049,7 +34377,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_serial_console_stream_v1`] /// ///[`ClientInstancesExt::instance_serial_console_stream_v1`]: super::ClientInstancesExt::instance_serial_console_stream_v1 @@ -37060,7 +34387,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceSerialConsoleStreamV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37070,7 +34396,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37080,7 +34405,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37091,7 +34415,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37102,7 +34425,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `GET` request to /// `/v1/instances/{instance}/serial-console/stream` pub async fn send( @@ -37153,7 +34475,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_start_v1`] /// ///[`ClientInstancesExt::instance_start_v1`]: super::ClientInstancesExt::instance_start_v1 @@ -37164,7 +34485,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceStartV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37174,7 +34494,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37184,7 +34503,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37195,7 +34513,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37206,7 +34523,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `POST` request to `/v1/instances/{instance}/start` pub async fn send(self) -> Result, Error> { let Self { @@ -37245,7 +34561,6 @@ pub mod builder { } } } - ///Builder for [`ClientInstancesExt::instance_stop_v1`] /// ///[`ClientInstancesExt::instance_stop_v1`]: super::ClientInstancesExt::instance_stop_v1 @@ -37256,7 +34571,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceStopV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37266,7 +34580,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37276,7 +34589,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37287,7 +34599,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37298,7 +34609,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `POST` request to `/v1/instances/{instance}/stop` pub async fn send(self) -> Result, Error> { let Self { @@ -37337,7 +34647,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_list_v1`] /// ///[`ClientOrganizationsExt::organization_list_v1`]: super::ClientOrganizationsExt::organization_list_v1 @@ -37348,7 +34657,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> OrganizationListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37358,7 +34666,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37368,7 +34675,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37379,7 +34685,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37390,7 +34695,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/organizations` pub async fn send( self, @@ -37429,7 +34733,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/organizations` pub fn stream( self, @@ -37477,7 +34780,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientOrganizationsExt::organization_create_v1`] /// ///[`ClientOrganizationsExt::organization_create_v1`]: super::ClientOrganizationsExt::organization_create_v1 @@ -37486,7 +34788,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> OrganizationCreateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37494,7 +34795,6 @@ pub mod builder { body: Ok(types::builder::OrganizationCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37505,7 +34805,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -37515,7 +34814,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/organizations` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -37538,7 +34836,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_view_v1`] /// ///[`ClientOrganizationsExt::organization_view_v1`]: super::ClientOrganizationsExt::organization_view_v1 @@ -37547,7 +34844,6 @@ pub mod builder { client: &'a super::Client, organization: Result, } - impl<'a> OrganizationViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37555,7 +34851,6 @@ pub mod builder { organization: Err("organization was not initialized".to_string()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37565,7 +34860,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `GET` request to `/v1/organizations/{organization}` pub async fn send(self) -> Result, Error> { let Self { @@ -37593,7 +34887,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_update_v1`] /// ///[`ClientOrganizationsExt::organization_update_v1`]: super::ClientOrganizationsExt::organization_update_v1 @@ -37603,7 +34896,6 @@ pub mod builder { organization: Result, body: Result, } - impl<'a> OrganizationUpdateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37612,7 +34904,6 @@ pub mod builder { body: Ok(types::builder::OrganizationUpdate::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37622,7 +34913,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37633,7 +34923,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -37643,7 +34932,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/v1/organizations/{organization}` pub async fn send(self) -> Result, Error> { let Self { @@ -37675,7 +34963,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_delete_v1`] /// ///[`ClientOrganizationsExt::organization_delete_v1`]: super::ClientOrganizationsExt::organization_delete_v1 @@ -37684,7 +34971,6 @@ pub mod builder { client: &'a super::Client, organization: Result, } - impl<'a> OrganizationDeleteV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37692,7 +34978,6 @@ pub mod builder { organization: Err("organization was not initialized".to_string()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37702,7 +34987,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `DELETE` request to `/v1/organizations/{organization}` pub async fn send(self) -> Result, Error> { let Self { @@ -37730,7 +35014,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_policy_view_v1`] /// ///[`ClientOrganizationsExt::organization_policy_view_v1`]: super::ClientOrganizationsExt::organization_policy_view_v1 @@ -37739,7 +35022,6 @@ pub mod builder { client: &'a super::Client, organization: Result, } - impl<'a> OrganizationPolicyViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37747,7 +35029,6 @@ pub mod builder { organization: Err("organization was not initialized".to_string()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37757,7 +35038,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `GET` request to `/v1/organizations/{organization}/policy` pub async fn send( self, @@ -37787,7 +35067,6 @@ pub mod builder { } } } - ///Builder for [`ClientOrganizationsExt::organization_policy_update_v1`] /// ///[`ClientOrganizationsExt::organization_policy_update_v1`]: super::ClientOrganizationsExt::organization_policy_update_v1 @@ -37797,7 +35076,6 @@ pub mod builder { organization: Result, body: Result, } - impl<'a> OrganizationPolicyUpdateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37806,7 +35084,6 @@ pub mod builder { body: Ok(types::builder::OrganizationRolePolicy::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37816,7 +35093,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37827,7 +35103,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -37837,7 +35112,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/v1/organizations/{organization}/policy` pub async fn send( self, @@ -37871,7 +35145,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_list_v1`] /// ///[`ClientProjectsExt::project_list_v1`]: super::ClientProjectsExt::project_list_v1 @@ -37883,7 +35156,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> ProjectListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37894,7 +35166,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37904,7 +35175,6 @@ pub mod builder { }); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37915,7 +35185,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37926,7 +35195,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37937,7 +35205,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/projects` pub async fn send( self, @@ -37981,7 +35248,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/projects` pub fn stream( self, @@ -38030,7 +35296,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientProjectsExt::project_create_v1`] /// ///[`ClientProjectsExt::project_create_v1`]: super::ClientProjectsExt::project_create_v1 @@ -38040,7 +35305,6 @@ pub mod builder { organization: Result, body: Result, } - impl<'a> ProjectCreateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38049,7 +35313,6 @@ pub mod builder { body: Ok(types::builder::ProjectCreate::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38059,7 +35322,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38070,7 +35332,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ProjectCreate) -> types::builder::ProjectCreate, @@ -38078,7 +35339,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/projects` pub async fn send(self) -> Result, Error> { let Self { @@ -38108,7 +35368,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_view_v1`] /// ///[`ClientProjectsExt::project_view_v1`]: super::ClientProjectsExt::project_view_v1 @@ -38118,7 +35377,6 @@ pub mod builder { project: Result, organization: Result, String>, } - impl<'a> ProjectViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38127,7 +35385,6 @@ pub mod builder { organization: Ok(None), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38137,7 +35394,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38148,7 +35404,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `GET` request to `/v1/projects/{project}` pub async fn send(self) -> Result, Error> { let Self { @@ -38182,7 +35437,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_update_v1`] /// ///[`ClientProjectsExt::project_update_v1`]: super::ClientProjectsExt::project_update_v1 @@ -38193,7 +35447,6 @@ pub mod builder { organization: Result, String>, body: Result, } - impl<'a> ProjectUpdateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38203,7 +35456,6 @@ pub mod builder { body: Ok(types::builder::ProjectUpdate::default()), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38213,7 +35465,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38224,7 +35475,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38235,7 +35485,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ProjectUpdate) -> types::builder::ProjectUpdate, @@ -38243,7 +35492,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/v1/projects/{project}` pub async fn send(self) -> Result, Error> { let Self { @@ -38281,7 +35529,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_delete_v1`] /// ///[`ClientProjectsExt::project_delete_v1`]: super::ClientProjectsExt::project_delete_v1 @@ -38291,7 +35538,6 @@ pub mod builder { project: Result, organization: Result, String>, } - impl<'a> ProjectDeleteV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38300,7 +35546,6 @@ pub mod builder { organization: Ok(None), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38310,7 +35555,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38321,7 +35565,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `DELETE` request to `/v1/projects/{project}` pub async fn send(self) -> Result, Error> { let Self { @@ -38355,7 +35598,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_policy_view_v1`] /// ///[`ClientProjectsExt::project_policy_view_v1`]: super::ClientProjectsExt::project_policy_view_v1 @@ -38365,7 +35607,6 @@ pub mod builder { project: Result, organization: Result, String>, } - impl<'a> ProjectPolicyViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38374,7 +35615,6 @@ pub mod builder { organization: Ok(None), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38384,7 +35624,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38395,7 +35634,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `GET` request to `/v1/projects/{project}/policy` pub async fn send( self, @@ -38431,7 +35669,6 @@ pub mod builder { } } } - ///Builder for [`ClientProjectsExt::project_policy_update_v1`] /// ///[`ClientProjectsExt::project_policy_update_v1`]: super::ClientProjectsExt::project_policy_update_v1 @@ -38442,7 +35679,6 @@ pub mod builder { organization: Result, String>, body: Result, } - impl<'a> ProjectPolicyUpdateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38452,7 +35688,6 @@ pub mod builder { body: Ok(types::builder::ProjectRolePolicy::default()), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38462,7 +35697,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38473,7 +35707,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38484,7 +35717,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -38494,7 +35726,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/v1/projects/{project}/policy` pub async fn send( self, @@ -38534,7 +35765,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_component_version_list`] /// ///[`ClientSystemExt::system_component_version_list`]: super::ClientSystemExt::system_component_version_list @@ -38545,7 +35775,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SystemComponentVersionList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38555,7 +35784,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38565,7 +35793,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38576,7 +35803,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38587,7 +35813,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/components` pub async fn send( self, @@ -38627,7 +35852,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/system/update/components` pub fn stream( self, @@ -38676,7 +35900,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::update_deployments_list`] /// ///[`ClientSystemExt::update_deployments_list`]: super::ClientSystemExt::update_deployments_list @@ -38687,7 +35910,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> UpdateDeploymentsList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38697,7 +35919,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38707,7 +35928,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38718,7 +35938,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38729,7 +35948,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/deployments` pub async fn send( self, @@ -38769,7 +35987,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/system/update/deployments` pub fn stream( self, @@ -38817,7 +36034,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::update_deployment_view`] /// ///[`ClientSystemExt::update_deployment_view`]: super::ClientSystemExt::update_deployment_view @@ -38826,7 +36042,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> UpdateDeploymentView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38834,7 +36049,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38844,7 +36058,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/deployments/{id}` pub async fn send( self, @@ -38871,7 +36084,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_update_refresh`] /// ///[`ClientSystemExt::system_update_refresh`]: super::ClientSystemExt::system_update_refresh @@ -38879,12 +36091,10 @@ pub mod builder { pub struct SystemUpdateRefresh<'a> { client: &'a super::Client, } - impl<'a> SystemUpdateRefresh<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/system/update/refresh` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -38904,7 +36114,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_update_start`] /// ///[`ClientSystemExt::system_update_start`]: super::ClientSystemExt::system_update_start @@ -38913,7 +36122,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SystemUpdateStart<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38921,7 +36129,6 @@ pub mod builder { body: Ok(types::builder::SystemUpdateStart::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38932,7 +36139,6 @@ pub mod builder { .map_err(|_| "conversion to `SystemUpdateStart` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -38942,7 +36148,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/system/update/start` pub async fn send( self, @@ -38967,7 +36172,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_update_stop`] /// ///[`ClientSystemExt::system_update_stop`]: super::ClientSystemExt::system_update_stop @@ -38975,12 +36179,10 @@ pub mod builder { pub struct SystemUpdateStop<'a> { client: &'a super::Client, } - impl<'a> SystemUpdateStop<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/system/update/stop` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -39000,7 +36202,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_update_list`] /// ///[`ClientSystemExt::system_update_list`]: super::ClientSystemExt::system_update_list @@ -39011,7 +36212,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SystemUpdateList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -39021,7 +36221,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -39031,7 +36230,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -39042,7 +36240,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -39053,7 +36250,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/updates` pub async fn send( self, @@ -39092,7 +36288,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/system/update/updates` pub fn stream( self, @@ -39140,7 +36335,6 @@ pub mod builder { .boxed() } } - ///Builder for [`ClientSystemExt::system_update_view`] /// ///[`ClientSystemExt::system_update_view`]: super::ClientSystemExt::system_update_view @@ -39149,7 +36343,6 @@ pub mod builder { client: &'a super::Client, version: Result, } - impl<'a> SystemUpdateView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -39157,7 +36350,6 @@ pub mod builder { version: Err("version was not initialized".to_string()), } } - pub fn version(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -39167,7 +36359,6 @@ pub mod builder { .map_err(|_| "conversion to `SemverVersion` for version failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/updates/{version}` pub async fn send(self) -> Result, Error> { let Self { client, version } = self; @@ -39192,7 +36383,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_update_components_list`] /// ///[`ClientSystemExt::system_update_components_list`]: super::ClientSystemExt::system_update_components_list @@ -39201,7 +36391,6 @@ pub mod builder { client: &'a super::Client, version: Result, } - impl<'a> SystemUpdateComponentsList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -39209,7 +36398,6 @@ pub mod builder { version: Err("version was not initialized".to_string()), } } - pub fn version(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -39219,7 +36407,6 @@ pub mod builder { .map_err(|_| "conversion to `SemverVersion` for version failed".to_string()); self } - ///Sends a `GET` request to /// `/v1/system/update/updates/{version}/components` pub async fn send( @@ -39247,7 +36434,6 @@ pub mod builder { } } } - ///Builder for [`ClientSystemExt::system_version`] /// ///[`ClientSystemExt::system_version`]: super::ClientSystemExt::system_version @@ -39255,12 +36441,10 @@ pub mod builder { pub struct SystemVersion<'a> { client: &'a super::Client, } - impl<'a> SystemVersion<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/system/update/version` pub async fn send( self, @@ -39283,7 +36467,6 @@ pub mod builder { } } } - pub mod prelude { pub use super::Client; pub use super::ClientDisksExt; diff --git a/progenitor-impl/tests/output/nexus-builder.out b/progenitor-impl/tests/output/nexus-builder.out index 8feaaca8..bafa6be3 100644 --- a/progenitor-impl/tests/output/nexus-builder.out +++ b/progenitor-impl/tests/output/nexus-builder.out @@ -14,19 +14,16 @@ pub mod types { pub revision: i64, pub serial: String, } - impl From<&Baseboard> for Baseboard { fn from(value: &Baseboard) -> Self { value.clone() } } - impl Baseboard { pub fn builder() -> builder::Baseboard { builder::Baseboard::default() } } - ///A type storing a range over `T`. /// ///This type supports ranges similar to the `RangeTo`, `Range` and @@ -46,13 +43,11 @@ pub mod types { #[serde(rename = "range_from")] RangeFrom { start: f64 }, } - impl From<&BinRangedouble> for BinRangedouble { fn from(value: &BinRangedouble) -> Self { value.clone() } } - ///A type storing a range over `T`. /// ///This type supports ranges similar to the `RangeTo`, `Range` and @@ -72,13 +67,11 @@ pub mod types { #[serde(rename = "range_from")] RangeFrom { start: i64 }, } - impl From<&BinRangeint64> for BinRangeint64 { fn from(value: &BinRangeint64) -> Self { value.clone() } } - ///Type storing bin edges and a count of samples within it. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Bindouble { @@ -87,19 +80,16 @@ pub mod types { ///The range of the support covered by this bin. pub range: BinRangedouble, } - impl From<&Bindouble> for Bindouble { fn from(value: &Bindouble) -> Self { value.clone() } } - impl Bindouble { pub fn builder() -> builder::Bindouble { builder::Bindouble::default() } } - ///Type storing bin edges and a count of samples within it. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Binint64 { @@ -108,19 +98,16 @@ pub mod types { ///The range of the support covered by this bin. pub range: BinRangeint64, } - impl From<&Binint64> for Binint64 { fn from(value: &Binint64) -> Self { value.clone() } } - impl Binint64 { pub fn builder() -> builder::Binint64 { builder::Binint64::default() } } - #[derive(Clone, Debug, JsonSchema, Serialize)] pub struct BlockSize(i64); impl std::ops::Deref for BlockSize { @@ -129,19 +116,16 @@ pub mod types { &self.0 } } - impl From for i64 { fn from(value: BlockSize) -> Self { value.0 } } - impl From<&BlockSize> for BlockSize { fn from(value: &BlockSize) -> Self { value.clone() } } - impl std::convert::TryFrom for BlockSize { type Error = &'static str; fn try_from(value: i64) -> Result { @@ -152,7 +136,6 @@ pub mod types { } } } - impl<'de> serde::Deserialize<'de> for BlockSize { fn deserialize(deserializer: D) -> Result where @@ -162,7 +145,6 @@ pub mod types { .map_err(|e| ::custom(e.to_string())) } } - ///A count of bytes, typically used either for memory or storage capacity /// ///The maximum supported byte count is [`i64::MAX`]. This makes it @@ -178,59 +160,50 @@ pub mod types { &self.0 } } - impl From for u64 { fn from(value: ByteCount) -> Self { value.0 } } - impl From<&ByteCount> for ByteCount { fn from(value: &ByteCount) -> Self { value.clone() } } - impl From for ByteCount { fn from(value: u64) -> Self { Self(value) } } - impl std::str::FromStr for ByteCount { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for ByteCount { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ByteCount { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ByteCount { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for ByteCount { fn to_string(&self) -> String { self.0.to_string() } } - ///Client view of a [`Certificate`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Certificate { @@ -246,19 +219,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Certificate> for Certificate { fn from(value: &Certificate) -> Self { value.clone() } } - impl Certificate { pub fn builder() -> builder::Certificate { builder::Certificate::default() } } - ///Create-time parameters for a /// [`Certificate`](crate::external_api::views::Certificate) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -272,19 +242,16 @@ pub mod types { ///The service using this certificate pub service: ServiceUsingCertificate, } - impl From<&CertificateCreate> for CertificateCreate { fn from(value: &CertificateCreate) -> Self { value.clone() } } - impl CertificateCreate { pub fn builder() -> builder::CertificateCreate { builder::CertificateCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct CertificateResultsPage { @@ -294,19 +261,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&CertificateResultsPage> for CertificateResultsPage { fn from(value: &CertificateResultsPage) -> Self { value.clone() } } - impl CertificateResultsPage { pub fn builder() -> builder::CertificateResultsPage { builder::CertificateResultsPage::default() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -320,19 +284,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&ComponentUpdate> for ComponentUpdate { fn from(value: &ComponentUpdate) -> Self { value.clone() } } - impl ComponentUpdate { pub fn builder() -> builder::ComponentUpdate { builder::ComponentUpdate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ComponentUpdateResultsPage { @@ -342,57 +303,48 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ComponentUpdateResultsPage> for ComponentUpdateResultsPage { fn from(value: &ComponentUpdateResultsPage) -> Self { value.clone() } } - impl ComponentUpdateResultsPage { pub fn builder() -> builder::ComponentUpdateResultsPage { builder::ComponentUpdateResultsPage::default() } } - ///A cumulative or counter data type. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Cumulativedouble { pub start_time: chrono::DateTime, pub value: f64, } - impl From<&Cumulativedouble> for Cumulativedouble { fn from(value: &Cumulativedouble) -> Self { value.clone() } } - impl Cumulativedouble { pub fn builder() -> builder::Cumulativedouble { builder::Cumulativedouble::default() } } - ///A cumulative or counter data type. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Cumulativeint64 { pub start_time: chrono::DateTime, pub value: i64, } - impl From<&Cumulativeint64> for Cumulativeint64 { fn from(value: &Cumulativeint64) -> Self { value.clone() } } - impl Cumulativeint64 { pub fn builder() -> builder::Cumulativeint64 { builder::Cumulativeint64::default() } } - ///A `Datum` is a single sampled data point from a metric. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "type", content = "datum")] @@ -416,61 +368,51 @@ pub mod types { #[serde(rename = "histogram_f64")] HistogramF64(Histogramdouble), } - impl From<&Datum> for Datum { fn from(value: &Datum) -> Self { value.clone() } } - impl From for Datum { fn from(value: bool) -> Self { Self::Bool(value) } } - impl From for Datum { fn from(value: i64) -> Self { Self::I64(value) } } - impl From for Datum { fn from(value: f64) -> Self { Self::F64(value) } } - impl From> for Datum { fn from(value: Vec) -> Self { Self::Bytes(value) } } - impl From for Datum { fn from(value: Cumulativeint64) -> Self { Self::CumulativeI64(value) } } - impl From for Datum { fn from(value: Cumulativedouble) -> Self { Self::CumulativeF64(value) } } - impl From for Datum { fn from(value: Histogramint64) -> Self { Self::HistogramI64(value) } } - impl From for Datum { fn from(value: Histogramdouble) -> Self { Self::HistogramF64(value) } } - ///The type of an individual datum of a metric. #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -495,13 +437,11 @@ pub mod types { #[serde(rename = "histogram_f64")] HistogramF64, } - impl From<&DatumType> for DatumType { fn from(value: &DatumType) -> Self { value.clone() } } - impl ToString for DatumType { fn to_string(&self) -> String { match *self { @@ -517,7 +457,6 @@ pub mod types { } } } - impl std::str::FromStr for DatumType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -535,28 +474,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for DatumType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for DatumType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for DatumType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct DerEncodedKeyPair { ///request signing private key (base64 encoded der file) @@ -564,85 +499,71 @@ pub mod types { ///request signing public certificate (base64 encoded der file) pub public_cert: String, } - impl From<&DerEncodedKeyPair> for DerEncodedKeyPair { fn from(value: &DerEncodedKeyPair) -> Self { value.clone() } } - impl DerEncodedKeyPair { pub fn builder() -> builder::DerEncodedKeyPair { builder::DerEncodedKeyPair::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct DeviceAccessTokenRequest { pub client_id: uuid::Uuid, pub device_code: String, pub grant_type: String, } - impl From<&DeviceAccessTokenRequest> for DeviceAccessTokenRequest { fn from(value: &DeviceAccessTokenRequest) -> Self { value.clone() } } - impl DeviceAccessTokenRequest { pub fn builder() -> builder::DeviceAccessTokenRequest { builder::DeviceAccessTokenRequest::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct DeviceAuthRequest { pub client_id: uuid::Uuid, } - impl From<&DeviceAuthRequest> for DeviceAuthRequest { fn from(value: &DeviceAuthRequest) -> Self { value.clone() } } - impl DeviceAuthRequest { pub fn builder() -> builder::DeviceAuthRequest { builder::DeviceAuthRequest::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct DeviceAuthVerify { pub user_code: String, } - impl From<&DeviceAuthVerify> for DeviceAuthVerify { fn from(value: &DeviceAuthVerify) -> Self { value.clone() } } - impl DeviceAuthVerify { pub fn builder() -> builder::DeviceAuthVerify { builder::DeviceAuthVerify::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "type", content = "value")] pub enum Digest { #[serde(rename = "sha256")] Sha256(String), } - impl From<&Digest> for Digest { fn from(value: &Digest) -> Self { value.clone() } } - ///Client view of a [`Disk`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Disk { @@ -666,19 +587,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Disk> for Disk { fn from(value: &Disk) -> Self { value.clone() } } - impl Disk { pub fn builder() -> builder::Disk { builder::Disk::default() } } - ///Create-time parameters for a /// [`Disk`](omicron_common::api::external::Disk) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -690,19 +608,16 @@ pub mod types { ///total size of the Disk in bytes pub size: ByteCount, } - impl From<&DiskCreate> for DiskCreate { fn from(value: &DiskCreate) -> Self { value.clone() } } - impl DiskCreate { pub fn builder() -> builder::DiskCreate { builder::DiskCreate::default() } } - ///TODO-v1: Delete this Parameters for the /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached /// to an instance @@ -710,19 +625,16 @@ pub mod types { pub struct DiskIdentifier { pub name: Name, } - impl From<&DiskIdentifier> for DiskIdentifier { fn from(value: &DiskIdentifier) -> Self { value.clone() } } - impl DiskIdentifier { pub fn builder() -> builder::DiskIdentifier { builder::DiskIdentifier::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -740,13 +652,11 @@ pub mod types { #[serde(rename = "write_bytes")] WriteBytes, } - impl From<&DiskMetricName> for DiskMetricName { fn from(value: &DiskMetricName) -> Self { value.clone() } } - impl ToString for DiskMetricName { fn to_string(&self) -> String { match *self { @@ -759,7 +669,6 @@ pub mod types { } } } - impl std::str::FromStr for DiskMetricName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -774,45 +683,38 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for DiskMetricName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for DiskMetricName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for DiskMetricName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct DiskPath { pub disk: NameOrId, } - impl From<&DiskPath> for DiskPath { fn from(value: &DiskPath) -> Self { value.clone() } } - impl DiskPath { pub fn builder() -> builder::DiskPath { builder::DiskPath::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct DiskResultsPage { @@ -822,19 +724,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&DiskResultsPage> for DiskResultsPage { fn from(value: &DiskResultsPage) -> Self { value.clone() } } - impl DiskResultsPage { pub fn builder() -> builder::DiskResultsPage { builder::DiskResultsPage::default() } } - ///Different sources for a disk #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "type")] @@ -856,13 +755,11 @@ pub mod types { #[serde(rename = "global_image")] GlobalImage { image_id: uuid::Uuid }, } - impl From<&DiskSource> for DiskSource { fn from(value: &DiskSource) -> Self { value.clone() } } - ///State of a Disk (primarily: attached or not) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "state", content = "instance")] @@ -885,13 +782,11 @@ pub mod types { #[serde(rename = "faulted")] Faulted, } - impl From<&DiskState> for DiskState { fn from(value: &DiskState) -> Self { value.clone() } } - ///OS image distribution #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Distribution { @@ -900,19 +795,16 @@ pub mod types { ///The version of the distribution (e.g. "3.10" or "18.04") pub version: String, } - impl From<&Distribution> for Distribution { fn from(value: &Distribution) -> Self { value.clone() } } - impl Distribution { pub fn builder() -> builder::Distribution { builder::Distribution::default() } } - ///Error information from a response. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Error { @@ -921,37 +813,31 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } - impl Error { pub fn builder() -> builder::Error { builder::Error::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ExternalIp { pub ip: std::net::IpAddr, pub kind: IpKind, } - impl From<&ExternalIp> for ExternalIp { fn from(value: &ExternalIp) -> Self { value.clone() } } - impl ExternalIp { pub fn builder() -> builder::ExternalIp { builder::ExternalIp::default() } } - ///Parameters for creating an external IP address for instances. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "type")] @@ -965,13 +851,11 @@ pub mod types { pool_name: Option, }, } - impl From<&ExternalIpCreate> for ExternalIpCreate { fn from(value: &ExternalIpCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ExternalIpResultsPage { @@ -981,19 +865,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ExternalIpResultsPage> for ExternalIpResultsPage { fn from(value: &ExternalIpResultsPage) -> Self { value.clone() } } - impl ExternalIpResultsPage { pub fn builder() -> builder::ExternalIpResultsPage { builder::ExternalIpResultsPage::default() } } - ///The name and type information for a field of a timeseries schema. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct FieldSchema { @@ -1001,19 +882,16 @@ pub mod types { pub source: FieldSource, pub ty: FieldType, } - impl From<&FieldSchema> for FieldSchema { fn from(value: &FieldSchema) -> Self { value.clone() } } - impl FieldSchema { pub fn builder() -> builder::FieldSchema { builder::FieldSchema::default() } } - ///The source from which a field is derived, the target or metric. #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -1024,13 +902,11 @@ pub mod types { #[serde(rename = "metric")] Metric, } - impl From<&FieldSource> for FieldSource { fn from(value: &FieldSource) -> Self { value.clone() } } - impl ToString for FieldSource { fn to_string(&self) -> String { match *self { @@ -1039,7 +915,6 @@ pub mod types { } } } - impl std::str::FromStr for FieldSource { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1050,28 +925,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FieldSource { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FieldSource { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FieldSource { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///The `FieldType` identifies the data type of a target or metric field. #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -1088,13 +959,11 @@ pub mod types { #[serde(rename = "bool")] Bool, } - impl From<&FieldType> for FieldType { fn from(value: &FieldType) -> Self { value.clone() } } - impl ToString for FieldType { fn to_string(&self) -> String { match *self { @@ -1106,7 +975,6 @@ pub mod types { } } } - impl std::str::FromStr for FieldType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1120,28 +988,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FieldType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FieldType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FieldType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -1153,13 +1017,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&FleetRole> for FleetRole { fn from(value: &FleetRole) -> Self { value.clone() } } - impl ToString for FleetRole { fn to_string(&self) -> String { match *self { @@ -1169,7 +1031,6 @@ pub mod types { } } } - impl std::str::FromStr for FleetRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1181,28 +1042,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FleetRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FleetRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FleetRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -1214,19 +1071,16 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&FleetRolePolicy> for FleetRolePolicy { fn from(value: &FleetRolePolicy) -> Self { value.clone() } } - impl FleetRolePolicy { pub fn builder() -> builder::FleetRolePolicy { builder::FleetRolePolicy::default() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -1239,19 +1093,16 @@ pub mod types { pub identity_type: IdentityType, pub role_name: FleetRole, } - impl From<&FleetRoleRoleAssignment> for FleetRoleRoleAssignment { fn from(value: &FleetRoleRoleAssignment) -> Self { value.clone() } } - impl FleetRoleRoleAssignment { pub fn builder() -> builder::FleetRoleRoleAssignment { builder::FleetRoleRoleAssignment::default() } } - ///Client view of global Images #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct GlobalImage { @@ -1280,19 +1131,16 @@ pub mod types { ///Image version pub version: String, } - impl From<&GlobalImage> for GlobalImage { fn from(value: &GlobalImage) -> Self { value.clone() } } - impl GlobalImage { pub fn builder() -> builder::GlobalImage { builder::GlobalImage::default() } } - ///Create-time parameters for an /// [`GlobalImage`](crate::external_api::views::GlobalImage) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -1306,19 +1154,16 @@ pub mod types { ///The source of the image's contents. pub source: ImageSource, } - impl From<&GlobalImageCreate> for GlobalImageCreate { fn from(value: &GlobalImageCreate) -> Self { value.clone() } } - impl GlobalImageCreate { pub fn builder() -> builder::GlobalImageCreate { builder::GlobalImageCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct GlobalImageResultsPage { @@ -1328,19 +1173,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&GlobalImageResultsPage> for GlobalImageResultsPage { fn from(value: &GlobalImageResultsPage) -> Self { value.clone() } } - impl GlobalImageResultsPage { pub fn builder() -> builder::GlobalImageResultsPage { builder::GlobalImageResultsPage::default() } } - ///Client view of a [`Group`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Group { @@ -1350,19 +1192,16 @@ pub mod types { ///Uuid of the silo to which this group belongs pub silo_id: uuid::Uuid, } - impl From<&Group> for Group { fn from(value: &Group) -> Self { value.clone() } } - impl Group { pub fn builder() -> builder::Group { builder::Group::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct GroupResultsPage { @@ -1372,19 +1211,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&GroupResultsPage> for GroupResultsPage { fn from(value: &GroupResultsPage) -> Self { value.clone() } } - impl GroupResultsPage { pub fn builder() -> builder::GroupResultsPage { builder::GroupResultsPage::default() } } - ///A simple type for managing a histogram metric. /// ///A histogram maintains the count of any number of samples, over a set of @@ -1433,19 +1269,16 @@ pub mod types { pub n_samples: u64, pub start_time: chrono::DateTime, } - impl From<&Histogramdouble> for Histogramdouble { fn from(value: &Histogramdouble) -> Self { value.clone() } } - impl Histogramdouble { pub fn builder() -> builder::Histogramdouble { builder::Histogramdouble::default() } } - ///A simple type for managing a histogram metric. /// ///A histogram maintains the count of any number of samples, over a set of @@ -1494,19 +1327,16 @@ pub mod types { pub n_samples: u64, pub start_time: chrono::DateTime, } - impl From<&Histogramint64> for Histogramint64 { fn from(value: &Histogramint64) -> Self { value.clone() } } - impl Histogramint64 { pub fn builder() -> builder::Histogramint64 { builder::Histogramint64::default() } } - ///Supported set of sort modes for scanning by id only. /// ///Currently, we only support scanning in ascending order. @@ -1518,13 +1348,11 @@ pub mod types { #[serde(rename = "id_ascending")] IdAscending, } - impl From<&IdSortMode> for IdSortMode { fn from(value: &IdSortMode) -> Self { value.clone() } } - impl ToString for IdSortMode { fn to_string(&self) -> String { match *self { @@ -1532,7 +1360,6 @@ pub mod types { } } } - impl std::str::FromStr for IdSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1542,28 +1369,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of an [`IdentityProvider`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct IdentityProvider { @@ -1580,19 +1403,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&IdentityProvider> for IdentityProvider { fn from(value: &IdentityProvider) -> Self { value.clone() } } - impl IdentityProvider { pub fn builder() -> builder::IdentityProvider { builder::IdentityProvider::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct IdentityProviderResultsPage { @@ -1602,19 +1422,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IdentityProviderResultsPage> for IdentityProviderResultsPage { fn from(value: &IdentityProviderResultsPage) -> Self { value.clone() } } - impl IdentityProviderResultsPage { pub fn builder() -> builder::IdentityProviderResultsPage { builder::IdentityProviderResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -1623,13 +1440,11 @@ pub mod types { #[serde(rename = "saml")] Saml, } - impl From<&IdentityProviderType> for IdentityProviderType { fn from(value: &IdentityProviderType) -> Self { value.clone() } } - impl ToString for IdentityProviderType { fn to_string(&self) -> String { match *self { @@ -1637,7 +1452,6 @@ pub mod types { } } } - impl std::str::FromStr for IdentityProviderType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1647,28 +1461,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdentityProviderType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdentityProviderType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdentityProviderType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Describes what kind of identity is described by an id #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -1679,13 +1489,11 @@ pub mod types { #[serde(rename = "silo_group")] SiloGroup, } - impl From<&IdentityType> for IdentityType { fn from(value: &IdentityType) -> Self { value.clone() } } - impl ToString for IdentityType { fn to_string(&self) -> String { match *self { @@ -1694,7 +1502,6 @@ pub mod types { } } } - impl std::str::FromStr for IdentityType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1705,28 +1512,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdentityType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdentityType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdentityType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "type")] pub enum IdpMetadataSource { @@ -1735,13 +1538,11 @@ pub mod types { #[serde(rename = "base64_encoded_xml")] Base64EncodedXml { data: String }, } - impl From<&IdpMetadataSource> for IdpMetadataSource { fn from(value: &IdpMetadataSource) -> Self { value.clone() } } - ///Client view of project Images #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Image { @@ -1771,19 +1572,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub version: Option, } - impl From<&Image> for Image { fn from(value: &Image) -> Self { value.clone() } } - impl Image { pub fn builder() -> builder::Image { builder::Image::default() } } - ///Create-time parameters for an /// [`Image`](crate::external_api::views::Image) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -1795,19 +1593,16 @@ pub mod types { ///The source of the image's contents. pub source: ImageSource, } - impl From<&ImageCreate> for ImageCreate { fn from(value: &ImageCreate) -> Self { value.clone() } } - impl ImageCreate { pub fn builder() -> builder::ImageCreate { builder::ImageCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ImageResultsPage { @@ -1817,19 +1612,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ImageResultsPage> for ImageResultsPage { fn from(value: &ImageResultsPage) -> Self { value.clone() } } - impl ImageResultsPage { pub fn builder() -> builder::ImageResultsPage { builder::ImageResultsPage::default() } } - ///The source of the underlying image. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "type")] @@ -1841,13 +1633,11 @@ pub mod types { #[serde(rename = "you_can_boot_anything_as_long_as_its_alpine")] YouCanBootAnythingAsLongAsItsAlpine, } - impl From<&ImageSource> for ImageSource { fn from(value: &ImageSource) -> Self { value.clone() } } - ///Client view of an [`Instance`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Instance { @@ -1872,19 +1662,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub time_run_state_updated: chrono::DateTime, } - impl From<&Instance> for Instance { fn from(value: &Instance) -> Self { value.clone() } } - impl Instance { pub fn builder() -> builder::Instance { builder::Instance::default() } } - ///The number of CPUs in an Instance #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceCpuCount(pub u16); @@ -1894,59 +1681,50 @@ pub mod types { &self.0 } } - impl From for u16 { fn from(value: InstanceCpuCount) -> Self { value.0 } } - impl From<&InstanceCpuCount> for InstanceCpuCount { fn from(value: &InstanceCpuCount) -> Self { value.clone() } } - impl From for InstanceCpuCount { fn from(value: u16) -> Self { Self(value) } } - impl std::str::FromStr for InstanceCpuCount { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for InstanceCpuCount { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceCpuCount { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceCpuCount { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for InstanceCpuCount { fn to_string(&self) -> String { self.0.to_string() } } - ///Create-time parameters for an /// [`Instance`](omicron_common::api::external::Instance) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -1979,19 +1757,16 @@ pub mod types { #[serde(default)] pub user_data: String, } - impl From<&InstanceCreate> for InstanceCreate { fn from(value: &InstanceCreate) -> Self { value.clone() } } - impl InstanceCreate { pub fn builder() -> builder::InstanceCreate { builder::InstanceCreate::default() } } - ///Describe the instance's disks at creation time #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "type")] @@ -2013,32 +1788,27 @@ pub mod types { name: Name, }, } - impl From<&InstanceDiskAttachment> for InstanceDiskAttachment { fn from(value: &InstanceDiskAttachment) -> Self { value.clone() } } - ///Migration parameters for an /// [`Instance`](omicron_common::api::external::Instance) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceMigrate { pub dst_sled_id: uuid::Uuid, } - impl From<&InstanceMigrate> for InstanceMigrate { fn from(value: &InstanceMigrate) -> Self { value.clone() } } - impl InstanceMigrate { pub fn builder() -> builder::InstanceMigrate { builder::InstanceMigrate::default() } } - ///Describes an attachment of a `NetworkInterface` to an `Instance`, at the /// time the instance is created. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -2055,19 +1825,16 @@ pub mod types { #[serde(rename = "none")] None, } - impl From<&InstanceNetworkInterfaceAttachment> for InstanceNetworkInterfaceAttachment { fn from(value: &InstanceNetworkInterfaceAttachment) -> Self { value.clone() } } - impl From> for InstanceNetworkInterfaceAttachment { fn from(value: Vec) -> Self { Self::Create(value) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceResultsPage { @@ -2077,19 +1844,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&InstanceResultsPage> for InstanceResultsPage { fn from(value: &InstanceResultsPage) -> Self { value.clone() } } - impl InstanceResultsPage { pub fn builder() -> builder::InstanceResultsPage { builder::InstanceResultsPage::default() } } - ///Contents of an Instance's serial console buffer. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceSerialConsoleData { @@ -2101,19 +1865,16 @@ pub mod types { /// a subsequent request) of the last byte returned in `data`. pub last_byte_offset: u64, } - impl From<&InstanceSerialConsoleData> for InstanceSerialConsoleData { fn from(value: &InstanceSerialConsoleData) -> Self { value.clone() } } - impl InstanceSerialConsoleData { pub fn builder() -> builder::InstanceSerialConsoleData { builder::InstanceSerialConsoleData::default() } } - ///Running state of an Instance (primarily: booted or stopped) /// ///This typically reflects whether it's starting, running, stopping, or @@ -2157,13 +1918,11 @@ pub mod types { #[serde(rename = "destroyed")] Destroyed, } - impl From<&InstanceState> for InstanceState { fn from(value: &InstanceState) -> Self { value.clone() } } - impl ToString for InstanceState { fn to_string(&self) -> String { match *self { @@ -2180,7 +1939,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2199,28 +1957,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///The kind of an external IP address for an instance #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -2231,13 +1985,11 @@ pub mod types { #[serde(rename = "floating")] Floating, } - impl From<&IpKind> for IpKind { fn from(value: &IpKind) -> Self { value.clone() } } - impl ToString for IpKind { fn to_string(&self) -> String { match *self { @@ -2246,7 +1998,6 @@ pub mod types { } } } - impl std::str::FromStr for IpKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2257,41 +2008,35 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IpKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IpKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IpKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(untagged)] pub enum IpNet { V4(Ipv4Net), V6(Ipv6Net), } - impl From<&IpNet> for IpNet { fn from(value: &IpNet) -> Self { value.clone() } } - impl std::str::FromStr for IpNet { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2304,28 +2049,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IpNet { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IpNet { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IpNet { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for IpNet { fn to_string(&self) -> String { match self { @@ -2334,19 +2075,16 @@ pub mod types { } } } - impl From for IpNet { fn from(value: Ipv4Net) -> Self { Self::V4(value) } } - impl From for IpNet { fn from(value: Ipv6Net) -> Self { Self::V6(value) } } - ///Identity-related metadata that's included in nearly all public API /// objects #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -2362,19 +2100,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&IpPool> for IpPool { fn from(value: &IpPool) -> Self { value.clone() } } - impl IpPool { pub fn builder() -> builder::IpPool { builder::IpPool::default() } } - ///Create-time parameters for an IP Pool. /// ///See [`IpPool`](crate::external_api::views::IpPool) @@ -2383,38 +2118,32 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&IpPoolCreate> for IpPoolCreate { fn from(value: &IpPoolCreate) -> Self { value.clone() } } - impl IpPoolCreate { pub fn builder() -> builder::IpPoolCreate { builder::IpPoolCreate::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct IpPoolRange { pub id: uuid::Uuid, pub range: IpRange, pub time_created: chrono::DateTime, } - impl From<&IpPoolRange> for IpPoolRange { fn from(value: &IpPoolRange) -> Self { value.clone() } } - impl IpPoolRange { pub fn builder() -> builder::IpPoolRange { builder::IpPoolRange::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct IpPoolRangeResultsPage { @@ -2424,19 +2153,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IpPoolRangeResultsPage> for IpPoolRangeResultsPage { fn from(value: &IpPoolRangeResultsPage) -> Self { value.clone() } } - impl IpPoolRangeResultsPage { pub fn builder() -> builder::IpPoolRangeResultsPage { builder::IpPoolRangeResultsPage::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct IpPoolResultsPage { @@ -2446,19 +2172,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IpPoolResultsPage> for IpPoolResultsPage { fn from(value: &IpPoolResultsPage) -> Self { value.clone() } } - impl IpPoolResultsPage { pub fn builder() -> builder::IpPoolResultsPage { builder::IpPoolResultsPage::default() } } - ///Parameters for updating an IP Pool #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct IpPoolUpdate { @@ -2467,44 +2190,37 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&IpPoolUpdate> for IpPoolUpdate { fn from(value: &IpPoolUpdate) -> Self { value.clone() } } - impl IpPoolUpdate { pub fn builder() -> builder::IpPoolUpdate { builder::IpPoolUpdate::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(untagged)] pub enum IpRange { V4(Ipv4Range), V6(Ipv6Range), } - impl From<&IpRange> for IpRange { fn from(value: &IpRange) -> Self { value.clone() } } - impl From for IpRange { fn from(value: Ipv4Range) -> Self { Self::V4(value) } } - impl From for IpRange { fn from(value: Ipv6Range) -> Self { Self::V6(value) } } - ///An IPv4 subnet, including prefix and subnet mask #[derive(Clone, Debug, JsonSchema, Serialize)] pub struct Ipv4Net(String); @@ -2514,19 +2230,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Ipv4Net) -> Self { value.0 } } - impl From<&Ipv4Net> for Ipv4Net { fn from(value: &Ipv4Net) -> Self { value.clone() } } - impl std::str::FromStr for Ipv4Net { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2534,28 +2247,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Ipv4Net { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Ipv4Net { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Ipv4Net { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Ipv4Net { fn deserialize(deserializer: D) -> Result where @@ -2566,7 +2275,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A non-decreasing IPv4 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. @@ -2575,19 +2283,16 @@ pub mod types { pub first: std::net::Ipv4Addr, pub last: std::net::Ipv4Addr, } - impl From<&Ipv4Range> for Ipv4Range { fn from(value: &Ipv4Range) -> Self { value.clone() } } - impl Ipv4Range { pub fn builder() -> builder::Ipv4Range { builder::Ipv4Range::default() } } - ///An IPv6 subnet, including prefix and subnet mask #[derive(Clone, Debug, JsonSchema, Serialize)] pub struct Ipv6Net(String); @@ -2597,19 +2302,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Ipv6Net) -> Self { value.0 } } - impl From<&Ipv6Net> for Ipv6Net { fn from(value: &Ipv6Net) -> Self { value.clone() } } - impl std::str::FromStr for Ipv6Net { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2617,28 +2319,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Ipv6Net { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Ipv6Net { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Ipv6Net { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Ipv6Net { fn deserialize(deserializer: D) -> Result where @@ -2649,7 +2347,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A non-decreasing IPv6 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. @@ -2658,19 +2355,16 @@ pub mod types { pub first: std::net::Ipv6Addr, pub last: std::net::Ipv6Addr, } - impl From<&Ipv6Range> for Ipv6Range { fn from(value: &Ipv6Range) -> Self { value.clone() } } - impl Ipv6Range { pub fn builder() -> builder::Ipv6Range { builder::Ipv6Range::default() } } - ///An inclusive-inclusive range of IP ports. The second port may be omitted /// to represent a single port #[derive(Clone, Debug, JsonSchema, Serialize)] @@ -2681,19 +2375,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: L4PortRange) -> Self { value.0 } } - impl From<&L4PortRange> for L4PortRange { fn from(value: &L4PortRange) -> Self { value.clone() } } - impl std::str::FromStr for L4PortRange { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2713,28 +2404,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for L4PortRange { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for L4PortRange { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for L4PortRange { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for L4PortRange { fn deserialize(deserializer: D) -> Result where @@ -2745,7 +2432,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A Media Access Control address, in EUI-48 format #[derive(Clone, Debug, JsonSchema, Serialize)] pub struct MacAddr(String); @@ -2755,19 +2441,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: MacAddr) -> Self { value.0 } } - impl From<&MacAddr> for MacAddr { fn from(value: &MacAddr) -> Self { value.clone() } } - impl std::str::FromStr for MacAddr { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2787,28 +2470,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for MacAddr { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for MacAddr { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for MacAddr { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for MacAddr { fn deserialize(deserializer: D) -> Result where @@ -2819,26 +2498,22 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A `Measurement` is a timestamped datum from a single metric #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Measurement { pub datum: Datum, pub timestamp: chrono::DateTime, } - impl From<&Measurement> for Measurement { fn from(value: &Measurement) -> Self { value.clone() } } - impl Measurement { pub fn builder() -> builder::Measurement { builder::Measurement::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct MeasurementResultsPage { @@ -2848,19 +2523,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&MeasurementResultsPage> for MeasurementResultsPage { fn from(value: &MeasurementResultsPage) -> Self { value.clone() } } - impl MeasurementResultsPage { pub fn builder() -> builder::MeasurementResultsPage { builder::MeasurementResultsPage::default() } } - ///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. @@ -2872,19 +2544,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Name) -> Self { value.0 } } - impl From<&Name> for Name { fn from(value: &Name) -> Self { value.clone() } } - impl std::str::FromStr for Name { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2895,28 +2564,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Name { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Name { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Name { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Name { fn deserialize(deserializer: D) -> Result where @@ -2927,20 +2592,17 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(untagged)] pub enum NameOrId { Id(uuid::Uuid), Name(Name), } - impl From<&NameOrId> for NameOrId { fn from(value: &NameOrId) -> Self { value.clone() } } - impl std::str::FromStr for NameOrId { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2953,28 +2615,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameOrId { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameOrId { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameOrId { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for NameOrId { fn to_string(&self) -> String { match self { @@ -2983,19 +2641,16 @@ pub mod types { } } } - impl From for NameOrId { fn from(value: uuid::Uuid) -> Self { Self::Id(value) } } - impl From for NameOrId { fn from(value: Name) -> Self { Self::Name(value) } } - ///Supported set of sort modes for scanning by name or id #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -3011,13 +2666,11 @@ pub mod types { #[serde(rename = "id_ascending")] IdAscending, } - impl From<&NameOrIdSortMode> for NameOrIdSortMode { fn from(value: &NameOrIdSortMode) -> Self { value.clone() } } - impl ToString for NameOrIdSortMode { fn to_string(&self) -> String { match *self { @@ -3027,7 +2680,6 @@ pub mod types { } } } - impl std::str::FromStr for NameOrIdSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3039,28 +2691,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameOrIdSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameOrIdSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameOrIdSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Supported set of sort modes for scanning by name only /// ///Currently, we only support scanning in ascending order. @@ -3072,13 +2720,11 @@ pub mod types { #[serde(rename = "name_ascending")] NameAscending, } - impl From<&NameSortMode> for NameSortMode { fn from(value: &NameSortMode) -> Self { value.clone() } } - impl ToString for NameSortMode { fn to_string(&self) -> String { match *self { @@ -3086,7 +2732,6 @@ pub mod types { } } } - impl std::str::FromStr for NameSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3096,28 +2741,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A `NetworkInterface` represents a virtual network interface device. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct NetworkInterface { @@ -3145,19 +2786,16 @@ pub mod types { ///The VPC to which the interface belongs. pub vpc_id: uuid::Uuid, } - impl From<&NetworkInterface> for NetworkInterface { fn from(value: &NetworkInterface) -> Self { value.clone() } } - impl NetworkInterface { pub fn builder() -> builder::NetworkInterface { builder::NetworkInterface::default() } } - ///Create-time parameters for a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -3173,19 +2811,16 @@ pub mod types { ///The VPC in which to create the interface. pub vpc_name: Name, } - impl From<&NetworkInterfaceCreate> for NetworkInterfaceCreate { fn from(value: &NetworkInterfaceCreate) -> Self { value.clone() } } - impl NetworkInterfaceCreate { pub fn builder() -> builder::NetworkInterfaceCreate { builder::NetworkInterfaceCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct NetworkInterfaceResultsPage { @@ -3195,19 +2830,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&NetworkInterfaceResultsPage> for NetworkInterfaceResultsPage { fn from(value: &NetworkInterfaceResultsPage) -> Self { value.clone() } } - impl NetworkInterfaceResultsPage { pub fn builder() -> builder::NetworkInterfaceResultsPage { builder::NetworkInterfaceResultsPage::default() } } - ///Parameters for updating a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface). /// @@ -3233,19 +2865,16 @@ pub mod types { #[serde(default)] pub primary: bool, } - impl From<&NetworkInterfaceUpdate> for NetworkInterfaceUpdate { fn from(value: &NetworkInterfaceUpdate) -> Self { value.clone() } } - impl NetworkInterfaceUpdate { pub fn builder() -> builder::NetworkInterfaceUpdate { builder::NetworkInterfaceUpdate::default() } } - ///Unique name for a saga [`Node`] /// ///Each node requires a string name that's unique within its DAG. The name @@ -3260,38 +2889,32 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: NodeName) -> Self { value.0 } } - impl From<&NodeName> for NodeName { fn from(value: &NodeName) -> Self { value.clone() } } - impl From for NodeName { fn from(value: String) -> Self { Self(value) } } - impl std::str::FromStr for NodeName { type Err = std::convert::Infallible; fn from_str(value: &str) -> Result { Ok(Self(value.to_string())) } } - impl ToString for NodeName { fn to_string(&self) -> String { self.0.to_string() } } - ///Client view of an [`Organization`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Organization { @@ -3306,19 +2929,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Organization> for Organization { fn from(value: &Organization) -> Self { value.clone() } } - impl Organization { pub fn builder() -> builder::Organization { builder::Organization::default() } } - ///Create-time parameters for an /// [`Organization`](crate::external_api::views::Organization) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -3326,19 +2946,16 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&OrganizationCreate> for OrganizationCreate { fn from(value: &OrganizationCreate) -> Self { value.clone() } } - impl OrganizationCreate { pub fn builder() -> builder::OrganizationCreate { builder::OrganizationCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct OrganizationResultsPage { @@ -3348,19 +2965,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&OrganizationResultsPage> for OrganizationResultsPage { fn from(value: &OrganizationResultsPage) -> Self { value.clone() } } - impl OrganizationResultsPage { pub fn builder() -> builder::OrganizationResultsPage { builder::OrganizationResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -3372,13 +2986,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&OrganizationRole> for OrganizationRole { fn from(value: &OrganizationRole) -> Self { value.clone() } } - impl ToString for OrganizationRole { fn to_string(&self) -> String { match *self { @@ -3388,7 +3000,6 @@ pub mod types { } } } - impl std::str::FromStr for OrganizationRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3400,28 +3011,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for OrganizationRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for OrganizationRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for OrganizationRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -3433,19 +3040,16 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&OrganizationRolePolicy> for OrganizationRolePolicy { fn from(value: &OrganizationRolePolicy) -> Self { value.clone() } } - impl OrganizationRolePolicy { pub fn builder() -> builder::OrganizationRolePolicy { builder::OrganizationRolePolicy::default() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -3458,19 +3062,16 @@ pub mod types { pub identity_type: IdentityType, pub role_name: OrganizationRole, } - impl From<&OrganizationRoleRoleAssignment> for OrganizationRoleRoleAssignment { fn from(value: &OrganizationRoleRoleAssignment) -> Self { value.clone() } } - impl OrganizationRoleRoleAssignment { pub fn builder() -> builder::OrganizationRoleRoleAssignment { builder::OrganizationRoleRoleAssignment::default() } } - ///Updateable properties of an /// [`Organization`](crate::external_api::views::Organization) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -3480,19 +3081,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&OrganizationUpdate> for OrganizationUpdate { fn from(value: &OrganizationUpdate) -> Self { value.clone() } } - impl OrganizationUpdate { pub fn builder() -> builder::OrganizationUpdate { builder::OrganizationUpdate::default() } } - ///Passwords may be subject to additional constraints. #[derive(Clone, Debug, JsonSchema, Serialize)] pub struct Password(String); @@ -3502,19 +3100,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Password) -> Self { value.0 } } - impl From<&Password> for Password { fn from(value: &Password) -> Self { value.clone() } } - impl std::str::FromStr for Password { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3524,28 +3119,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Password { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Password { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Password { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Password { fn deserialize(deserializer: D) -> Result where @@ -3556,7 +3147,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///Client view of a [`PhysicalDisk`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct PhysicalDisk { @@ -3574,19 +3164,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub vendor: String, } - impl From<&PhysicalDisk> for PhysicalDisk { fn from(value: &PhysicalDisk) -> Self { value.clone() } } - impl PhysicalDisk { pub fn builder() -> builder::PhysicalDisk { builder::PhysicalDisk::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct PhysicalDiskResultsPage { @@ -3596,19 +3183,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&PhysicalDiskResultsPage> for PhysicalDiskResultsPage { fn from(value: &PhysicalDiskResultsPage) -> Self { value.clone() } } - impl PhysicalDiskResultsPage { pub fn builder() -> builder::PhysicalDiskResultsPage { builder::PhysicalDiskResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -3618,13 +3202,11 @@ pub mod types { #[serde(rename = "external")] External, } - impl From<&PhysicalDiskType> for PhysicalDiskType { fn from(value: &PhysicalDiskType) -> Self { value.clone() } } - impl ToString for PhysicalDiskType { fn to_string(&self) -> String { match *self { @@ -3633,7 +3215,6 @@ pub mod types { } } } - impl std::str::FromStr for PhysicalDiskType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3644,28 +3225,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for PhysicalDiskType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for PhysicalDiskType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for PhysicalDiskType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Project`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Project { @@ -3681,19 +3258,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Project> for Project { fn from(value: &Project) -> Self { value.clone() } } - impl Project { pub fn builder() -> builder::Project { builder::Project::default() } } - ///Create-time parameters for a /// [`Project`](crate::external_api::views::Project) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -3701,19 +3275,16 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&ProjectCreate> for ProjectCreate { fn from(value: &ProjectCreate) -> Self { value.clone() } } - impl ProjectCreate { pub fn builder() -> builder::ProjectCreate { builder::ProjectCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct ProjectResultsPage { @@ -3723,19 +3294,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ProjectResultsPage> for ProjectResultsPage { fn from(value: &ProjectResultsPage) -> Self { value.clone() } } - impl ProjectResultsPage { pub fn builder() -> builder::ProjectResultsPage { builder::ProjectResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -3747,13 +3315,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&ProjectRole> for ProjectRole { fn from(value: &ProjectRole) -> Self { value.clone() } } - impl ToString for ProjectRole { fn to_string(&self) -> String { match *self { @@ -3763,7 +3329,6 @@ pub mod types { } } } - impl std::str::FromStr for ProjectRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3775,28 +3340,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for ProjectRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ProjectRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ProjectRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -3808,19 +3369,16 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&ProjectRolePolicy> for ProjectRolePolicy { fn from(value: &ProjectRolePolicy) -> Self { value.clone() } } - impl ProjectRolePolicy { pub fn builder() -> builder::ProjectRolePolicy { builder::ProjectRolePolicy::default() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -3833,19 +3391,16 @@ pub mod types { pub identity_type: IdentityType, pub role_name: ProjectRole, } - impl From<&ProjectRoleRoleAssignment> for ProjectRoleRoleAssignment { fn from(value: &ProjectRoleRoleAssignment) -> Self { value.clone() } } - impl ProjectRoleRoleAssignment { pub fn builder() -> builder::ProjectRoleRoleAssignment { builder::ProjectRoleRoleAssignment::default() } } - ///Updateable properties of a /// [`Project`](crate::external_api::views::Project) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -3855,19 +3410,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&ProjectUpdate> for ProjectUpdate { fn from(value: &ProjectUpdate) -> Self { value.clone() } } - impl ProjectUpdate { pub fn builder() -> builder::ProjectUpdate { builder::ProjectUpdate::default() } } - ///Client view of an [`Rack`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Rack { @@ -3878,19 +3430,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Rack> for Rack { fn from(value: &Rack) -> Self { value.clone() } } - impl Rack { pub fn builder() -> builder::Rack { builder::Rack::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct RackResultsPage { @@ -3900,38 +3449,32 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RackResultsPage> for RackResultsPage { fn from(value: &RackResultsPage) -> Self { value.clone() } } - impl RackResultsPage { pub fn builder() -> builder::RackResultsPage { builder::RackResultsPage::default() } } - ///Client view of a [`Role`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Role { pub description: String, pub name: RoleName, } - impl From<&Role> for Role { fn from(value: &Role) -> Self { value.clone() } } - impl Role { pub fn builder() -> builder::Role { builder::Role::default() } } - ///Role names consist of two string components separated by dot ("."). #[derive(Clone, Debug, JsonSchema, Serialize)] pub struct RoleName(String); @@ -3941,19 +3484,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: RoleName) -> Self { value.0 } } - impl From<&RoleName> for RoleName { fn from(value: &RoleName) -> Self { value.clone() } } - impl std::str::FromStr for RoleName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3970,28 +3510,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for RoleName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for RoleName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for RoleName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for RoleName { fn deserialize(deserializer: D) -> Result where @@ -4002,7 +3538,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct RoleResultsPage { @@ -4012,19 +3547,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RoleResultsPage> for RoleResultsPage { fn from(value: &RoleResultsPage) -> Self { value.clone() } } - impl RoleResultsPage { pub fn builder() -> builder::RoleResultsPage { builder::RoleResultsPage::default() } } - ///A `RouteDestination` is used to match traffic with a routing rule, on /// the destination of that traffic. /// @@ -4047,25 +3579,21 @@ pub mod types { #[serde(rename = "subnet")] Subnet(Name), } - impl From<&RouteDestination> for RouteDestination { fn from(value: &RouteDestination) -> Self { value.clone() } } - impl From for RouteDestination { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for RouteDestination { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///A `RouteTarget` describes the possible locations that traffic matching a /// route destination can be sent. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -4087,19 +3615,16 @@ pub mod types { #[serde(rename = "internet_gateway")] InternetGateway(Name), } - impl From<&RouteTarget> for RouteTarget { fn from(value: &RouteTarget) -> Self { value.clone() } } - impl From for RouteTarget { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - ///A route defines a rule that governs where traffic should be sent based /// on its destination. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -4121,19 +3646,16 @@ pub mod types { ///The VPC Router to which the route belongs. pub vpc_router_id: uuid::Uuid, } - impl From<&RouterRoute> for RouterRoute { fn from(value: &RouterRoute) -> Self { value.clone() } } - impl RouterRoute { pub fn builder() -> builder::RouterRoute { builder::RouterRoute::default() } } - ///Create-time parameters for a [`RouterRoute`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct RouterRouteCreateParams { @@ -4142,19 +3664,16 @@ pub mod types { pub name: Name, pub target: RouteTarget, } - impl From<&RouterRouteCreateParams> for RouterRouteCreateParams { fn from(value: &RouterRouteCreateParams) -> Self { value.clone() } } - impl RouterRouteCreateParams { pub fn builder() -> builder::RouterRouteCreateParams { builder::RouterRouteCreateParams::default() } } - ///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. @@ -4186,13 +3705,11 @@ pub mod types { #[serde(rename = "custom")] Custom, } - impl From<&RouterRouteKind> for RouterRouteKind { fn from(value: &RouterRouteKind) -> Self { value.clone() } } - impl ToString for RouterRouteKind { fn to_string(&self) -> String { match *self { @@ -4203,7 +3720,6 @@ pub mod types { } } } - impl std::str::FromStr for RouterRouteKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4216,28 +3732,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for RouterRouteKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for RouterRouteKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for RouterRouteKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct RouterRouteResultsPage { @@ -4247,19 +3759,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RouterRouteResultsPage> for RouterRouteResultsPage { fn from(value: &RouterRouteResultsPage) -> Self { value.clone() } } - impl RouterRouteResultsPage { pub fn builder() -> builder::RouterRouteResultsPage { builder::RouterRouteResultsPage::default() } } - ///Updateable properties of a [`RouterRoute`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct RouterRouteUpdateParams { @@ -4270,37 +3779,31 @@ pub mod types { pub name: Option, pub target: RouteTarget, } - impl From<&RouterRouteUpdateParams> for RouterRouteUpdateParams { fn from(value: &RouterRouteUpdateParams) -> Self { value.clone() } } - impl RouterRouteUpdateParams { pub fn builder() -> builder::RouterRouteUpdateParams { builder::RouterRouteUpdateParams::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Saga { pub id: uuid::Uuid, pub state: SagaState, } - impl From<&Saga> for Saga { fn from(value: &Saga) -> Self { value.clone() } } - impl Saga { pub fn builder() -> builder::Saga { builder::Saga::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "error")] pub enum SagaErrorInfo { @@ -4315,13 +3818,11 @@ pub mod types { #[serde(rename = "subsaga_create_failed")] SubsagaCreateFailed { message: String }, } - impl From<&SagaErrorInfo> for SagaErrorInfo { fn from(value: &SagaErrorInfo) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SagaResultsPage { @@ -4331,19 +3832,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SagaResultsPage> for SagaResultsPage { fn from(value: &SagaResultsPage) -> Self { value.clone() } } - impl SagaResultsPage { pub fn builder() -> builder::SagaResultsPage { builder::SagaResultsPage::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "state")] pub enum SagaState { @@ -4357,13 +3855,11 @@ pub mod types { error_node_name: NodeName, }, } - impl From<&SagaState> for SagaState { fn from(value: &SagaState) -> Self { value.clone() } } - ///Identity-related metadata that's included in nearly all public API /// objects #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -4393,19 +3889,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&SamlIdentityProvider> for SamlIdentityProvider { fn from(value: &SamlIdentityProvider) -> Self { value.clone() } } - impl SamlIdentityProvider { pub fn builder() -> builder::SamlIdentityProvider { builder::SamlIdentityProvider::default() } } - ///Create-time identity-related parameters #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SamlIdentityProviderCreate { @@ -4432,19 +3925,16 @@ pub mod types { ///customer's technical contact for saml configuration pub technical_contact_email: String, } - impl From<&SamlIdentityProviderCreate> for SamlIdentityProviderCreate { fn from(value: &SamlIdentityProviderCreate) -> Self { value.clone() } } - impl SamlIdentityProviderCreate { pub fn builder() -> builder::SamlIdentityProviderCreate { builder::SamlIdentityProviderCreate::default() } } - #[derive(Clone, Debug, JsonSchema, Serialize)] pub struct SemverVersion(String); impl std::ops::Deref for SemverVersion { @@ -4453,19 +3943,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: SemverVersion) -> Self { value.0 } } - impl From<&SemverVersion> for SemverVersion { fn from(value: &SemverVersion) -> Self { value.clone() } } - impl std::str::FromStr for SemverVersion { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4479,28 +3966,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for SemverVersion { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SemverVersion { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SemverVersion { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for SemverVersion { fn deserialize(deserializer: D) -> Result where @@ -4511,7 +3994,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///The service intended to use this certificate. #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -4521,13 +4003,11 @@ pub mod types { #[serde(rename = "external_api")] ExternalApi, } - impl From<&ServiceUsingCertificate> for ServiceUsingCertificate { fn from(value: &ServiceUsingCertificate) -> Self { value.clone() } } - impl ToString for ServiceUsingCertificate { fn to_string(&self) -> String { match *self { @@ -4535,7 +4015,6 @@ pub mod types { } } } - impl std::str::FromStr for ServiceUsingCertificate { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4545,28 +4024,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a ['Silo'] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Silo { @@ -4586,19 +4061,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Silo> for Silo { fn from(value: &Silo) -> Self { value.clone() } } - impl Silo { pub fn builder() -> builder::Silo { builder::Silo::default() } } - ///Create-time parameters for a [`Silo`](crate::external_api::views::Silo) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SiloCreate { @@ -4617,19 +4089,16 @@ pub mod types { pub identity_mode: SiloIdentityMode, pub name: Name, } - impl From<&SiloCreate> for SiloCreate { fn from(value: &SiloCreate) -> Self { value.clone() } } - impl SiloCreate { pub fn builder() -> builder::SiloCreate { builder::SiloCreate::default() } } - ///Describes how identities are managed and users are authenticated in this /// Silo #[derive( @@ -4647,13 +4116,11 @@ pub mod types { #[serde(rename = "local_only")] LocalOnly, } - impl From<&SiloIdentityMode> for SiloIdentityMode { fn from(value: &SiloIdentityMode) -> Self { value.clone() } } - impl ToString for SiloIdentityMode { fn to_string(&self) -> String { match *self { @@ -4662,7 +4129,6 @@ pub mod types { } } } - impl std::str::FromStr for SiloIdentityMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4673,28 +4139,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SiloIdentityMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SiloIdentityMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SiloIdentityMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SiloResultsPage { @@ -4704,19 +4166,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SiloResultsPage> for SiloResultsPage { fn from(value: &SiloResultsPage) -> Self { value.clone() } } - impl SiloResultsPage { pub fn builder() -> builder::SiloResultsPage { builder::SiloResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -4728,13 +4187,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&SiloRole> for SiloRole { fn from(value: &SiloRole) -> Self { value.clone() } } - impl ToString for SiloRole { fn to_string(&self) -> String { match *self { @@ -4744,7 +4201,6 @@ pub mod types { } } } - impl std::str::FromStr for SiloRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4756,28 +4212,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SiloRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SiloRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SiloRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -4789,19 +4241,16 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&SiloRolePolicy> for SiloRolePolicy { fn from(value: &SiloRolePolicy) -> Self { value.clone() } } - impl SiloRolePolicy { pub fn builder() -> builder::SiloRolePolicy { builder::SiloRolePolicy::default() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -4814,19 +4263,16 @@ pub mod types { pub identity_type: IdentityType, pub role_name: SiloRole, } - impl From<&SiloRoleRoleAssignment> for SiloRoleRoleAssignment { fn from(value: &SiloRoleRoleAssignment) -> Self { value.clone() } } - impl SiloRoleRoleAssignment { pub fn builder() -> builder::SiloRoleRoleAssignment { builder::SiloRoleRoleAssignment::default() } } - ///Client view of a [`Sled`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Sled { @@ -4839,19 +4285,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Sled> for Sled { fn from(value: &Sled) -> Self { value.clone() } } - impl Sled { pub fn builder() -> builder::Sled { builder::Sled::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SledResultsPage { @@ -4861,19 +4304,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SledResultsPage> for SledResultsPage { fn from(value: &SledResultsPage) -> Self { value.clone() } } - impl SledResultsPage { pub fn builder() -> builder::SledResultsPage { builder::SledResultsPage::default() } } - ///Client view of a Snapshot #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Snapshot { @@ -4892,19 +4332,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Snapshot> for Snapshot { fn from(value: &Snapshot) -> Self { value.clone() } } - impl Snapshot { pub fn builder() -> builder::Snapshot { builder::Snapshot::default() } } - ///Create-time parameters for a /// [`Snapshot`](crate::external_api::views::Snapshot) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -4914,19 +4351,16 @@ pub mod types { pub disk: Name, pub name: Name, } - impl From<&SnapshotCreate> for SnapshotCreate { fn from(value: &SnapshotCreate) -> Self { value.clone() } } - impl SnapshotCreate { pub fn builder() -> builder::SnapshotCreate { builder::SnapshotCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SnapshotResultsPage { @@ -4936,19 +4370,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SnapshotResultsPage> for SnapshotResultsPage { fn from(value: &SnapshotResultsPage) -> Self { value.clone() } } - impl SnapshotResultsPage { pub fn builder() -> builder::SnapshotResultsPage { builder::SnapshotResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -4962,13 +4393,11 @@ pub mod types { #[serde(rename = "destroyed")] Destroyed, } - impl From<&SnapshotState> for SnapshotState { fn from(value: &SnapshotState) -> Self { value.clone() } } - impl ToString for SnapshotState { fn to_string(&self) -> String { match *self { @@ -4979,7 +4408,6 @@ pub mod types { } } } - impl std::str::FromStr for SnapshotState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4992,45 +4420,38 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SnapshotState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SnapshotState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SnapshotState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SpoofLoginBody { pub username: String, } - impl From<&SpoofLoginBody> for SpoofLoginBody { fn from(value: &SpoofLoginBody) -> Self { value.clone() } } - impl SpoofLoginBody { pub fn builder() -> builder::SpoofLoginBody { builder::SpoofLoginBody::default() } } - ///Client view of a [`SshKey`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SshKey { @@ -5049,19 +4470,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&SshKey> for SshKey { fn from(value: &SshKey) -> Self { value.clone() } } - impl SshKey { pub fn builder() -> builder::SshKey { builder::SshKey::default() } } - ///Create-time parameters for an /// [`SshKey`](crate::external_api::views::SshKey) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -5071,19 +4489,16 @@ pub mod types { ///SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` pub public_key: String, } - impl From<&SshKeyCreate> for SshKeyCreate { fn from(value: &SshKeyCreate) -> Self { value.clone() } } - impl SshKeyCreate { pub fn builder() -> builder::SshKeyCreate { builder::SshKeyCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SshKeyResultsPage { @@ -5093,19 +4508,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SshKeyResultsPage> for SshKeyResultsPage { fn from(value: &SshKeyResultsPage) -> Self { value.clone() } } - impl SshKeyResultsPage { pub fn builder() -> builder::SshKeyResultsPage { builder::SshKeyResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -5117,13 +4529,11 @@ pub mod types { #[serde(rename = "ram_provisioned")] RamProvisioned, } - impl From<&SystemMetricName> for SystemMetricName { fn from(value: &SystemMetricName) -> Self { value.clone() } } - impl ToString for SystemMetricName { fn to_string(&self) -> String { match *self { @@ -5133,7 +4543,6 @@ pub mod types { } } } - impl std::str::FromStr for SystemMetricName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5145,28 +4554,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SystemMetricName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SystemMetricName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SystemMetricName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -5179,19 +4584,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&SystemUpdate> for SystemUpdate { fn from(value: &SystemUpdate) -> Self { value.clone() } } - impl SystemUpdate { pub fn builder() -> builder::SystemUpdate { builder::SystemUpdate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SystemUpdateResultsPage { @@ -5201,54 +4603,45 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SystemUpdateResultsPage> for SystemUpdateResultsPage { fn from(value: &SystemUpdateResultsPage) -> Self { value.clone() } } - impl SystemUpdateResultsPage { pub fn builder() -> builder::SystemUpdateResultsPage { builder::SystemUpdateResultsPage::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SystemUpdateStart { pub version: SemverVersion, } - impl From<&SystemUpdateStart> for SystemUpdateStart { fn from(value: &SystemUpdateStart) -> Self { value.clone() } } - impl SystemUpdateStart { pub fn builder() -> builder::SystemUpdateStart { builder::SystemUpdateStart::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct SystemVersion { pub status: UpdateStatus, pub version_range: VersionRange, } - impl From<&SystemVersion> for SystemVersion { fn from(value: &SystemVersion) -> Self { value.clone() } } - impl SystemVersion { pub fn builder() -> builder::SystemVersion { builder::SystemVersion::default() } } - ///Names are constructed by concatenating the target and metric names with /// ':'. Target and metric names must be lowercase alphanumeric characters /// with '_' separating words. @@ -5260,19 +4653,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: TimeseriesName) -> Self { value.0 } } - impl From<&TimeseriesName> for TimeseriesName { fn from(value: &TimeseriesName) -> Self { value.clone() } } - impl std::str::FromStr for TimeseriesName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5288,28 +4678,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for TimeseriesName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for TimeseriesName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for TimeseriesName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for TimeseriesName { fn deserialize(deserializer: D) -> Result where @@ -5320,7 +4706,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///The schema for a timeseries. /// ///This includes the name of the timeseries, as well as the datum type of @@ -5332,19 +4717,16 @@ pub mod types { pub field_schema: Vec, pub timeseries_name: TimeseriesName, } - impl From<&TimeseriesSchema> for TimeseriesSchema { fn from(value: &TimeseriesSchema) -> Self { value.clone() } } - impl TimeseriesSchema { pub fn builder() -> builder::TimeseriesSchema { builder::TimeseriesSchema::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct TimeseriesSchemaResultsPage { @@ -5354,19 +4736,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&TimeseriesSchemaResultsPage> for TimeseriesSchemaResultsPage { fn from(value: &TimeseriesSchemaResultsPage) -> Self { value.clone() } } - impl TimeseriesSchemaResultsPage { pub fn builder() -> builder::TimeseriesSchemaResultsPage { builder::TimeseriesSchemaResultsPage::default() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -5380,19 +4759,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&UpdateDeployment> for UpdateDeployment { fn from(value: &UpdateDeployment) -> Self { value.clone() } } - impl UpdateDeployment { pub fn builder() -> builder::UpdateDeployment { builder::UpdateDeployment::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UpdateDeploymentResultsPage { @@ -5402,19 +4778,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UpdateDeploymentResultsPage> for UpdateDeploymentResultsPage { fn from(value: &UpdateDeploymentResultsPage) -> Self { value.clone() } } - impl UpdateDeploymentResultsPage { pub fn builder() -> builder::UpdateDeploymentResultsPage { builder::UpdateDeploymentResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -5425,13 +4798,11 @@ pub mod types { #[serde(rename = "steady")] Steady, } - impl From<&UpdateStatus> for UpdateStatus { fn from(value: &UpdateStatus) -> Self { value.clone() } } - impl ToString for UpdateStatus { fn to_string(&self) -> String { match *self { @@ -5440,7 +4811,6 @@ pub mod types { } } } - impl std::str::FromStr for UpdateStatus { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5451,28 +4821,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for UpdateStatus { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UpdateStatus { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UpdateStatus { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -5489,19 +4855,16 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&UpdateableComponent> for UpdateableComponent { fn from(value: &UpdateableComponent) -> Self { value.clone() } } - impl UpdateableComponent { pub fn builder() -> builder::UpdateableComponent { builder::UpdateableComponent::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UpdateableComponentResultsPage { @@ -5511,19 +4874,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UpdateableComponentResultsPage> for UpdateableComponentResultsPage { fn from(value: &UpdateableComponentResultsPage) -> Self { value.clone() } } - impl UpdateableComponentResultsPage { pub fn builder() -> builder::UpdateableComponentResultsPage { builder::UpdateableComponentResultsPage::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -5553,13 +4913,11 @@ pub mod types { #[serde(rename = "host_omicron")] HostOmicron, } - impl From<&UpdateableComponentType> for UpdateableComponentType { fn from(value: &UpdateableComponentType) -> Self { value.clone() } } - impl ToString for UpdateableComponentType { fn to_string(&self) -> String { match *self { @@ -5578,7 +4936,6 @@ pub mod types { } } } - impl std::str::FromStr for UpdateableComponentType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5599,28 +4956,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for UpdateableComponentType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UpdateableComponentType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UpdateableComponentType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`User`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct User { @@ -5630,19 +4983,16 @@ pub mod types { ///Uuid of the silo to which this user belongs pub silo_id: uuid::Uuid, } - impl From<&User> for User { fn from(value: &User) -> Self { value.clone() } } - impl User { pub fn builder() -> builder::User { builder::User::default() } } - ///Client view of a [`UserBuiltin`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UserBuiltin { @@ -5657,19 +5007,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&UserBuiltin> for UserBuiltin { fn from(value: &UserBuiltin) -> Self { value.clone() } } - impl UserBuiltin { pub fn builder() -> builder::UserBuiltin { builder::UserBuiltin::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UserBuiltinResultsPage { @@ -5679,19 +5026,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UserBuiltinResultsPage> for UserBuiltinResultsPage { fn from(value: &UserBuiltinResultsPage) -> Self { value.clone() } } - impl UserBuiltinResultsPage { pub fn builder() -> builder::UserBuiltinResultsPage { builder::UserBuiltinResultsPage::default() } } - ///Create-time parameters for a [`User`](crate::external_api::views::User) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UserCreate { @@ -5700,19 +5044,16 @@ pub mod types { ///password used to log in pub password: UserPassword, } - impl From<&UserCreate> for UserCreate { fn from(value: &UserCreate) -> Self { value.clone() } } - impl UserCreate { pub fn builder() -> builder::UserCreate { builder::UserCreate::default() } } - ///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. @@ -5724,19 +5065,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: UserId) -> Self { value.0 } } - impl From<&UserId> for UserId { fn from(value: &UserId) -> Self { value.clone() } } - impl std::str::FromStr for UserId { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5747,28 +5085,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for UserId { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UserId { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UserId { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for UserId { fn deserialize(deserializer: D) -> Result where @@ -5779,7 +5113,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///Parameters for setting a user's password #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "user_password_value", content = "details")] @@ -5790,19 +5123,16 @@ pub mod types { #[serde(rename = "invalid_password")] InvalidPassword, } - impl From<&UserPassword> for UserPassword { fn from(value: &UserPassword) -> Self { value.clone() } } - impl From for UserPassword { fn from(value: Password) -> Self { Self::Password(value) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UserResultsPage { @@ -5812,56 +5142,47 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UserResultsPage> for UserResultsPage { fn from(value: &UserResultsPage) -> Self { value.clone() } } - impl UserResultsPage { pub fn builder() -> builder::UserResultsPage { builder::UserResultsPage::default() } } - ///Credentials for local user login #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct UsernamePasswordCredentials { pub password: Password, pub username: UserId, } - impl From<&UsernamePasswordCredentials> for UsernamePasswordCredentials { fn from(value: &UsernamePasswordCredentials) -> Self { value.clone() } } - impl UsernamePasswordCredentials { pub fn builder() -> builder::UsernamePasswordCredentials { builder::UsernamePasswordCredentials::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VersionRange { pub high: SemverVersion, pub low: SemverVersion, } - impl From<&VersionRange> for VersionRange { fn from(value: &VersionRange) -> Self { value.clone() } } - impl VersionRange { pub fn builder() -> builder::VersionRange { builder::VersionRange::default() } } - ///Client view of a [`Vpc`] #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Vpc { @@ -5884,19 +5205,16 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Vpc> for Vpc { fn from(value: &Vpc) -> Self { value.clone() } } - impl Vpc { pub fn builder() -> builder::Vpc { builder::Vpc::default() } } - ///Create-time parameters for a [`Vpc`](crate::external_api::views::Vpc) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VpcCreate { @@ -5912,19 +5230,16 @@ pub mod types { pub ipv6_prefix: Option, pub name: Name, } - impl From<&VpcCreate> for VpcCreate { fn from(value: &VpcCreate) -> Self { value.clone() } } - impl VpcCreate { pub fn builder() -> builder::VpcCreate { builder::VpcCreate::default() } } - ///A single rule in a VPC firewall #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VpcFirewallRule { @@ -5953,19 +5268,16 @@ pub mod types { ///the VPC to which this rule belongs pub vpc_id: uuid::Uuid, } - impl From<&VpcFirewallRule> for VpcFirewallRule { fn from(value: &VpcFirewallRule) -> Self { value.clone() } } - impl VpcFirewallRule { pub fn builder() -> builder::VpcFirewallRule { builder::VpcFirewallRule::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -5975,13 +5287,11 @@ pub mod types { #[serde(rename = "deny")] Deny, } - impl From<&VpcFirewallRuleAction> for VpcFirewallRuleAction { fn from(value: &VpcFirewallRuleAction) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleAction { fn to_string(&self) -> String { match *self { @@ -5990,7 +5300,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleAction { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6001,28 +5310,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -6032,13 +5337,11 @@ pub mod types { #[serde(rename = "outbound")] Outbound, } - impl From<&VpcFirewallRuleDirection> for VpcFirewallRuleDirection { fn from(value: &VpcFirewallRuleDirection) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleDirection { fn to_string(&self) -> String { match *self { @@ -6047,7 +5350,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleDirection { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6058,28 +5360,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///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. @@ -6096,19 +5394,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub protocols: Option>, } - impl From<&VpcFirewallRuleFilter> for VpcFirewallRuleFilter { fn from(value: &VpcFirewallRuleFilter) -> Self { value.clone() } } - impl VpcFirewallRuleFilter { pub fn builder() -> builder::VpcFirewallRuleFilter { builder::VpcFirewallRuleFilter::default() } } - ///The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis /// of its source or destination host. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -6130,25 +5425,21 @@ pub mod types { #[serde(rename = "ip_net")] IpNet(IpNet), } - impl From<&VpcFirewallRuleHostFilter> for VpcFirewallRuleHostFilter { fn from(value: &VpcFirewallRuleHostFilter) -> Self { value.clone() } } - impl From for VpcFirewallRuleHostFilter { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for VpcFirewallRuleHostFilter { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///The protocols that may be specified in a firewall rule's filter #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -6161,13 +5452,11 @@ pub mod types { #[serde(rename = "ICMP")] Icmp, } - impl From<&VpcFirewallRuleProtocol> for VpcFirewallRuleProtocol { fn from(value: &VpcFirewallRuleProtocol) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleProtocol { fn to_string(&self) -> String { match *self { @@ -6177,7 +5466,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleProtocol { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6189,28 +5477,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -6220,13 +5504,11 @@ pub mod types { #[serde(rename = "enabled")] Enabled, } - impl From<&VpcFirewallRuleStatus> for VpcFirewallRuleStatus { fn from(value: &VpcFirewallRuleStatus) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleStatus { fn to_string(&self) -> String { match *self { @@ -6235,7 +5517,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleStatus { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6246,28 +5527,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A `VpcFirewallRuleTarget` is used to specify the set of [`Instance`]s to /// which a firewall rule applies. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -6289,25 +5566,21 @@ pub mod types { #[serde(rename = "ip_net")] IpNet(IpNet), } - impl From<&VpcFirewallRuleTarget> for VpcFirewallRuleTarget { fn from(value: &VpcFirewallRuleTarget) -> Self { value.clone() } } - impl From for VpcFirewallRuleTarget { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for VpcFirewallRuleTarget { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///A single rule in a VPC firewall #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VpcFirewallRuleUpdate { @@ -6328,19 +5601,16 @@ pub mod types { ///list of sets of instances that the rule applies to pub targets: Vec, } - impl From<&VpcFirewallRuleUpdate> for VpcFirewallRuleUpdate { fn from(value: &VpcFirewallRuleUpdate) -> Self { value.clone() } } - impl VpcFirewallRuleUpdate { pub fn builder() -> builder::VpcFirewallRuleUpdate { builder::VpcFirewallRuleUpdate::default() } } - ///Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules /// are implicitly created along with a Vpc, so there is no explicit /// creation. @@ -6348,37 +5618,31 @@ pub mod types { pub struct VpcFirewallRuleUpdateParams { pub rules: Vec, } - impl From<&VpcFirewallRuleUpdateParams> for VpcFirewallRuleUpdateParams { fn from(value: &VpcFirewallRuleUpdateParams) -> Self { value.clone() } } - impl VpcFirewallRuleUpdateParams { pub fn builder() -> builder::VpcFirewallRuleUpdateParams { builder::VpcFirewallRuleUpdateParams::default() } } - ///Collection of a Vpc's firewall rules #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VpcFirewallRules { pub rules: Vec, } - impl From<&VpcFirewallRules> for VpcFirewallRules { fn from(value: &VpcFirewallRules) -> Self { value.clone() } } - impl VpcFirewallRules { pub fn builder() -> builder::VpcFirewallRules { builder::VpcFirewallRules::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VpcResultsPage { @@ -6388,19 +5652,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcResultsPage> for VpcResultsPage { fn from(value: &VpcResultsPage) -> Self { value.clone() } } - impl VpcResultsPage { pub fn builder() -> builder::VpcResultsPage { builder::VpcResultsPage::default() } } - ///A VPC router defines a series of rules that indicate where traffic /// should be sent depending on its destination. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -6419,19 +5680,16 @@ pub mod types { ///The VPC to which the router belongs. pub vpc_id: uuid::Uuid, } - impl From<&VpcRouter> for VpcRouter { fn from(value: &VpcRouter) -> Self { value.clone() } } - impl VpcRouter { pub fn builder() -> builder::VpcRouter { builder::VpcRouter::default() } } - ///Create-time parameters for a /// [`VpcRouter`](crate::external_api::views::VpcRouter) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -6439,19 +5697,16 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&VpcRouterCreate> for VpcRouterCreate { fn from(value: &VpcRouterCreate) -> Self { value.clone() } } - impl VpcRouterCreate { pub fn builder() -> builder::VpcRouterCreate { builder::VpcRouterCreate::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -6461,13 +5716,11 @@ pub mod types { #[serde(rename = "custom")] Custom, } - impl From<&VpcRouterKind> for VpcRouterKind { fn from(value: &VpcRouterKind) -> Self { value.clone() } } - impl ToString for VpcRouterKind { fn to_string(&self) -> String { match *self { @@ -6476,7 +5729,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcRouterKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -6487,28 +5739,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcRouterKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcRouterKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcRouterKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VpcRouterResultsPage { @@ -6518,19 +5766,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcRouterResultsPage> for VpcRouterResultsPage { fn from(value: &VpcRouterResultsPage) -> Self { value.clone() } } - impl VpcRouterResultsPage { pub fn builder() -> builder::VpcRouterResultsPage { builder::VpcRouterResultsPage::default() } } - ///Updateable properties of a /// [`VpcRouter`](crate::external_api::views::VpcRouter) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -6540,19 +5785,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcRouterUpdate> for VpcRouterUpdate { fn from(value: &VpcRouterUpdate) -> Self { value.clone() } } - impl VpcRouterUpdate { pub fn builder() -> builder::VpcRouterUpdate { builder::VpcRouterUpdate::default() } } - ///A VPC subnet represents a logical grouping for instances that allows /// network traffic between them, within a IPv4 subnetwork or optionall an /// IPv6 subnetwork. @@ -6575,19 +5817,16 @@ pub mod types { ///The VPC to which the subnet belongs. pub vpc_id: uuid::Uuid, } - impl From<&VpcSubnet> for VpcSubnet { fn from(value: &VpcSubnet) -> Self { value.clone() } } - impl VpcSubnet { pub fn builder() -> builder::VpcSubnet { builder::VpcSubnet::default() } } - ///Create-time parameters for a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -6608,19 +5847,16 @@ pub mod types { pub ipv6_block: Option, pub name: Name, } - impl From<&VpcSubnetCreate> for VpcSubnetCreate { fn from(value: &VpcSubnetCreate) -> Self { value.clone() } } - impl VpcSubnetCreate { pub fn builder() -> builder::VpcSubnetCreate { builder::VpcSubnetCreate::default() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VpcSubnetResultsPage { @@ -6630,19 +5866,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcSubnetResultsPage> for VpcSubnetResultsPage { fn from(value: &VpcSubnetResultsPage) -> Self { value.clone() } } - impl VpcSubnetResultsPage { pub fn builder() -> builder::VpcSubnetResultsPage { builder::VpcSubnetResultsPage::default() } } - ///Updateable properties of a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -6652,19 +5885,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcSubnetUpdate> for VpcSubnetUpdate { fn from(value: &VpcSubnetUpdate) -> Self { value.clone() } } - impl VpcSubnetUpdate { pub fn builder() -> builder::VpcSubnetUpdate { builder::VpcSubnetUpdate::default() } } - ///Updateable properties of a [`Vpc`](crate::external_api::views::Vpc) #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct VpcUpdate { @@ -6675,19 +5905,16 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcUpdate> for VpcUpdate { fn from(value: &VpcUpdate) -> Self { value.clone() } } - impl VpcUpdate { pub fn builder() -> builder::VpcUpdate { builder::VpcUpdate::default() } } - pub mod builder { #[derive(Clone, Debug)] pub struct Baseboard { @@ -6695,7 +5922,6 @@ pub mod types { revision: Result, serial: Result, } - impl Default for Baseboard { fn default() -> Self { Self { @@ -6705,7 +5931,6 @@ pub mod types { } } } - impl Baseboard { pub fn part(mut self, value: T) -> Self where @@ -6738,7 +5963,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Baseboard { type Error = String; fn try_from(value: Baseboard) -> Result { @@ -6749,7 +5973,6 @@ pub mod types { }) } } - impl From for Baseboard { fn from(value: super::Baseboard) -> Self { Self { @@ -6759,13 +5982,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Bindouble { count: Result, range: Result, } - impl Default for Bindouble { fn default() -> Self { Self { @@ -6774,7 +5995,6 @@ pub mod types { } } } - impl Bindouble { pub fn count(mut self, value: T) -> Self where @@ -6797,7 +6017,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Bindouble { type Error = String; fn try_from(value: Bindouble) -> Result { @@ -6807,7 +6026,6 @@ pub mod types { }) } } - impl From for Bindouble { fn from(value: super::Bindouble) -> Self { Self { @@ -6816,13 +6034,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Binint64 { count: Result, range: Result, } - impl Default for Binint64 { fn default() -> Self { Self { @@ -6831,7 +6047,6 @@ pub mod types { } } } - impl Binint64 { pub fn count(mut self, value: T) -> Self where @@ -6854,7 +6069,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Binint64 { type Error = String; fn try_from(value: Binint64) -> Result { @@ -6864,7 +6078,6 @@ pub mod types { }) } } - impl From for Binint64 { fn from(value: super::Binint64) -> Self { Self { @@ -6873,7 +6086,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Certificate { description: Result, @@ -6883,7 +6095,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Certificate { fn default() -> Self { Self { @@ -6896,7 +6107,6 @@ pub mod types { } } } - impl Certificate { pub fn description(mut self, value: T) -> Self where @@ -6959,7 +6169,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Certificate { type Error = String; fn try_from(value: Certificate) -> Result { @@ -6973,7 +6182,6 @@ pub mod types { }) } } - impl From for Certificate { fn from(value: super::Certificate) -> Self { Self { @@ -6986,7 +6194,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct CertificateCreate { cert: Result, String>, @@ -6995,7 +6202,6 @@ pub mod types { name: Result, service: Result, } - impl Default for CertificateCreate { fn default() -> Self { Self { @@ -7007,7 +6213,6 @@ pub mod types { } } } - impl CertificateCreate { pub fn cert(mut self, value: T) -> Self where @@ -7060,7 +6265,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::CertificateCreate { type Error = String; fn try_from(value: CertificateCreate) -> Result { @@ -7073,7 +6277,6 @@ pub mod types { }) } } - impl From for CertificateCreate { fn from(value: super::CertificateCreate) -> Self { Self { @@ -7085,13 +6288,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct CertificateResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for CertificateResultsPage { fn default() -> Self { Self { @@ -7100,7 +6301,6 @@ pub mod types { } } } - impl CertificateResultsPage { pub fn items(mut self, value: T) -> Self where @@ -7123,7 +6323,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::CertificateResultsPage { type Error = String; fn try_from(value: CertificateResultsPage) -> Result { @@ -7133,7 +6332,6 @@ pub mod types { }) } } - impl From for CertificateResultsPage { fn from(value: super::CertificateResultsPage) -> Self { Self { @@ -7142,7 +6340,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ComponentUpdate { component_type: Result, @@ -7151,7 +6348,6 @@ pub mod types { time_modified: Result, String>, version: Result, } - impl Default for ComponentUpdate { fn default() -> Self { Self { @@ -7163,7 +6359,6 @@ pub mod types { } } } - impl ComponentUpdate { pub fn component_type(mut self, value: T) -> Self where @@ -7216,7 +6411,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ComponentUpdate { type Error = String; fn try_from(value: ComponentUpdate) -> Result { @@ -7229,7 +6423,6 @@ pub mod types { }) } } - impl From for ComponentUpdate { fn from(value: super::ComponentUpdate) -> Self { Self { @@ -7241,13 +6434,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ComponentUpdateResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for ComponentUpdateResultsPage { fn default() -> Self { Self { @@ -7256,7 +6447,6 @@ pub mod types { } } } - impl ComponentUpdateResultsPage { pub fn items(mut self, value: T) -> Self where @@ -7279,7 +6469,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ComponentUpdateResultsPage { type Error = String; fn try_from(value: ComponentUpdateResultsPage) -> Result { @@ -7289,7 +6478,6 @@ pub mod types { }) } } - impl From for ComponentUpdateResultsPage { fn from(value: super::ComponentUpdateResultsPage) -> Self { Self { @@ -7298,13 +6486,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Cumulativedouble { start_time: Result, String>, value: Result, } - impl Default for Cumulativedouble { fn default() -> Self { Self { @@ -7313,7 +6499,6 @@ pub mod types { } } } - impl Cumulativedouble { pub fn start_time(mut self, value: T) -> Self where @@ -7336,7 +6521,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Cumulativedouble { type Error = String; fn try_from(value: Cumulativedouble) -> Result { @@ -7346,7 +6530,6 @@ pub mod types { }) } } - impl From for Cumulativedouble { fn from(value: super::Cumulativedouble) -> Self { Self { @@ -7355,13 +6538,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Cumulativeint64 { start_time: Result, String>, value: Result, } - impl Default for Cumulativeint64 { fn default() -> Self { Self { @@ -7370,7 +6551,6 @@ pub mod types { } } } - impl Cumulativeint64 { pub fn start_time(mut self, value: T) -> Self where @@ -7393,7 +6573,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Cumulativeint64 { type Error = String; fn try_from(value: Cumulativeint64) -> Result { @@ -7403,7 +6582,6 @@ pub mod types { }) } } - impl From for Cumulativeint64 { fn from(value: super::Cumulativeint64) -> Self { Self { @@ -7412,13 +6590,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DerEncodedKeyPair { private_key: Result, public_cert: Result, } - impl Default for DerEncodedKeyPair { fn default() -> Self { Self { @@ -7427,7 +6603,6 @@ pub mod types { } } } - impl DerEncodedKeyPair { pub fn private_key(mut self, value: T) -> Self where @@ -7450,7 +6625,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DerEncodedKeyPair { type Error = String; fn try_from(value: DerEncodedKeyPair) -> Result { @@ -7460,7 +6634,6 @@ pub mod types { }) } } - impl From for DerEncodedKeyPair { fn from(value: super::DerEncodedKeyPair) -> Self { Self { @@ -7469,14 +6642,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DeviceAccessTokenRequest { client_id: Result, device_code: Result, grant_type: Result, } - impl Default for DeviceAccessTokenRequest { fn default() -> Self { Self { @@ -7486,7 +6657,6 @@ pub mod types { } } } - impl DeviceAccessTokenRequest { pub fn client_id(mut self, value: T) -> Self where @@ -7519,7 +6689,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DeviceAccessTokenRequest { type Error = String; fn try_from(value: DeviceAccessTokenRequest) -> Result { @@ -7530,7 +6699,6 @@ pub mod types { }) } } - impl From for DeviceAccessTokenRequest { fn from(value: super::DeviceAccessTokenRequest) -> Self { Self { @@ -7540,12 +6708,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DeviceAuthRequest { client_id: Result, } - impl Default for DeviceAuthRequest { fn default() -> Self { Self { @@ -7553,7 +6719,6 @@ pub mod types { } } } - impl DeviceAuthRequest { pub fn client_id(mut self, value: T) -> Self where @@ -7566,7 +6731,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DeviceAuthRequest { type Error = String; fn try_from(value: DeviceAuthRequest) -> Result { @@ -7575,7 +6739,6 @@ pub mod types { }) } } - impl From for DeviceAuthRequest { fn from(value: super::DeviceAuthRequest) -> Self { Self { @@ -7583,12 +6746,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DeviceAuthVerify { user_code: Result, } - impl Default for DeviceAuthVerify { fn default() -> Self { Self { @@ -7596,7 +6757,6 @@ pub mod types { } } } - impl DeviceAuthVerify { pub fn user_code(mut self, value: T) -> Self where @@ -7609,7 +6769,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DeviceAuthVerify { type Error = String; fn try_from(value: DeviceAuthVerify) -> Result { @@ -7618,7 +6777,6 @@ pub mod types { }) } } - impl From for DeviceAuthVerify { fn from(value: super::DeviceAuthVerify) -> Self { Self { @@ -7626,7 +6784,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Disk { block_size: Result, @@ -7642,7 +6799,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Disk { fn default() -> Self { Self { @@ -7661,7 +6817,6 @@ pub mod types { } } } - impl Disk { pub fn block_size(mut self, value: T) -> Self where @@ -7784,7 +6939,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Disk { type Error = String; fn try_from(value: Disk) -> Result { @@ -7804,7 +6958,6 @@ pub mod types { }) } } - impl From for Disk { fn from(value: super::Disk) -> Self { Self { @@ -7823,7 +6976,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskCreate { description: Result, @@ -7831,7 +6983,6 @@ pub mod types { name: Result, size: Result, } - impl Default for DiskCreate { fn default() -> Self { Self { @@ -7842,7 +6993,6 @@ pub mod types { } } } - impl DiskCreate { pub fn description(mut self, value: T) -> Self where @@ -7885,7 +7035,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskCreate { type Error = String; fn try_from(value: DiskCreate) -> Result { @@ -7897,7 +7046,6 @@ pub mod types { }) } } - impl From for DiskCreate { fn from(value: super::DiskCreate) -> Self { Self { @@ -7908,12 +7056,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskIdentifier { name: Result, } - impl Default for DiskIdentifier { fn default() -> Self { Self { @@ -7921,7 +7067,6 @@ pub mod types { } } } - impl DiskIdentifier { pub fn name(mut self, value: T) -> Self where @@ -7934,14 +7079,12 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskIdentifier { type Error = String; fn try_from(value: DiskIdentifier) -> Result { Ok(Self { name: value.name? }) } } - impl From for DiskIdentifier { fn from(value: super::DiskIdentifier) -> Self { Self { @@ -7949,12 +7092,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskPath { disk: Result, } - impl Default for DiskPath { fn default() -> Self { Self { @@ -7962,7 +7103,6 @@ pub mod types { } } } - impl DiskPath { pub fn disk(mut self, value: T) -> Self where @@ -7975,14 +7115,12 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskPath { type Error = String; fn try_from(value: DiskPath) -> Result { Ok(Self { disk: value.disk? }) } } - impl From for DiskPath { fn from(value: super::DiskPath) -> Self { Self { @@ -7990,13 +7128,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for DiskResultsPage { fn default() -> Self { Self { @@ -8005,7 +7141,6 @@ pub mod types { } } } - impl DiskResultsPage { pub fn items(mut self, value: T) -> Self where @@ -8028,7 +7163,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskResultsPage { type Error = String; fn try_from(value: DiskResultsPage) -> Result { @@ -8038,7 +7172,6 @@ pub mod types { }) } } - impl From for DiskResultsPage { fn from(value: super::DiskResultsPage) -> Self { Self { @@ -8047,13 +7180,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Distribution { name: Result, version: Result, } - impl Default for Distribution { fn default() -> Self { Self { @@ -8062,7 +7193,6 @@ pub mod types { } } } - impl Distribution { pub fn name(mut self, value: T) -> Self where @@ -8085,7 +7215,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Distribution { type Error = String; fn try_from(value: Distribution) -> Result { @@ -8095,7 +7224,6 @@ pub mod types { }) } } - impl From for Distribution { fn from(value: super::Distribution) -> Self { Self { @@ -8104,14 +7232,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Error { error_code: Result, String>, message: Result, request_id: Result, } - impl Default for Error { fn default() -> Self { Self { @@ -8121,7 +7247,6 @@ pub mod types { } } } - impl Error { pub fn error_code(mut self, value: T) -> Self where @@ -8154,7 +7279,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Error { type Error = String; fn try_from(value: Error) -> Result { @@ -8165,7 +7289,6 @@ pub mod types { }) } } - impl From for Error { fn from(value: super::Error) -> Self { Self { @@ -8175,13 +7298,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ExternalIp { ip: Result, kind: Result, } - impl Default for ExternalIp { fn default() -> Self { Self { @@ -8190,7 +7311,6 @@ pub mod types { } } } - impl ExternalIp { pub fn ip(mut self, value: T) -> Self where @@ -8213,7 +7333,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ExternalIp { type Error = String; fn try_from(value: ExternalIp) -> Result { @@ -8223,7 +7342,6 @@ pub mod types { }) } } - impl From for ExternalIp { fn from(value: super::ExternalIp) -> Self { Self { @@ -8232,13 +7350,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ExternalIpResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for ExternalIpResultsPage { fn default() -> Self { Self { @@ -8247,7 +7363,6 @@ pub mod types { } } } - impl ExternalIpResultsPage { pub fn items(mut self, value: T) -> Self where @@ -8270,7 +7385,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ExternalIpResultsPage { type Error = String; fn try_from(value: ExternalIpResultsPage) -> Result { @@ -8280,7 +7394,6 @@ pub mod types { }) } } - impl From for ExternalIpResultsPage { fn from(value: super::ExternalIpResultsPage) -> Self { Self { @@ -8289,14 +7402,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct FieldSchema { name: Result, source: Result, ty: Result, } - impl Default for FieldSchema { fn default() -> Self { Self { @@ -8306,7 +7417,6 @@ pub mod types { } } } - impl FieldSchema { pub fn name(mut self, value: T) -> Self where @@ -8339,7 +7449,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::FieldSchema { type Error = String; fn try_from(value: FieldSchema) -> Result { @@ -8350,7 +7459,6 @@ pub mod types { }) } } - impl From for FieldSchema { fn from(value: super::FieldSchema) -> Self { Self { @@ -8360,12 +7468,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct FleetRolePolicy { role_assignments: Result, String>, } - impl Default for FleetRolePolicy { fn default() -> Self { Self { @@ -8373,7 +7479,6 @@ pub mod types { } } } - impl FleetRolePolicy { pub fn role_assignments(mut self, value: T) -> Self where @@ -8389,7 +7494,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::FleetRolePolicy { type Error = String; fn try_from(value: FleetRolePolicy) -> Result { @@ -8398,7 +7502,6 @@ pub mod types { }) } } - impl From for FleetRolePolicy { fn from(value: super::FleetRolePolicy) -> Self { Self { @@ -8406,14 +7509,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct FleetRoleRoleAssignment { identity_id: Result, identity_type: Result, role_name: Result, } - impl Default for FleetRoleRoleAssignment { fn default() -> Self { Self { @@ -8423,7 +7524,6 @@ pub mod types { } } } - impl FleetRoleRoleAssignment { pub fn identity_id(mut self, value: T) -> Self where @@ -8456,7 +7556,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::FleetRoleRoleAssignment { type Error = String; fn try_from(value: FleetRoleRoleAssignment) -> Result { @@ -8467,7 +7566,6 @@ pub mod types { }) } } - impl From for FleetRoleRoleAssignment { fn from(value: super::FleetRoleRoleAssignment) -> Self { Self { @@ -8477,7 +7575,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GlobalImage { block_size: Result, @@ -8492,7 +7589,6 @@ pub mod types { url: Result, String>, version: Result, } - impl Default for GlobalImage { fn default() -> Self { Self { @@ -8510,7 +7606,6 @@ pub mod types { } } } - impl GlobalImage { pub fn block_size(mut self, value: T) -> Self where @@ -8623,7 +7718,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GlobalImage { type Error = String; fn try_from(value: GlobalImage) -> Result { @@ -8642,7 +7736,6 @@ pub mod types { }) } } - impl From for GlobalImage { fn from(value: super::GlobalImage) -> Self { Self { @@ -8660,7 +7753,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GlobalImageCreate { block_size: Result, @@ -8669,7 +7761,6 @@ pub mod types { name: Result, source: Result, } - impl Default for GlobalImageCreate { fn default() -> Self { Self { @@ -8681,7 +7772,6 @@ pub mod types { } } } - impl GlobalImageCreate { pub fn block_size(mut self, value: T) -> Self where @@ -8734,7 +7824,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GlobalImageCreate { type Error = String; fn try_from(value: GlobalImageCreate) -> Result { @@ -8747,7 +7836,6 @@ pub mod types { }) } } - impl From for GlobalImageCreate { fn from(value: super::GlobalImageCreate) -> Self { Self { @@ -8759,13 +7847,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GlobalImageResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for GlobalImageResultsPage { fn default() -> Self { Self { @@ -8774,7 +7860,6 @@ pub mod types { } } } - impl GlobalImageResultsPage { pub fn items(mut self, value: T) -> Self where @@ -8797,7 +7882,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GlobalImageResultsPage { type Error = String; fn try_from(value: GlobalImageResultsPage) -> Result { @@ -8807,7 +7891,6 @@ pub mod types { }) } } - impl From for GlobalImageResultsPage { fn from(value: super::GlobalImageResultsPage) -> Self { Self { @@ -8816,14 +7899,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Group { display_name: Result, id: Result, silo_id: Result, } - impl Default for Group { fn default() -> Self { Self { @@ -8833,7 +7914,6 @@ pub mod types { } } } - impl Group { pub fn display_name(mut self, value: T) -> Self where @@ -8866,7 +7946,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Group { type Error = String; fn try_from(value: Group) -> Result { @@ -8877,7 +7956,6 @@ pub mod types { }) } } - impl From for Group { fn from(value: super::Group) -> Self { Self { @@ -8887,13 +7965,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct GroupResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for GroupResultsPage { fn default() -> Self { Self { @@ -8902,7 +7978,6 @@ pub mod types { } } } - impl GroupResultsPage { pub fn items(mut self, value: T) -> Self where @@ -8925,7 +8000,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::GroupResultsPage { type Error = String; fn try_from(value: GroupResultsPage) -> Result { @@ -8935,7 +8009,6 @@ pub mod types { }) } } - impl From for GroupResultsPage { fn from(value: super::GroupResultsPage) -> Self { Self { @@ -8944,14 +8017,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Histogramdouble { bins: Result, String>, n_samples: Result, start_time: Result, String>, } - impl Default for Histogramdouble { fn default() -> Self { Self { @@ -8961,7 +8032,6 @@ pub mod types { } } } - impl Histogramdouble { pub fn bins(mut self, value: T) -> Self where @@ -8994,7 +8064,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Histogramdouble { type Error = String; fn try_from(value: Histogramdouble) -> Result { @@ -9005,7 +8074,6 @@ pub mod types { }) } } - impl From for Histogramdouble { fn from(value: super::Histogramdouble) -> Self { Self { @@ -9015,14 +8083,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Histogramint64 { bins: Result, String>, n_samples: Result, start_time: Result, String>, } - impl Default for Histogramint64 { fn default() -> Self { Self { @@ -9032,7 +8098,6 @@ pub mod types { } } } - impl Histogramint64 { pub fn bins(mut self, value: T) -> Self where @@ -9065,7 +8130,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Histogramint64 { type Error = String; fn try_from(value: Histogramint64) -> Result { @@ -9076,7 +8140,6 @@ pub mod types { }) } } - impl From for Histogramint64 { fn from(value: super::Histogramint64) -> Self { Self { @@ -9086,7 +8149,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IdentityProvider { description: Result, @@ -9096,7 +8158,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for IdentityProvider { fn default() -> Self { Self { @@ -9109,7 +8170,6 @@ pub mod types { } } } - impl IdentityProvider { pub fn description(mut self, value: T) -> Self where @@ -9172,7 +8232,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IdentityProvider { type Error = String; fn try_from(value: IdentityProvider) -> Result { @@ -9186,7 +8245,6 @@ pub mod types { }) } } - impl From for IdentityProvider { fn from(value: super::IdentityProvider) -> Self { Self { @@ -9199,13 +8257,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IdentityProviderResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for IdentityProviderResultsPage { fn default() -> Self { Self { @@ -9214,7 +8270,6 @@ pub mod types { } } } - impl IdentityProviderResultsPage { pub fn items(mut self, value: T) -> Self where @@ -9237,7 +8292,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IdentityProviderResultsPage { type Error = String; fn try_from(value: IdentityProviderResultsPage) -> Result { @@ -9247,7 +8301,6 @@ pub mod types { }) } } - impl From for IdentityProviderResultsPage { fn from(value: super::IdentityProviderResultsPage) -> Self { Self { @@ -9256,7 +8309,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Image { block_size: Result, @@ -9271,7 +8323,6 @@ pub mod types { url: Result, String>, version: Result, String>, } - impl Default for Image { fn default() -> Self { Self { @@ -9289,7 +8340,6 @@ pub mod types { } } } - impl Image { pub fn block_size(mut self, value: T) -> Self where @@ -9402,7 +8452,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Image { type Error = String; fn try_from(value: Image) -> Result { @@ -9421,7 +8470,6 @@ pub mod types { }) } } - impl From for Image { fn from(value: super::Image) -> Self { Self { @@ -9439,7 +8487,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ImageCreate { block_size: Result, @@ -9447,7 +8494,6 @@ pub mod types { name: Result, source: Result, } - impl Default for ImageCreate { fn default() -> Self { Self { @@ -9458,7 +8504,6 @@ pub mod types { } } } - impl ImageCreate { pub fn block_size(mut self, value: T) -> Self where @@ -9501,7 +8546,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ImageCreate { type Error = String; fn try_from(value: ImageCreate) -> Result { @@ -9513,7 +8557,6 @@ pub mod types { }) } } - impl From for ImageCreate { fn from(value: super::ImageCreate) -> Self { Self { @@ -9524,13 +8567,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ImageResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for ImageResultsPage { fn default() -> Self { Self { @@ -9539,7 +8580,6 @@ pub mod types { } } } - impl ImageResultsPage { pub fn items(mut self, value: T) -> Self where @@ -9562,7 +8602,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ImageResultsPage { type Error = String; fn try_from(value: ImageResultsPage) -> Result { @@ -9572,7 +8611,6 @@ pub mod types { }) } } - impl From for ImageResultsPage { fn from(value: super::ImageResultsPage) -> Self { Self { @@ -9581,7 +8619,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Instance { description: Result, @@ -9596,7 +8633,6 @@ pub mod types { time_modified: Result, String>, time_run_state_updated: Result, String>, } - impl Default for Instance { fn default() -> Self { Self { @@ -9616,7 +8652,6 @@ pub mod types { } } } - impl Instance { pub fn description(mut self, value: T) -> Self where @@ -9732,7 +8767,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Instance { type Error = String; fn try_from(value: Instance) -> Result { @@ -9751,7 +8785,6 @@ pub mod types { }) } } - impl From for Instance { fn from(value: super::Instance) -> Self { Self { @@ -9769,7 +8802,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceCreate { description: Result, @@ -9783,7 +8815,6 @@ pub mod types { start: Result, user_data: Result, } - impl Default for InstanceCreate { fn default() -> Self { Self { @@ -9800,7 +8831,6 @@ pub mod types { } } } - impl InstanceCreate { pub fn description(mut self, value: T) -> Self where @@ -9906,7 +8936,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceCreate { type Error = String; fn try_from(value: InstanceCreate) -> Result { @@ -9924,7 +8953,6 @@ pub mod types { }) } } - impl From for InstanceCreate { fn from(value: super::InstanceCreate) -> Self { Self { @@ -9941,12 +8969,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrate { dst_sled_id: Result, } - impl Default for InstanceMigrate { fn default() -> Self { Self { @@ -9954,7 +8980,6 @@ pub mod types { } } } - impl InstanceMigrate { pub fn dst_sled_id(mut self, value: T) -> Self where @@ -9967,7 +8992,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrate { type Error = String; fn try_from(value: InstanceMigrate) -> Result { @@ -9976,7 +9000,6 @@ pub mod types { }) } } - impl From for InstanceMigrate { fn from(value: super::InstanceMigrate) -> Self { Self { @@ -9984,13 +9007,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for InstanceResultsPage { fn default() -> Self { Self { @@ -9999,7 +9020,6 @@ pub mod types { } } } - impl InstanceResultsPage { pub fn items(mut self, value: T) -> Self where @@ -10022,7 +9042,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceResultsPage { type Error = String; fn try_from(value: InstanceResultsPage) -> Result { @@ -10032,7 +9051,6 @@ pub mod types { }) } } - impl From for InstanceResultsPage { fn from(value: super::InstanceResultsPage) -> Self { Self { @@ -10041,13 +9059,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceSerialConsoleData { data: Result, String>, last_byte_offset: Result, } - impl Default for InstanceSerialConsoleData { fn default() -> Self { Self { @@ -10056,7 +9072,6 @@ pub mod types { } } } - impl InstanceSerialConsoleData { pub fn data(mut self, value: T) -> Self where @@ -10082,7 +9097,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceSerialConsoleData { type Error = String; fn try_from(value: InstanceSerialConsoleData) -> Result { @@ -10092,7 +9106,6 @@ pub mod types { }) } } - impl From for InstanceSerialConsoleData { fn from(value: super::InstanceSerialConsoleData) -> Self { Self { @@ -10101,7 +9114,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPool { description: Result, @@ -10110,7 +9122,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for IpPool { fn default() -> Self { Self { @@ -10122,7 +9133,6 @@ pub mod types { } } } - impl IpPool { pub fn description(mut self, value: T) -> Self where @@ -10175,7 +9185,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPool { type Error = String; fn try_from(value: IpPool) -> Result { @@ -10188,7 +9197,6 @@ pub mod types { }) } } - impl From for IpPool { fn from(value: super::IpPool) -> Self { Self { @@ -10200,13 +9208,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolCreate { description: Result, name: Result, } - impl Default for IpPoolCreate { fn default() -> Self { Self { @@ -10215,7 +9221,6 @@ pub mod types { } } } - impl IpPoolCreate { pub fn description(mut self, value: T) -> Self where @@ -10238,7 +9243,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolCreate { type Error = String; fn try_from(value: IpPoolCreate) -> Result { @@ -10248,7 +9252,6 @@ pub mod types { }) } } - impl From for IpPoolCreate { fn from(value: super::IpPoolCreate) -> Self { Self { @@ -10257,14 +9260,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolRange { id: Result, range: Result, time_created: Result, String>, } - impl Default for IpPoolRange { fn default() -> Self { Self { @@ -10274,7 +9275,6 @@ pub mod types { } } } - impl IpPoolRange { pub fn id(mut self, value: T) -> Self where @@ -10307,7 +9307,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolRange { type Error = String; fn try_from(value: IpPoolRange) -> Result { @@ -10318,7 +9317,6 @@ pub mod types { }) } } - impl From for IpPoolRange { fn from(value: super::IpPoolRange) -> Self { Self { @@ -10328,13 +9326,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolRangeResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for IpPoolRangeResultsPage { fn default() -> Self { Self { @@ -10343,7 +9339,6 @@ pub mod types { } } } - impl IpPoolRangeResultsPage { pub fn items(mut self, value: T) -> Self where @@ -10366,7 +9361,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolRangeResultsPage { type Error = String; fn try_from(value: IpPoolRangeResultsPage) -> Result { @@ -10376,7 +9370,6 @@ pub mod types { }) } } - impl From for IpPoolRangeResultsPage { fn from(value: super::IpPoolRangeResultsPage) -> Self { Self { @@ -10385,13 +9378,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for IpPoolResultsPage { fn default() -> Self { Self { @@ -10400,7 +9391,6 @@ pub mod types { } } } - impl IpPoolResultsPage { pub fn items(mut self, value: T) -> Self where @@ -10423,7 +9413,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolResultsPage { type Error = String; fn try_from(value: IpPoolResultsPage) -> Result { @@ -10433,7 +9422,6 @@ pub mod types { }) } } - impl From for IpPoolResultsPage { fn from(value: super::IpPoolResultsPage) -> Self { Self { @@ -10442,13 +9430,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct IpPoolUpdate { description: Result, String>, name: Result, String>, } - impl Default for IpPoolUpdate { fn default() -> Self { Self { @@ -10457,7 +9443,6 @@ pub mod types { } } } - impl IpPoolUpdate { pub fn description(mut self, value: T) -> Self where @@ -10480,7 +9465,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::IpPoolUpdate { type Error = String; fn try_from(value: IpPoolUpdate) -> Result { @@ -10490,7 +9474,6 @@ pub mod types { }) } } - impl From for IpPoolUpdate { fn from(value: super::IpPoolUpdate) -> Self { Self { @@ -10499,13 +9482,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Ipv4Range { first: Result, last: Result, } - impl Default for Ipv4Range { fn default() -> Self { Self { @@ -10514,7 +9495,6 @@ pub mod types { } } } - impl Ipv4Range { pub fn first(mut self, value: T) -> Self where @@ -10537,7 +9517,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Ipv4Range { type Error = String; fn try_from(value: Ipv4Range) -> Result { @@ -10547,7 +9526,6 @@ pub mod types { }) } } - impl From for Ipv4Range { fn from(value: super::Ipv4Range) -> Self { Self { @@ -10556,13 +9534,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Ipv6Range { first: Result, last: Result, } - impl Default for Ipv6Range { fn default() -> Self { Self { @@ -10571,7 +9547,6 @@ pub mod types { } } } - impl Ipv6Range { pub fn first(mut self, value: T) -> Self where @@ -10594,7 +9569,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Ipv6Range { type Error = String; fn try_from(value: Ipv6Range) -> Result { @@ -10604,7 +9578,6 @@ pub mod types { }) } } - impl From for Ipv6Range { fn from(value: super::Ipv6Range) -> Self { Self { @@ -10613,13 +9586,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Measurement { datum: Result, timestamp: Result, String>, } - impl Default for Measurement { fn default() -> Self { Self { @@ -10628,7 +9599,6 @@ pub mod types { } } } - impl Measurement { pub fn datum(mut self, value: T) -> Self where @@ -10651,7 +9621,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Measurement { type Error = String; fn try_from(value: Measurement) -> Result { @@ -10661,7 +9630,6 @@ pub mod types { }) } } - impl From for Measurement { fn from(value: super::Measurement) -> Self { Self { @@ -10670,13 +9638,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct MeasurementResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for MeasurementResultsPage { fn default() -> Self { Self { @@ -10685,7 +9651,6 @@ pub mod types { } } } - impl MeasurementResultsPage { pub fn items(mut self, value: T) -> Self where @@ -10708,7 +9673,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::MeasurementResultsPage { type Error = String; fn try_from(value: MeasurementResultsPage) -> Result { @@ -10718,7 +9682,6 @@ pub mod types { }) } } - impl From for MeasurementResultsPage { fn from(value: super::MeasurementResultsPage) -> Self { Self { @@ -10727,7 +9690,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterface { description: Result, @@ -10742,7 +9704,6 @@ pub mod types { time_modified: Result, String>, vpc_id: Result, } - impl Default for NetworkInterface { fn default() -> Self { Self { @@ -10760,7 +9721,6 @@ pub mod types { } } } - impl NetworkInterface { pub fn description(mut self, value: T) -> Self where @@ -10873,7 +9833,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterface { type Error = String; fn try_from(value: NetworkInterface) -> Result { @@ -10892,7 +9851,6 @@ pub mod types { }) } } - impl From for NetworkInterface { fn from(value: super::NetworkInterface) -> Self { Self { @@ -10910,7 +9868,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterfaceCreate { description: Result, @@ -10919,7 +9876,6 @@ pub mod types { subnet_name: Result, vpc_name: Result, } - impl Default for NetworkInterfaceCreate { fn default() -> Self { Self { @@ -10931,7 +9887,6 @@ pub mod types { } } } - impl NetworkInterfaceCreate { pub fn description(mut self, value: T) -> Self where @@ -10984,7 +9939,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterfaceCreate { type Error = String; fn try_from(value: NetworkInterfaceCreate) -> Result { @@ -10997,7 +9951,6 @@ pub mod types { }) } } - impl From for NetworkInterfaceCreate { fn from(value: super::NetworkInterfaceCreate) -> Self { Self { @@ -11009,13 +9962,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterfaceResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for NetworkInterfaceResultsPage { fn default() -> Self { Self { @@ -11024,7 +9975,6 @@ pub mod types { } } } - impl NetworkInterfaceResultsPage { pub fn items(mut self, value: T) -> Self where @@ -11047,7 +9997,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterfaceResultsPage { type Error = String; fn try_from(value: NetworkInterfaceResultsPage) -> Result { @@ -11057,7 +10006,6 @@ pub mod types { }) } } - impl From for NetworkInterfaceResultsPage { fn from(value: super::NetworkInterfaceResultsPage) -> Self { Self { @@ -11066,14 +10014,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterfaceUpdate { description: Result, String>, name: Result, String>, primary: Result, } - impl Default for NetworkInterfaceUpdate { fn default() -> Self { Self { @@ -11083,7 +10029,6 @@ pub mod types { } } } - impl NetworkInterfaceUpdate { pub fn description(mut self, value: T) -> Self where @@ -11116,7 +10061,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterfaceUpdate { type Error = String; fn try_from(value: NetworkInterfaceUpdate) -> Result { @@ -11127,7 +10071,6 @@ pub mod types { }) } } - impl From for NetworkInterfaceUpdate { fn from(value: super::NetworkInterfaceUpdate) -> Self { Self { @@ -11137,7 +10080,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Organization { description: Result, @@ -11146,7 +10088,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Organization { fn default() -> Self { Self { @@ -11158,7 +10099,6 @@ pub mod types { } } } - impl Organization { pub fn description(mut self, value: T) -> Self where @@ -11211,7 +10151,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Organization { type Error = String; fn try_from(value: Organization) -> Result { @@ -11224,7 +10163,6 @@ pub mod types { }) } } - impl From for Organization { fn from(value: super::Organization) -> Self { Self { @@ -11236,13 +10174,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationCreate { description: Result, name: Result, } - impl Default for OrganizationCreate { fn default() -> Self { Self { @@ -11251,7 +10187,6 @@ pub mod types { } } } - impl OrganizationCreate { pub fn description(mut self, value: T) -> Self where @@ -11274,7 +10209,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationCreate { type Error = String; fn try_from(value: OrganizationCreate) -> Result { @@ -11284,7 +10218,6 @@ pub mod types { }) } } - impl From for OrganizationCreate { fn from(value: super::OrganizationCreate) -> Self { Self { @@ -11293,13 +10226,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for OrganizationResultsPage { fn default() -> Self { Self { @@ -11308,7 +10239,6 @@ pub mod types { } } } - impl OrganizationResultsPage { pub fn items(mut self, value: T) -> Self where @@ -11331,7 +10261,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationResultsPage { type Error = String; fn try_from(value: OrganizationResultsPage) -> Result { @@ -11341,7 +10270,6 @@ pub mod types { }) } } - impl From for OrganizationResultsPage { fn from(value: super::OrganizationResultsPage) -> Self { Self { @@ -11350,12 +10278,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationRolePolicy { role_assignments: Result, String>, } - impl Default for OrganizationRolePolicy { fn default() -> Self { Self { @@ -11363,7 +10289,6 @@ pub mod types { } } } - impl OrganizationRolePolicy { pub fn role_assignments(mut self, value: T) -> Self where @@ -11379,7 +10304,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationRolePolicy { type Error = String; fn try_from(value: OrganizationRolePolicy) -> Result { @@ -11388,7 +10312,6 @@ pub mod types { }) } } - impl From for OrganizationRolePolicy { fn from(value: super::OrganizationRolePolicy) -> Self { Self { @@ -11396,14 +10319,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationRoleRoleAssignment { identity_id: Result, identity_type: Result, role_name: Result, } - impl Default for OrganizationRoleRoleAssignment { fn default() -> Self { Self { @@ -11413,7 +10334,6 @@ pub mod types { } } } - impl OrganizationRoleRoleAssignment { pub fn identity_id(mut self, value: T) -> Self where @@ -11446,7 +10366,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationRoleRoleAssignment { @@ -11459,7 +10378,6 @@ pub mod types { }) } } - impl From for OrganizationRoleRoleAssignment { fn from(value: super::OrganizationRoleRoleAssignment) -> Self { Self { @@ -11469,13 +10387,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct OrganizationUpdate { description: Result, String>, name: Result, String>, } - impl Default for OrganizationUpdate { fn default() -> Self { Self { @@ -11484,7 +10400,6 @@ pub mod types { } } } - impl OrganizationUpdate { pub fn description(mut self, value: T) -> Self where @@ -11507,7 +10422,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::OrganizationUpdate { type Error = String; fn try_from(value: OrganizationUpdate) -> Result { @@ -11517,7 +10431,6 @@ pub mod types { }) } } - impl From for OrganizationUpdate { fn from(value: super::OrganizationUpdate) -> Self { Self { @@ -11526,7 +10439,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct PhysicalDisk { disk_type: Result, @@ -11538,7 +10450,6 @@ pub mod types { time_modified: Result, String>, vendor: Result, } - impl Default for PhysicalDisk { fn default() -> Self { Self { @@ -11553,7 +10464,6 @@ pub mod types { } } } - impl PhysicalDisk { pub fn disk_type(mut self, value: T) -> Self where @@ -11636,7 +10546,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::PhysicalDisk { type Error = String; fn try_from(value: PhysicalDisk) -> Result { @@ -11652,7 +10561,6 @@ pub mod types { }) } } - impl From for PhysicalDisk { fn from(value: super::PhysicalDisk) -> Self { Self { @@ -11667,13 +10575,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct PhysicalDiskResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for PhysicalDiskResultsPage { fn default() -> Self { Self { @@ -11682,7 +10588,6 @@ pub mod types { } } } - impl PhysicalDiskResultsPage { pub fn items(mut self, value: T) -> Self where @@ -11705,7 +10610,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::PhysicalDiskResultsPage { type Error = String; fn try_from(value: PhysicalDiskResultsPage) -> Result { @@ -11715,7 +10619,6 @@ pub mod types { }) } } - impl From for PhysicalDiskResultsPage { fn from(value: super::PhysicalDiskResultsPage) -> Self { Self { @@ -11724,7 +10627,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Project { description: Result, @@ -11734,7 +10636,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Project { fn default() -> Self { Self { @@ -11747,7 +10648,6 @@ pub mod types { } } } - impl Project { pub fn description(mut self, value: T) -> Self where @@ -11810,7 +10710,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Project { type Error = String; fn try_from(value: Project) -> Result { @@ -11824,7 +10723,6 @@ pub mod types { }) } } - impl From for Project { fn from(value: super::Project) -> Self { Self { @@ -11837,13 +10735,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectCreate { description: Result, name: Result, } - impl Default for ProjectCreate { fn default() -> Self { Self { @@ -11852,7 +10748,6 @@ pub mod types { } } } - impl ProjectCreate { pub fn description(mut self, value: T) -> Self where @@ -11875,7 +10770,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectCreate { type Error = String; fn try_from(value: ProjectCreate) -> Result { @@ -11885,7 +10779,6 @@ pub mod types { }) } } - impl From for ProjectCreate { fn from(value: super::ProjectCreate) -> Self { Self { @@ -11894,13 +10787,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for ProjectResultsPage { fn default() -> Self { Self { @@ -11909,7 +10800,6 @@ pub mod types { } } } - impl ProjectResultsPage { pub fn items(mut self, value: T) -> Self where @@ -11932,7 +10822,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectResultsPage { type Error = String; fn try_from(value: ProjectResultsPage) -> Result { @@ -11942,7 +10831,6 @@ pub mod types { }) } } - impl From for ProjectResultsPage { fn from(value: super::ProjectResultsPage) -> Self { Self { @@ -11951,12 +10839,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectRolePolicy { role_assignments: Result, String>, } - impl Default for ProjectRolePolicy { fn default() -> Self { Self { @@ -11964,7 +10850,6 @@ pub mod types { } } } - impl ProjectRolePolicy { pub fn role_assignments(mut self, value: T) -> Self where @@ -11980,7 +10865,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectRolePolicy { type Error = String; fn try_from(value: ProjectRolePolicy) -> Result { @@ -11989,7 +10873,6 @@ pub mod types { }) } } - impl From for ProjectRolePolicy { fn from(value: super::ProjectRolePolicy) -> Self { Self { @@ -11997,14 +10880,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectRoleRoleAssignment { identity_id: Result, identity_type: Result, role_name: Result, } - impl Default for ProjectRoleRoleAssignment { fn default() -> Self { Self { @@ -12014,7 +10895,6 @@ pub mod types { } } } - impl ProjectRoleRoleAssignment { pub fn identity_id(mut self, value: T) -> Self where @@ -12047,7 +10927,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectRoleRoleAssignment { type Error = String; fn try_from(value: ProjectRoleRoleAssignment) -> Result { @@ -12058,7 +10937,6 @@ pub mod types { }) } } - impl From for ProjectRoleRoleAssignment { fn from(value: super::ProjectRoleRoleAssignment) -> Self { Self { @@ -12068,13 +10946,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct ProjectUpdate { description: Result, String>, name: Result, String>, } - impl Default for ProjectUpdate { fn default() -> Self { Self { @@ -12083,7 +10959,6 @@ pub mod types { } } } - impl ProjectUpdate { pub fn description(mut self, value: T) -> Self where @@ -12106,7 +10981,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::ProjectUpdate { type Error = String; fn try_from(value: ProjectUpdate) -> Result { @@ -12116,7 +10990,6 @@ pub mod types { }) } } - impl From for ProjectUpdate { fn from(value: super::ProjectUpdate) -> Self { Self { @@ -12125,14 +10998,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Rack { id: Result, time_created: Result, String>, time_modified: Result, String>, } - impl Default for Rack { fn default() -> Self { Self { @@ -12142,7 +11013,6 @@ pub mod types { } } } - impl Rack { pub fn id(mut self, value: T) -> Self where @@ -12175,7 +11045,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Rack { type Error = String; fn try_from(value: Rack) -> Result { @@ -12186,7 +11055,6 @@ pub mod types { }) } } - impl From for Rack { fn from(value: super::Rack) -> Self { Self { @@ -12196,13 +11064,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RackResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for RackResultsPage { fn default() -> Self { Self { @@ -12211,7 +11077,6 @@ pub mod types { } } } - impl RackResultsPage { pub fn items(mut self, value: T) -> Self where @@ -12234,7 +11099,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RackResultsPage { type Error = String; fn try_from(value: RackResultsPage) -> Result { @@ -12244,7 +11108,6 @@ pub mod types { }) } } - impl From for RackResultsPage { fn from(value: super::RackResultsPage) -> Self { Self { @@ -12253,13 +11116,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Role { description: Result, name: Result, } - impl Default for Role { fn default() -> Self { Self { @@ -12268,7 +11129,6 @@ pub mod types { } } } - impl Role { pub fn description(mut self, value: T) -> Self where @@ -12291,7 +11151,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Role { type Error = String; fn try_from(value: Role) -> Result { @@ -12301,7 +11160,6 @@ pub mod types { }) } } - impl From for Role { fn from(value: super::Role) -> Self { Self { @@ -12310,13 +11168,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RoleResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for RoleResultsPage { fn default() -> Self { Self { @@ -12325,7 +11181,6 @@ pub mod types { } } } - impl RoleResultsPage { pub fn items(mut self, value: T) -> Self where @@ -12348,7 +11203,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RoleResultsPage { type Error = String; fn try_from(value: RoleResultsPage) -> Result { @@ -12358,7 +11212,6 @@ pub mod types { }) } } - impl From for RoleResultsPage { fn from(value: super::RoleResultsPage) -> Self { Self { @@ -12367,7 +11220,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RouterRoute { description: Result, @@ -12380,7 +11232,6 @@ pub mod types { time_modified: Result, String>, vpc_router_id: Result, } - impl Default for RouterRoute { fn default() -> Self { Self { @@ -12396,7 +11247,6 @@ pub mod types { } } } - impl RouterRoute { pub fn description(mut self, value: T) -> Self where @@ -12489,7 +11339,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RouterRoute { type Error = String; fn try_from(value: RouterRoute) -> Result { @@ -12506,7 +11355,6 @@ pub mod types { }) } } - impl From for RouterRoute { fn from(value: super::RouterRoute) -> Self { Self { @@ -12522,7 +11370,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RouterRouteCreateParams { description: Result, @@ -12530,7 +11377,6 @@ pub mod types { name: Result, target: Result, } - impl Default for RouterRouteCreateParams { fn default() -> Self { Self { @@ -12541,7 +11387,6 @@ pub mod types { } } } - impl RouterRouteCreateParams { pub fn description(mut self, value: T) -> Self where @@ -12584,7 +11429,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RouterRouteCreateParams { type Error = String; fn try_from(value: RouterRouteCreateParams) -> Result { @@ -12596,7 +11440,6 @@ pub mod types { }) } } - impl From for RouterRouteCreateParams { fn from(value: super::RouterRouteCreateParams) -> Self { Self { @@ -12607,13 +11450,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RouterRouteResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for RouterRouteResultsPage { fn default() -> Self { Self { @@ -12622,7 +11463,6 @@ pub mod types { } } } - impl RouterRouteResultsPage { pub fn items(mut self, value: T) -> Self where @@ -12645,7 +11485,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RouterRouteResultsPage { type Error = String; fn try_from(value: RouterRouteResultsPage) -> Result { @@ -12655,7 +11494,6 @@ pub mod types { }) } } - impl From for RouterRouteResultsPage { fn from(value: super::RouterRouteResultsPage) -> Self { Self { @@ -12664,7 +11502,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct RouterRouteUpdateParams { description: Result, String>, @@ -12672,7 +11509,6 @@ pub mod types { name: Result, String>, target: Result, } - impl Default for RouterRouteUpdateParams { fn default() -> Self { Self { @@ -12683,7 +11519,6 @@ pub mod types { } } } - impl RouterRouteUpdateParams { pub fn description(mut self, value: T) -> Self where @@ -12726,7 +11561,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::RouterRouteUpdateParams { type Error = String; fn try_from(value: RouterRouteUpdateParams) -> Result { @@ -12738,7 +11572,6 @@ pub mod types { }) } } - impl From for RouterRouteUpdateParams { fn from(value: super::RouterRouteUpdateParams) -> Self { Self { @@ -12749,13 +11582,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Saga { id: Result, state: Result, } - impl Default for Saga { fn default() -> Self { Self { @@ -12764,7 +11595,6 @@ pub mod types { } } } - impl Saga { pub fn id(mut self, value: T) -> Self where @@ -12787,7 +11617,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Saga { type Error = String; fn try_from(value: Saga) -> Result { @@ -12797,7 +11626,6 @@ pub mod types { }) } } - impl From for Saga { fn from(value: super::Saga) -> Self { Self { @@ -12806,13 +11634,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SagaResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SagaResultsPage { fn default() -> Self { Self { @@ -12821,7 +11647,6 @@ pub mod types { } } } - impl SagaResultsPage { pub fn items(mut self, value: T) -> Self where @@ -12844,7 +11669,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SagaResultsPage { type Error = String; fn try_from(value: SagaResultsPage) -> Result { @@ -12854,7 +11678,6 @@ pub mod types { }) } } - impl From for SagaResultsPage { fn from(value: super::SagaResultsPage) -> Self { Self { @@ -12863,7 +11686,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SamlIdentityProvider { acs_url: Result, @@ -12878,7 +11700,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for SamlIdentityProvider { fn default() -> Self { Self { @@ -12898,7 +11719,6 @@ pub mod types { } } } - impl SamlIdentityProvider { pub fn acs_url(mut self, value: T) -> Self where @@ -13014,7 +11834,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SamlIdentityProvider { type Error = String; fn try_from(value: SamlIdentityProvider) -> Result { @@ -13033,7 +11852,6 @@ pub mod types { }) } } - impl From for SamlIdentityProvider { fn from(value: super::SamlIdentityProvider) -> Self { Self { @@ -13051,7 +11869,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SamlIdentityProviderCreate { acs_url: Result, @@ -13065,7 +11882,6 @@ pub mod types { sp_client_id: Result, technical_contact_email: Result, } - impl Default for SamlIdentityProviderCreate { fn default() -> Self { Self { @@ -13086,7 +11902,6 @@ pub mod types { } } } - impl SamlIdentityProviderCreate { pub fn acs_url(mut self, value: T) -> Self where @@ -13198,7 +12013,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SamlIdentityProviderCreate { type Error = String; fn try_from(value: SamlIdentityProviderCreate) -> Result { @@ -13216,7 +12030,6 @@ pub mod types { }) } } - impl From for SamlIdentityProviderCreate { fn from(value: super::SamlIdentityProviderCreate) -> Self { Self { @@ -13233,7 +12046,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Silo { description: Result, @@ -13244,7 +12056,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Silo { fn default() -> Self { Self { @@ -13258,7 +12069,6 @@ pub mod types { } } } - impl Silo { pub fn description(mut self, value: T) -> Self where @@ -13331,7 +12141,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Silo { type Error = String; fn try_from(value: Silo) -> Result { @@ -13346,7 +12155,6 @@ pub mod types { }) } } - impl From for Silo { fn from(value: super::Silo) -> Self { Self { @@ -13360,7 +12168,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SiloCreate { admin_group_name: Result, String>, @@ -13369,7 +12176,6 @@ pub mod types { identity_mode: Result, name: Result, } - impl Default for SiloCreate { fn default() -> Self { Self { @@ -13381,7 +12187,6 @@ pub mod types { } } } - impl SiloCreate { pub fn admin_group_name(mut self, value: T) -> Self where @@ -13437,7 +12242,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SiloCreate { type Error = String; fn try_from(value: SiloCreate) -> Result { @@ -13450,7 +12254,6 @@ pub mod types { }) } } - impl From for SiloCreate { fn from(value: super::SiloCreate) -> Self { Self { @@ -13462,13 +12265,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SiloResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SiloResultsPage { fn default() -> Self { Self { @@ -13477,7 +12278,6 @@ pub mod types { } } } - impl SiloResultsPage { pub fn items(mut self, value: T) -> Self where @@ -13500,7 +12300,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SiloResultsPage { type Error = String; fn try_from(value: SiloResultsPage) -> Result { @@ -13510,7 +12309,6 @@ pub mod types { }) } } - impl From for SiloResultsPage { fn from(value: super::SiloResultsPage) -> Self { Self { @@ -13519,12 +12317,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SiloRolePolicy { role_assignments: Result, String>, } - impl Default for SiloRolePolicy { fn default() -> Self { Self { @@ -13532,7 +12328,6 @@ pub mod types { } } } - impl SiloRolePolicy { pub fn role_assignments(mut self, value: T) -> Self where @@ -13548,7 +12343,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SiloRolePolicy { type Error = String; fn try_from(value: SiloRolePolicy) -> Result { @@ -13557,7 +12351,6 @@ pub mod types { }) } } - impl From for SiloRolePolicy { fn from(value: super::SiloRolePolicy) -> Self { Self { @@ -13565,14 +12358,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SiloRoleRoleAssignment { identity_id: Result, identity_type: Result, role_name: Result, } - impl Default for SiloRoleRoleAssignment { fn default() -> Self { Self { @@ -13582,7 +12373,6 @@ pub mod types { } } } - impl SiloRoleRoleAssignment { pub fn identity_id(mut self, value: T) -> Self where @@ -13615,7 +12405,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SiloRoleRoleAssignment { type Error = String; fn try_from(value: SiloRoleRoleAssignment) -> Result { @@ -13626,7 +12415,6 @@ pub mod types { }) } } - impl From for SiloRoleRoleAssignment { fn from(value: super::SiloRoleRoleAssignment) -> Self { Self { @@ -13636,7 +12424,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Sled { baseboard: Result, @@ -13645,7 +12432,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Sled { fn default() -> Self { Self { @@ -13657,7 +12443,6 @@ pub mod types { } } } - impl Sled { pub fn baseboard(mut self, value: T) -> Self where @@ -13710,7 +12495,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Sled { type Error = String; fn try_from(value: Sled) -> Result { @@ -13723,7 +12507,6 @@ pub mod types { }) } } - impl From for Sled { fn from(value: super::Sled) -> Self { Self { @@ -13735,13 +12518,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SledResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SledResultsPage { fn default() -> Self { Self { @@ -13750,7 +12531,6 @@ pub mod types { } } } - impl SledResultsPage { pub fn items(mut self, value: T) -> Self where @@ -13773,7 +12553,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SledResultsPage { type Error = String; fn try_from(value: SledResultsPage) -> Result { @@ -13783,7 +12562,6 @@ pub mod types { }) } } - impl From for SledResultsPage { fn from(value: super::SledResultsPage) -> Self { Self { @@ -13792,7 +12570,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Snapshot { description: Result, @@ -13805,7 +12582,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Snapshot { fn default() -> Self { Self { @@ -13821,7 +12597,6 @@ pub mod types { } } } - impl Snapshot { pub fn description(mut self, value: T) -> Self where @@ -13914,7 +12689,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Snapshot { type Error = String; fn try_from(value: Snapshot) -> Result { @@ -13931,7 +12705,6 @@ pub mod types { }) } } - impl From for Snapshot { fn from(value: super::Snapshot) -> Self { Self { @@ -13947,14 +12720,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SnapshotCreate { description: Result, disk: Result, name: Result, } - impl Default for SnapshotCreate { fn default() -> Self { Self { @@ -13964,7 +12735,6 @@ pub mod types { } } } - impl SnapshotCreate { pub fn description(mut self, value: T) -> Self where @@ -13997,7 +12767,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SnapshotCreate { type Error = String; fn try_from(value: SnapshotCreate) -> Result { @@ -14008,7 +12777,6 @@ pub mod types { }) } } - impl From for SnapshotCreate { fn from(value: super::SnapshotCreate) -> Self { Self { @@ -14018,13 +12786,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SnapshotResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SnapshotResultsPage { fn default() -> Self { Self { @@ -14033,7 +12799,6 @@ pub mod types { } } } - impl SnapshotResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14056,7 +12821,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SnapshotResultsPage { type Error = String; fn try_from(value: SnapshotResultsPage) -> Result { @@ -14066,7 +12830,6 @@ pub mod types { }) } } - impl From for SnapshotResultsPage { fn from(value: super::SnapshotResultsPage) -> Self { Self { @@ -14075,12 +12838,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SpoofLoginBody { username: Result, } - impl Default for SpoofLoginBody { fn default() -> Self { Self { @@ -14088,7 +12849,6 @@ pub mod types { } } } - impl SpoofLoginBody { pub fn username(mut self, value: T) -> Self where @@ -14101,7 +12861,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SpoofLoginBody { type Error = String; fn try_from(value: SpoofLoginBody) -> Result { @@ -14110,7 +12869,6 @@ pub mod types { }) } } - impl From for SpoofLoginBody { fn from(value: super::SpoofLoginBody) -> Self { Self { @@ -14118,7 +12876,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SshKey { description: Result, @@ -14129,7 +12886,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for SshKey { fn default() -> Self { Self { @@ -14143,7 +12899,6 @@ pub mod types { } } } - impl SshKey { pub fn description(mut self, value: T) -> Self where @@ -14216,7 +12971,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SshKey { type Error = String; fn try_from(value: SshKey) -> Result { @@ -14231,7 +12985,6 @@ pub mod types { }) } } - impl From for SshKey { fn from(value: super::SshKey) -> Self { Self { @@ -14245,14 +12998,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SshKeyCreate { description: Result, name: Result, public_key: Result, } - impl Default for SshKeyCreate { fn default() -> Self { Self { @@ -14262,7 +13013,6 @@ pub mod types { } } } - impl SshKeyCreate { pub fn description(mut self, value: T) -> Self where @@ -14295,7 +13045,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SshKeyCreate { type Error = String; fn try_from(value: SshKeyCreate) -> Result { @@ -14306,7 +13055,6 @@ pub mod types { }) } } - impl From for SshKeyCreate { fn from(value: super::SshKeyCreate) -> Self { Self { @@ -14316,13 +13064,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SshKeyResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SshKeyResultsPage { fn default() -> Self { Self { @@ -14331,7 +13077,6 @@ pub mod types { } } } - impl SshKeyResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14354,7 +13099,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SshKeyResultsPage { type Error = String; fn try_from(value: SshKeyResultsPage) -> Result { @@ -14364,7 +13108,6 @@ pub mod types { }) } } - impl From for SshKeyResultsPage { fn from(value: super::SshKeyResultsPage) -> Self { Self { @@ -14373,7 +13116,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SystemUpdate { id: Result, @@ -14381,7 +13123,6 @@ pub mod types { time_modified: Result, String>, version: Result, } - impl Default for SystemUpdate { fn default() -> Self { Self { @@ -14392,7 +13133,6 @@ pub mod types { } } } - impl SystemUpdate { pub fn id(mut self, value: T) -> Self where @@ -14435,7 +13175,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SystemUpdate { type Error = String; fn try_from(value: SystemUpdate) -> Result { @@ -14447,7 +13186,6 @@ pub mod types { }) } } - impl From for SystemUpdate { fn from(value: super::SystemUpdate) -> Self { Self { @@ -14458,13 +13196,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SystemUpdateResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for SystemUpdateResultsPage { fn default() -> Self { Self { @@ -14473,7 +13209,6 @@ pub mod types { } } } - impl SystemUpdateResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14496,7 +13231,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SystemUpdateResultsPage { type Error = String; fn try_from(value: SystemUpdateResultsPage) -> Result { @@ -14506,7 +13240,6 @@ pub mod types { }) } } - impl From for SystemUpdateResultsPage { fn from(value: super::SystemUpdateResultsPage) -> Self { Self { @@ -14515,12 +13248,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SystemUpdateStart { version: Result, } - impl Default for SystemUpdateStart { fn default() -> Self { Self { @@ -14528,7 +13259,6 @@ pub mod types { } } } - impl SystemUpdateStart { pub fn version(mut self, value: T) -> Self where @@ -14541,7 +13271,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SystemUpdateStart { type Error = String; fn try_from(value: SystemUpdateStart) -> Result { @@ -14550,7 +13279,6 @@ pub mod types { }) } } - impl From for SystemUpdateStart { fn from(value: super::SystemUpdateStart) -> Self { Self { @@ -14558,13 +13286,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct SystemVersion { status: Result, version_range: Result, } - impl Default for SystemVersion { fn default() -> Self { Self { @@ -14573,7 +13299,6 @@ pub mod types { } } } - impl SystemVersion { pub fn status(mut self, value: T) -> Self where @@ -14596,7 +13321,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::SystemVersion { type Error = String; fn try_from(value: SystemVersion) -> Result { @@ -14606,7 +13330,6 @@ pub mod types { }) } } - impl From for SystemVersion { fn from(value: super::SystemVersion) -> Self { Self { @@ -14615,7 +13338,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TimeseriesSchema { created: Result, String>, @@ -14623,7 +13345,6 @@ pub mod types { field_schema: Result, String>, timeseries_name: Result, } - impl Default for TimeseriesSchema { fn default() -> Self { Self { @@ -14634,7 +13355,6 @@ pub mod types { } } } - impl TimeseriesSchema { pub fn created(mut self, value: T) -> Self where @@ -14677,7 +13397,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TimeseriesSchema { type Error = String; fn try_from(value: TimeseriesSchema) -> Result { @@ -14689,7 +13408,6 @@ pub mod types { }) } } - impl From for TimeseriesSchema { fn from(value: super::TimeseriesSchema) -> Self { Self { @@ -14700,13 +13418,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct TimeseriesSchemaResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for TimeseriesSchemaResultsPage { fn default() -> Self { Self { @@ -14715,7 +13431,6 @@ pub mod types { } } } - impl TimeseriesSchemaResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14738,7 +13453,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::TimeseriesSchemaResultsPage { type Error = String; fn try_from(value: TimeseriesSchemaResultsPage) -> Result { @@ -14748,7 +13462,6 @@ pub mod types { }) } } - impl From for TimeseriesSchemaResultsPage { fn from(value: super::TimeseriesSchemaResultsPage) -> Self { Self { @@ -14757,7 +13470,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UpdateDeployment { id: Result, @@ -14766,7 +13478,6 @@ pub mod types { time_modified: Result, String>, version: Result, } - impl Default for UpdateDeployment { fn default() -> Self { Self { @@ -14778,7 +13489,6 @@ pub mod types { } } } - impl UpdateDeployment { pub fn id(mut self, value: T) -> Self where @@ -14831,7 +13541,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UpdateDeployment { type Error = String; fn try_from(value: UpdateDeployment) -> Result { @@ -14844,7 +13553,6 @@ pub mod types { }) } } - impl From for UpdateDeployment { fn from(value: super::UpdateDeployment) -> Self { Self { @@ -14856,13 +13564,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UpdateDeploymentResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for UpdateDeploymentResultsPage { fn default() -> Self { Self { @@ -14871,7 +13577,6 @@ pub mod types { } } } - impl UpdateDeploymentResultsPage { pub fn items(mut self, value: T) -> Self where @@ -14894,7 +13599,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UpdateDeploymentResultsPage { type Error = String; fn try_from(value: UpdateDeploymentResultsPage) -> Result { @@ -14904,7 +13608,6 @@ pub mod types { }) } } - impl From for UpdateDeploymentResultsPage { fn from(value: super::UpdateDeploymentResultsPage) -> Self { Self { @@ -14913,7 +13616,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UpdateableComponent { component_type: Result, @@ -14925,7 +13627,6 @@ pub mod types { time_modified: Result, String>, version: Result, } - impl Default for UpdateableComponent { fn default() -> Self { Self { @@ -14940,7 +13641,6 @@ pub mod types { } } } - impl UpdateableComponent { pub fn component_type(mut self, value: T) -> Self where @@ -15023,7 +13723,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UpdateableComponent { type Error = String; fn try_from(value: UpdateableComponent) -> Result { @@ -15039,7 +13738,6 @@ pub mod types { }) } } - impl From for UpdateableComponent { fn from(value: super::UpdateableComponent) -> Self { Self { @@ -15054,13 +13752,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UpdateableComponentResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for UpdateableComponentResultsPage { fn default() -> Self { Self { @@ -15069,7 +13765,6 @@ pub mod types { } } } - impl UpdateableComponentResultsPage { pub fn items(mut self, value: T) -> Self where @@ -15092,7 +13787,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UpdateableComponentResultsPage { @@ -15104,7 +13798,6 @@ pub mod types { }) } } - impl From for UpdateableComponentResultsPage { fn from(value: super::UpdateableComponentResultsPage) -> Self { Self { @@ -15113,14 +13806,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct User { display_name: Result, id: Result, silo_id: Result, } - impl Default for User { fn default() -> Self { Self { @@ -15130,7 +13821,6 @@ pub mod types { } } } - impl User { pub fn display_name(mut self, value: T) -> Self where @@ -15163,7 +13853,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::User { type Error = String; fn try_from(value: User) -> Result { @@ -15174,7 +13863,6 @@ pub mod types { }) } } - impl From for User { fn from(value: super::User) -> Self { Self { @@ -15184,7 +13872,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserBuiltin { description: Result, @@ -15193,7 +13880,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for UserBuiltin { fn default() -> Self { Self { @@ -15205,7 +13891,6 @@ pub mod types { } } } - impl UserBuiltin { pub fn description(mut self, value: T) -> Self where @@ -15258,7 +13943,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserBuiltin { type Error = String; fn try_from(value: UserBuiltin) -> Result { @@ -15271,7 +13955,6 @@ pub mod types { }) } } - impl From for UserBuiltin { fn from(value: super::UserBuiltin) -> Self { Self { @@ -15283,13 +13966,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserBuiltinResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for UserBuiltinResultsPage { fn default() -> Self { Self { @@ -15298,7 +13979,6 @@ pub mod types { } } } - impl UserBuiltinResultsPage { pub fn items(mut self, value: T) -> Self where @@ -15321,7 +14001,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserBuiltinResultsPage { type Error = String; fn try_from(value: UserBuiltinResultsPage) -> Result { @@ -15331,7 +14010,6 @@ pub mod types { }) } } - impl From for UserBuiltinResultsPage { fn from(value: super::UserBuiltinResultsPage) -> Self { Self { @@ -15340,13 +14018,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserCreate { external_id: Result, password: Result, } - impl Default for UserCreate { fn default() -> Self { Self { @@ -15355,7 +14031,6 @@ pub mod types { } } } - impl UserCreate { pub fn external_id(mut self, value: T) -> Self where @@ -15378,7 +14053,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserCreate { type Error = String; fn try_from(value: UserCreate) -> Result { @@ -15388,7 +14062,6 @@ pub mod types { }) } } - impl From for UserCreate { fn from(value: super::UserCreate) -> Self { Self { @@ -15397,13 +14070,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UserResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for UserResultsPage { fn default() -> Self { Self { @@ -15412,7 +14083,6 @@ pub mod types { } } } - impl UserResultsPage { pub fn items(mut self, value: T) -> Self where @@ -15435,7 +14105,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UserResultsPage { type Error = String; fn try_from(value: UserResultsPage) -> Result { @@ -15445,7 +14114,6 @@ pub mod types { }) } } - impl From for UserResultsPage { fn from(value: super::UserResultsPage) -> Self { Self { @@ -15454,13 +14122,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct UsernamePasswordCredentials { password: Result, username: Result, } - impl Default for UsernamePasswordCredentials { fn default() -> Self { Self { @@ -15469,7 +14135,6 @@ pub mod types { } } } - impl UsernamePasswordCredentials { pub fn password(mut self, value: T) -> Self where @@ -15492,7 +14157,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::UsernamePasswordCredentials { type Error = String; fn try_from(value: UsernamePasswordCredentials) -> Result { @@ -15502,7 +14166,6 @@ pub mod types { }) } } - impl From for UsernamePasswordCredentials { fn from(value: super::UsernamePasswordCredentials) -> Self { Self { @@ -15511,13 +14174,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VersionRange { high: Result, low: Result, } - impl Default for VersionRange { fn default() -> Self { Self { @@ -15526,7 +14187,6 @@ pub mod types { } } } - impl VersionRange { pub fn high(mut self, value: T) -> Self where @@ -15549,7 +14209,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VersionRange { type Error = String; fn try_from(value: VersionRange) -> Result { @@ -15559,7 +14218,6 @@ pub mod types { }) } } - impl From for VersionRange { fn from(value: super::VersionRange) -> Self { Self { @@ -15568,7 +14226,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Vpc { description: Result, @@ -15581,7 +14238,6 @@ pub mod types { time_created: Result, String>, time_modified: Result, String>, } - impl Default for Vpc { fn default() -> Self { Self { @@ -15597,7 +14253,6 @@ pub mod types { } } } - impl Vpc { pub fn description(mut self, value: T) -> Self where @@ -15693,7 +14348,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Vpc { type Error = String; fn try_from(value: Vpc) -> Result { @@ -15710,7 +14364,6 @@ pub mod types { }) } } - impl From for Vpc { fn from(value: super::Vpc) -> Self { Self { @@ -15726,7 +14379,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcCreate { description: Result, @@ -15734,7 +14386,6 @@ pub mod types { ipv6_prefix: Result, String>, name: Result, } - impl Default for VpcCreate { fn default() -> Self { Self { @@ -15745,7 +14396,6 @@ pub mod types { } } } - impl VpcCreate { pub fn description(mut self, value: T) -> Self where @@ -15788,7 +14438,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcCreate { type Error = String; fn try_from(value: VpcCreate) -> Result { @@ -15800,7 +14449,6 @@ pub mod types { }) } } - impl From for VpcCreate { fn from(value: super::VpcCreate) -> Self { Self { @@ -15811,7 +14459,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRule { action: Result, @@ -15827,7 +14474,6 @@ pub mod types { time_modified: Result, String>, vpc_id: Result, } - impl Default for VpcFirewallRule { fn default() -> Self { Self { @@ -15846,7 +14492,6 @@ pub mod types { } } } - impl VpcFirewallRule { pub fn action(mut self, value: T) -> Self where @@ -15969,7 +14614,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRule { type Error = String; fn try_from(value: VpcFirewallRule) -> Result { @@ -15989,7 +14633,6 @@ pub mod types { }) } } - impl From for VpcFirewallRule { fn from(value: super::VpcFirewallRule) -> Self { Self { @@ -16008,14 +14651,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRuleFilter { hosts: Result>, String>, ports: Result>, String>, protocols: Result>, String>, } - impl Default for VpcFirewallRuleFilter { fn default() -> Self { Self { @@ -16025,7 +14666,6 @@ pub mod types { } } } - impl VpcFirewallRuleFilter { pub fn hosts(mut self, value: T) -> Self where @@ -16058,7 +14698,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRuleFilter { type Error = String; fn try_from(value: VpcFirewallRuleFilter) -> Result { @@ -16069,7 +14708,6 @@ pub mod types { }) } } - impl From for VpcFirewallRuleFilter { fn from(value: super::VpcFirewallRuleFilter) -> Self { Self { @@ -16079,7 +14717,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRuleUpdate { action: Result, @@ -16091,7 +14728,6 @@ pub mod types { status: Result, targets: Result, String>, } - impl Default for VpcFirewallRuleUpdate { fn default() -> Self { Self { @@ -16106,7 +14742,6 @@ pub mod types { } } } - impl VpcFirewallRuleUpdate { pub fn action(mut self, value: T) -> Self where @@ -16189,7 +14824,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRuleUpdate { type Error = String; fn try_from(value: VpcFirewallRuleUpdate) -> Result { @@ -16205,7 +14839,6 @@ pub mod types { }) } } - impl From for VpcFirewallRuleUpdate { fn from(value: super::VpcFirewallRuleUpdate) -> Self { Self { @@ -16220,12 +14853,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRuleUpdateParams { rules: Result, String>, } - impl Default for VpcFirewallRuleUpdateParams { fn default() -> Self { Self { @@ -16233,7 +14864,6 @@ pub mod types { } } } - impl VpcFirewallRuleUpdateParams { pub fn rules(mut self, value: T) -> Self where @@ -16246,7 +14876,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRuleUpdateParams { type Error = String; fn try_from(value: VpcFirewallRuleUpdateParams) -> Result { @@ -16255,7 +14884,6 @@ pub mod types { }) } } - impl From for VpcFirewallRuleUpdateParams { fn from(value: super::VpcFirewallRuleUpdateParams) -> Self { Self { @@ -16263,12 +14891,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcFirewallRules { rules: Result, String>, } - impl Default for VpcFirewallRules { fn default() -> Self { Self { @@ -16276,7 +14902,6 @@ pub mod types { } } } - impl VpcFirewallRules { pub fn rules(mut self, value: T) -> Self where @@ -16289,7 +14914,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcFirewallRules { type Error = String; fn try_from(value: VpcFirewallRules) -> Result { @@ -16298,7 +14922,6 @@ pub mod types { }) } } - impl From for VpcFirewallRules { fn from(value: super::VpcFirewallRules) -> Self { Self { @@ -16306,13 +14929,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for VpcResultsPage { fn default() -> Self { Self { @@ -16321,7 +14942,6 @@ pub mod types { } } } - impl VpcResultsPage { pub fn items(mut self, value: T) -> Self where @@ -16344,7 +14964,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcResultsPage { type Error = String; fn try_from(value: VpcResultsPage) -> Result { @@ -16354,7 +14973,6 @@ pub mod types { }) } } - impl From for VpcResultsPage { fn from(value: super::VpcResultsPage) -> Self { Self { @@ -16363,7 +14981,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcRouter { description: Result, @@ -16374,7 +14991,6 @@ pub mod types { time_modified: Result, String>, vpc_id: Result, } - impl Default for VpcRouter { fn default() -> Self { Self { @@ -16388,7 +15004,6 @@ pub mod types { } } } - impl VpcRouter { pub fn description(mut self, value: T) -> Self where @@ -16461,7 +15076,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcRouter { type Error = String; fn try_from(value: VpcRouter) -> Result { @@ -16476,7 +15090,6 @@ pub mod types { }) } } - impl From for VpcRouter { fn from(value: super::VpcRouter) -> Self { Self { @@ -16490,13 +15103,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcRouterCreate { description: Result, name: Result, } - impl Default for VpcRouterCreate { fn default() -> Self { Self { @@ -16505,7 +15116,6 @@ pub mod types { } } } - impl VpcRouterCreate { pub fn description(mut self, value: T) -> Self where @@ -16528,7 +15138,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcRouterCreate { type Error = String; fn try_from(value: VpcRouterCreate) -> Result { @@ -16538,7 +15147,6 @@ pub mod types { }) } } - impl From for VpcRouterCreate { fn from(value: super::VpcRouterCreate) -> Self { Self { @@ -16547,13 +15155,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcRouterResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for VpcRouterResultsPage { fn default() -> Self { Self { @@ -16562,7 +15168,6 @@ pub mod types { } } } - impl VpcRouterResultsPage { pub fn items(mut self, value: T) -> Self where @@ -16585,7 +15190,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcRouterResultsPage { type Error = String; fn try_from(value: VpcRouterResultsPage) -> Result { @@ -16595,7 +15199,6 @@ pub mod types { }) } } - impl From for VpcRouterResultsPage { fn from(value: super::VpcRouterResultsPage) -> Self { Self { @@ -16604,13 +15207,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcRouterUpdate { description: Result, String>, name: Result, String>, } - impl Default for VpcRouterUpdate { fn default() -> Self { Self { @@ -16619,7 +15220,6 @@ pub mod types { } } } - impl VpcRouterUpdate { pub fn description(mut self, value: T) -> Self where @@ -16642,7 +15242,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcRouterUpdate { type Error = String; fn try_from(value: VpcRouterUpdate) -> Result { @@ -16652,7 +15251,6 @@ pub mod types { }) } } - impl From for VpcRouterUpdate { fn from(value: super::VpcRouterUpdate) -> Self { Self { @@ -16661,7 +15259,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcSubnet { description: Result, @@ -16673,7 +15270,6 @@ pub mod types { time_modified: Result, String>, vpc_id: Result, } - impl Default for VpcSubnet { fn default() -> Self { Self { @@ -16688,7 +15284,6 @@ pub mod types { } } } - impl VpcSubnet { pub fn description(mut self, value: T) -> Self where @@ -16771,7 +15366,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcSubnet { type Error = String; fn try_from(value: VpcSubnet) -> Result { @@ -16787,7 +15381,6 @@ pub mod types { }) } } - impl From for VpcSubnet { fn from(value: super::VpcSubnet) -> Self { Self { @@ -16802,7 +15395,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcSubnetCreate { description: Result, @@ -16810,7 +15402,6 @@ pub mod types { ipv6_block: Result, String>, name: Result, } - impl Default for VpcSubnetCreate { fn default() -> Self { Self { @@ -16821,7 +15412,6 @@ pub mod types { } } } - impl VpcSubnetCreate { pub fn description(mut self, value: T) -> Self where @@ -16864,7 +15454,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcSubnetCreate { type Error = String; fn try_from(value: VpcSubnetCreate) -> Result { @@ -16876,7 +15465,6 @@ pub mod types { }) } } - impl From for VpcSubnetCreate { fn from(value: super::VpcSubnetCreate) -> Self { Self { @@ -16887,13 +15475,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcSubnetResultsPage { items: Result, String>, next_page: Result, String>, } - impl Default for VpcSubnetResultsPage { fn default() -> Self { Self { @@ -16902,7 +15488,6 @@ pub mod types { } } } - impl VpcSubnetResultsPage { pub fn items(mut self, value: T) -> Self where @@ -16925,7 +15510,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcSubnetResultsPage { type Error = String; fn try_from(value: VpcSubnetResultsPage) -> Result { @@ -16935,7 +15519,6 @@ pub mod types { }) } } - impl From for VpcSubnetResultsPage { fn from(value: super::VpcSubnetResultsPage) -> Self { Self { @@ -16944,13 +15527,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcSubnetUpdate { description: Result, String>, name: Result, String>, } - impl Default for VpcSubnetUpdate { fn default() -> Self { Self { @@ -16959,7 +15540,6 @@ pub mod types { } } } - impl VpcSubnetUpdate { pub fn description(mut self, value: T) -> Self where @@ -16982,7 +15562,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcSubnetUpdate { type Error = String; fn try_from(value: VpcSubnetUpdate) -> Result { @@ -16992,7 +15571,6 @@ pub mod types { }) } } - impl From for VpcSubnetUpdate { fn from(value: super::VpcSubnetUpdate) -> Self { Self { @@ -17001,14 +15579,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct VpcUpdate { description: Result, String>, dns_name: Result, String>, name: Result, String>, } - impl Default for VpcUpdate { fn default() -> Self { Self { @@ -17018,7 +15594,6 @@ pub mod types { } } } - impl VpcUpdate { pub fn description(mut self, value: T) -> Self where @@ -17051,7 +15626,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::VpcUpdate { type Error = String; fn try_from(value: VpcUpdate) -> Result { @@ -17062,7 +15636,6 @@ pub mod types { }) } } - impl From for VpcUpdate { fn from(value: super::VpcUpdate) -> Self { Self { @@ -17073,19 +15646,16 @@ pub mod types { } } } - pub mod defaults { pub(super) fn default_bool() -> bool { V } - pub(super) fn instance_create_network_interfaces( ) -> super::InstanceNetworkInterfaceAttachment { super::InstanceNetworkInterfaceAttachment::Default } } } - #[derive(Clone, Debug)] ///Client for Oxide Region API /// @@ -17096,7 +15666,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -17112,7 +15681,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -17125,17 +15693,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -17144,7 +15709,6 @@ impl Client { "0.0.1" } } - impl Client { ///Fetch a disk by id /// @@ -17161,7 +15725,6 @@ impl Client { pub fn disk_view_by_id(&self) -> builder::DiskViewById { builder::DiskViewById::new(self) } - ///Fetch an image by id /// ///Sends a `GET` request to `/by-id/images/{id}` @@ -17175,7 +15738,6 @@ impl Client { pub fn image_view_by_id(&self) -> builder::ImageViewById { builder::ImageViewById::new(self) } - ///Fetch an instance by id /// ///Sends a `GET` request to `/by-id/instances/{id}` @@ -17189,7 +15751,6 @@ impl Client { pub fn instance_view_by_id(&self) -> builder::InstanceViewById { builder::InstanceViewById::new(self) } - ///Fetch a network interface by id /// ///Sends a `GET` request to `/by-id/network-interfaces/{id}` @@ -17205,7 +15766,6 @@ impl Client { ) -> builder::InstanceNetworkInterfaceViewById { builder::InstanceNetworkInterfaceViewById::new(self) } - ///Fetch an organization by id /// ///Use `GET /v1/organizations/{organization}` instead @@ -17221,7 +15781,6 @@ impl Client { pub fn organization_view_by_id(&self) -> builder::OrganizationViewById { builder::OrganizationViewById::new(self) } - ///Fetch a project by id /// ///Use `GET /v1/projects/{project}` instead @@ -17237,7 +15796,6 @@ impl Client { pub fn project_view_by_id(&self) -> builder::ProjectViewById { builder::ProjectViewById::new(self) } - ///Fetch a snapshot by id /// ///Sends a `GET` request to `/by-id/snapshots/{id}` @@ -17251,7 +15809,6 @@ impl Client { pub fn snapshot_view_by_id(&self) -> builder::SnapshotViewById { builder::SnapshotViewById::new(self) } - ///Fetch a route by id /// ///Sends a `GET` request to `/by-id/vpc-router-routes/{id}` @@ -17265,7 +15822,6 @@ impl Client { pub fn vpc_router_route_view_by_id(&self) -> builder::VpcRouterRouteViewById { builder::VpcRouterRouteViewById::new(self) } - ///Get a router by id /// ///Sends a `GET` request to `/by-id/vpc-routers/{id}` @@ -17279,7 +15835,6 @@ impl Client { pub fn vpc_router_view_by_id(&self) -> builder::VpcRouterViewById { builder::VpcRouterViewById::new(self) } - ///Fetch a subnet by id /// ///Sends a `GET` request to `/by-id/vpc-subnets/{id}` @@ -17293,7 +15848,6 @@ impl Client { pub fn vpc_subnet_view_by_id(&self) -> builder::VpcSubnetViewById { builder::VpcSubnetViewById::new(self) } - ///Fetch a VPC /// ///Sends a `GET` request to `/by-id/vpcs/{id}` @@ -17307,7 +15861,6 @@ impl Client { pub fn vpc_view_by_id(&self) -> builder::VpcViewById { builder::VpcViewById::new(self) } - ///Start an OAuth 2.0 Device Authorization Grant /// ///This endpoint is designed to be accessed from an *unauthenticated* API @@ -17325,7 +15878,6 @@ impl Client { pub fn device_auth_request(&self) -> builder::DeviceAuthRequest { builder::DeviceAuthRequest::new(self) } - ///Confirm an OAuth 2.0 Device Authorization Grant /// ///This endpoint is designed to be accessed by the user agent (browser), @@ -17344,7 +15896,6 @@ impl Client { pub fn device_auth_confirm(&self) -> builder::DeviceAuthConfirm { builder::DeviceAuthConfirm::new(self) } - ///Request a device access token /// ///This endpoint should be polled by the client until the user code is @@ -17361,7 +15912,6 @@ impl Client { pub fn device_access_token(&self) -> builder::DeviceAccessToken { builder::DeviceAccessToken::new(self) } - ///List groups /// ///Sends a `GET` request to `/groups` @@ -17382,7 +15932,6 @@ impl Client { pub fn group_list(&self) -> builder::GroupList { builder::GroupList::new(self) } - ///Sends a `POST` request to `/login` /// ///```ignore @@ -17394,7 +15943,6 @@ impl Client { pub fn login_spoof(&self) -> builder::LoginSpoof { builder::LoginSpoof::new(self) } - ///Authenticate a user (i.e., log in) via username and password /// ///Sends a `POST` request to `/login/{silo_name}/local` @@ -17409,7 +15957,6 @@ impl Client { pub fn login_local(&self) -> builder::LoginLocal { builder::LoginLocal::new(self) } - ///Prompt user login /// ///Either display a page asking a user for their credentials, or redirect @@ -17427,7 +15974,6 @@ impl Client { pub fn login_saml_begin(&self) -> builder::LoginSamlBegin { builder::LoginSamlBegin::new(self) } - ///Authenticate a user (i.e., log in) via SAML /// ///Sends a `POST` request to `/login/{silo_name}/saml/{provider_name}` @@ -17443,7 +15989,6 @@ impl Client { pub fn login_saml(&self) -> builder::LoginSaml { builder::LoginSaml::new(self) } - ///Sends a `POST` request to `/logout` /// ///```ignore @@ -17454,7 +15999,6 @@ impl Client { pub fn logout(&self) -> builder::Logout { builder::Logout::new(self) } - ///List organizations /// ///Use `GET /v1/organizations` instead @@ -17477,7 +16021,6 @@ impl Client { pub fn organization_list(&self) -> builder::OrganizationList { builder::OrganizationList::new(self) } - ///Create an organization /// ///Use `POST /v1/organizations` instead @@ -17493,7 +16036,6 @@ impl Client { pub fn organization_create(&self) -> builder::OrganizationCreate { builder::OrganizationCreate::new(self) } - ///Fetch an organization /// ///Use `GET /v1/organizations/{organization}` instead @@ -17511,7 +16053,6 @@ impl Client { pub fn organization_view(&self) -> builder::OrganizationView { builder::OrganizationView::new(self) } - ///Update an organization /// ///Use `PUT /v1/organizations/{organization}` instead @@ -17531,7 +16072,6 @@ impl Client { pub fn organization_update(&self) -> builder::OrganizationUpdate { builder::OrganizationUpdate::new(self) } - ///Delete an organization /// ///Use `DELETE /v1/organizations/{organization}` instead @@ -17549,7 +16089,6 @@ impl Client { pub fn organization_delete(&self) -> builder::OrganizationDelete { builder::OrganizationDelete::new(self) } - ///Fetch an organization's IAM policy /// ///Use `GET /v1/organizations/{organization}/policy` instead @@ -17567,7 +16106,6 @@ impl Client { pub fn organization_policy_view(&self) -> builder::OrganizationPolicyView { builder::OrganizationPolicyView::new(self) } - ///Update an organization's IAM policy /// ///Use `PUT /v1/organizations/{organization}/policy` instead @@ -17587,7 +16125,6 @@ impl Client { pub fn organization_policy_update(&self) -> builder::OrganizationPolicyUpdate { builder::OrganizationPolicyUpdate::new(self) } - ///List projects /// ///Use `GET /v1/projects` instead @@ -17612,7 +16149,6 @@ impl Client { pub fn project_list(&self) -> builder::ProjectList { builder::ProjectList::new(self) } - ///Create a project /// ///Use `POST /v1/projects` instead @@ -17632,7 +16168,6 @@ impl Client { pub fn project_create(&self) -> builder::ProjectCreate { builder::ProjectCreate::new(self) } - ///Fetch a project /// ///Use `GET /v1/projects/{project}` instead @@ -17653,7 +16188,6 @@ impl Client { pub fn project_view(&self) -> builder::ProjectView { builder::ProjectView::new(self) } - ///Update a project /// ///Use `PUT /v1/projects/{project}` instead @@ -17676,7 +16210,6 @@ impl Client { pub fn project_update(&self) -> builder::ProjectUpdate { builder::ProjectUpdate::new(self) } - ///Delete a project /// ///Use `DELETE /v1/projects/{project}` instead @@ -17697,7 +16230,6 @@ impl Client { pub fn project_delete(&self) -> builder::ProjectDelete { builder::ProjectDelete::new(self) } - ///List disks /// ///Use `GET /v1/disks` instead @@ -17725,7 +16257,6 @@ impl Client { pub fn disk_list(&self) -> builder::DiskList { builder::DiskList::new(self) } - ///Use `POST /v1/disks` instead /// ///Sends a `POST` request to @@ -17746,7 +16277,6 @@ impl Client { pub fn disk_create(&self) -> builder::DiskCreate { builder::DiskCreate::new(self) } - ///Fetch a disk /// ///Use `GET /v1/disks/{disk}` instead @@ -17766,7 +16296,6 @@ impl Client { pub fn disk_view(&self) -> builder::DiskView { builder::DiskView::new(self) } - ///Use `DELETE /v1/disks/{disk}` instead /// ///Sends a `DELETE` request to @@ -17784,7 +16313,6 @@ impl Client { pub fn disk_delete(&self) -> builder::DiskDelete { builder::DiskDelete::new(self) } - ///Fetch disk metrics /// ///Sends a `GET` request to @@ -17817,7 +16345,6 @@ impl Client { pub fn disk_metrics_list(&self) -> builder::DiskMetricsList { builder::DiskMetricsList::new(self) } - ///List images /// ///List images in a project. The images are returned sorted by creation @@ -17846,7 +16373,6 @@ impl Client { pub fn image_list(&self) -> builder::ImageList { builder::ImageList::new(self) } - ///Create an image /// ///Create a new image in a project. @@ -17869,7 +16395,6 @@ impl Client { pub fn image_create(&self) -> builder::ImageCreate { builder::ImageCreate::new(self) } - ///Fetch an image /// ///Fetch the details for a specific image in a project. @@ -17889,7 +16414,6 @@ impl Client { pub fn image_view(&self) -> builder::ImageView { builder::ImageView::new(self) } - ///Delete an image /// ///Permanently delete an image from a project. This operation cannot be @@ -17911,7 +16435,6 @@ impl Client { pub fn image_delete(&self) -> builder::ImageDelete { builder::ImageDelete::new(self) } - ///List instances /// ///Sends a `GET` request to @@ -17937,7 +16460,6 @@ impl Client { pub fn instance_list(&self) -> builder::InstanceList { builder::InstanceList::new(self) } - ///Create an instance /// ///Use `POST /v1/instances` instead @@ -17960,7 +16482,6 @@ impl Client { pub fn instance_create(&self) -> builder::InstanceCreate { builder::InstanceCreate::new(self) } - ///Fetch an instance /// ///Use `GET /v1/instances/{instance}` instead @@ -17980,7 +16501,6 @@ impl Client { pub fn instance_view(&self) -> builder::InstanceView { builder::InstanceView::new(self) } - ///Delete an instance /// ///Sends a `DELETE` request to @@ -17998,7 +16518,6 @@ impl Client { pub fn instance_delete(&self) -> builder::InstanceDelete { builder::InstanceDelete::new(self) } - ///List an instance's disks /// ///Use `GET /v1/instances/{instance}/disks` instead @@ -18029,7 +16548,6 @@ impl Client { pub fn instance_disk_list(&self) -> builder::InstanceDiskList { builder::InstanceDiskList::new(self) } - ///Attach a disk to an instance /// ///Use `POST /v1/instances/{instance}/disks/attach` instead @@ -18050,7 +16568,6 @@ impl Client { pub fn instance_disk_attach(&self) -> builder::InstanceDiskAttach { builder::InstanceDiskAttach::new(self) } - ///Detach a disk from an instance /// ///Use `POST /v1/disks/{disk}/detach` instead @@ -18071,7 +16588,6 @@ impl Client { pub fn instance_disk_detach(&self) -> builder::InstanceDiskDetach { builder::InstanceDiskDetach::new(self) } - ///List external IP addresses /// ///Sends a `GET` request to @@ -18089,7 +16605,6 @@ impl Client { pub fn instance_external_ip_list(&self) -> builder::InstanceExternalIpList { builder::InstanceExternalIpList::new(self) } - ///Migrate an instance /// ///Use `POST /v1/instances/{instance}/migrate` instead @@ -18110,7 +16625,6 @@ impl Client { pub fn instance_migrate(&self) -> builder::InstanceMigrate { builder::InstanceMigrate::new(self) } - ///List network interfaces /// ///Sends a `GET` request to @@ -18139,7 +16653,6 @@ impl Client { pub fn instance_network_interface_list(&self) -> builder::InstanceNetworkInterfaceList { builder::InstanceNetworkInterfaceList::new(self) } - ///Create a network interface /// ///Sends a `POST` request to @@ -18158,7 +16671,6 @@ impl Client { pub fn instance_network_interface_create(&self) -> builder::InstanceNetworkInterfaceCreate { builder::InstanceNetworkInterfaceCreate::new(self) } - ///Fetch a network interface /// ///Sends a `GET` request to @@ -18177,7 +16689,6 @@ impl Client { pub fn instance_network_interface_view(&self) -> builder::InstanceNetworkInterfaceView { builder::InstanceNetworkInterfaceView::new(self) } - ///Update a network interface /// ///Sends a `PUT` request to @@ -18197,7 +16708,6 @@ impl Client { pub fn instance_network_interface_update(&self) -> builder::InstanceNetworkInterfaceUpdate { builder::InstanceNetworkInterfaceUpdate::new(self) } - ///Delete a network interface /// ///Note that the primary interface for an instance cannot be deleted if @@ -18221,7 +16731,6 @@ impl Client { pub fn instance_network_interface_delete(&self) -> builder::InstanceNetworkInterfaceDelete { builder::InstanceNetworkInterfaceDelete::new(self) } - ///Reboot an instance /// ///Use `POST /v1/instances/{instance}/reboot` instead @@ -18241,7 +16750,6 @@ impl Client { pub fn instance_reboot(&self) -> builder::InstanceReboot { builder::InstanceReboot::new(self) } - ///Fetch an instance's serial console /// ///Use `GET /v1/instances/{instance}/serial-console` instead @@ -18279,7 +16787,6 @@ impl Client { pub fn instance_serial_console(&self) -> builder::InstanceSerialConsole { builder::InstanceSerialConsole::new(self) } - ///Connect to an instance's serial console /// ///Use `GET /v1/instances/{instance}/serial-console/stream` instead @@ -18299,7 +16806,6 @@ impl Client { pub fn instance_serial_console_stream(&self) -> builder::InstanceSerialConsoleStream { builder::InstanceSerialConsoleStream::new(self) } - ///Boot an instance /// ///Use `POST /v1/instances/{instance}/start` instead @@ -18319,7 +16825,6 @@ impl Client { pub fn instance_start(&self) -> builder::InstanceStart { builder::InstanceStart::new(self) } - ///Halt an instance /// ///Use `POST /v1/instances/{instance}/stop` instead @@ -18339,7 +16844,6 @@ impl Client { pub fn instance_stop(&self) -> builder::InstanceStop { builder::InstanceStop::new(self) } - ///Fetch a project's IAM policy /// ///Use `GET /v1/projects/{project}/policy` instead @@ -18360,7 +16864,6 @@ impl Client { pub fn project_policy_view(&self) -> builder::ProjectPolicyView { builder::ProjectPolicyView::new(self) } - ///Update a project's IAM policy /// ///Sends a `PUT` request to @@ -18381,7 +16884,6 @@ impl Client { pub fn project_policy_update(&self) -> builder::ProjectPolicyUpdate { builder::ProjectPolicyUpdate::new(self) } - ///List snapshots /// ///Sends a `GET` request to @@ -18407,7 +16909,6 @@ impl Client { pub fn snapshot_list(&self) -> builder::SnapshotList { builder::SnapshotList::new(self) } - ///Create a snapshot /// ///Creates a point-in-time snapshot from a disk. @@ -18430,7 +16931,6 @@ impl Client { pub fn snapshot_create(&self) -> builder::SnapshotCreate { builder::SnapshotCreate::new(self) } - ///Fetch a snapshot /// ///Sends a `GET` request to @@ -18448,7 +16948,6 @@ impl Client { pub fn snapshot_view(&self) -> builder::SnapshotView { builder::SnapshotView::new(self) } - ///Delete a snapshot /// ///Sends a `DELETE` request to @@ -18466,7 +16965,6 @@ impl Client { pub fn snapshot_delete(&self) -> builder::SnapshotDelete { builder::SnapshotDelete::new(self) } - ///List VPCs /// ///Sends a `GET` request to @@ -18492,7 +16990,6 @@ impl Client { pub fn vpc_list(&self) -> builder::VpcList { builder::VpcList::new(self) } - ///Create a VPC /// ///Sends a `POST` request to @@ -18513,7 +17010,6 @@ impl Client { pub fn vpc_create(&self) -> builder::VpcCreate { builder::VpcCreate::new(self) } - ///Fetch a VPC /// ///Sends a `GET` request to @@ -18531,7 +17027,6 @@ impl Client { pub fn vpc_view(&self) -> builder::VpcView { builder::VpcView::new(self) } - ///Update a VPC /// ///Sends a `PUT` request to @@ -18550,7 +17045,6 @@ impl Client { pub fn vpc_update(&self) -> builder::VpcUpdate { builder::VpcUpdate::new(self) } - ///Delete a VPC /// ///Sends a `DELETE` request to @@ -18568,7 +17062,6 @@ impl Client { pub fn vpc_delete(&self) -> builder::VpcDelete { builder::VpcDelete::new(self) } - ///List firewall rules /// ///Sends a `GET` request to @@ -18586,7 +17079,6 @@ impl Client { pub fn vpc_firewall_rules_view(&self) -> builder::VpcFirewallRulesView { builder::VpcFirewallRulesView::new(self) } - ///Replace firewall rules /// ///Sends a `PUT` request to @@ -18605,7 +17097,6 @@ impl Client { pub fn vpc_firewall_rules_update(&self) -> builder::VpcFirewallRulesUpdate { builder::VpcFirewallRulesUpdate::new(self) } - ///List routers /// ///Sends a `GET` request to @@ -18634,7 +17125,6 @@ impl Client { pub fn vpc_router_list(&self) -> builder::VpcRouterList { builder::VpcRouterList::new(self) } - ///Create a router /// ///Sends a `POST` request to @@ -18653,7 +17143,6 @@ impl Client { pub fn vpc_router_create(&self) -> builder::VpcRouterCreate { builder::VpcRouterCreate::new(self) } - ///Get a router /// ///Sends a `GET` request to @@ -18672,7 +17161,6 @@ impl Client { pub fn vpc_router_view(&self) -> builder::VpcRouterView { builder::VpcRouterView::new(self) } - ///Update a router /// ///Sends a `PUT` request to @@ -18692,7 +17180,6 @@ impl Client { pub fn vpc_router_update(&self) -> builder::VpcRouterUpdate { builder::VpcRouterUpdate::new(self) } - ///Delete a router /// ///Sends a `DELETE` request to @@ -18711,7 +17198,6 @@ impl Client { pub fn vpc_router_delete(&self) -> builder::VpcRouterDelete { builder::VpcRouterDelete::new(self) } - ///List routes /// ///List the routes associated with a router in a particular VPC. @@ -18744,7 +17230,6 @@ impl Client { pub fn vpc_router_route_list(&self) -> builder::VpcRouterRouteList { builder::VpcRouterRouteList::new(self) } - ///Create a router /// ///Sends a `POST` request to @@ -18764,7 +17249,6 @@ impl Client { pub fn vpc_router_route_create(&self) -> builder::VpcRouterRouteCreate { builder::VpcRouterRouteCreate::new(self) } - ///Fetch a route /// ///Sends a `GET` request to @@ -18784,7 +17268,6 @@ impl Client { pub fn vpc_router_route_view(&self) -> builder::VpcRouterRouteView { builder::VpcRouterRouteView::new(self) } - ///Update a route /// ///Sends a `PUT` request to @@ -18805,7 +17288,6 @@ impl Client { pub fn vpc_router_route_update(&self) -> builder::VpcRouterRouteUpdate { builder::VpcRouterRouteUpdate::new(self) } - ///Delete a route /// ///Sends a `DELETE` request to @@ -18825,7 +17307,6 @@ impl Client { pub fn vpc_router_route_delete(&self) -> builder::VpcRouterRouteDelete { builder::VpcRouterRouteDelete::new(self) } - ///List subnets /// ///Sends a `GET` request to @@ -18854,7 +17335,6 @@ impl Client { pub fn vpc_subnet_list(&self) -> builder::VpcSubnetList { builder::VpcSubnetList::new(self) } - ///Create a subnet /// ///Sends a `POST` request to @@ -18873,7 +17353,6 @@ impl Client { pub fn vpc_subnet_create(&self) -> builder::VpcSubnetCreate { builder::VpcSubnetCreate::new(self) } - ///Fetch a subnet /// ///Sends a `GET` request to @@ -18892,7 +17371,6 @@ impl Client { pub fn vpc_subnet_view(&self) -> builder::VpcSubnetView { builder::VpcSubnetView::new(self) } - ///Update a subnet /// ///Sends a `PUT` request to @@ -18912,7 +17390,6 @@ impl Client { pub fn vpc_subnet_update(&self) -> builder::VpcSubnetUpdate { builder::VpcSubnetUpdate::new(self) } - ///Delete a subnet /// ///Sends a `DELETE` request to @@ -18931,7 +17408,6 @@ impl Client { pub fn vpc_subnet_delete(&self) -> builder::VpcSubnetDelete { builder::VpcSubnetDelete::new(self) } - ///List network interfaces /// ///Sends a `GET` request to @@ -18962,7 +17438,6 @@ impl Client { pub fn vpc_subnet_list_network_interfaces(&self) -> builder::VpcSubnetListNetworkInterfaces { builder::VpcSubnetListNetworkInterfaces::new(self) } - ///Fetch the current silo's IAM policy /// ///Sends a `GET` request to `/policy` @@ -18975,7 +17450,6 @@ impl Client { pub fn policy_view(&self) -> builder::PolicyView { builder::PolicyView::new(self) } - ///Update the current silo's IAM policy /// ///Sends a `PUT` request to `/policy` @@ -18989,7 +17463,6 @@ impl Client { pub fn policy_update(&self) -> builder::PolicyUpdate { builder::PolicyUpdate::new(self) } - ///List built-in roles /// ///Sends a `GET` request to `/roles` @@ -19008,7 +17481,6 @@ impl Client { pub fn role_list(&self) -> builder::RoleList { builder::RoleList::new(self) } - ///Fetch a built-in role /// ///Sends a `GET` request to `/roles/{role_name}` @@ -19024,7 +17496,6 @@ impl Client { pub fn role_view(&self) -> builder::RoleView { builder::RoleView::new(self) } - ///Fetch the user associated with the current session /// ///Sends a `GET` request to `/session/me` @@ -19037,7 +17508,6 @@ impl Client { pub fn session_me(&self) -> builder::SessionMe { builder::SessionMe::new(self) } - ///Fetch the silo groups the current user belongs to /// ///Sends a `GET` request to `/session/me/groups` @@ -19058,7 +17528,6 @@ impl Client { pub fn session_me_groups(&self) -> builder::SessionMeGroups { builder::SessionMeGroups::new(self) } - ///List SSH public keys /// ///Lists SSH public keys for the currently authenticated user. @@ -19081,7 +17550,6 @@ impl Client { pub fn session_sshkey_list(&self) -> builder::SessionSshkeyList { builder::SessionSshkeyList::new(self) } - ///Create an SSH public key /// ///Create an SSH public key for the currently authenticated user. @@ -19097,7 +17565,6 @@ impl Client { pub fn session_sshkey_create(&self) -> builder::SessionSshkeyCreate { builder::SessionSshkeyCreate::new(self) } - ///Fetch an SSH public key /// ///Fetch an SSH public key associated with the currently authenticated @@ -19114,7 +17581,6 @@ impl Client { pub fn session_sshkey_view(&self) -> builder::SessionSshkeyView { builder::SessionSshkeyView::new(self) } - ///Delete an SSH public key /// ///Delete an SSH public key associated with the currently authenticated @@ -19131,7 +17597,6 @@ impl Client { pub fn session_sshkey_delete(&self) -> builder::SessionSshkeyDelete { builder::SessionSshkeyDelete::new(self) } - ///Fetch a system-wide image by id /// ///Sends a `GET` request to `/system/by-id/images/{id}` @@ -19145,7 +17610,6 @@ impl Client { pub fn system_image_view_by_id(&self) -> builder::SystemImageViewById { builder::SystemImageViewById::new(self) } - ///Fetch an IP pool by id /// ///Sends a `GET` request to `/system/by-id/ip-pools/{id}` @@ -19159,7 +17623,6 @@ impl Client { pub fn ip_pool_view_by_id(&self) -> builder::IpPoolViewById { builder::IpPoolViewById::new(self) } - ///Fetch a silo by id /// ///Sends a `GET` request to `/system/by-id/silos/{id}` @@ -19173,7 +17636,6 @@ impl Client { pub fn silo_view_by_id(&self) -> builder::SiloViewById { builder::SiloViewById::new(self) } - ///List system-wide certificates /// ///Returns a list of all the system-wide certificates. System-wide @@ -19198,7 +17660,6 @@ impl Client { pub fn certificate_list(&self) -> builder::CertificateList { builder::CertificateList::new(self) } - ///Create a new system-wide x.509 certificate /// ///This certificate is automatically used by the Oxide Control plane to @@ -19215,7 +17676,6 @@ impl Client { pub fn certificate_create(&self) -> builder::CertificateCreate { builder::CertificateCreate::new(self) } - ///Fetch a certificate /// ///Returns the details of a specific certificate @@ -19231,7 +17691,6 @@ impl Client { pub fn certificate_view(&self) -> builder::CertificateView { builder::CertificateView::new(self) } - ///Delete a certificate /// ///Permanently delete a certificate. This operation cannot be undone. @@ -19247,7 +17706,6 @@ impl Client { pub fn certificate_delete(&self) -> builder::CertificateDelete { builder::CertificateDelete::new(self) } - ///List physical disks /// ///Sends a `GET` request to `/system/hardware/disks` @@ -19268,7 +17726,6 @@ impl Client { pub fn physical_disk_list(&self) -> builder::PhysicalDiskList { builder::PhysicalDiskList::new(self) } - ///List racks /// ///Sends a `GET` request to `/system/hardware/racks` @@ -19289,7 +17746,6 @@ impl Client { pub fn rack_list(&self) -> builder::RackList { builder::RackList::new(self) } - ///Fetch a rack /// ///Sends a `GET` request to `/system/hardware/racks/{rack_id}` @@ -19305,7 +17761,6 @@ impl Client { pub fn rack_view(&self) -> builder::RackView { builder::RackView::new(self) } - ///List sleds /// ///Sends a `GET` request to `/system/hardware/sleds` @@ -19326,7 +17781,6 @@ impl Client { pub fn sled_list(&self) -> builder::SledList { builder::SledList::new(self) } - ///Fetch a sled /// ///Sends a `GET` request to `/system/hardware/sleds/{sled_id}` @@ -19342,7 +17796,6 @@ impl Client { pub fn sled_view(&self) -> builder::SledView { builder::SledView::new(self) } - ///List physical disks attached to sleds /// ///Sends a `GET` request to `/system/hardware/sleds/{sled_id}/disks` @@ -19365,7 +17818,6 @@ impl Client { pub fn sled_physical_disk_list(&self) -> builder::SledPhysicalDiskList { builder::SledPhysicalDiskList::new(self) } - ///List system-wide images /// ///Returns a list of all the system-wide images. System-wide images are @@ -19390,7 +17842,6 @@ impl Client { pub fn system_image_list(&self) -> builder::SystemImageList { builder::SystemImageList::new(self) } - ///Create a system-wide image /// ///Create a new system-wide image. This image can then be used by any user @@ -19407,7 +17858,6 @@ impl Client { pub fn system_image_create(&self) -> builder::SystemImageCreate { builder::SystemImageCreate::new(self) } - ///Fetch a system-wide image /// ///Returns the details of a specific system-wide image. @@ -19423,7 +17873,6 @@ impl Client { pub fn system_image_view(&self) -> builder::SystemImageView { builder::SystemImageView::new(self) } - ///Delete a system-wide image /// ///Permanently delete a system-wide image. This operation cannot be undone. @@ -19441,7 +17890,6 @@ impl Client { pub fn system_image_delete(&self) -> builder::SystemImageDelete { builder::SystemImageDelete::new(self) } - ///List IP pools /// ///Sends a `GET` request to `/system/ip-pools` @@ -19462,7 +17910,6 @@ impl Client { pub fn ip_pool_list(&self) -> builder::IpPoolList { builder::IpPoolList::new(self) } - ///Create an IP pool /// ///Sends a `POST` request to `/system/ip-pools` @@ -19476,7 +17923,6 @@ impl Client { pub fn ip_pool_create(&self) -> builder::IpPoolCreate { builder::IpPoolCreate::new(self) } - ///Fetch an IP pool /// ///Sends a `GET` request to `/system/ip-pools/{pool_name}` @@ -19490,7 +17936,6 @@ impl Client { pub fn ip_pool_view(&self) -> builder::IpPoolView { builder::IpPoolView::new(self) } - ///Update an IP Pool /// ///Sends a `PUT` request to `/system/ip-pools/{pool_name}` @@ -19505,7 +17950,6 @@ impl Client { pub fn ip_pool_update(&self) -> builder::IpPoolUpdate { builder::IpPoolUpdate::new(self) } - ///Delete an IP Pool /// ///Sends a `DELETE` request to `/system/ip-pools/{pool_name}` @@ -19519,7 +17963,6 @@ impl Client { pub fn ip_pool_delete(&self) -> builder::IpPoolDelete { builder::IpPoolDelete::new(self) } - ///List ranges for an IP pool /// ///Ranges are ordered by their first address. @@ -19542,7 +17985,6 @@ impl Client { pub fn ip_pool_range_list(&self) -> builder::IpPoolRangeList { builder::IpPoolRangeList::new(self) } - ///Add a range to an IP pool /// ///Sends a `POST` request to `/system/ip-pools/{pool_name}/ranges/add` @@ -19557,7 +17999,6 @@ impl Client { pub fn ip_pool_range_add(&self) -> builder::IpPoolRangeAdd { builder::IpPoolRangeAdd::new(self) } - ///Remove a range from an IP pool /// ///Sends a `POST` request to `/system/ip-pools/{pool_name}/ranges/remove` @@ -19572,7 +18013,6 @@ impl Client { pub fn ip_pool_range_remove(&self) -> builder::IpPoolRangeRemove { builder::IpPoolRangeRemove::new(self) } - ///Fetch the IP pool used for Oxide services /// ///Sends a `GET` request to `/system/ip-pools-service` @@ -19585,7 +18025,6 @@ impl Client { pub fn ip_pool_service_view(&self) -> builder::IpPoolServiceView { builder::IpPoolServiceView::new(self) } - ///List ranges for the IP pool used for Oxide services /// ///Ranges are ordered by their first address. @@ -19606,7 +18045,6 @@ impl Client { pub fn ip_pool_service_range_list(&self) -> builder::IpPoolServiceRangeList { builder::IpPoolServiceRangeList::new(self) } - ///Add a range to an IP pool used for Oxide services /// ///Sends a `POST` request to `/system/ip-pools-service/ranges/add` @@ -19620,7 +18058,6 @@ impl Client { pub fn ip_pool_service_range_add(&self) -> builder::IpPoolServiceRangeAdd { builder::IpPoolServiceRangeAdd::new(self) } - ///Remove a range from an IP pool used for Oxide services /// ///Sends a `POST` request to `/system/ip-pools-service/ranges/remove` @@ -19634,7 +18071,6 @@ impl Client { pub fn ip_pool_service_range_remove(&self) -> builder::IpPoolServiceRangeRemove { builder::IpPoolServiceRangeRemove::new(self) } - ///Access metrics data /// ///Sends a `GET` request to `/system/metrics/{metric_name}` @@ -19661,7 +18097,6 @@ impl Client { pub fn system_metric(&self) -> builder::SystemMetric { builder::SystemMetric::new(self) } - ///Fetch the top-level IAM policy /// ///Sends a `GET` request to `/system/policy` @@ -19674,7 +18109,6 @@ impl Client { pub fn system_policy_view(&self) -> builder::SystemPolicyView { builder::SystemPolicyView::new(self) } - ///Update the top-level IAM policy /// ///Sends a `PUT` request to `/system/policy` @@ -19688,7 +18122,6 @@ impl Client { pub fn system_policy_update(&self) -> builder::SystemPolicyUpdate { builder::SystemPolicyUpdate::new(self) } - ///List sagas /// ///Sends a `GET` request to `/system/sagas` @@ -19709,7 +18142,6 @@ impl Client { pub fn saga_list(&self) -> builder::SagaList { builder::SagaList::new(self) } - ///Fetch a saga /// ///Sends a `GET` request to `/system/sagas/{saga_id}` @@ -19723,7 +18155,6 @@ impl Client { pub fn saga_view(&self) -> builder::SagaView { builder::SagaView::new(self) } - ///List silos /// ///Lists silos that are discoverable based on the current permissions. @@ -19746,7 +18177,6 @@ impl Client { pub fn silo_list(&self) -> builder::SiloList { builder::SiloList::new(self) } - ///Create a silo /// ///Sends a `POST` request to `/system/silos` @@ -19760,7 +18190,6 @@ impl Client { pub fn silo_create(&self) -> builder::SiloCreate { builder::SiloCreate::new(self) } - ///Fetch a silo /// ///Fetch a silo by name. @@ -19778,7 +18207,6 @@ impl Client { pub fn silo_view(&self) -> builder::SiloView { builder::SiloView::new(self) } - ///Delete a silo /// ///Delete a silo by name. @@ -19796,7 +18224,6 @@ impl Client { pub fn silo_delete(&self) -> builder::SiloDelete { builder::SiloDelete::new(self) } - ///List a silo's IDPs /// ///Sends a `GET` request to `/system/silos/{silo_name}/identity-providers` @@ -19819,7 +18246,6 @@ impl Client { pub fn silo_identity_provider_list(&self) -> builder::SiloIdentityProviderList { builder::SiloIdentityProviderList::new(self) } - ///Create a user /// ///Users can only be created in Silos with `provision_type` == `Fixed`. @@ -19842,7 +18268,6 @@ impl Client { pub fn local_idp_user_create(&self) -> builder::LocalIdpUserCreate { builder::LocalIdpUserCreate::new(self) } - ///Delete a user /// ///Sends a `DELETE` request to @@ -19861,7 +18286,6 @@ impl Client { pub fn local_idp_user_delete(&self) -> builder::LocalIdpUserDelete { builder::LocalIdpUserDelete::new(self) } - ///Set or invalidate a user's password /// ///Passwords can only be updated for users in Silos with identity mode @@ -19886,7 +18310,6 @@ impl Client { pub fn local_idp_user_set_password(&self) -> builder::LocalIdpUserSetPassword { builder::LocalIdpUserSetPassword::new(self) } - ///Create a SAML IDP /// ///Sends a `POST` request to @@ -19905,7 +18328,6 @@ impl Client { pub fn saml_identity_provider_create(&self) -> builder::SamlIdentityProviderCreate { builder::SamlIdentityProviderCreate::new(self) } - ///Fetch a SAML IDP /// ///Sends a `GET` request to @@ -19924,7 +18346,6 @@ impl Client { pub fn saml_identity_provider_view(&self) -> builder::SamlIdentityProviderView { builder::SamlIdentityProviderView::new(self) } - ///Fetch a silo's IAM policy /// ///Sends a `GET` request to `/system/silos/{silo_name}/policy` @@ -19940,7 +18361,6 @@ impl Client { pub fn silo_policy_view(&self) -> builder::SiloPolicyView { builder::SiloPolicyView::new(self) } - ///Update a silo's IAM policy /// ///Sends a `PUT` request to `/system/silos/{silo_name}/policy` @@ -19958,7 +18378,6 @@ impl Client { pub fn silo_policy_update(&self) -> builder::SiloPolicyUpdate { builder::SiloPolicyUpdate::new(self) } - ///List users in a silo /// ///Sends a `GET` request to `/system/silos/{silo_name}/users/all` @@ -19981,7 +18400,6 @@ impl Client { pub fn silo_users_list(&self) -> builder::SiloUsersList { builder::SiloUsersList::new(self) } - ///Fetch a user /// ///Sends a `GET` request to `/system/silos/{silo_name}/users/id/{user_id}` @@ -19999,7 +18417,6 @@ impl Client { pub fn silo_user_view(&self) -> builder::SiloUserView { builder::SiloUserView::new(self) } - ///List built-in users /// ///Sends a `GET` request to `/system/user` @@ -20020,7 +18437,6 @@ impl Client { pub fn system_user_list(&self) -> builder::SystemUserList { builder::SystemUserList::new(self) } - ///Fetch a built-in user /// ///Sends a `GET` request to `/system/user/{user_name}` @@ -20036,7 +18452,6 @@ impl Client { pub fn system_user_view(&self) -> builder::SystemUserView { builder::SystemUserView::new(self) } - ///List timeseries schema /// ///Sends a `GET` request to `/timeseries/schema` @@ -20055,7 +18470,6 @@ impl Client { pub fn timeseries_schema_get(&self) -> builder::TimeseriesSchemaGet { builder::TimeseriesSchemaGet::new(self) } - ///List users /// ///Sends a `GET` request to `/users` @@ -20076,7 +18490,6 @@ impl Client { pub fn user_list(&self) -> builder::UserList { builder::UserList::new(self) } - ///List disks /// ///Sends a `GET` request to `/v1/disks` @@ -20101,7 +18514,6 @@ impl Client { pub fn disk_list_v1(&self) -> builder::DiskListV1 { builder::DiskListV1::new(self) } - ///Create a disk /// ///Sends a `POST` request to `/v1/disks` @@ -20117,7 +18529,6 @@ impl Client { pub fn disk_create_v1(&self) -> builder::DiskCreateV1 { builder::DiskCreateV1::new(self) } - ///Fetch a disk /// ///Sends a `GET` request to `/v1/disks/{disk}` @@ -20133,7 +18544,6 @@ impl Client { pub fn disk_view_v1(&self) -> builder::DiskViewV1 { builder::DiskViewV1::new(self) } - ///Delete a disk /// ///Sends a `DELETE` request to `/v1/disks/{disk}` @@ -20149,7 +18559,6 @@ impl Client { pub fn disk_delete_v1(&self) -> builder::DiskDeleteV1 { builder::DiskDeleteV1::new(self) } - ///List instances /// ///Sends a `GET` request to `/v1/instances` @@ -20174,7 +18583,6 @@ impl Client { pub fn instance_list_v1(&self) -> builder::InstanceListV1 { builder::InstanceListV1::new(self) } - ///Create an instance /// ///Sends a `POST` request to `/v1/instances` @@ -20190,7 +18598,6 @@ impl Client { pub fn instance_create_v1(&self) -> builder::InstanceCreateV1 { builder::InstanceCreateV1::new(self) } - ///Fetch an instance /// ///Sends a `GET` request to `/v1/instances/{instance}` @@ -20206,7 +18613,6 @@ impl Client { pub fn instance_view_v1(&self) -> builder::InstanceViewV1 { builder::InstanceViewV1::new(self) } - ///Delete an instance /// ///Sends a `DELETE` request to `/v1/instances/{instance}` @@ -20222,7 +18628,6 @@ impl Client { pub fn instance_delete_v1(&self) -> builder::InstanceDeleteV1 { builder::InstanceDeleteV1::new(self) } - ///List an instance's disks /// ///Sends a `GET` request to `/v1/instances/{instance}/disks` @@ -20249,7 +18654,6 @@ impl Client { pub fn instance_disk_list_v1(&self) -> builder::InstanceDiskListV1 { builder::InstanceDiskListV1::new(self) } - ///Attach a disk to an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/disks/attach` @@ -20266,7 +18670,6 @@ impl Client { pub fn instance_disk_attach_v1(&self) -> builder::InstanceDiskAttachV1 { builder::InstanceDiskAttachV1::new(self) } - ///Detach a disk from an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/disks/detach` @@ -20283,7 +18686,6 @@ impl Client { pub fn instance_disk_detach_v1(&self) -> builder::InstanceDiskDetachV1 { builder::InstanceDiskDetachV1::new(self) } - ///Migrate an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/migrate` @@ -20300,7 +18702,6 @@ impl Client { pub fn instance_migrate_v1(&self) -> builder::InstanceMigrateV1 { builder::InstanceMigrateV1::new(self) } - ///Reboot an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/reboot` @@ -20316,7 +18717,6 @@ impl Client { pub fn instance_reboot_v1(&self) -> builder::InstanceRebootV1 { builder::InstanceRebootV1::new(self) } - ///Fetch an instance's serial console /// ///Sends a `GET` request to `/v1/instances/{instance}/serial-console` @@ -20350,7 +18750,6 @@ impl Client { pub fn instance_serial_console_v1(&self) -> builder::InstanceSerialConsoleV1 { builder::InstanceSerialConsoleV1::new(self) } - ///Stream an instance's serial console /// ///Sends a `GET` request to @@ -20367,7 +18766,6 @@ impl Client { pub fn instance_serial_console_stream_v1(&self) -> builder::InstanceSerialConsoleStreamV1 { builder::InstanceSerialConsoleStreamV1::new(self) } - ///Boot an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/start` @@ -20383,7 +18781,6 @@ impl Client { pub fn instance_start_v1(&self) -> builder::InstanceStartV1 { builder::InstanceStartV1::new(self) } - ///Stop an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/stop` @@ -20399,7 +18796,6 @@ impl Client { pub fn instance_stop_v1(&self) -> builder::InstanceStopV1 { builder::InstanceStopV1::new(self) } - ///List organizations /// ///Sends a `GET` request to `/v1/organizations` @@ -20420,7 +18816,6 @@ impl Client { pub fn organization_list_v1(&self) -> builder::OrganizationListV1 { builder::OrganizationListV1::new(self) } - ///Create an organization /// ///Sends a `POST` request to `/v1/organizations` @@ -20434,7 +18829,6 @@ impl Client { pub fn organization_create_v1(&self) -> builder::OrganizationCreateV1 { builder::OrganizationCreateV1::new(self) } - ///Fetch an organization /// ///Sends a `GET` request to `/v1/organizations/{organization}` @@ -20448,7 +18842,6 @@ impl Client { pub fn organization_view_v1(&self) -> builder::OrganizationViewV1 { builder::OrganizationViewV1::new(self) } - ///Update an organization /// ///Sends a `PUT` request to `/v1/organizations/{organization}` @@ -20463,7 +18856,6 @@ impl Client { pub fn organization_update_v1(&self) -> builder::OrganizationUpdateV1 { builder::OrganizationUpdateV1::new(self) } - ///Delete an organization /// ///Sends a `DELETE` request to `/v1/organizations/{organization}` @@ -20477,7 +18869,6 @@ impl Client { pub fn organization_delete_v1(&self) -> builder::OrganizationDeleteV1 { builder::OrganizationDeleteV1::new(self) } - ///Fetch an organization's IAM policy /// ///Sends a `GET` request to `/v1/organizations/{organization}/policy` @@ -20491,7 +18882,6 @@ impl Client { pub fn organization_policy_view_v1(&self) -> builder::OrganizationPolicyViewV1 { builder::OrganizationPolicyViewV1::new(self) } - ///Update an organization's IAM policy /// ///Sends a `PUT` request to `/v1/organizations/{organization}/policy` @@ -20506,7 +18896,6 @@ impl Client { pub fn organization_policy_update_v1(&self) -> builder::OrganizationPolicyUpdateV1 { builder::OrganizationPolicyUpdateV1::new(self) } - ///List projects /// ///Sends a `GET` request to `/v1/projects` @@ -20529,7 +18918,6 @@ impl Client { pub fn project_list_v1(&self) -> builder::ProjectListV1 { builder::ProjectListV1::new(self) } - ///Create a project /// ///Sends a `POST` request to `/v1/projects` @@ -20544,7 +18932,6 @@ impl Client { pub fn project_create_v1(&self) -> builder::ProjectCreateV1 { builder::ProjectCreateV1::new(self) } - ///Fetch a project /// ///Sends a `GET` request to `/v1/projects/{project}` @@ -20559,7 +18946,6 @@ impl Client { pub fn project_view_v1(&self) -> builder::ProjectViewV1 { builder::ProjectViewV1::new(self) } - ///Update a project /// ///Sends a `PUT` request to `/v1/projects/{project}` @@ -20575,7 +18961,6 @@ impl Client { pub fn project_update_v1(&self) -> builder::ProjectUpdateV1 { builder::ProjectUpdateV1::new(self) } - ///Delete a project /// ///Sends a `DELETE` request to `/v1/projects/{project}` @@ -20590,7 +18975,6 @@ impl Client { pub fn project_delete_v1(&self) -> builder::ProjectDeleteV1 { builder::ProjectDeleteV1::new(self) } - ///Fetch a project's IAM policy /// ///Sends a `GET` request to `/v1/projects/{project}/policy` @@ -20605,7 +18989,6 @@ impl Client { pub fn project_policy_view_v1(&self) -> builder::ProjectPolicyViewV1 { builder::ProjectPolicyViewV1::new(self) } - ///Update a project's IAM policy /// ///Sends a `PUT` request to `/v1/projects/{project}/policy` @@ -20621,7 +19004,6 @@ impl Client { pub fn project_policy_update_v1(&self) -> builder::ProjectPolicyUpdateV1 { builder::ProjectPolicyUpdateV1::new(self) } - ///View version and update status of component tree /// ///Sends a `GET` request to `/v1/system/update/components` @@ -20642,7 +19024,6 @@ impl Client { pub fn system_component_version_list(&self) -> builder::SystemComponentVersionList { builder::SystemComponentVersionList::new(self) } - ///List all update deployments /// ///Sends a `GET` request to `/v1/system/update/deployments` @@ -20663,7 +19044,6 @@ impl Client { pub fn update_deployments_list(&self) -> builder::UpdateDeploymentsList { builder::UpdateDeploymentsList::new(self) } - ///Fetch a system update deployment /// ///Sends a `GET` request to `/v1/system/update/deployments/{id}` @@ -20677,7 +19057,6 @@ impl Client { pub fn update_deployment_view(&self) -> builder::UpdateDeploymentView { builder::UpdateDeploymentView::new(self) } - ///Refresh update data /// ///Sends a `POST` request to `/v1/system/update/refresh` @@ -20690,7 +19069,6 @@ impl Client { pub fn system_update_refresh(&self) -> builder::SystemUpdateRefresh { builder::SystemUpdateRefresh::new(self) } - ///Start system update /// ///Sends a `POST` request to `/v1/system/update/start` @@ -20704,7 +19082,6 @@ impl Client { pub fn system_update_start(&self) -> builder::SystemUpdateStart { builder::SystemUpdateStart::new(self) } - ///Stop system update /// ///If there is no update in progress, do nothing. @@ -20719,7 +19096,6 @@ impl Client { pub fn system_update_stop(&self) -> builder::SystemUpdateStop { builder::SystemUpdateStop::new(self) } - ///List all updates /// ///Sends a `GET` request to `/v1/system/update/updates` @@ -20740,7 +19116,6 @@ impl Client { pub fn system_update_list(&self) -> builder::SystemUpdateList { builder::SystemUpdateList::new(self) } - ///View system update /// ///Sends a `GET` request to `/v1/system/update/updates/{version}` @@ -20754,7 +19129,6 @@ impl Client { pub fn system_update_view(&self) -> builder::SystemUpdateView { builder::SystemUpdateView::new(self) } - ///View system update component tree /// ///Sends a `GET` request to @@ -20769,7 +19143,6 @@ impl Client { pub fn system_update_components_list(&self) -> builder::SystemUpdateComponentsList { builder::SystemUpdateComponentsList::new(self) } - ///View system version and update status /// ///Sends a `GET` request to `/v1/system/update/version` @@ -20783,7 +19156,6 @@ impl Client { builder::SystemVersion::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -20798,7 +19170,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> DiskViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -20806,7 +19177,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -20816,7 +19186,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/disks/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -20841,7 +19210,6 @@ pub mod builder { } } } - ///Builder for [`Client::image_view_by_id`] /// ///[`Client::image_view_by_id`]: super::Client::image_view_by_id @@ -20850,7 +19218,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> ImageViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -20858,7 +19225,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -20868,7 +19234,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/images/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -20893,7 +19258,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_view_by_id`] /// ///[`Client::instance_view_by_id`]: super::Client::instance_view_by_id @@ -20902,7 +19266,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> InstanceViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -20910,7 +19273,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -20920,7 +19282,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/instances/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -20945,7 +19306,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_network_interface_view_by_id`] /// ///[`Client::instance_network_interface_view_by_id`]: super::Client::instance_network_interface_view_by_id @@ -20954,7 +19314,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> InstanceNetworkInterfaceViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -20962,7 +19321,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -20972,7 +19330,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/network-interfaces/{id}` pub async fn send( self, @@ -20999,7 +19356,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_view_by_id`] /// ///[`Client::organization_view_by_id`]: super::Client::organization_view_by_id @@ -21008,7 +19364,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> OrganizationViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21016,7 +19371,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21026,7 +19380,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/organizations/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21051,7 +19404,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_view_by_id`] /// ///[`Client::project_view_by_id`]: super::Client::project_view_by_id @@ -21060,7 +19412,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> ProjectViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21068,7 +19419,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21078,7 +19428,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/projects/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21103,7 +19452,6 @@ pub mod builder { } } } - ///Builder for [`Client::snapshot_view_by_id`] /// ///[`Client::snapshot_view_by_id`]: super::Client::snapshot_view_by_id @@ -21112,7 +19460,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> SnapshotViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21120,7 +19467,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21130,7 +19476,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/snapshots/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21155,7 +19500,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_route_view_by_id`] /// ///[`Client::vpc_router_route_view_by_id`]: super::Client::vpc_router_route_view_by_id @@ -21164,7 +19508,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> VpcRouterRouteViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21172,7 +19515,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21182,7 +19524,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/vpc-router-routes/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21207,7 +19548,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_view_by_id`] /// ///[`Client::vpc_router_view_by_id`]: super::Client::vpc_router_view_by_id @@ -21216,7 +19556,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> VpcRouterViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21224,7 +19563,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21234,7 +19572,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/vpc-routers/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21259,7 +19596,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_subnet_view_by_id`] /// ///[`Client::vpc_subnet_view_by_id`]: super::Client::vpc_subnet_view_by_id @@ -21268,7 +19604,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> VpcSubnetViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21276,7 +19611,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21286,7 +19620,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/vpc-subnets/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21311,7 +19644,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_view_by_id`] /// ///[`Client::vpc_view_by_id`]: super::Client::vpc_view_by_id @@ -21320,7 +19652,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> VpcViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21328,7 +19659,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21338,7 +19668,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/by-id/vpcs/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -21363,7 +19692,6 @@ pub mod builder { } } } - ///Builder for [`Client::device_auth_request`] /// ///[`Client::device_auth_request`]: super::Client::device_auth_request @@ -21372,7 +19700,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> DeviceAuthRequest<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21380,7 +19707,6 @@ pub mod builder { body: Ok(types::builder::DeviceAuthRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21391,7 +19717,6 @@ pub mod builder { .map_err(|_| "conversion to `DeviceAuthRequest` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -21401,7 +19726,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/device/auth` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -21418,7 +19742,6 @@ pub mod builder { } } } - ///Builder for [`Client::device_auth_confirm`] /// ///[`Client::device_auth_confirm`]: super::Client::device_auth_confirm @@ -21427,7 +19750,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> DeviceAuthConfirm<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21435,7 +19757,6 @@ pub mod builder { body: Ok(types::builder::DeviceAuthVerify::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21446,7 +19767,6 @@ pub mod builder { .map_err(|_| "conversion to `DeviceAuthVerify` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -21456,7 +19776,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/device/confirm` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -21479,7 +19798,6 @@ pub mod builder { } } } - ///Builder for [`Client::device_access_token`] /// ///[`Client::device_access_token`]: super::Client::device_access_token @@ -21488,7 +19806,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> DeviceAccessToken<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21496,7 +19813,6 @@ pub mod builder { body: Ok(types::builder::DeviceAccessTokenRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21506,7 +19822,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -21516,7 +19831,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/device/token` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -21533,7 +19847,6 @@ pub mod builder { } } } - ///Builder for [`Client::group_list`] /// ///[`Client::group_list`]: super::Client::group_list @@ -21544,7 +19857,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> GroupList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21554,7 +19866,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21564,7 +19875,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21575,7 +19885,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21586,7 +19895,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/groups` pub async fn send( self, @@ -21625,7 +19933,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/groups` pub fn stream( self, @@ -21673,7 +19980,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::login_spoof`] /// ///[`Client::login_spoof`]: super::Client::login_spoof @@ -21682,7 +19988,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> LoginSpoof<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21690,7 +19995,6 @@ pub mod builder { body: Ok(types::builder::SpoofLoginBody::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21701,7 +20005,6 @@ pub mod builder { .map_err(|_| "conversion to `SpoofLoginBody` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SpoofLoginBody) -> types::builder::SpoofLoginBody, @@ -21709,7 +20012,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/login` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -21732,7 +20034,6 @@ pub mod builder { } } } - ///Builder for [`Client::login_local`] /// ///[`Client::login_local`]: super::Client::login_local @@ -21742,7 +20043,6 @@ pub mod builder { silo_name: Result, body: Result, } - impl<'a> LoginLocal<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21751,7 +20051,6 @@ pub mod builder { body: Ok(types::builder::UsernamePasswordCredentials::default()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21761,7 +20060,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21771,7 +20069,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -21781,7 +20078,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/login/{silo_name}/local` pub async fn send(self) -> Result, Error> { let Self { @@ -21813,7 +20109,6 @@ pub mod builder { } } } - ///Builder for [`Client::login_saml_begin`] /// ///[`Client::login_saml_begin`]: super::Client::login_saml_begin @@ -21823,7 +20118,6 @@ pub mod builder { silo_name: Result, provider_name: Result, } - impl<'a> LoginSamlBegin<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21832,7 +20126,6 @@ pub mod builder { provider_name: Err("provider_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21842,7 +20135,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn provider_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21852,7 +20144,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for provider_name failed".to_string()); self } - ///Sends a `GET` request to `/login/{silo_name}/saml/{provider_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -21883,7 +20174,6 @@ pub mod builder { } } } - ///Builder for [`Client::login_saml`] /// ///[`Client::login_saml`]: super::Client::login_saml @@ -21894,7 +20184,6 @@ pub mod builder { provider_name: Result, body: Result, } - impl<'a> LoginSaml<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -21904,7 +20193,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21914,7 +20202,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn provider_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -21924,7 +20211,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for provider_name failed".to_string()); self } - pub fn body(mut self, value: B) -> Self where B: std::convert::TryInto, @@ -21934,7 +20220,6 @@ pub mod builder { .map_err(|_| "conversion to `reqwest::Body` for body failed".to_string()); self } - ///Sends a `POST` request to `/login/{silo_name}/saml/{provider_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -21975,7 +20260,6 @@ pub mod builder { } } } - ///Builder for [`Client::logout`] /// ///[`Client::logout`]: super::Client::logout @@ -21983,12 +20267,10 @@ pub mod builder { pub struct Logout<'a> { client: &'a super::Client, } - impl<'a> Logout<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/logout` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -22008,7 +20290,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_list`] /// ///[`Client::organization_list`]: super::Client::organization_list @@ -22019,7 +20300,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> OrganizationList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22029,7 +20309,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22039,7 +20318,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22050,7 +20328,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22061,7 +20338,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/organizations` pub async fn send( self, @@ -22100,7 +20376,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/organizations` pub fn stream( self, @@ -22148,7 +20423,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::organization_create`] /// ///[`Client::organization_create`]: super::Client::organization_create @@ -22157,7 +20431,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> OrganizationCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22165,7 +20438,6 @@ pub mod builder { body: Ok(types::builder::OrganizationCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22176,7 +20448,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -22186,7 +20457,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/organizations` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -22209,7 +20479,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_view`] /// ///[`Client::organization_view`]: super::Client::organization_view @@ -22218,7 +20487,6 @@ pub mod builder { client: &'a super::Client, organization_name: Result, } - impl<'a> OrganizationView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22226,7 +20494,6 @@ pub mod builder { organization_name: Err("organization_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22236,7 +20503,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - ///Sends a `GET` request to `/organizations/{organization_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -22264,7 +20530,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_update`] /// ///[`Client::organization_update`]: super::Client::organization_update @@ -22274,7 +20539,6 @@ pub mod builder { organization_name: Result, body: Result, } - impl<'a> OrganizationUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22283,7 +20547,6 @@ pub mod builder { body: Ok(types::builder::OrganizationUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22293,7 +20556,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22304,7 +20566,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -22314,7 +20575,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/organizations/{organization_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -22346,7 +20606,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_delete`] /// ///[`Client::organization_delete`]: super::Client::organization_delete @@ -22355,7 +20614,6 @@ pub mod builder { client: &'a super::Client, organization_name: Result, } - impl<'a> OrganizationDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22363,7 +20621,6 @@ pub mod builder { organization_name: Err("organization_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22373,7 +20630,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - ///Sends a `DELETE` request to `/organizations/{organization_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -22401,7 +20657,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_policy_view`] /// ///[`Client::organization_policy_view`]: super::Client::organization_policy_view @@ -22410,7 +20665,6 @@ pub mod builder { client: &'a super::Client, organization_name: Result, } - impl<'a> OrganizationPolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22418,7 +20672,6 @@ pub mod builder { organization_name: Err("organization_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22428,7 +20681,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - ///Sends a `GET` request to `/organizations/{organization_name}/policy` pub async fn send( self, @@ -22458,7 +20710,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_policy_update`] /// ///[`Client::organization_policy_update`]: super::Client::organization_policy_update @@ -22468,7 +20719,6 @@ pub mod builder { organization_name: Result, body: Result, } - impl<'a> OrganizationPolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22477,7 +20727,6 @@ pub mod builder { body: Ok(types::builder::OrganizationRolePolicy::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22487,7 +20736,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22498,7 +20746,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -22508,7 +20755,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/organizations/{organization_name}/policy` pub async fn send( self, @@ -22542,7 +20788,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_list`] /// ///[`Client::project_list`]: super::Client::project_list @@ -22554,7 +20799,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> ProjectList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22565,7 +20809,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22575,7 +20818,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22585,7 +20827,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22596,7 +20837,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22607,7 +20847,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects` pub async fn send( @@ -22653,7 +20892,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects` pub fn stream( @@ -22702,7 +20940,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::project_create`] /// ///[`Client::project_create`]: super::Client::project_create @@ -22712,7 +20949,6 @@ pub mod builder { organization_name: Result, body: Result, } - impl<'a> ProjectCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22721,7 +20957,6 @@ pub mod builder { body: Ok(types::builder::ProjectCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22731,7 +20966,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22742,7 +20976,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ProjectCreate) -> types::builder::ProjectCreate, @@ -22750,7 +20983,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects` pub async fn send(self) -> Result, Error> { @@ -22783,7 +21015,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_view`] /// ///[`Client::project_view`]: super::Client::project_view @@ -22793,7 +21024,6 @@ pub mod builder { organization_name: Result, project_name: Result, } - impl<'a> ProjectView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22802,7 +21032,6 @@ pub mod builder { project_name: Err("project_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22812,7 +21041,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22822,7 +21050,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}` pub async fn send(self) -> Result, Error> { @@ -22854,7 +21081,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_update`] /// ///[`Client::project_update`]: super::Client::project_update @@ -22865,7 +21091,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> ProjectUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22875,7 +21100,6 @@ pub mod builder { body: Ok(types::builder::ProjectUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22885,7 +21109,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22895,7 +21118,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22906,7 +21128,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ProjectUpdate) -> types::builder::ProjectUpdate, @@ -22914,7 +21135,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}` pub async fn send(self) -> Result, Error> { @@ -22950,7 +21170,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_delete`] /// ///[`Client::project_delete`]: super::Client::project_delete @@ -22960,7 +21179,6 @@ pub mod builder { organization_name: Result, project_name: Result, } - impl<'a> ProjectDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -22969,7 +21187,6 @@ pub mod builder { project_name: Err("project_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22979,7 +21196,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -22989,7 +21205,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}` pub async fn send(self) -> Result, Error> { @@ -23021,7 +21236,6 @@ pub mod builder { } } } - ///Builder for [`Client::disk_list`] /// ///[`Client::disk_list`]: super::Client::disk_list @@ -23034,7 +21248,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> DiskList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23046,7 +21259,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23056,7 +21268,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23066,7 +21277,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23076,7 +21286,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23087,7 +21296,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23098,7 +21306,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/disks` pub async fn send( @@ -23147,7 +21354,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/disks` pub fn stream( @@ -23196,7 +21402,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::disk_create`] /// ///[`Client::disk_create`]: super::Client::disk_create @@ -23207,7 +21412,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> DiskCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23217,7 +21421,6 @@ pub mod builder { body: Ok(types::builder::DiskCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23227,7 +21430,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23237,7 +21439,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23248,7 +21449,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskCreate) -> types::builder::DiskCreate, @@ -23256,7 +21456,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/disks` pub async fn send(self) -> Result, Error> { @@ -23292,7 +21491,6 @@ pub mod builder { } } } - ///Builder for [`Client::disk_view`] /// ///[`Client::disk_view`]: super::Client::disk_view @@ -23303,7 +21501,6 @@ pub mod builder { project_name: Result, disk_name: Result, } - impl<'a> DiskView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23313,7 +21510,6 @@ pub mod builder { disk_name: Err("disk_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23323,7 +21519,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23333,7 +21528,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn disk_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23343,7 +21537,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for disk_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/disks/ /// {disk_name}` @@ -23379,7 +21572,6 @@ pub mod builder { } } } - ///Builder for [`Client::disk_delete`] /// ///[`Client::disk_delete`]: super::Client::disk_delete @@ -23390,7 +21582,6 @@ pub mod builder { project_name: Result, disk_name: Result, } - impl<'a> DiskDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23400,7 +21591,6 @@ pub mod builder { disk_name: Err("disk_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23410,7 +21600,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23420,7 +21609,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn disk_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23430,7 +21618,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for disk_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/disks/ /// {disk_name}` @@ -23466,7 +21653,6 @@ pub mod builder { } } } - ///Builder for [`Client::disk_metrics_list`] /// ///[`Client::disk_metrics_list`]: super::Client::disk_metrics_list @@ -23482,7 +21668,6 @@ pub mod builder { page_token: Result, String>, start_time: Result>, String>, } - impl<'a> DiskMetricsList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23497,7 +21682,6 @@ pub mod builder { start_time: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23507,7 +21691,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23517,7 +21700,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn disk_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23527,7 +21709,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for disk_name failed".to_string()); self } - pub fn metric_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23537,7 +21718,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskMetricName` for metric_name failed".to_string()); self } - pub fn end_time(mut self, value: V) -> Self where V: std::convert::TryInto>, @@ -23545,7 +21725,6 @@ pub mod builder { self . end_time = value . try_into () . map (Some) . map_err (| _ | "conversion to `chrono :: DateTime < chrono :: offset :: Utc >` for end_time failed" . to_string ()) ; self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23555,7 +21734,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23566,7 +21744,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn start_time(mut self, value: V) -> Self where V: std::convert::TryInto>, @@ -23574,7 +21751,6 @@ pub mod builder { self . start_time = value . try_into () . map (Some) . map_err (| _ | "conversion to `chrono :: DateTime < chrono :: offset :: Utc >` for start_time failed" . to_string ()) ; self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/disks/ /// {disk_name}/metrics/{metric_name}` @@ -23635,7 +21811,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/disks/ /// {disk_name}/metrics/{metric_name}` @@ -23686,7 +21861,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::image_list`] /// ///[`Client::image_list`]: super::Client::image_list @@ -23699,7 +21873,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> ImageList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23711,7 +21884,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23721,7 +21893,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23731,7 +21902,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23741,7 +21911,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23752,7 +21921,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23763,7 +21931,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/images` pub async fn send( @@ -23812,7 +21979,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/images` pub fn stream( @@ -23861,7 +22027,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::image_create`] /// ///[`Client::image_create`]: super::Client::image_create @@ -23872,7 +22037,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> ImageCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23882,7 +22046,6 @@ pub mod builder { body: Ok(types::builder::ImageCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23892,7 +22055,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23902,7 +22064,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23913,7 +22074,6 @@ pub mod builder { .map_err(|_| "conversion to `ImageCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ImageCreate) -> types::builder::ImageCreate, @@ -23921,7 +22081,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/images` pub async fn send(self) -> Result, Error> { @@ -23957,7 +22116,6 @@ pub mod builder { } } } - ///Builder for [`Client::image_view`] /// ///[`Client::image_view`]: super::Client::image_view @@ -23968,7 +22126,6 @@ pub mod builder { project_name: Result, image_name: Result, } - impl<'a> ImageView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -23978,7 +22135,6 @@ pub mod builder { image_name: Err("image_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23988,7 +22144,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -23998,7 +22153,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn image_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24008,7 +22162,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for image_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/images/ /// {image_name}` @@ -24044,7 +22197,6 @@ pub mod builder { } } } - ///Builder for [`Client::image_delete`] /// ///[`Client::image_delete`]: super::Client::image_delete @@ -24055,7 +22207,6 @@ pub mod builder { project_name: Result, image_name: Result, } - impl<'a> ImageDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24065,7 +22216,6 @@ pub mod builder { image_name: Err("image_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24075,7 +22225,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24085,7 +22234,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn image_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24095,7 +22243,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for image_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/images/ /// {image_name}` @@ -24131,7 +22278,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_list`] /// ///[`Client::instance_list`]: super::Client::instance_list @@ -24144,7 +22290,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24156,7 +22301,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24166,7 +22310,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24176,7 +22319,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24186,7 +22328,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24197,7 +22338,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24208,7 +22348,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances` @@ -24258,7 +22397,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances` @@ -24308,7 +22446,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::instance_create`] /// ///[`Client::instance_create`]: super::Client::instance_create @@ -24319,7 +22456,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> InstanceCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24329,7 +22465,6 @@ pub mod builder { body: Ok(types::builder::InstanceCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24339,7 +22474,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24349,7 +22483,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24360,7 +22493,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::InstanceCreate) -> types::builder::InstanceCreate, @@ -24368,7 +22500,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances` @@ -24405,7 +22536,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_view`] /// ///[`Client::instance_view`]: super::Client::instance_view @@ -24416,7 +22546,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24426,7 +22555,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24436,7 +22564,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24446,7 +22573,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24456,7 +22582,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}` @@ -24492,7 +22617,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_delete`] /// ///[`Client::instance_delete`]: super::Client::instance_delete @@ -24503,7 +22627,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24513,7 +22636,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24523,7 +22645,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24533,7 +22654,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24543,7 +22663,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}` @@ -24579,7 +22698,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_disk_list`] /// ///[`Client::instance_disk_list`]: super::Client::instance_disk_list @@ -24593,7 +22711,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceDiskList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24606,7 +22723,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24616,7 +22732,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24626,7 +22741,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24636,7 +22750,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24646,7 +22759,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24657,7 +22769,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24668,7 +22779,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/disks` @@ -24721,7 +22831,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/disks` @@ -24771,7 +22880,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::instance_disk_attach`] /// ///[`Client::instance_disk_attach`]: super::Client::instance_disk_attach @@ -24783,7 +22891,6 @@ pub mod builder { instance_name: Result, body: Result, } - impl<'a> InstanceDiskAttach<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24794,7 +22901,6 @@ pub mod builder { body: Ok(types::builder::DiskIdentifier::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24804,7 +22910,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24814,7 +22919,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24824,7 +22928,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24835,7 +22938,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskIdentifier` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskIdentifier) -> types::builder::DiskIdentifier, @@ -24843,7 +22945,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/disks/attach` @@ -24883,7 +22984,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_disk_detach`] /// ///[`Client::instance_disk_detach`]: super::Client::instance_disk_detach @@ -24895,7 +22995,6 @@ pub mod builder { instance_name: Result, body: Result, } - impl<'a> InstanceDiskDetach<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -24906,7 +23005,6 @@ pub mod builder { body: Ok(types::builder::DiskIdentifier::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24916,7 +23014,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24926,7 +23023,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24936,7 +23032,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -24947,7 +23042,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskIdentifier` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskIdentifier) -> types::builder::DiskIdentifier, @@ -24955,7 +23049,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/disks/detach` @@ -24995,7 +23088,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_external_ip_list`] /// ///[`Client::instance_external_ip_list`]: super::Client::instance_external_ip_list @@ -25006,7 +23098,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceExternalIpList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25016,7 +23107,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25026,7 +23116,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25036,7 +23125,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25046,7 +23134,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/external-ips` @@ -25084,7 +23171,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_migrate`] /// ///[`Client::instance_migrate`]: super::Client::instance_migrate @@ -25096,7 +23182,6 @@ pub mod builder { instance_name: Result, body: Result, } - impl<'a> InstanceMigrate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25107,7 +23192,6 @@ pub mod builder { body: Ok(types::builder::InstanceMigrate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25117,7 +23201,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25127,7 +23210,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25137,7 +23219,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25148,7 +23229,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceMigrate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::InstanceMigrate) -> types::builder::InstanceMigrate, @@ -25156,7 +23236,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/migrate` @@ -25196,7 +23275,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_network_interface_list`] /// ///[`Client::instance_network_interface_list`]: super::Client::instance_network_interface_list @@ -25210,7 +23288,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceNetworkInterfaceList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25223,7 +23300,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25233,7 +23309,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25243,7 +23318,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25253,7 +23327,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25263,7 +23336,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25274,7 +23346,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25285,7 +23356,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces` @@ -25339,7 +23409,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces` @@ -25389,7 +23458,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::instance_network_interface_create`] /// ///[`Client::instance_network_interface_create`]: super::Client::instance_network_interface_create @@ -25401,7 +23469,6 @@ pub mod builder { instance_name: Result, body: Result, } - impl<'a> InstanceNetworkInterfaceCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25412,7 +23479,6 @@ pub mod builder { body: Ok(types::builder::NetworkInterfaceCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25422,7 +23488,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25432,7 +23497,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25442,7 +23506,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25453,7 +23516,6 @@ pub mod builder { .map_err(|_| "conversion to `NetworkInterfaceCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -25463,7 +23525,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces` @@ -25505,7 +23566,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_network_interface_view`] /// ///[`Client::instance_network_interface_view`]: super::Client::instance_network_interface_view @@ -25517,7 +23577,6 @@ pub mod builder { instance_name: Result, interface_name: Result, } - impl<'a> InstanceNetworkInterfaceView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25528,7 +23587,6 @@ pub mod builder { interface_name: Err("interface_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25538,7 +23596,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25548,7 +23605,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25558,7 +23614,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn interface_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25568,7 +23623,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for interface_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces/{interface_name}` @@ -25609,7 +23663,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_network_interface_update`] /// ///[`Client::instance_network_interface_update`]: super::Client::instance_network_interface_update @@ -25622,7 +23675,6 @@ pub mod builder { interface_name: Result, body: Result, } - impl<'a> InstanceNetworkInterfaceUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25634,7 +23686,6 @@ pub mod builder { body: Ok(types::builder::NetworkInterfaceUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25644,7 +23695,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25654,7 +23704,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25664,7 +23713,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn interface_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25674,7 +23722,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for interface_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25685,7 +23732,6 @@ pub mod builder { .map_err(|_| "conversion to `NetworkInterfaceUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -25695,7 +23741,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces/{interface_name}` @@ -25740,7 +23785,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_network_interface_delete`] /// ///[`Client::instance_network_interface_delete`]: super::Client::instance_network_interface_delete @@ -25752,7 +23796,6 @@ pub mod builder { instance_name: Result, interface_name: Result, } - impl<'a> InstanceNetworkInterfaceDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25763,7 +23806,6 @@ pub mod builder { interface_name: Err("interface_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25773,7 +23815,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25783,7 +23824,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25793,7 +23833,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn interface_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25803,7 +23842,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for interface_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/network-interfaces/{interface_name}` @@ -25842,7 +23880,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_reboot`] /// ///[`Client::instance_reboot`]: super::Client::instance_reboot @@ -25853,7 +23890,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceReboot<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25863,7 +23899,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25873,7 +23908,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25883,7 +23917,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25893,7 +23926,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/reboot` @@ -25929,7 +23961,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_serial_console`] /// ///[`Client::instance_serial_console`]: super::Client::instance_serial_console @@ -25943,7 +23974,6 @@ pub mod builder { max_bytes: Result, String>, most_recent: Result, String>, } - impl<'a> InstanceSerialConsole<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -25956,7 +23986,6 @@ pub mod builder { most_recent: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25966,7 +23995,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25976,7 +24004,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25986,7 +24013,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - pub fn from_start(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -25997,7 +24023,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for from_start failed".to_string()); self } - pub fn max_bytes(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26008,7 +24033,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for max_bytes failed".to_string()); self } - pub fn most_recent(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26019,7 +24043,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for most_recent failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/serial-console` @@ -26073,7 +24096,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_serial_console_stream`] /// ///[`Client::instance_serial_console_stream`]: super::Client::instance_serial_console_stream @@ -26084,7 +24106,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceSerialConsoleStream<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26094,7 +24115,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26104,7 +24124,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26114,7 +24133,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26124,7 +24142,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/serial-console/stream` @@ -26170,7 +24187,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_start`] /// ///[`Client::instance_start`]: super::Client::instance_start @@ -26181,7 +24197,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceStart<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26191,7 +24206,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26201,7 +24215,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26211,7 +24224,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26221,7 +24233,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/start` @@ -26257,7 +24268,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_stop`] /// ///[`Client::instance_stop`]: super::Client::instance_stop @@ -26268,7 +24278,6 @@ pub mod builder { project_name: Result, instance_name: Result, } - impl<'a> InstanceStop<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26278,7 +24287,6 @@ pub mod builder { instance_name: Err("instance_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26288,7 +24296,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26298,7 +24305,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn instance_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26308,7 +24314,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for instance_name failed".to_string()); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// instances/{instance_name}/stop` @@ -26344,7 +24349,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_policy_view`] /// ///[`Client::project_policy_view`]: super::Client::project_policy_view @@ -26354,7 +24358,6 @@ pub mod builder { organization_name: Result, project_name: Result, } - impl<'a> ProjectPolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26363,7 +24366,6 @@ pub mod builder { project_name: Err("project_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26373,7 +24375,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26383,7 +24384,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/policy` pub async fn send( @@ -26417,7 +24417,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_policy_update`] /// ///[`Client::project_policy_update`]: super::Client::project_policy_update @@ -26428,7 +24427,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> ProjectPolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26438,7 +24436,6 @@ pub mod builder { body: Ok(types::builder::ProjectRolePolicy::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26448,7 +24445,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26458,7 +24454,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26469,7 +24464,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -26479,7 +24473,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/policy` pub async fn send( @@ -26517,7 +24510,6 @@ pub mod builder { } } } - ///Builder for [`Client::snapshot_list`] /// ///[`Client::snapshot_list`]: super::Client::snapshot_list @@ -26530,7 +24522,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SnapshotList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26542,7 +24533,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26552,7 +24542,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26562,7 +24551,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26572,7 +24560,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26583,7 +24570,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26594,7 +24580,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots` @@ -26644,7 +24629,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots` @@ -26694,7 +24678,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::snapshot_create`] /// ///[`Client::snapshot_create`]: super::Client::snapshot_create @@ -26705,7 +24688,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> SnapshotCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26715,7 +24697,6 @@ pub mod builder { body: Ok(types::builder::SnapshotCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26725,7 +24706,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26735,7 +24715,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26746,7 +24725,6 @@ pub mod builder { .map_err(|_| "conversion to `SnapshotCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SnapshotCreate) -> types::builder::SnapshotCreate, @@ -26754,7 +24732,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots` @@ -26791,7 +24768,6 @@ pub mod builder { } } } - ///Builder for [`Client::snapshot_view`] /// ///[`Client::snapshot_view`]: super::Client::snapshot_view @@ -26802,7 +24778,6 @@ pub mod builder { project_name: Result, snapshot_name: Result, } - impl<'a> SnapshotView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26812,7 +24787,6 @@ pub mod builder { snapshot_name: Err("snapshot_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26822,7 +24796,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26832,7 +24805,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn snapshot_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26842,7 +24814,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for snapshot_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots/{snapshot_name}` @@ -26878,7 +24849,6 @@ pub mod builder { } } } - ///Builder for [`Client::snapshot_delete`] /// ///[`Client::snapshot_delete`]: super::Client::snapshot_delete @@ -26889,7 +24859,6 @@ pub mod builder { project_name: Result, snapshot_name: Result, } - impl<'a> SnapshotDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26899,7 +24868,6 @@ pub mod builder { snapshot_name: Err("snapshot_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26909,7 +24877,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26919,7 +24886,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn snapshot_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -26929,7 +24895,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for snapshot_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/ /// snapshots/{snapshot_name}` @@ -26965,7 +24930,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_list`] /// ///[`Client::vpc_list`]: super::Client::vpc_list @@ -26978,7 +24942,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -26990,7 +24953,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27000,7 +24962,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27010,7 +24971,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27020,7 +24980,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27031,7 +24990,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27042,7 +25000,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs` pub async fn send( @@ -27091,7 +25048,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs` pub fn stream( @@ -27140,7 +25096,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::vpc_create`] /// ///[`Client::vpc_create`]: super::Client::vpc_create @@ -27151,7 +25106,6 @@ pub mod builder { project_name: Result, body: Result, } - impl<'a> VpcCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27161,7 +25115,6 @@ pub mod builder { body: Ok(types::builder::VpcCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27171,7 +25124,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27181,7 +25133,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27192,7 +25143,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcCreate) -> types::builder::VpcCreate, @@ -27200,7 +25150,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs` pub async fn send(self) -> Result, Error> { @@ -27236,7 +25185,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_view`] /// ///[`Client::vpc_view`]: super::Client::vpc_view @@ -27247,7 +25195,6 @@ pub mod builder { project_name: Result, vpc_name: Result, } - impl<'a> VpcView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27257,7 +25204,6 @@ pub mod builder { vpc_name: Err("vpc_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27267,7 +25213,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27277,7 +25222,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27287,7 +25231,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}` @@ -27323,7 +25266,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_update`] /// ///[`Client::vpc_update`]: super::Client::vpc_update @@ -27335,7 +25277,6 @@ pub mod builder { vpc_name: Result, body: Result, } - impl<'a> VpcUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27346,7 +25287,6 @@ pub mod builder { body: Ok(types::builder::VpcUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27356,7 +25296,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27366,7 +25305,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27376,7 +25314,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27387,7 +25324,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcUpdate) -> types::builder::VpcUpdate, @@ -27395,7 +25331,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}` @@ -27435,7 +25370,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_delete`] /// ///[`Client::vpc_delete`]: super::Client::vpc_delete @@ -27446,7 +25380,6 @@ pub mod builder { project_name: Result, vpc_name: Result, } - impl<'a> VpcDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27456,7 +25389,6 @@ pub mod builder { vpc_name: Err("vpc_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27466,7 +25398,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27476,7 +25407,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27486,7 +25416,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}` @@ -27522,7 +25451,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_firewall_rules_view`] /// ///[`Client::vpc_firewall_rules_view`]: super::Client::vpc_firewall_rules_view @@ -27533,7 +25461,6 @@ pub mod builder { project_name: Result, vpc_name: Result, } - impl<'a> VpcFirewallRulesView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27543,7 +25470,6 @@ pub mod builder { vpc_name: Err("vpc_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27553,7 +25479,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27563,7 +25488,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27573,7 +25497,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/firewall/rules` @@ -27611,7 +25534,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_firewall_rules_update`] /// ///[`Client::vpc_firewall_rules_update`]: super::Client::vpc_firewall_rules_update @@ -27623,7 +25545,6 @@ pub mod builder { vpc_name: Result, body: Result, } - impl<'a> VpcFirewallRulesUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27634,7 +25555,6 @@ pub mod builder { body: Ok(types::builder::VpcFirewallRuleUpdateParams::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27644,7 +25564,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27654,7 +25573,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27664,7 +25582,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27674,7 +25591,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -27684,7 +25600,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/firewall/rules` @@ -27726,7 +25641,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_list`] /// ///[`Client::vpc_router_list`]: super::Client::vpc_router_list @@ -27740,7 +25654,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcRouterList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27753,7 +25666,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27763,7 +25675,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27773,7 +25684,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27783,7 +25693,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27793,7 +25702,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27804,7 +25712,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27815,7 +25722,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers` @@ -27868,7 +25774,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers` @@ -27918,7 +25823,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::vpc_router_create`] /// ///[`Client::vpc_router_create`]: super::Client::vpc_router_create @@ -27930,7 +25834,6 @@ pub mod builder { vpc_name: Result, body: Result, } - impl<'a> VpcRouterCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -27941,7 +25844,6 @@ pub mod builder { body: Ok(types::builder::VpcRouterCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27951,7 +25853,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27961,7 +25862,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27971,7 +25871,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -27982,7 +25881,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcRouterCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcRouterCreate) -> types::builder::VpcRouterCreate, @@ -27990,7 +25888,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers` @@ -28030,7 +25927,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_view`] /// ///[`Client::vpc_router_view`]: super::Client::vpc_router_view @@ -28042,7 +25938,6 @@ pub mod builder { vpc_name: Result, router_name: Result, } - impl<'a> VpcRouterView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28053,7 +25948,6 @@ pub mod builder { router_name: Err("router_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28063,7 +25957,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28073,7 +25966,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28083,7 +25975,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28093,7 +25984,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}` @@ -28132,7 +26022,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_update`] /// ///[`Client::vpc_router_update`]: super::Client::vpc_router_update @@ -28145,7 +26034,6 @@ pub mod builder { router_name: Result, body: Result, } - impl<'a> VpcRouterUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28157,7 +26045,6 @@ pub mod builder { body: Ok(types::builder::VpcRouterUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28167,7 +26054,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28177,7 +26063,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28187,7 +26072,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28197,7 +26081,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28208,7 +26091,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcRouterUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcRouterUpdate) -> types::builder::VpcRouterUpdate, @@ -28216,7 +26098,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}` @@ -28259,7 +26140,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_delete`] /// ///[`Client::vpc_router_delete`]: super::Client::vpc_router_delete @@ -28271,7 +26151,6 @@ pub mod builder { vpc_name: Result, router_name: Result, } - impl<'a> VpcRouterDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28282,7 +26161,6 @@ pub mod builder { router_name: Err("router_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28292,7 +26170,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28302,7 +26179,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28312,7 +26188,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28322,7 +26197,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}` @@ -28361,7 +26235,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_route_list`] /// ///[`Client::vpc_router_route_list`]: super::Client::vpc_router_route_list @@ -28376,7 +26249,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcRouterRouteList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28390,7 +26262,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28400,7 +26271,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28410,7 +26280,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28420,7 +26289,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28430,7 +26298,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28440,7 +26307,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28451,7 +26317,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28462,7 +26327,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes` @@ -28518,7 +26382,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes` @@ -28568,7 +26431,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::vpc_router_route_create`] /// ///[`Client::vpc_router_route_create`]: super::Client::vpc_router_route_create @@ -28581,7 +26443,6 @@ pub mod builder { router_name: Result, body: Result, } - impl<'a> VpcRouterRouteCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28593,7 +26454,6 @@ pub mod builder { body: Ok(types::builder::RouterRouteCreateParams::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28603,7 +26463,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28613,7 +26472,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28623,7 +26481,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28633,7 +26490,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28644,7 +26500,6 @@ pub mod builder { .map_err(|_| "conversion to `RouterRouteCreateParams` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -28654,7 +26509,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes` @@ -28697,7 +26551,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_route_view`] /// ///[`Client::vpc_router_route_view`]: super::Client::vpc_router_route_view @@ -28710,7 +26563,6 @@ pub mod builder { router_name: Result, route_name: Result, } - impl<'a> VpcRouterRouteView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28722,7 +26574,6 @@ pub mod builder { route_name: Err("route_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28732,7 +26583,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28742,7 +26592,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28752,7 +26601,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28762,7 +26610,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn route_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28772,7 +26619,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for route_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes/{route_name}` @@ -28814,7 +26660,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_route_update`] /// ///[`Client::vpc_router_route_update`]: super::Client::vpc_router_route_update @@ -28828,7 +26673,6 @@ pub mod builder { route_name: Result, body: Result, } - impl<'a> VpcRouterRouteUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28841,7 +26685,6 @@ pub mod builder { body: Ok(types::builder::RouterRouteUpdateParams::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28851,7 +26694,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28861,7 +26703,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28871,7 +26712,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28881,7 +26721,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn route_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28891,7 +26730,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for route_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28902,7 +26740,6 @@ pub mod builder { .map_err(|_| "conversion to `RouterRouteUpdateParams` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -28912,7 +26749,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes/{route_name}` @@ -28958,7 +26794,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_router_route_delete`] /// ///[`Client::vpc_router_route_delete`]: super::Client::vpc_router_route_delete @@ -28971,7 +26806,6 @@ pub mod builder { router_name: Result, route_name: Result, } - impl<'a> VpcRouterRouteDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -28983,7 +26817,6 @@ pub mod builder { route_name: Err("route_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -28993,7 +26826,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29003,7 +26835,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29013,7 +26844,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn router_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29023,7 +26853,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for router_name failed".to_string()); self } - pub fn route_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29033,7 +26862,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for route_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/routers/{router_name}/routes/{route_name}` @@ -29075,7 +26903,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_subnet_list`] /// ///[`Client::vpc_subnet_list`]: super::Client::vpc_subnet_list @@ -29089,7 +26916,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcSubnetList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29102,7 +26928,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29112,7 +26937,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29122,7 +26946,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29132,7 +26955,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29142,7 +26964,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29153,7 +26974,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29164,7 +26984,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets` @@ -29217,7 +27036,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets` @@ -29267,7 +27085,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::vpc_subnet_create`] /// ///[`Client::vpc_subnet_create`]: super::Client::vpc_subnet_create @@ -29279,7 +27096,6 @@ pub mod builder { vpc_name: Result, body: Result, } - impl<'a> VpcSubnetCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29290,7 +27106,6 @@ pub mod builder { body: Ok(types::builder::VpcSubnetCreate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29300,7 +27115,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29310,7 +27124,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29320,7 +27133,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29331,7 +27143,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcSubnetCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcSubnetCreate) -> types::builder::VpcSubnetCreate, @@ -29339,7 +27150,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets` @@ -29379,7 +27189,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_subnet_view`] /// ///[`Client::vpc_subnet_view`]: super::Client::vpc_subnet_view @@ -29391,7 +27200,6 @@ pub mod builder { vpc_name: Result, subnet_name: Result, } - impl<'a> VpcSubnetView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29402,7 +27210,6 @@ pub mod builder { subnet_name: Err("subnet_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29412,7 +27219,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29422,7 +27228,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29432,7 +27237,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn subnet_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29442,7 +27246,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for subnet_name failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}` @@ -29481,7 +27284,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_subnet_update`] /// ///[`Client::vpc_subnet_update`]: super::Client::vpc_subnet_update @@ -29494,7 +27296,6 @@ pub mod builder { subnet_name: Result, body: Result, } - impl<'a> VpcSubnetUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29506,7 +27307,6 @@ pub mod builder { body: Ok(types::builder::VpcSubnetUpdate::default()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29516,7 +27316,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29526,7 +27325,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29536,7 +27334,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn subnet_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29546,7 +27343,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for subnet_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29557,7 +27353,6 @@ pub mod builder { .map_err(|_| "conversion to `VpcSubnetUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::VpcSubnetUpdate) -> types::builder::VpcSubnetUpdate, @@ -29565,7 +27360,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}` @@ -29608,7 +27402,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_subnet_delete`] /// ///[`Client::vpc_subnet_delete`]: super::Client::vpc_subnet_delete @@ -29620,7 +27413,6 @@ pub mod builder { vpc_name: Result, subnet_name: Result, } - impl<'a> VpcSubnetDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29631,7 +27423,6 @@ pub mod builder { subnet_name: Err("subnet_name was not initialized".to_string()), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29641,7 +27432,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29651,7 +27441,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29661,7 +27450,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn subnet_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29671,7 +27459,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for subnet_name failed".to_string()); self } - ///Sends a `DELETE` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}` @@ -29710,7 +27497,6 @@ pub mod builder { } } } - ///Builder for [`Client::vpc_subnet_list_network_interfaces`] /// ///[`Client::vpc_subnet_list_network_interfaces`]: super::Client::vpc_subnet_list_network_interfaces @@ -29725,7 +27511,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> VpcSubnetListNetworkInterfaces<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29739,7 +27524,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn organization_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29749,7 +27533,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for organization_name failed".to_string()); self } - pub fn project_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29759,7 +27542,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for project_name failed".to_string()); self } - pub fn vpc_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29769,7 +27551,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for vpc_name failed".to_string()); self } - pub fn subnet_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29779,7 +27560,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for subnet_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29789,7 +27569,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29800,7 +27579,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29811,7 +27589,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}/network-interfaces` @@ -29868,7 +27645,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/organizations/{organization_name}/projects/{project_name}/vpcs/ /// {vpc_name}/subnets/{subnet_name}/network-interfaces` @@ -29918,7 +27694,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::policy_view`] /// ///[`Client::policy_view`]: super::Client::policy_view @@ -29926,12 +27701,10 @@ pub mod builder { pub struct PolicyView<'a> { client: &'a super::Client, } - impl<'a> PolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/policy` pub async fn send( self, @@ -29953,7 +27726,6 @@ pub mod builder { } } } - ///Builder for [`Client::policy_update`] /// ///[`Client::policy_update`]: super::Client::policy_update @@ -29962,7 +27734,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> PolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -29970,7 +27741,6 @@ pub mod builder { body: Ok(types::builder::SiloRolePolicy::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -29981,7 +27751,6 @@ pub mod builder { .map_err(|_| "conversion to `SiloRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SiloRolePolicy) -> types::builder::SiloRolePolicy, @@ -29989,7 +27758,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/policy` pub async fn send( self, @@ -30014,7 +27782,6 @@ pub mod builder { } } } - ///Builder for [`Client::role_list`] /// ///[`Client::role_list`]: super::Client::role_list @@ -30024,7 +27791,6 @@ pub mod builder { limit: Result, String>, page_token: Result, String>, } - impl<'a> RoleList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30033,7 +27799,6 @@ pub mod builder { page_token: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30043,7 +27808,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30054,7 +27818,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - ///Sends a `GET` request to `/roles` pub async fn send( self, @@ -30088,7 +27851,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/roles` pub fn stream( self, @@ -30135,7 +27897,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::role_view`] /// ///[`Client::role_view`]: super::Client::role_view @@ -30144,7 +27905,6 @@ pub mod builder { client: &'a super::Client, role_name: Result, } - impl<'a> RoleView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30152,7 +27912,6 @@ pub mod builder { role_name: Err("role_name was not initialized".to_string()), } } - pub fn role_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30162,7 +27921,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for role_name failed".to_string()); self } - ///Sends a `GET` request to `/roles/{role_name}` pub async fn send(self) -> Result, Error> { let Self { client, role_name } = self; @@ -30187,7 +27945,6 @@ pub mod builder { } } } - ///Builder for [`Client::session_me`] /// ///[`Client::session_me`]: super::Client::session_me @@ -30195,12 +27952,10 @@ pub mod builder { pub struct SessionMe<'a> { client: &'a super::Client, } - impl<'a> SessionMe<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/session/me` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -30220,7 +27975,6 @@ pub mod builder { } } } - ///Builder for [`Client::session_me_groups`] /// ///[`Client::session_me_groups`]: super::Client::session_me_groups @@ -30231,7 +27985,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SessionMeGroups<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30241,7 +27994,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30251,7 +28003,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30262,7 +28013,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30273,7 +28023,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/session/me/groups` pub async fn send( self, @@ -30312,7 +28061,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/session/me/groups` pub fn stream( self, @@ -30360,7 +28108,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::session_sshkey_list`] /// ///[`Client::session_sshkey_list`]: super::Client::session_sshkey_list @@ -30371,7 +28118,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SessionSshkeyList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30381,7 +28127,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30391,7 +28136,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30402,7 +28146,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30413,7 +28156,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/session/me/sshkeys` pub async fn send( self, @@ -30452,7 +28194,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/session/me/sshkeys` pub fn stream( self, @@ -30500,7 +28241,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::session_sshkey_create`] /// ///[`Client::session_sshkey_create`]: super::Client::session_sshkey_create @@ -30509,7 +28249,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SessionSshkeyCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30517,7 +28256,6 @@ pub mod builder { body: Ok(types::builder::SshKeyCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30528,7 +28266,6 @@ pub mod builder { .map_err(|_| "conversion to `SshKeyCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SshKeyCreate) -> types::builder::SshKeyCreate, @@ -30536,7 +28273,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/session/me/sshkeys` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -30559,7 +28295,6 @@ pub mod builder { } } } - ///Builder for [`Client::session_sshkey_view`] /// ///[`Client::session_sshkey_view`]: super::Client::session_sshkey_view @@ -30568,7 +28303,6 @@ pub mod builder { client: &'a super::Client, ssh_key_name: Result, } - impl<'a> SessionSshkeyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30576,7 +28310,6 @@ pub mod builder { ssh_key_name: Err("ssh_key_name was not initialized".to_string()), } } - pub fn ssh_key_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30586,7 +28319,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for ssh_key_name failed".to_string()); self } - ///Sends a `GET` request to `/session/me/sshkeys/{ssh_key_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -30614,7 +28346,6 @@ pub mod builder { } } } - ///Builder for [`Client::session_sshkey_delete`] /// ///[`Client::session_sshkey_delete`]: super::Client::session_sshkey_delete @@ -30623,7 +28354,6 @@ pub mod builder { client: &'a super::Client, ssh_key_name: Result, } - impl<'a> SessionSshkeyDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30631,7 +28361,6 @@ pub mod builder { ssh_key_name: Err("ssh_key_name was not initialized".to_string()), } } - pub fn ssh_key_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30641,7 +28370,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for ssh_key_name failed".to_string()); self } - ///Sends a `DELETE` request to `/session/me/sshkeys/{ssh_key_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -30669,7 +28397,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_image_view_by_id`] /// ///[`Client::system_image_view_by_id`]: super::Client::system_image_view_by_id @@ -30678,7 +28405,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> SystemImageViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30686,7 +28412,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30696,7 +28421,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/system/by-id/images/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -30721,7 +28445,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_view_by_id`] /// ///[`Client::ip_pool_view_by_id`]: super::Client::ip_pool_view_by_id @@ -30730,7 +28453,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> IpPoolViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30738,7 +28460,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30748,7 +28469,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/system/by-id/ip-pools/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -30773,7 +28493,6 @@ pub mod builder { } } } - ///Builder for [`Client::silo_view_by_id`] /// ///[`Client::silo_view_by_id`]: super::Client::silo_view_by_id @@ -30782,7 +28501,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> SiloViewById<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30790,7 +28508,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30800,7 +28517,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/system/by-id/silos/{id}` pub async fn send(self) -> Result, Error> { let Self { client, id } = self; @@ -30825,7 +28541,6 @@ pub mod builder { } } } - ///Builder for [`Client::certificate_list`] /// ///[`Client::certificate_list`]: super::Client::certificate_list @@ -30836,7 +28551,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> CertificateList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30846,7 +28560,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30856,7 +28569,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30867,7 +28579,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30878,7 +28589,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/certificates` pub async fn send( self, @@ -30917,7 +28627,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/certificates` pub fn stream( self, @@ -30965,7 +28674,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::certificate_create`] /// ///[`Client::certificate_create`]: super::Client::certificate_create @@ -30974,7 +28682,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> CertificateCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -30982,7 +28689,6 @@ pub mod builder { body: Ok(types::builder::CertificateCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -30993,7 +28699,6 @@ pub mod builder { .map_err(|_| "conversion to `CertificateCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -31003,7 +28708,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/system/certificates` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -31026,7 +28730,6 @@ pub mod builder { } } } - ///Builder for [`Client::certificate_view`] /// ///[`Client::certificate_view`]: super::Client::certificate_view @@ -31035,7 +28738,6 @@ pub mod builder { client: &'a super::Client, certificate: Result, } - impl<'a> CertificateView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31043,7 +28745,6 @@ pub mod builder { certificate: Err("certificate was not initialized".to_string()), } } - pub fn certificate(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31053,7 +28754,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for certificate failed".to_string()); self } - ///Sends a `GET` request to `/system/certificates/{certificate}` pub async fn send(self) -> Result, Error> { let Self { @@ -31081,7 +28781,6 @@ pub mod builder { } } } - ///Builder for [`Client::certificate_delete`] /// ///[`Client::certificate_delete`]: super::Client::certificate_delete @@ -31090,7 +28789,6 @@ pub mod builder { client: &'a super::Client, certificate: Result, } - impl<'a> CertificateDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31098,7 +28796,6 @@ pub mod builder { certificate: Err("certificate was not initialized".to_string()), } } - pub fn certificate(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31108,7 +28805,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for certificate failed".to_string()); self } - ///Sends a `DELETE` request to `/system/certificates/{certificate}` pub async fn send(self) -> Result, Error> { let Self { @@ -31136,7 +28832,6 @@ pub mod builder { } } } - ///Builder for [`Client::physical_disk_list`] /// ///[`Client::physical_disk_list`]: super::Client::physical_disk_list @@ -31147,7 +28842,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> PhysicalDiskList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31157,7 +28851,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31167,7 +28860,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31178,7 +28870,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31189,7 +28880,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/disks` pub async fn send( self, @@ -31228,7 +28918,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/hardware/disks` pub fn stream( self, @@ -31276,7 +28965,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::rack_list`] /// ///[`Client::rack_list`]: super::Client::rack_list @@ -31287,7 +28975,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> RackList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31297,7 +28984,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31307,7 +28993,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31318,7 +29003,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31329,7 +29013,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/racks` pub async fn send( self, @@ -31368,7 +29051,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/hardware/racks` pub fn stream( self, @@ -31416,7 +29098,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::rack_view`] /// ///[`Client::rack_view`]: super::Client::rack_view @@ -31425,7 +29106,6 @@ pub mod builder { client: &'a super::Client, rack_id: Result, } - impl<'a> RackView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31433,7 +29113,6 @@ pub mod builder { rack_id: Err("rack_id was not initialized".to_string()), } } - pub fn rack_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31443,7 +29122,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for rack_id failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/racks/{rack_id}` pub async fn send(self) -> Result, Error> { let Self { client, rack_id } = self; @@ -31468,7 +29146,6 @@ pub mod builder { } } } - ///Builder for [`Client::sled_list`] /// ///[`Client::sled_list`]: super::Client::sled_list @@ -31479,7 +29156,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SledList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31489,7 +29165,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31499,7 +29174,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31510,7 +29184,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31521,7 +29194,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/sleds` pub async fn send( self, @@ -31560,7 +29232,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/hardware/sleds` pub fn stream( self, @@ -31608,7 +29279,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::sled_view`] /// ///[`Client::sled_view`]: super::Client::sled_view @@ -31617,7 +29287,6 @@ pub mod builder { client: &'a super::Client, sled_id: Result, } - impl<'a> SledView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31625,7 +29294,6 @@ pub mod builder { sled_id: Err("sled_id was not initialized".to_string()), } } - pub fn sled_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31635,7 +29303,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for sled_id failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/sleds/{sled_id}` pub async fn send(self) -> Result, Error> { let Self { client, sled_id } = self; @@ -31660,7 +29327,6 @@ pub mod builder { } } } - ///Builder for [`Client::sled_physical_disk_list`] /// ///[`Client::sled_physical_disk_list`]: super::Client::sled_physical_disk_list @@ -31672,7 +29338,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SledPhysicalDiskList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31683,7 +29348,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn sled_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31693,7 +29357,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for sled_id failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31703,7 +29366,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31714,7 +29376,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31725,7 +29386,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/hardware/sleds/{sled_id}/disks` pub async fn send( self, @@ -31770,7 +29430,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/hardware/sleds/{sled_id}/disks` pub fn stream( self, @@ -31818,7 +29477,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::system_image_list`] /// ///[`Client::system_image_list`]: super::Client::system_image_list @@ -31829,7 +29487,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SystemImageList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31839,7 +29496,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31849,7 +29505,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31860,7 +29515,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31871,7 +29525,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/images` pub async fn send( self, @@ -31910,7 +29563,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/images` pub fn stream( self, @@ -31958,7 +29610,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::system_image_create`] /// ///[`Client::system_image_create`]: super::Client::system_image_create @@ -31967,7 +29618,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SystemImageCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -31975,7 +29625,6 @@ pub mod builder { body: Ok(types::builder::GlobalImageCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -31986,7 +29635,6 @@ pub mod builder { .map_err(|_| "conversion to `GlobalImageCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -31996,7 +29644,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/system/images` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -32019,7 +29666,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_image_view`] /// ///[`Client::system_image_view`]: super::Client::system_image_view @@ -32028,7 +29674,6 @@ pub mod builder { client: &'a super::Client, image_name: Result, } - impl<'a> SystemImageView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32036,7 +29681,6 @@ pub mod builder { image_name: Err("image_name was not initialized".to_string()), } } - pub fn image_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32046,7 +29690,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for image_name failed".to_string()); self } - ///Sends a `GET` request to `/system/images/{image_name}` pub async fn send(self) -> Result, Error> { let Self { client, image_name } = self; @@ -32071,7 +29714,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_image_delete`] /// ///[`Client::system_image_delete`]: super::Client::system_image_delete @@ -32080,7 +29722,6 @@ pub mod builder { client: &'a super::Client, image_name: Result, } - impl<'a> SystemImageDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32088,7 +29729,6 @@ pub mod builder { image_name: Err("image_name was not initialized".to_string()), } } - pub fn image_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32098,7 +29738,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for image_name failed".to_string()); self } - ///Sends a `DELETE` request to `/system/images/{image_name}` pub async fn send(self) -> Result, Error> { let Self { client, image_name } = self; @@ -32123,7 +29762,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_list`] /// ///[`Client::ip_pool_list`]: super::Client::ip_pool_list @@ -32134,7 +29772,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> IpPoolList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32144,7 +29781,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32154,7 +29790,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32165,7 +29800,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32176,7 +29810,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/ip-pools` pub async fn send( self, @@ -32215,7 +29848,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/ip-pools` pub fn stream( self, @@ -32263,7 +29895,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::ip_pool_create`] /// ///[`Client::ip_pool_create`]: super::Client::ip_pool_create @@ -32272,7 +29903,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> IpPoolCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32280,7 +29910,6 @@ pub mod builder { body: Ok(types::builder::IpPoolCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32291,7 +29920,6 @@ pub mod builder { .map_err(|_| "conversion to `IpPoolCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::IpPoolCreate) -> types::builder::IpPoolCreate, @@ -32299,7 +29927,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/system/ip-pools` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -32322,7 +29949,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_view`] /// ///[`Client::ip_pool_view`]: super::Client::ip_pool_view @@ -32331,7 +29957,6 @@ pub mod builder { client: &'a super::Client, pool_name: Result, } - impl<'a> IpPoolView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32339,7 +29964,6 @@ pub mod builder { pool_name: Err("pool_name was not initialized".to_string()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32349,7 +29973,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - ///Sends a `GET` request to `/system/ip-pools/{pool_name}` pub async fn send(self) -> Result, Error> { let Self { client, pool_name } = self; @@ -32374,7 +29997,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_update`] /// ///[`Client::ip_pool_update`]: super::Client::ip_pool_update @@ -32384,7 +30006,6 @@ pub mod builder { pool_name: Result, body: Result, } - impl<'a> IpPoolUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32393,7 +30014,6 @@ pub mod builder { body: Ok(types::builder::IpPoolUpdate::default()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32403,7 +30023,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32414,7 +30033,6 @@ pub mod builder { .map_err(|_| "conversion to `IpPoolUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::IpPoolUpdate) -> types::builder::IpPoolUpdate, @@ -32422,7 +30040,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/system/ip-pools/{pool_name}` pub async fn send(self) -> Result, Error> { let Self { @@ -32454,7 +30071,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_delete`] /// ///[`Client::ip_pool_delete`]: super::Client::ip_pool_delete @@ -32463,7 +30079,6 @@ pub mod builder { client: &'a super::Client, pool_name: Result, } - impl<'a> IpPoolDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32471,7 +30086,6 @@ pub mod builder { pool_name: Err("pool_name was not initialized".to_string()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32481,7 +30095,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - ///Sends a `DELETE` request to `/system/ip-pools/{pool_name}` pub async fn send(self) -> Result, Error> { let Self { client, pool_name } = self; @@ -32506,7 +30119,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_range_list`] /// ///[`Client::ip_pool_range_list`]: super::Client::ip_pool_range_list @@ -32517,7 +30129,6 @@ pub mod builder { limit: Result, String>, page_token: Result, String>, } - impl<'a> IpPoolRangeList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32527,7 +30138,6 @@ pub mod builder { page_token: Ok(None), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32537,7 +30147,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32547,7 +30156,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32558,7 +30166,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - ///Sends a `GET` request to `/system/ip-pools/{pool_name}/ranges` pub async fn send( self, @@ -32598,7 +30205,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/ip-pools/{pool_name}/ranges` pub fn stream( self, @@ -32645,7 +30251,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::ip_pool_range_add`] /// ///[`Client::ip_pool_range_add`]: super::Client::ip_pool_range_add @@ -32655,7 +30260,6 @@ pub mod builder { pool_name: Result, body: Result, } - impl<'a> IpPoolRangeAdd<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32664,7 +30268,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32674,7 +30277,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32684,7 +30286,6 @@ pub mod builder { .map_err(|_| "conversion to `IpRange` for body failed".to_string()); self } - ///Sends a `POST` request to `/system/ip-pools/{pool_name}/ranges/add` pub async fn send(self) -> Result, Error> { let Self { @@ -32714,7 +30315,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_range_remove`] /// ///[`Client::ip_pool_range_remove`]: super::Client::ip_pool_range_remove @@ -32724,7 +30324,6 @@ pub mod builder { pool_name: Result, body: Result, } - impl<'a> IpPoolRangeRemove<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32733,7 +30332,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn pool_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32743,7 +30341,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for pool_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32753,7 +30350,6 @@ pub mod builder { .map_err(|_| "conversion to `IpRange` for body failed".to_string()); self } - ///Sends a `POST` request to /// `/system/ip-pools/{pool_name}/ranges/remove` pub async fn send(self) -> Result, Error> { @@ -32784,7 +30380,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_service_view`] /// ///[`Client::ip_pool_service_view`]: super::Client::ip_pool_service_view @@ -32792,12 +30387,10 @@ pub mod builder { pub struct IpPoolServiceView<'a> { client: &'a super::Client, } - impl<'a> IpPoolServiceView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/system/ip-pools-service` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -32817,7 +30410,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_service_range_list`] /// ///[`Client::ip_pool_service_range_list`]: super::Client::ip_pool_service_range_list @@ -32827,7 +30419,6 @@ pub mod builder { limit: Result, String>, page_token: Result, String>, } - impl<'a> IpPoolServiceRangeList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32836,7 +30427,6 @@ pub mod builder { page_token: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32846,7 +30436,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32857,7 +30446,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - ///Sends a `GET` request to `/system/ip-pools-service/ranges` pub async fn send( self, @@ -32891,7 +30479,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/ip-pools-service/ranges` pub fn stream( self, @@ -32938,7 +30525,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::ip_pool_service_range_add`] /// ///[`Client::ip_pool_service_range_add`]: super::Client::ip_pool_service_range_add @@ -32947,7 +30533,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> IpPoolServiceRangeAdd<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -32955,7 +30540,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -32965,7 +30549,6 @@ pub mod builder { .map_err(|_| "conversion to `IpRange` for body failed".to_string()); self } - ///Sends a `POST` request to `/system/ip-pools-service/ranges/add` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -32986,7 +30569,6 @@ pub mod builder { } } } - ///Builder for [`Client::ip_pool_service_range_remove`] /// ///[`Client::ip_pool_service_range_remove`]: super::Client::ip_pool_service_range_remove @@ -32995,7 +30577,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> IpPoolServiceRangeRemove<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33003,7 +30584,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33013,7 +30593,6 @@ pub mod builder { .map_err(|_| "conversion to `IpRange` for body failed".to_string()); self } - ///Sends a `POST` request to `/system/ip-pools-service/ranges/remove` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -33034,7 +30613,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_metric`] /// ///[`Client::system_metric`]: super::Client::system_metric @@ -33048,7 +30626,6 @@ pub mod builder { page_token: Result, String>, start_time: Result>, String>, } - impl<'a> SystemMetric<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33061,7 +30638,6 @@ pub mod builder { start_time: Ok(None), } } - pub fn metric_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33071,7 +30647,6 @@ pub mod builder { .map_err(|_| "conversion to `SystemMetricName` for metric_name failed".to_string()); self } - pub fn end_time(mut self, value: V) -> Self where V: std::convert::TryInto>, @@ -33079,7 +30654,6 @@ pub mod builder { self . end_time = value . try_into () . map (Some) . map_err (| _ | "conversion to `chrono :: DateTime < chrono :: offset :: Utc >` for end_time failed" . to_string ()) ; self } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33089,7 +30663,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33099,7 +30672,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33110,7 +30682,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn start_time(mut self, value: V) -> Self where V: std::convert::TryInto>, @@ -33118,7 +30689,6 @@ pub mod builder { self . start_time = value . try_into () . map (Some) . map_err (| _ | "conversion to `chrono :: DateTime < chrono :: offset :: Utc >` for start_time failed" . to_string ()) ; self } - ///Sends a `GET` request to `/system/metrics/{metric_name}` pub async fn send( self, @@ -33172,7 +30742,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_policy_view`] /// ///[`Client::system_policy_view`]: super::Client::system_policy_view @@ -33180,12 +30749,10 @@ pub mod builder { pub struct SystemPolicyView<'a> { client: &'a super::Client, } - impl<'a> SystemPolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/system/policy` pub async fn send( self, @@ -33207,7 +30774,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_policy_update`] /// ///[`Client::system_policy_update`]: super::Client::system_policy_update @@ -33216,7 +30782,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SystemPolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33224,7 +30789,6 @@ pub mod builder { body: Ok(types::builder::FleetRolePolicy::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33235,7 +30799,6 @@ pub mod builder { .map_err(|_| "conversion to `FleetRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::FleetRolePolicy) -> types::builder::FleetRolePolicy, @@ -33243,7 +30806,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/system/policy` pub async fn send( self, @@ -33268,7 +30830,6 @@ pub mod builder { } } } - ///Builder for [`Client::saga_list`] /// ///[`Client::saga_list`]: super::Client::saga_list @@ -33279,7 +30840,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SagaList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33289,7 +30849,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33299,7 +30858,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33310,7 +30868,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33321,7 +30878,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/sagas` pub async fn send( self, @@ -33360,7 +30916,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/sagas` pub fn stream( self, @@ -33408,7 +30963,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::saga_view`] /// ///[`Client::saga_view`]: super::Client::saga_view @@ -33417,7 +30971,6 @@ pub mod builder { client: &'a super::Client, saga_id: Result, } - impl<'a> SagaView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33425,7 +30978,6 @@ pub mod builder { saga_id: Err("saga_id was not initialized".to_string()), } } - pub fn saga_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33435,7 +30987,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for saga_id failed".to_string()); self } - ///Sends a `GET` request to `/system/sagas/{saga_id}` pub async fn send(self) -> Result, Error> { let Self { client, saga_id } = self; @@ -33460,7 +31011,6 @@ pub mod builder { } } } - ///Builder for [`Client::silo_list`] /// ///[`Client::silo_list`]: super::Client::silo_list @@ -33471,7 +31021,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SiloList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33481,7 +31030,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33491,7 +31039,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33502,7 +31049,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33513,7 +31059,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/silos` pub async fn send( self, @@ -33552,7 +31097,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/silos` pub fn stream( self, @@ -33600,7 +31144,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::silo_create`] /// ///[`Client::silo_create`]: super::Client::silo_create @@ -33609,7 +31152,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SiloCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33617,7 +31159,6 @@ pub mod builder { body: Ok(types::builder::SiloCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33628,7 +31169,6 @@ pub mod builder { .map_err(|_| "conversion to `SiloCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SiloCreate) -> types::builder::SiloCreate, @@ -33636,7 +31176,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/system/silos` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -33659,7 +31198,6 @@ pub mod builder { } } } - ///Builder for [`Client::silo_view`] /// ///[`Client::silo_view`]: super::Client::silo_view @@ -33668,7 +31206,6 @@ pub mod builder { client: &'a super::Client, silo_name: Result, } - impl<'a> SiloView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33676,7 +31213,6 @@ pub mod builder { silo_name: Err("silo_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33686,7 +31222,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - ///Sends a `GET` request to `/system/silos/{silo_name}` pub async fn send(self) -> Result, Error> { let Self { client, silo_name } = self; @@ -33711,7 +31246,6 @@ pub mod builder { } } } - ///Builder for [`Client::silo_delete`] /// ///[`Client::silo_delete`]: super::Client::silo_delete @@ -33720,7 +31254,6 @@ pub mod builder { client: &'a super::Client, silo_name: Result, } - impl<'a> SiloDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33728,7 +31261,6 @@ pub mod builder { silo_name: Err("silo_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33738,7 +31270,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - ///Sends a `DELETE` request to `/system/silos/{silo_name}` pub async fn send(self) -> Result, Error> { let Self { client, silo_name } = self; @@ -33763,7 +31294,6 @@ pub mod builder { } } } - ///Builder for [`Client::silo_identity_provider_list`] /// ///[`Client::silo_identity_provider_list`]: super::Client::silo_identity_provider_list @@ -33775,7 +31305,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SiloIdentityProviderList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33786,7 +31315,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33796,7 +31324,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33806,7 +31333,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33817,7 +31343,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33828,7 +31353,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to /// `/system/silos/{silo_name}/identity-providers` pub async fn send( @@ -33875,7 +31399,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to /// `/system/silos/{silo_name}/identity-providers` pub fn stream( @@ -33924,7 +31447,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::local_idp_user_create`] /// ///[`Client::local_idp_user_create`]: super::Client::local_idp_user_create @@ -33934,7 +31456,6 @@ pub mod builder { silo_name: Result, body: Result, } - impl<'a> LocalIdpUserCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -33943,7 +31464,6 @@ pub mod builder { body: Ok(types::builder::UserCreate::default()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33953,7 +31473,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -33964,7 +31483,6 @@ pub mod builder { .map_err(|_| "conversion to `UserCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::UserCreate) -> types::builder::UserCreate, @@ -33972,7 +31490,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/system/silos/{silo_name}/identity-providers/local/users` pub async fn send(self) -> Result, Error> { @@ -34005,7 +31522,6 @@ pub mod builder { } } } - ///Builder for [`Client::local_idp_user_delete`] /// ///[`Client::local_idp_user_delete`]: super::Client::local_idp_user_delete @@ -34015,7 +31531,6 @@ pub mod builder { silo_name: Result, user_id: Result, } - impl<'a> LocalIdpUserDelete<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34024,7 +31539,6 @@ pub mod builder { user_id: Err("user_id was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34034,7 +31548,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn user_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34044,7 +31557,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for user_id failed".to_string()); self } - ///Sends a `DELETE` request to /// `/system/silos/{silo_name}/identity-providers/local/users/{user_id}` pub async fn send(self) -> Result, Error> { @@ -34076,7 +31588,6 @@ pub mod builder { } } } - ///Builder for [`Client::local_idp_user_set_password`] /// ///[`Client::local_idp_user_set_password`]: super::Client::local_idp_user_set_password @@ -34087,7 +31598,6 @@ pub mod builder { user_id: Result, body: Result, } - impl<'a> LocalIdpUserSetPassword<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34097,7 +31607,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34107,7 +31616,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn user_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34117,7 +31625,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for user_id failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34127,7 +31634,6 @@ pub mod builder { .map_err(|_| "conversion to `UserPassword` for body failed".to_string()); self } - ///Sends a `POST` request to /// `/system/silos/{silo_name}/identity-providers/local/users/{user_id}/ /// set-password` @@ -34162,7 +31668,6 @@ pub mod builder { } } } - ///Builder for [`Client::saml_identity_provider_create`] /// ///[`Client::saml_identity_provider_create`]: super::Client::saml_identity_provider_create @@ -34172,7 +31677,6 @@ pub mod builder { silo_name: Result, body: Result, } - impl<'a> SamlIdentityProviderCreate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34181,7 +31685,6 @@ pub mod builder { body: Ok(types::builder::SamlIdentityProviderCreate::default()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34191,7 +31694,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34201,7 +31703,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -34211,7 +31712,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to /// `/system/silos/{silo_name}/identity-providers/saml` pub async fn send( @@ -34246,7 +31746,6 @@ pub mod builder { } } } - ///Builder for [`Client::saml_identity_provider_view`] /// ///[`Client::saml_identity_provider_view`]: super::Client::saml_identity_provider_view @@ -34256,7 +31755,6 @@ pub mod builder { silo_name: Result, provider_name: Result, } - impl<'a> SamlIdentityProviderView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34265,7 +31763,6 @@ pub mod builder { provider_name: Err("provider_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34275,7 +31772,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn provider_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34285,7 +31781,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for provider_name failed".to_string()); self } - ///Sends a `GET` request to /// `/system/silos/{silo_name}/identity-providers/saml/{provider_name}` pub async fn send( @@ -34319,7 +31814,6 @@ pub mod builder { } } } - ///Builder for [`Client::silo_policy_view`] /// ///[`Client::silo_policy_view`]: super::Client::silo_policy_view @@ -34328,7 +31822,6 @@ pub mod builder { client: &'a super::Client, silo_name: Result, } - impl<'a> SiloPolicyView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34336,7 +31829,6 @@ pub mod builder { silo_name: Err("silo_name was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34346,7 +31838,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - ///Sends a `GET` request to `/system/silos/{silo_name}/policy` pub async fn send( self, @@ -34373,7 +31864,6 @@ pub mod builder { } } } - ///Builder for [`Client::silo_policy_update`] /// ///[`Client::silo_policy_update`]: super::Client::silo_policy_update @@ -34383,7 +31873,6 @@ pub mod builder { silo_name: Result, body: Result, } - impl<'a> SiloPolicyUpdate<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34392,7 +31881,6 @@ pub mod builder { body: Ok(types::builder::SiloRolePolicy::default()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34402,7 +31890,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34413,7 +31900,6 @@ pub mod builder { .map_err(|_| "conversion to `SiloRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::SiloRolePolicy) -> types::builder::SiloRolePolicy, @@ -34421,7 +31907,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/system/silos/{silo_name}/policy` pub async fn send( self, @@ -34455,7 +31940,6 @@ pub mod builder { } } } - ///Builder for [`Client::silo_users_list`] /// ///[`Client::silo_users_list`]: super::Client::silo_users_list @@ -34467,7 +31951,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SiloUsersList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34478,7 +31961,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34488,7 +31970,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34498,7 +31979,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34509,7 +31989,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34520,7 +31999,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/silos/{silo_name}/users/all` pub async fn send( self, @@ -34565,7 +32043,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/silos/{silo_name}/users/all` pub fn stream( self, @@ -34613,7 +32090,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::silo_user_view`] /// ///[`Client::silo_user_view`]: super::Client::silo_user_view @@ -34623,7 +32099,6 @@ pub mod builder { silo_name: Result, user_id: Result, } - impl<'a> SiloUserView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34632,7 +32107,6 @@ pub mod builder { user_id: Err("user_id was not initialized".to_string()), } } - pub fn silo_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34642,7 +32116,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for silo_name failed".to_string()); self } - pub fn user_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34652,7 +32125,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for user_id failed".to_string()); self } - ///Sends a `GET` request to /// `/system/silos/{silo_name}/users/id/{user_id}` pub async fn send(self) -> Result, Error> { @@ -34684,7 +32156,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_user_list`] /// ///[`Client::system_user_list`]: super::Client::system_user_list @@ -34695,7 +32166,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SystemUserList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34705,7 +32175,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34715,7 +32184,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34726,7 +32194,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34737,7 +32204,6 @@ pub mod builder { .map_err(|_| "conversion to `NameSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/system/user` pub async fn send( self, @@ -34776,7 +32242,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/system/user` pub fn stream( self, @@ -34824,7 +32289,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::system_user_view`] /// ///[`Client::system_user_view`]: super::Client::system_user_view @@ -34833,7 +32297,6 @@ pub mod builder { client: &'a super::Client, user_name: Result, } - impl<'a> SystemUserView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34841,7 +32304,6 @@ pub mod builder { user_name: Err("user_name was not initialized".to_string()), } } - pub fn user_name(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34851,7 +32313,6 @@ pub mod builder { .map_err(|_| "conversion to `Name` for user_name failed".to_string()); self } - ///Sends a `GET` request to `/system/user/{user_name}` pub async fn send(self) -> Result, Error> { let Self { client, user_name } = self; @@ -34876,7 +32337,6 @@ pub mod builder { } } } - ///Builder for [`Client::timeseries_schema_get`] /// ///[`Client::timeseries_schema_get`]: super::Client::timeseries_schema_get @@ -34886,7 +32346,6 @@ pub mod builder { limit: Result, String>, page_token: Result, String>, } - impl<'a> TimeseriesSchemaGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -34895,7 +32354,6 @@ pub mod builder { page_token: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34905,7 +32363,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -34916,7 +32373,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - ///Sends a `GET` request to `/timeseries/schema` pub async fn send( self, @@ -34951,7 +32407,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/timeseries/schema` pub fn stream( self, @@ -34998,7 +32453,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::user_list`] /// ///[`Client::user_list`]: super::Client::user_list @@ -35009,7 +32463,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> UserList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35019,7 +32472,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35029,7 +32481,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35040,7 +32491,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35051,7 +32501,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/users` pub async fn send( self, @@ -35090,7 +32539,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/users` pub fn stream( self, @@ -35138,7 +32586,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::disk_list_v1`] /// ///[`Client::disk_list_v1`]: super::Client::disk_list_v1 @@ -35151,7 +32598,6 @@ pub mod builder { project: Result, String>, sort_by: Result, String>, } - impl<'a> DiskListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35163,7 +32609,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35173,7 +32618,6 @@ pub mod builder { }); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35184,7 +32628,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35195,7 +32638,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35206,7 +32648,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35217,7 +32658,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/disks` pub async fn send( self, @@ -35266,7 +32706,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/disks` pub fn stream( self, @@ -35316,7 +32755,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::disk_create_v1`] /// ///[`Client::disk_create_v1`]: super::Client::disk_create_v1 @@ -35327,7 +32765,6 @@ pub mod builder { project: Result, body: Result, } - impl<'a> DiskCreateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35337,7 +32774,6 @@ pub mod builder { body: Ok(types::builder::DiskCreate::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35348,7 +32784,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35358,7 +32793,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35369,7 +32803,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskCreate) -> types::builder::DiskCreate, @@ -35377,7 +32810,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/disks` pub async fn send(self) -> Result, Error> { let Self { @@ -35412,7 +32844,6 @@ pub mod builder { } } } - ///Builder for [`Client::disk_view_v1`] /// ///[`Client::disk_view_v1`]: super::Client::disk_view_v1 @@ -35423,7 +32854,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> DiskViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35433,7 +32863,6 @@ pub mod builder { project: Ok(None), } } - pub fn disk(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35443,7 +32872,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for disk failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35454,7 +32882,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35465,7 +32892,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `GET` request to `/v1/disks/{disk}` pub async fn send(self) -> Result, Error> { let Self { @@ -35504,7 +32930,6 @@ pub mod builder { } } } - ///Builder for [`Client::disk_delete_v1`] /// ///[`Client::disk_delete_v1`]: super::Client::disk_delete_v1 @@ -35515,7 +32940,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> DiskDeleteV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35525,7 +32949,6 @@ pub mod builder { project: Ok(None), } } - pub fn disk(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35535,7 +32958,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for disk failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35546,7 +32968,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35557,7 +32978,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `DELETE` request to `/v1/disks/{disk}` pub async fn send(self) -> Result, Error> { let Self { @@ -35596,7 +33016,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_list_v1`] /// ///[`Client::instance_list_v1`]: super::Client::instance_list_v1 @@ -35609,7 +33028,6 @@ pub mod builder { project: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35621,7 +33039,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35631,7 +33048,6 @@ pub mod builder { }); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35642,7 +33058,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35653,7 +33068,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35664,7 +33078,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35675,7 +33088,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/instances` pub async fn send( self, @@ -35724,7 +33136,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/instances` pub fn stream( self, @@ -35774,7 +33185,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::instance_create_v1`] /// ///[`Client::instance_create_v1`]: super::Client::instance_create_v1 @@ -35785,7 +33195,6 @@ pub mod builder { project: Result, body: Result, } - impl<'a> InstanceCreateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35795,7 +33204,6 @@ pub mod builder { body: Ok(types::builder::InstanceCreate::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35806,7 +33214,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35816,7 +33223,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35827,7 +33233,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::InstanceCreate) -> types::builder::InstanceCreate, @@ -35835,7 +33240,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/instances` pub async fn send(self) -> Result, Error> { let Self { @@ -35870,7 +33274,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_view_v1`] /// ///[`Client::instance_view_v1`]: super::Client::instance_view_v1 @@ -35881,7 +33284,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35891,7 +33293,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35901,7 +33302,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35912,7 +33312,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35923,7 +33322,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `GET` request to `/v1/instances/{instance}` pub async fn send(self) -> Result, Error> { let Self { @@ -35962,7 +33360,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_delete_v1`] /// ///[`Client::instance_delete_v1`]: super::Client::instance_delete_v1 @@ -35973,7 +33370,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceDeleteV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -35983,7 +33379,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -35993,7 +33388,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36004,7 +33398,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36015,7 +33408,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `DELETE` request to `/v1/instances/{instance}` pub async fn send(self) -> Result, Error> { let Self { @@ -36054,7 +33446,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_disk_list_v1`] /// ///[`Client::instance_disk_list_v1`]: super::Client::instance_disk_list_v1 @@ -36068,7 +33459,6 @@ pub mod builder { project: Result, String>, sort_by: Result, String>, } - impl<'a> InstanceDiskListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36081,7 +33471,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36091,7 +33480,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36101,7 +33489,6 @@ pub mod builder { }); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36112,7 +33499,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36123,7 +33509,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36134,7 +33519,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36145,7 +33529,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/instances/{instance}/disks` pub async fn send( self, @@ -36200,7 +33583,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/instances/{instance}/disks` pub fn stream( self, @@ -36250,7 +33632,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::instance_disk_attach_v1`] /// ///[`Client::instance_disk_attach_v1`]: super::Client::instance_disk_attach_v1 @@ -36262,7 +33643,6 @@ pub mod builder { project: Result, String>, body: Result, } - impl<'a> InstanceDiskAttachV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36273,7 +33653,6 @@ pub mod builder { body: Ok(types::builder::DiskPath::default()), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36283,7 +33662,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36294,7 +33672,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36305,7 +33682,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36316,7 +33692,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskPath` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskPath) -> types::builder::DiskPath, @@ -36324,7 +33699,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/instances/{instance}/disks/attach` pub async fn send(self) -> Result, Error> { let Self { @@ -36367,7 +33741,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_disk_detach_v1`] /// ///[`Client::instance_disk_detach_v1`]: super::Client::instance_disk_detach_v1 @@ -36379,7 +33752,6 @@ pub mod builder { project: Result, String>, body: Result, } - impl<'a> InstanceDiskDetachV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36390,7 +33762,6 @@ pub mod builder { body: Ok(types::builder::DiskPath::default()), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36400,7 +33771,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36411,7 +33781,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36422,7 +33791,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36433,7 +33801,6 @@ pub mod builder { .map_err(|_| "conversion to `DiskPath` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::DiskPath) -> types::builder::DiskPath, @@ -36441,7 +33808,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/instances/{instance}/disks/detach` pub async fn send(self) -> Result, Error> { let Self { @@ -36484,7 +33850,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_migrate_v1`] /// ///[`Client::instance_migrate_v1`]: super::Client::instance_migrate_v1 @@ -36496,7 +33861,6 @@ pub mod builder { project: Result, String>, body: Result, } - impl<'a> InstanceMigrateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36507,7 +33871,6 @@ pub mod builder { body: Ok(types::builder::InstanceMigrate::default()), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36517,7 +33880,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36528,7 +33890,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36539,7 +33900,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36550,7 +33910,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceMigrate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::InstanceMigrate) -> types::builder::InstanceMigrate, @@ -36558,7 +33917,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/instances/{instance}/migrate` pub async fn send(self) -> Result, Error> { let Self { @@ -36601,7 +33959,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_reboot_v1`] /// ///[`Client::instance_reboot_v1`]: super::Client::instance_reboot_v1 @@ -36612,7 +33969,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceRebootV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36622,7 +33978,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36632,7 +33987,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36643,7 +33997,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36654,7 +34007,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `POST` request to `/v1/instances/{instance}/reboot` pub async fn send(self) -> Result, Error> { let Self { @@ -36693,7 +34045,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_serial_console_v1`] /// ///[`Client::instance_serial_console_v1`]: super::Client::instance_serial_console_v1 @@ -36707,7 +34058,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceSerialConsoleV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36720,7 +34070,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36730,7 +34079,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn from_start(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36741,7 +34089,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for from_start failed".to_string()); self } - pub fn max_bytes(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36752,7 +34099,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for max_bytes failed".to_string()); self } - pub fn most_recent(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36763,7 +34109,6 @@ pub mod builder { .map_err(|_| "conversion to `u64` for most_recent failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36774,7 +34119,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36785,7 +34129,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `GET` request to `/v1/instances/{instance}/serial-console` pub async fn send( self, @@ -36841,7 +34184,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_serial_console_stream_v1`] /// ///[`Client::instance_serial_console_stream_v1`]: super::Client::instance_serial_console_stream_v1 @@ -36852,7 +34194,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceSerialConsoleStreamV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36862,7 +34203,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36872,7 +34212,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36883,7 +34222,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36894,7 +34232,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `GET` request to /// `/v1/instances/{instance}/serial-console/stream` pub async fn send( @@ -36945,7 +34282,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_start_v1`] /// ///[`Client::instance_start_v1`]: super::Client::instance_start_v1 @@ -36956,7 +34292,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceStartV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -36966,7 +34301,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36976,7 +34310,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36987,7 +34320,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -36998,7 +34330,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `POST` request to `/v1/instances/{instance}/start` pub async fn send(self) -> Result, Error> { let Self { @@ -37037,7 +34368,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_stop_v1`] /// ///[`Client::instance_stop_v1`]: super::Client::instance_stop_v1 @@ -37048,7 +34378,6 @@ pub mod builder { organization: Result, String>, project: Result, String>, } - impl<'a> InstanceStopV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37058,7 +34387,6 @@ pub mod builder { project: Ok(None), } } - pub fn instance(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37068,7 +34396,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for instance failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37079,7 +34406,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37090,7 +34416,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - ///Sends a `POST` request to `/v1/instances/{instance}/stop` pub async fn send(self) -> Result, Error> { let Self { @@ -37129,7 +34454,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_list_v1`] /// ///[`Client::organization_list_v1`]: super::Client::organization_list_v1 @@ -37140,7 +34464,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> OrganizationListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37150,7 +34473,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37160,7 +34482,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37171,7 +34492,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37182,7 +34502,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/organizations` pub async fn send( self, @@ -37221,7 +34540,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/organizations` pub fn stream( self, @@ -37269,7 +34587,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::organization_create_v1`] /// ///[`Client::organization_create_v1`]: super::Client::organization_create_v1 @@ -37278,7 +34595,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> OrganizationCreateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37286,7 +34602,6 @@ pub mod builder { body: Ok(types::builder::OrganizationCreate::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37297,7 +34612,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -37307,7 +34621,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/organizations` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -37330,7 +34643,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_view_v1`] /// ///[`Client::organization_view_v1`]: super::Client::organization_view_v1 @@ -37339,7 +34651,6 @@ pub mod builder { client: &'a super::Client, organization: Result, } - impl<'a> OrganizationViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37347,7 +34658,6 @@ pub mod builder { organization: Err("organization was not initialized".to_string()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37357,7 +34667,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `GET` request to `/v1/organizations/{organization}` pub async fn send(self) -> Result, Error> { let Self { @@ -37385,7 +34694,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_update_v1`] /// ///[`Client::organization_update_v1`]: super::Client::organization_update_v1 @@ -37395,7 +34703,6 @@ pub mod builder { organization: Result, body: Result, } - impl<'a> OrganizationUpdateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37404,7 +34711,6 @@ pub mod builder { body: Ok(types::builder::OrganizationUpdate::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37414,7 +34720,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37425,7 +34730,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -37435,7 +34739,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/v1/organizations/{organization}` pub async fn send(self) -> Result, Error> { let Self { @@ -37467,7 +34770,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_delete_v1`] /// ///[`Client::organization_delete_v1`]: super::Client::organization_delete_v1 @@ -37476,7 +34778,6 @@ pub mod builder { client: &'a super::Client, organization: Result, } - impl<'a> OrganizationDeleteV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37484,7 +34785,6 @@ pub mod builder { organization: Err("organization was not initialized".to_string()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37494,7 +34794,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `DELETE` request to `/v1/organizations/{organization}` pub async fn send(self) -> Result, Error> { let Self { @@ -37522,7 +34821,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_policy_view_v1`] /// ///[`Client::organization_policy_view_v1`]: super::Client::organization_policy_view_v1 @@ -37531,7 +34829,6 @@ pub mod builder { client: &'a super::Client, organization: Result, } - impl<'a> OrganizationPolicyViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37539,7 +34836,6 @@ pub mod builder { organization: Err("organization was not initialized".to_string()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37549,7 +34845,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `GET` request to `/v1/organizations/{organization}/policy` pub async fn send( self, @@ -37579,7 +34874,6 @@ pub mod builder { } } } - ///Builder for [`Client::organization_policy_update_v1`] /// ///[`Client::organization_policy_update_v1`]: super::Client::organization_policy_update_v1 @@ -37589,7 +34883,6 @@ pub mod builder { organization: Result, body: Result, } - impl<'a> OrganizationPolicyUpdateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37598,7 +34891,6 @@ pub mod builder { body: Ok(types::builder::OrganizationRolePolicy::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37608,7 +34900,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37619,7 +34910,6 @@ pub mod builder { .map_err(|_| "conversion to `OrganizationRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -37629,7 +34919,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/v1/organizations/{organization}/policy` pub async fn send( self, @@ -37663,7 +34952,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_list_v1`] /// ///[`Client::project_list_v1`]: super::Client::project_list_v1 @@ -37675,7 +34963,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> ProjectListV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37686,7 +34973,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37696,7 +34982,6 @@ pub mod builder { }); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37707,7 +34992,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37718,7 +35002,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37729,7 +35012,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrIdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/projects` pub async fn send( self, @@ -37773,7 +35055,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/projects` pub fn stream( self, @@ -37822,7 +35103,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::project_create_v1`] /// ///[`Client::project_create_v1`]: super::Client::project_create_v1 @@ -37832,7 +35112,6 @@ pub mod builder { organization: Result, body: Result, } - impl<'a> ProjectCreateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37841,7 +35120,6 @@ pub mod builder { body: Ok(types::builder::ProjectCreate::default()), } } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37851,7 +35129,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37862,7 +35139,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectCreate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ProjectCreate) -> types::builder::ProjectCreate, @@ -37870,7 +35146,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/projects` pub async fn send(self) -> Result, Error> { let Self { @@ -37900,7 +35175,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_view_v1`] /// ///[`Client::project_view_v1`]: super::Client::project_view_v1 @@ -37910,7 +35184,6 @@ pub mod builder { project: Result, organization: Result, String>, } - impl<'a> ProjectViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37919,7 +35192,6 @@ pub mod builder { organization: Ok(None), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37929,7 +35201,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -37940,7 +35211,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `GET` request to `/v1/projects/{project}` pub async fn send(self) -> Result, Error> { let Self { @@ -37974,7 +35244,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_update_v1`] /// ///[`Client::project_update_v1`]: super::Client::project_update_v1 @@ -37985,7 +35254,6 @@ pub mod builder { organization: Result, String>, body: Result, } - impl<'a> ProjectUpdateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -37995,7 +35263,6 @@ pub mod builder { body: Ok(types::builder::ProjectUpdate::default()), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38005,7 +35272,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38016,7 +35282,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38027,7 +35292,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectUpdate` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce(types::builder::ProjectUpdate) -> types::builder::ProjectUpdate, @@ -38035,7 +35299,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/v1/projects/{project}` pub async fn send(self) -> Result, Error> { let Self { @@ -38073,7 +35336,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_delete_v1`] /// ///[`Client::project_delete_v1`]: super::Client::project_delete_v1 @@ -38083,7 +35345,6 @@ pub mod builder { project: Result, organization: Result, String>, } - impl<'a> ProjectDeleteV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38092,7 +35353,6 @@ pub mod builder { organization: Ok(None), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38102,7 +35362,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38113,7 +35372,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `DELETE` request to `/v1/projects/{project}` pub async fn send(self) -> Result, Error> { let Self { @@ -38147,7 +35405,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_policy_view_v1`] /// ///[`Client::project_policy_view_v1`]: super::Client::project_policy_view_v1 @@ -38157,7 +35414,6 @@ pub mod builder { project: Result, organization: Result, String>, } - impl<'a> ProjectPolicyViewV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38166,7 +35422,6 @@ pub mod builder { organization: Ok(None), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38176,7 +35431,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38187,7 +35441,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - ///Sends a `GET` request to `/v1/projects/{project}/policy` pub async fn send( self, @@ -38223,7 +35476,6 @@ pub mod builder { } } } - ///Builder for [`Client::project_policy_update_v1`] /// ///[`Client::project_policy_update_v1`]: super::Client::project_policy_update_v1 @@ -38234,7 +35486,6 @@ pub mod builder { organization: Result, String>, body: Result, } - impl<'a> ProjectPolicyUpdateV1<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38244,7 +35495,6 @@ pub mod builder { body: Ok(types::builder::ProjectRolePolicy::default()), } } - pub fn project(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38254,7 +35504,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for project failed".to_string()); self } - pub fn organization(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38265,7 +35514,6 @@ pub mod builder { .map_err(|_| "conversion to `NameOrId` for organization failed".to_string()); self } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38276,7 +35524,6 @@ pub mod builder { .map_err(|_| "conversion to `ProjectRolePolicy` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -38286,7 +35533,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/v1/projects/{project}/policy` pub async fn send( self, @@ -38326,7 +35572,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_component_version_list`] /// ///[`Client::system_component_version_list`]: super::Client::system_component_version_list @@ -38337,7 +35582,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SystemComponentVersionList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38347,7 +35591,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38357,7 +35600,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38368,7 +35610,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38379,7 +35620,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/components` pub async fn send( self, @@ -38419,7 +35659,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/system/update/components` pub fn stream( self, @@ -38468,7 +35707,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::update_deployments_list`] /// ///[`Client::update_deployments_list`]: super::Client::update_deployments_list @@ -38479,7 +35717,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> UpdateDeploymentsList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38489,7 +35726,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38499,7 +35735,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38510,7 +35745,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38521,7 +35755,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/deployments` pub async fn send( self, @@ -38561,7 +35794,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/system/update/deployments` pub fn stream( self, @@ -38609,7 +35841,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::update_deployment_view`] /// ///[`Client::update_deployment_view`]: super::Client::update_deployment_view @@ -38618,7 +35849,6 @@ pub mod builder { client: &'a super::Client, id: Result, } - impl<'a> UpdateDeploymentView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38626,7 +35856,6 @@ pub mod builder { id: Err("id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38636,7 +35865,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/deployments/{id}` pub async fn send( self, @@ -38663,7 +35891,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_update_refresh`] /// ///[`Client::system_update_refresh`]: super::Client::system_update_refresh @@ -38671,12 +35898,10 @@ pub mod builder { pub struct SystemUpdateRefresh<'a> { client: &'a super::Client, } - impl<'a> SystemUpdateRefresh<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/system/update/refresh` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -38696,7 +35921,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_update_start`] /// ///[`Client::system_update_start`]: super::Client::system_update_start @@ -38705,7 +35929,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> SystemUpdateStart<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38713,7 +35936,6 @@ pub mod builder { body: Ok(types::builder::SystemUpdateStart::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38724,7 +35946,6 @@ pub mod builder { .map_err(|_| "conversion to `SystemUpdateStart` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -38734,7 +35955,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/v1/system/update/start` pub async fn send( self, @@ -38759,7 +35979,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_update_stop`] /// ///[`Client::system_update_stop`]: super::Client::system_update_stop @@ -38767,12 +35986,10 @@ pub mod builder { pub struct SystemUpdateStop<'a> { client: &'a super::Client, } - impl<'a> SystemUpdateStop<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `POST` request to `/v1/system/update/stop` pub async fn send(self) -> Result, Error> { let Self { client } = self; @@ -38792,7 +36009,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_update_list`] /// ///[`Client::system_update_list`]: super::Client::system_update_list @@ -38803,7 +36019,6 @@ pub mod builder { page_token: Result, String>, sort_by: Result, String>, } - impl<'a> SystemUpdateList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38813,7 +36028,6 @@ pub mod builder { sort_by: Ok(None), } } - pub fn limit(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38823,7 +36037,6 @@ pub mod builder { }); self } - pub fn page_token(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38834,7 +36047,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for page_token failed".to_string()); self } - pub fn sort_by(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38845,7 +36057,6 @@ pub mod builder { .map_err(|_| "conversion to `IdSortMode` for sort_by failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/updates` pub async fn send( self, @@ -38884,7 +36095,6 @@ pub mod builder { _ => Err(Error::UnexpectedResponse(response)), } } - ///Streams `GET` requests to `/v1/system/update/updates` pub fn stream( self, @@ -38932,7 +36142,6 @@ pub mod builder { .boxed() } } - ///Builder for [`Client::system_update_view`] /// ///[`Client::system_update_view`]: super::Client::system_update_view @@ -38941,7 +36150,6 @@ pub mod builder { client: &'a super::Client, version: Result, } - impl<'a> SystemUpdateView<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -38949,7 +36157,6 @@ pub mod builder { version: Err("version was not initialized".to_string()), } } - pub fn version(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -38959,7 +36166,6 @@ pub mod builder { .map_err(|_| "conversion to `SemverVersion` for version failed".to_string()); self } - ///Sends a `GET` request to `/v1/system/update/updates/{version}` pub async fn send(self) -> Result, Error> { let Self { client, version } = self; @@ -38984,7 +36190,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_update_components_list`] /// ///[`Client::system_update_components_list`]: super::Client::system_update_components_list @@ -38993,7 +36198,6 @@ pub mod builder { client: &'a super::Client, version: Result, } - impl<'a> SystemUpdateComponentsList<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -39001,7 +36205,6 @@ pub mod builder { version: Err("version was not initialized".to_string()), } } - pub fn version(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -39011,7 +36214,6 @@ pub mod builder { .map_err(|_| "conversion to `SemverVersion` for version failed".to_string()); self } - ///Sends a `GET` request to /// `/v1/system/update/updates/{version}/components` pub async fn send( @@ -39039,7 +36241,6 @@ pub mod builder { } } } - ///Builder for [`Client::system_version`] /// ///[`Client::system_version`]: super::Client::system_version @@ -39047,12 +36248,10 @@ pub mod builder { pub struct SystemVersion<'a> { client: &'a super::Client, } - impl<'a> SystemVersion<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/v1/system/update/version` pub async fn send( self, @@ -39075,7 +36274,6 @@ pub mod builder { } } } - pub mod prelude { pub use self::super::Client; } diff --git a/progenitor-impl/tests/output/nexus-cli.out b/progenitor-impl/tests/output/nexus-cli.out index 52316a29..f5e525c6 100644 --- a/progenitor-impl/tests/output/nexus-cli.out +++ b/progenitor-impl/tests/output/nexus-cli.out @@ -1,12175 +1 @@ -pub struct Cli { - client: sdk::Client, - over: T, -} - -impl Cli { - pub fn new(client: sdk::Client) -> Self { - Self { client, over: () } - } - - pub fn get_command(cmd: CliCommand) -> clap::Command { - match cmd { - CliCommand::DiskViewById => Self::cli_disk_view_by_id(), - CliCommand::ImageViewById => Self::cli_image_view_by_id(), - CliCommand::InstanceViewById => Self::cli_instance_view_by_id(), - CliCommand::InstanceNetworkInterfaceViewById => { - Self::cli_instance_network_interface_view_by_id() - } - CliCommand::OrganizationViewById => Self::cli_organization_view_by_id(), - CliCommand::ProjectViewById => Self::cli_project_view_by_id(), - CliCommand::SnapshotViewById => Self::cli_snapshot_view_by_id(), - CliCommand::VpcRouterRouteViewById => Self::cli_vpc_router_route_view_by_id(), - CliCommand::VpcRouterViewById => Self::cli_vpc_router_view_by_id(), - CliCommand::VpcSubnetViewById => Self::cli_vpc_subnet_view_by_id(), - CliCommand::VpcViewById => Self::cli_vpc_view_by_id(), - CliCommand::DeviceAuthRequest => Self::cli_device_auth_request(), - CliCommand::DeviceAuthConfirm => Self::cli_device_auth_confirm(), - CliCommand::DeviceAccessToken => Self::cli_device_access_token(), - CliCommand::GroupList => Self::cli_group_list(), - CliCommand::LoginSpoof => Self::cli_login_spoof(), - CliCommand::LoginLocal => Self::cli_login_local(), - CliCommand::LoginSamlBegin => Self::cli_login_saml_begin(), - CliCommand::LoginSaml => Self::cli_login_saml(), - CliCommand::Logout => Self::cli_logout(), - CliCommand::OrganizationList => Self::cli_organization_list(), - CliCommand::OrganizationCreate => Self::cli_organization_create(), - CliCommand::OrganizationView => Self::cli_organization_view(), - CliCommand::OrganizationUpdate => Self::cli_organization_update(), - CliCommand::OrganizationDelete => Self::cli_organization_delete(), - CliCommand::OrganizationPolicyView => Self::cli_organization_policy_view(), - CliCommand::OrganizationPolicyUpdate => Self::cli_organization_policy_update(), - CliCommand::ProjectList => Self::cli_project_list(), - CliCommand::ProjectCreate => Self::cli_project_create(), - CliCommand::ProjectView => Self::cli_project_view(), - CliCommand::ProjectUpdate => Self::cli_project_update(), - CliCommand::ProjectDelete => Self::cli_project_delete(), - CliCommand::DiskList => Self::cli_disk_list(), - CliCommand::DiskCreate => Self::cli_disk_create(), - CliCommand::DiskView => Self::cli_disk_view(), - CliCommand::DiskDelete => Self::cli_disk_delete(), - CliCommand::DiskMetricsList => Self::cli_disk_metrics_list(), - CliCommand::ImageList => Self::cli_image_list(), - CliCommand::ImageCreate => Self::cli_image_create(), - CliCommand::ImageView => Self::cli_image_view(), - CliCommand::ImageDelete => Self::cli_image_delete(), - CliCommand::InstanceList => Self::cli_instance_list(), - CliCommand::InstanceCreate => Self::cli_instance_create(), - CliCommand::InstanceView => Self::cli_instance_view(), - CliCommand::InstanceDelete => Self::cli_instance_delete(), - CliCommand::InstanceDiskList => Self::cli_instance_disk_list(), - CliCommand::InstanceDiskAttach => Self::cli_instance_disk_attach(), - CliCommand::InstanceDiskDetach => Self::cli_instance_disk_detach(), - CliCommand::InstanceExternalIpList => Self::cli_instance_external_ip_list(), - CliCommand::InstanceMigrate => Self::cli_instance_migrate(), - CliCommand::InstanceNetworkInterfaceList => Self::cli_instance_network_interface_list(), - CliCommand::InstanceNetworkInterfaceCreate => { - Self::cli_instance_network_interface_create() - } - CliCommand::InstanceNetworkInterfaceView => Self::cli_instance_network_interface_view(), - CliCommand::InstanceNetworkInterfaceUpdate => { - Self::cli_instance_network_interface_update() - } - CliCommand::InstanceNetworkInterfaceDelete => { - Self::cli_instance_network_interface_delete() - } - CliCommand::InstanceReboot => Self::cli_instance_reboot(), - CliCommand::InstanceSerialConsole => Self::cli_instance_serial_console(), - CliCommand::InstanceSerialConsoleStream => Self::cli_instance_serial_console_stream(), - CliCommand::InstanceStart => Self::cli_instance_start(), - CliCommand::InstanceStop => Self::cli_instance_stop(), - CliCommand::ProjectPolicyView => Self::cli_project_policy_view(), - CliCommand::ProjectPolicyUpdate => Self::cli_project_policy_update(), - CliCommand::SnapshotList => Self::cli_snapshot_list(), - CliCommand::SnapshotCreate => Self::cli_snapshot_create(), - CliCommand::SnapshotView => Self::cli_snapshot_view(), - CliCommand::SnapshotDelete => Self::cli_snapshot_delete(), - CliCommand::VpcList => Self::cli_vpc_list(), - CliCommand::VpcCreate => Self::cli_vpc_create(), - CliCommand::VpcView => Self::cli_vpc_view(), - CliCommand::VpcUpdate => Self::cli_vpc_update(), - CliCommand::VpcDelete => Self::cli_vpc_delete(), - CliCommand::VpcFirewallRulesView => Self::cli_vpc_firewall_rules_view(), - CliCommand::VpcFirewallRulesUpdate => Self::cli_vpc_firewall_rules_update(), - CliCommand::VpcRouterList => Self::cli_vpc_router_list(), - CliCommand::VpcRouterCreate => Self::cli_vpc_router_create(), - CliCommand::VpcRouterView => Self::cli_vpc_router_view(), - CliCommand::VpcRouterUpdate => Self::cli_vpc_router_update(), - CliCommand::VpcRouterDelete => Self::cli_vpc_router_delete(), - CliCommand::VpcRouterRouteList => Self::cli_vpc_router_route_list(), - CliCommand::VpcRouterRouteCreate => Self::cli_vpc_router_route_create(), - CliCommand::VpcRouterRouteView => Self::cli_vpc_router_route_view(), - CliCommand::VpcRouterRouteUpdate => Self::cli_vpc_router_route_update(), - CliCommand::VpcRouterRouteDelete => Self::cli_vpc_router_route_delete(), - CliCommand::VpcSubnetList => Self::cli_vpc_subnet_list(), - CliCommand::VpcSubnetCreate => Self::cli_vpc_subnet_create(), - CliCommand::VpcSubnetView => Self::cli_vpc_subnet_view(), - CliCommand::VpcSubnetUpdate => Self::cli_vpc_subnet_update(), - CliCommand::VpcSubnetDelete => Self::cli_vpc_subnet_delete(), - CliCommand::VpcSubnetListNetworkInterfaces => { - Self::cli_vpc_subnet_list_network_interfaces() - } - CliCommand::PolicyView => Self::cli_policy_view(), - CliCommand::PolicyUpdate => Self::cli_policy_update(), - CliCommand::RoleList => Self::cli_role_list(), - CliCommand::RoleView => Self::cli_role_view(), - CliCommand::SessionMe => Self::cli_session_me(), - CliCommand::SessionMeGroups => Self::cli_session_me_groups(), - CliCommand::SessionSshkeyList => Self::cli_session_sshkey_list(), - CliCommand::SessionSshkeyCreate => Self::cli_session_sshkey_create(), - CliCommand::SessionSshkeyView => Self::cli_session_sshkey_view(), - CliCommand::SessionSshkeyDelete => Self::cli_session_sshkey_delete(), - CliCommand::SystemImageViewById => Self::cli_system_image_view_by_id(), - CliCommand::IpPoolViewById => Self::cli_ip_pool_view_by_id(), - CliCommand::SiloViewById => Self::cli_silo_view_by_id(), - CliCommand::CertificateList => Self::cli_certificate_list(), - CliCommand::CertificateCreate => Self::cli_certificate_create(), - CliCommand::CertificateView => Self::cli_certificate_view(), - CliCommand::CertificateDelete => Self::cli_certificate_delete(), - CliCommand::PhysicalDiskList => Self::cli_physical_disk_list(), - CliCommand::RackList => Self::cli_rack_list(), - CliCommand::RackView => Self::cli_rack_view(), - CliCommand::SledList => Self::cli_sled_list(), - CliCommand::SledView => Self::cli_sled_view(), - CliCommand::SledPhysicalDiskList => Self::cli_sled_physical_disk_list(), - CliCommand::SystemImageList => Self::cli_system_image_list(), - CliCommand::SystemImageCreate => Self::cli_system_image_create(), - CliCommand::SystemImageView => Self::cli_system_image_view(), - CliCommand::SystemImageDelete => Self::cli_system_image_delete(), - CliCommand::IpPoolList => Self::cli_ip_pool_list(), - CliCommand::IpPoolCreate => Self::cli_ip_pool_create(), - CliCommand::IpPoolView => Self::cli_ip_pool_view(), - CliCommand::IpPoolUpdate => Self::cli_ip_pool_update(), - CliCommand::IpPoolDelete => Self::cli_ip_pool_delete(), - CliCommand::IpPoolRangeList => Self::cli_ip_pool_range_list(), - CliCommand::IpPoolRangeAdd => Self::cli_ip_pool_range_add(), - CliCommand::IpPoolRangeRemove => Self::cli_ip_pool_range_remove(), - CliCommand::IpPoolServiceView => Self::cli_ip_pool_service_view(), - CliCommand::IpPoolServiceRangeList => Self::cli_ip_pool_service_range_list(), - CliCommand::IpPoolServiceRangeAdd => Self::cli_ip_pool_service_range_add(), - CliCommand::IpPoolServiceRangeRemove => Self::cli_ip_pool_service_range_remove(), - CliCommand::SystemMetric => Self::cli_system_metric(), - CliCommand::SystemPolicyView => Self::cli_system_policy_view(), - CliCommand::SystemPolicyUpdate => Self::cli_system_policy_update(), - CliCommand::SagaList => Self::cli_saga_list(), - CliCommand::SagaView => Self::cli_saga_view(), - CliCommand::SiloList => Self::cli_silo_list(), - CliCommand::SiloCreate => Self::cli_silo_create(), - CliCommand::SiloView => Self::cli_silo_view(), - CliCommand::SiloDelete => Self::cli_silo_delete(), - CliCommand::SiloIdentityProviderList => Self::cli_silo_identity_provider_list(), - CliCommand::LocalIdpUserCreate => Self::cli_local_idp_user_create(), - CliCommand::LocalIdpUserDelete => Self::cli_local_idp_user_delete(), - CliCommand::LocalIdpUserSetPassword => Self::cli_local_idp_user_set_password(), - CliCommand::SamlIdentityProviderCreate => Self::cli_saml_identity_provider_create(), - CliCommand::SamlIdentityProviderView => Self::cli_saml_identity_provider_view(), - CliCommand::SiloPolicyView => Self::cli_silo_policy_view(), - CliCommand::SiloPolicyUpdate => Self::cli_silo_policy_update(), - CliCommand::SiloUsersList => Self::cli_silo_users_list(), - CliCommand::SiloUserView => Self::cli_silo_user_view(), - CliCommand::SystemUserList => Self::cli_system_user_list(), - CliCommand::SystemUserView => Self::cli_system_user_view(), - CliCommand::TimeseriesSchemaGet => Self::cli_timeseries_schema_get(), - CliCommand::UserList => Self::cli_user_list(), - CliCommand::DiskListV1 => Self::cli_disk_list_v1(), - CliCommand::DiskCreateV1 => Self::cli_disk_create_v1(), - CliCommand::DiskViewV1 => Self::cli_disk_view_v1(), - CliCommand::DiskDeleteV1 => Self::cli_disk_delete_v1(), - CliCommand::InstanceListV1 => Self::cli_instance_list_v1(), - CliCommand::InstanceCreateV1 => Self::cli_instance_create_v1(), - CliCommand::InstanceViewV1 => Self::cli_instance_view_v1(), - CliCommand::InstanceDeleteV1 => Self::cli_instance_delete_v1(), - CliCommand::InstanceDiskListV1 => Self::cli_instance_disk_list_v1(), - CliCommand::InstanceDiskAttachV1 => Self::cli_instance_disk_attach_v1(), - CliCommand::InstanceDiskDetachV1 => Self::cli_instance_disk_detach_v1(), - CliCommand::InstanceMigrateV1 => Self::cli_instance_migrate_v1(), - CliCommand::InstanceRebootV1 => Self::cli_instance_reboot_v1(), - CliCommand::InstanceSerialConsoleV1 => Self::cli_instance_serial_console_v1(), - CliCommand::InstanceSerialConsoleStreamV1 => { - Self::cli_instance_serial_console_stream_v1() - } - CliCommand::InstanceStartV1 => Self::cli_instance_start_v1(), - CliCommand::InstanceStopV1 => Self::cli_instance_stop_v1(), - CliCommand::OrganizationListV1 => Self::cli_organization_list_v1(), - CliCommand::OrganizationCreateV1 => Self::cli_organization_create_v1(), - CliCommand::OrganizationViewV1 => Self::cli_organization_view_v1(), - CliCommand::OrganizationUpdateV1 => Self::cli_organization_update_v1(), - CliCommand::OrganizationDeleteV1 => Self::cli_organization_delete_v1(), - CliCommand::OrganizationPolicyViewV1 => Self::cli_organization_policy_view_v1(), - CliCommand::OrganizationPolicyUpdateV1 => Self::cli_organization_policy_update_v1(), - CliCommand::ProjectListV1 => Self::cli_project_list_v1(), - CliCommand::ProjectCreateV1 => Self::cli_project_create_v1(), - CliCommand::ProjectViewV1 => Self::cli_project_view_v1(), - CliCommand::ProjectUpdateV1 => Self::cli_project_update_v1(), - CliCommand::ProjectDeleteV1 => Self::cli_project_delete_v1(), - CliCommand::ProjectPolicyViewV1 => Self::cli_project_policy_view_v1(), - CliCommand::ProjectPolicyUpdateV1 => Self::cli_project_policy_update_v1(), - CliCommand::SystemComponentVersionList => Self::cli_system_component_version_list(), - CliCommand::UpdateDeploymentsList => Self::cli_update_deployments_list(), - CliCommand::UpdateDeploymentView => Self::cli_update_deployment_view(), - CliCommand::SystemUpdateRefresh => Self::cli_system_update_refresh(), - CliCommand::SystemUpdateStart => Self::cli_system_update_start(), - CliCommand::SystemUpdateStop => Self::cli_system_update_stop(), - CliCommand::SystemUpdateList => Self::cli_system_update_list(), - CliCommand::SystemUpdateView => Self::cli_system_update_view(), - CliCommand::SystemUpdateComponentsList => Self::cli_system_update_components_list(), - CliCommand::SystemVersion => Self::cli_system_version(), - } - } - - pub fn cli_disk_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a disk by id\n\nUse `GET /v1/disks/{disk}` instead") - } - - pub fn cli_image_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch an image by id") - } - - pub fn cli_instance_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch an instance by id") - } - - pub fn cli_instance_network_interface_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a network interface by id") - } - - pub fn cli_organization_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about( - "Fetch an organization by id\n\nUse `GET /v1/organizations/{organization}` instead", - ) - } - - pub fn cli_project_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a project by id\n\nUse `GET /v1/projects/{project}` instead") - } - - pub fn cli_snapshot_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a snapshot by id") - } - - pub fn cli_vpc_router_route_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a route by id") - } - - pub fn cli_vpc_router_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Get a router by id") - } - - pub fn cli_vpc_subnet_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a subnet by id") - } - - pub fn cli_vpc_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a VPC") - } - - pub fn cli_device_auth_request() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("client-id") - .long("client-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about( - "Start an OAuth 2.0 Device Authorization Grant\n\nThis endpoint is designed to be \ - accessed from an *unauthenticated* API client. It generates and records a \ - `device_code` and `user_code` which must be verified and confirmed prior to a \ - token being granted.", - ) - } - - pub fn cli_device_auth_confirm() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("user-code") - .long("user-code") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .about( - "Confirm an OAuth 2.0 Device Authorization Grant\n\nThis endpoint is designed to \ - be accessed by the user agent (browser), not the client requesting the token. So \ - we do not actually return the token here; it will be returned in response to the \ - poll on `/device/token`.", - ) - } - - pub fn cli_device_access_token() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("client-id") - .long("client-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .arg( - clap::Arg::new("device-code") - .long("device-code") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("grant-type") - .long("grant-type") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .about( - "Request a device access token\n\nThis endpoint should be polled by the client \ - until the user code is verified and the grant is confirmed.", - ) - } - - pub fn cli_group_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List groups") - } - - pub fn cli_login_spoof() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("username") - .long("username") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_login_local() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("password") - .long("password") - .required(true) - .value_parser(clap::value_parser!(types::Password)), - ) - .arg( - clap::Arg::new("username") - .long("username") - .required(true) - .value_parser(clap::value_parser!(types::UserId)), - ) - .about("Authenticate a user (i.e., log in) via username and password") - } - - pub fn cli_login_saml_begin() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("provider-name") - .long("provider-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Prompt user login\n\nEither display a page asking a user for their credentials, \ - or redirect them to their identity provider.", - ) - } - - pub fn cli_login_saml() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("provider-name") - .long("provider-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Authenticate a user (i.e., log in) via SAML") - } - - pub fn cli_logout() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_organization_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about("List organizations\n\nUse `GET /v1/organizations` instead") - } - - pub fn cli_organization_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create an organization\n\nUse `POST /v1/organizations` instead") - } - - pub fn cli_organization_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .about("Fetch an organization\n\nUse `GET /v1/organizations/{organization}` instead") - } - - pub fn cli_organization_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update an organization\n\nUse `PUT /v1/organizations/{organization}` instead") - } - - pub fn cli_organization_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .about( - "Delete an organization\n\nUse `DELETE /v1/organizations/{organization}` instead", - ) - } - - pub fn cli_organization_policy_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .about( - "Fetch an organization's IAM policy\n\nUse `GET \ - /v1/organizations/{organization}/policy` instead", - ) - } - - pub fn cli_organization_policy_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .about( - "Update an organization's IAM policy\n\nUse `PUT \ - /v1/organizations/{organization}/policy` instead", - ) - } - - pub fn cli_project_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about("List projects\n\nUse `GET /v1/projects` instead") - } - - pub fn cli_project_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create a project\n\nUse `POST /v1/projects` instead") - } - - pub fn cli_project_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .about("Fetch a project\n\nUse `GET /v1/projects/{project}` instead") - } - - pub fn cli_project_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update a project\n\nUse `PUT /v1/projects/{project}` instead") - } - - pub fn cli_project_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .about("Delete a project\n\nUse `DELETE /v1/projects/{project}` instead") - } - - pub fn cli_disk_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List disks\n\nUse `GET /v1/disks` instead") - } - - pub fn cli_disk_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("size") - .long("size") - .required(true) - .value_parser(clap::value_parser!(types::ByteCount)) - .help("total size of the Disk in bytes"), - ) - .about("Use `POST /v1/disks` instead") - } - - pub fn cli_disk_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("disk-name") - .long("disk-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch a disk\n\nUse `GET /v1/disks/{disk}` instead") - } - - pub fn cli_disk_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("disk-name") - .long("disk-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Use `DELETE /v1/disks/{disk}` instead") - } - - pub fn cli_disk_metrics_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("disk-name") - .long("disk-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("metric-name") - .long("metric-name") - .required(true) - .value_parser(clap::value_parser!(types::DiskMetricName)), - ) - .arg( - clap::Arg::new("end-time") - .long("end-time") - .required(false) - .value_parser(clap::value_parser!(chrono::DateTime)) - .help("An exclusive end time of metrics."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("start-time") - .long("start-time") - .required(false) - .value_parser(clap::value_parser!(chrono::DateTime)) - .help("An inclusive start time of metrics."), - ) - .about("Fetch disk metrics") - } - - pub fn cli_image_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about( - "List images\n\nList images in a project. The images are returned sorted by \ - creation date, with the most recent images appearing first.", - ) - } - - pub fn cli_image_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create an image\n\nCreate a new image in a project.") - } - - pub fn cli_image_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("image-name") - .long("image-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch an image\n\nFetch the details for a specific image in a project.") - } - - pub fn cli_image_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("image-name") - .long("image-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Delete an image\n\nPermanently delete an image from a project. This operation \ - cannot be undone. Any instances in the project using the image will continue to \ - run, however new instances can not be created with this image.", - ) - } - - pub fn cli_instance_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List instances") - } - - pub fn cli_instance_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("hostname") - .long("hostname") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("memory") - .long("memory") - .required(true) - .value_parser(clap::value_parser!(types::ByteCount)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("ncpus") - .long("ncpus") - .required(true) - .value_parser(clap::value_parser!(types::InstanceCpuCount)), - ) - .arg( - clap::Arg::new("start") - .long("start") - .required(false) - .value_parser(clap::value_parser!(bool)) - .help("Should this instance be started upon creation; true by default."), - ) - .arg( - clap::Arg::new("user-data") - .long("user-data") - .required(false) - .value_parser(clap::value_parser!(String)) - .help( - "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.", - ), - ) - .about("Create an instance\n\nUse `POST /v1/instances` instead") - } - - pub fn cli_instance_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch an instance\n\nUse `GET /v1/instances/{instance}` instead") - } - - pub fn cli_instance_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Delete an instance") - } - - pub fn cli_instance_disk_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List an instance's disks\n\nUse `GET /v1/instances/{instance}/disks` instead") - } - - pub fn cli_instance_disk_attach() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Attach a disk to an instance\n\nUse `POST /v1/instances/{instance}/disks/attach` \ - instead", - ) - } - - pub fn cli_instance_disk_detach() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Detach a disk from an instance\n\nUse `POST /v1/disks/{disk}/detach` instead") - } - - pub fn cli_instance_external_ip_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("List external IP addresses") - } - - pub fn cli_instance_migrate() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("dst-sled-id") - .long("dst-sled-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Migrate an instance\n\nUse `POST /v1/instances/{instance}/migrate` instead") - } - - pub fn cli_instance_network_interface_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List network interfaces") - } - - pub fn cli_instance_network_interface_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("ip") - .long("ip") - .required(false) - .value_parser(clap::value_parser!(std::net::IpAddr)) - .help( - "The IP address for the interface. One will be auto-assigned if not \ - provided.", - ), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("subnet-name") - .long("subnet-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The VPC Subnet in which to create the interface."), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The VPC in which to create the interface."), - ) - .about("Create a network interface") - } - - pub fn cli_instance_network_interface_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("interface-name") - .long("interface-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch a network interface") - } - - pub fn cli_instance_network_interface_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("interface-name") - .long("interface-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("primary") - .long("primary") - .required(false) - .value_parser(clap::value_parser!(bool)) - .help( - "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.", - ), - ) - .about("Update a network interface") - } - - pub fn cli_instance_network_interface_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("interface-name") - .long("interface-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Delete a network interface\n\nNote that the primary interface for an instance \ - cannot be deleted if there are any secondary interfaces. A new primary interface \ - must be designated first. The primary interface can be deleted if there are no \ - secondary interfaces.", - ) - } - - pub fn cli_instance_reboot() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Reboot an instance\n\nUse `POST /v1/instances/{instance}/reboot` instead") - } - - pub fn cli_instance_serial_console() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("from-start") - .long("from-start") - .required(false) - .value_parser(clap::value_parser!(u64)) - .help( - "Character index in the serial buffer from which to read, counting the \ - bytes output since instance start. If this is not provided, \ - `most_recent` must be provided, and if this *is* provided, `most_recent` \ - must *not* be provided.", - ), - ) - .arg( - clap::Arg::new("max-bytes") - .long("max-bytes") - .required(false) - .value_parser(clap::value_parser!(u64)) - .help( - "Maximum number of bytes of buffered serial console contents to return. \ - If the requested range runs to the end of the available buffer, the data \ - returned will be shorter than `max_bytes`.", - ), - ) - .arg( - clap::Arg::new("most-recent") - .long("most-recent") - .required(false) - .value_parser(clap::value_parser!(u64)) - .help( - "Character index in the serial buffer from which to read, counting \ - *backward* from the most recently buffered data retrieved from the \ - instance. (See note on `from_start` about mutual exclusivity)", - ), - ) - .about( - "Fetch an instance's serial console\n\nUse `GET \ - /v1/instances/{instance}/serial-console` instead", - ) - } - - pub fn cli_instance_serial_console_stream() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Connect to an instance's serial console\n\nUse `GET \ - /v1/instances/{instance}/serial-console/stream` instead", - ) - } - - pub fn cli_instance_start() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Boot an instance\n\nUse `POST /v1/instances/{instance}/start` instead") - } - - pub fn cli_instance_stop() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("instance-name") - .long("instance-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Halt an instance\n\nUse `POST /v1/instances/{instance}/stop` instead") - } - - pub fn cli_project_policy_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .about( - "Fetch a project's IAM policy\n\nUse `GET /v1/projects/{project}/policy` instead", - ) - } - - pub fn cli_project_policy_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .about("Update a project's IAM policy") - } - - pub fn cli_snapshot_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List snapshots") - } - - pub fn cli_snapshot_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("disk") - .long("disk") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The name of the disk to be snapshotted"), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create a snapshot\n\nCreates a point-in-time snapshot from a disk.") - } - - pub fn cli_snapshot_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("snapshot-name") - .long("snapshot-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch a snapshot") - } - - pub fn cli_snapshot_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("snapshot-name") - .long("snapshot-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Delete a snapshot") - } - - pub fn cli_vpc_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List VPCs") - } - - pub fn cli_vpc_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The organization's unique name."), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The project's unique name within the organization."), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("dns-name") - .long("dns-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("ipv6-prefix") - .long("ipv6-prefix") - .required(false) - .value_parser(clap::value_parser!(types::Ipv6Net)) - .help( - "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.", - ), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create a VPC") - } - - pub fn cli_vpc_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch a VPC") - } - - pub fn cli_vpc_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("dns-name") - .long("dns-name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update a VPC") - } - - pub fn cli_vpc_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Delete a VPC") - } - - pub fn cli_vpc_firewall_rules_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("List firewall rules") - } - - pub fn cli_vpc_firewall_rules_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Replace firewall rules") - } - - pub fn cli_vpc_router_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List routers") - } - - pub fn cli_vpc_router_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create a router") - } - - pub fn cli_vpc_router_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("router-name") - .long("router-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Get a router") - } - - pub fn cli_vpc_router_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("router-name") - .long("router-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update a router") - } - - pub fn cli_vpc_router_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("router-name") - .long("router-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Delete a router") - } - - pub fn cli_vpc_router_route_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("router-name") - .long("router-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List routes\n\nList the routes associated with a router in a particular VPC.") - } - - pub fn cli_vpc_router_route_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("router-name") - .long("router-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create a router") - } - - pub fn cli_vpc_router_route_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("router-name") - .long("router-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("route-name") - .long("route-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch a route") - } - - pub fn cli_vpc_router_route_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("router-name") - .long("router-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("route-name") - .long("route-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update a route") - } - - pub fn cli_vpc_router_route_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("router-name") - .long("router-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("route-name") - .long("route-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Delete a route") - } - - pub fn cli_vpc_subnet_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List subnets") - } - - pub fn cli_vpc_subnet_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("ipv4-block") - .long("ipv4-block") - .required(true) - .value_parser(clap::value_parser!(types::Ipv4Net)) - .help( - "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.", - ), - ) - .arg( - clap::Arg::new("ipv6-block") - .long("ipv6-block") - .required(false) - .value_parser(clap::value_parser!(types::Ipv6Net)) - .help( - "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.", - ), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create a subnet") - } - - pub fn cli_vpc_subnet_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("subnet-name") - .long("subnet-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch a subnet") - } - - pub fn cli_vpc_subnet_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("subnet-name") - .long("subnet-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update a subnet") - } - - pub fn cli_vpc_subnet_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("subnet-name") - .long("subnet-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Delete a subnet") - } - - pub fn cli_vpc_subnet_list_network_interfaces() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization-name") - .long("organization-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("project-name") - .long("project-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("vpc-name") - .long("vpc-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("subnet-name") - .long("subnet-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List network interfaces") - } - - pub fn cli_policy_view() -> clap::Command { - clap::Command::new("").about("Fetch the current silo's IAM policy") - } - - pub fn cli_policy_update() -> clap::Command { - clap::Command::new("").about("Update the current silo's IAM policy") - } - - pub fn cli_role_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .about("List built-in roles") - } - - pub fn cli_role_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("role-name") - .long("role-name") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("The built-in role's unique name."), - ) - .about("Fetch a built-in role") - } - - pub fn cli_session_me() -> clap::Command { - clap::Command::new("").about("Fetch the user associated with the current session") - } - - pub fn cli_session_me_groups() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("Fetch the silo\u{a0}groups the current user belongs to") - } - - pub fn cli_session_sshkey_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about( - "List SSH public keys\n\nLists SSH public keys for the currently authenticated \ - user.", - ) - } - - pub fn cli_session_sshkey_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("public-key") - .long("public-key") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("SSH public key, e.g., `\"ssh-ed25519 AAAAC3NzaC...\"`"), - ) - .about( - "Create an SSH public key\n\nCreate an SSH public key for the currently \ - authenticated user.", - ) - } - - pub fn cli_session_sshkey_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("ssh-key-name") - .long("ssh-key-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Fetch an SSH public key\n\nFetch an SSH public key associated with the currently \ - authenticated user.", - ) - } - - pub fn cli_session_sshkey_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("ssh-key-name") - .long("ssh-key-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Delete an SSH public key\n\nDelete an SSH public key associated with the \ - currently authenticated user.", - ) - } - - pub fn cli_system_image_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a system-wide image by id") - } - - pub fn cli_ip_pool_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch an IP pool by id") - } - - pub fn cli_silo_view_by_id() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a silo by id") - } - - pub fn cli_certificate_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about( - "List system-wide certificates\n\nReturns a list of all the system-wide \ - certificates. System-wide certificates are returned sorted by creation date, \ - with the most recent certificates appearing first.", - ) - } - - pub fn cli_certificate_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("service") - .long("service") - .required(true) - .value_parser(clap::value_parser!(types::ServiceUsingCertificate)) - .help("The service using this certificate"), - ) - .about( - "Create a new system-wide x.509 certificate.\n\nThis certificate is automatically \ - used by the Oxide Control plane to serve external connections.", - ) - } - - pub fn cli_certificate_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("certificate") - .long("certificate") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Fetch a certificate\n\nReturns the details of a specific certificate") - } - - pub fn cli_certificate_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("certificate") - .long("certificate") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about( - "Delete a certificate\n\nPermanently delete a certificate. This operation cannot \ - be undone.", - ) - } - - pub fn cli_physical_disk_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List physical disks") - } - - pub fn cli_rack_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List racks") - } - - pub fn cli_rack_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("rack-id") - .long("rack-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)) - .help("The rack's unique ID."), - ) - .about("Fetch a rack") - } - - pub fn cli_sled_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List sleds") - } - - pub fn cli_sled_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("sled-id") - .long("sled-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)) - .help("The sled's unique ID."), - ) - .about("Fetch a sled") - } - - pub fn cli_sled_physical_disk_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("sled-id") - .long("sled-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)) - .help("The sled's unique ID."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List physical disks attached to sleds") - } - - pub fn cli_system_image_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about( - "List system-wide images\n\nReturns a list of all the system-wide images. \ - System-wide images are returned sorted by creation date, with the most recent \ - images appearing first.", - ) - } - - pub fn cli_system_image_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Create a system-wide image\n\nCreate a new system-wide image. This image can \ - then be used by any user in any silo as a base for instances.", - ) - } - - pub fn cli_system_image_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("image-name") - .long("image-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Fetch a system-wide image\n\nReturns the details of a specific system-wide image.", - ) - } - - pub fn cli_system_image_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("image-name") - .long("image-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about( - "Delete a system-wide image\n\nPermanently delete a system-wide image. This \ - operation cannot be undone. Any instances using the system-wide image will \ - continue to run, however new instances can not be created with this image.", - ) - } - - pub fn cli_ip_pool_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about("List IP pools") - } - - pub fn cli_ip_pool_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create an IP pool") - } - - pub fn cli_ip_pool_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("pool-name") - .long("pool-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Fetch an IP pool") - } - - pub fn cli_ip_pool_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("pool-name") - .long("pool-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update an IP Pool") - } - - pub fn cli_ip_pool_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("pool-name") - .long("pool-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Delete an IP Pool") - } - - pub fn cli_ip_pool_range_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("pool-name") - .long("pool-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .about("List ranges for an IP pool\n\nRanges are ordered by their first address.") - } - - pub fn cli_ip_pool_range_add() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("pool-name") - .long("pool-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Add a range to an IP pool") - } - - pub fn cli_ip_pool_range_remove() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("pool-name") - .long("pool-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Remove a range from an IP pool") - } - - pub fn cli_ip_pool_service_view() -> clap::Command { - clap::Command::new("").about("Fetch the IP pool used for Oxide services.") - } - - pub fn cli_ip_pool_service_range_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .about( - "List ranges for the IP pool used for Oxide services.\n\nRanges are ordered by \ - their first address.", - ) - } - - pub fn cli_ip_pool_service_range_add() -> clap::Command { - clap::Command::new("").about("Add a range to an IP pool used for Oxide services.") - } - - pub fn cli_ip_pool_service_range_remove() -> clap::Command { - clap::Command::new("").about("Remove a range from an IP pool used for Oxide services.") - } - - pub fn cli_system_metric() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("metric-name") - .long("metric-name") - .required(true) - .value_parser(clap::value_parser!(types::SystemMetricName)), - ) - .arg( - clap::Arg::new("end-time") - .long("end-time") - .required(false) - .value_parser(clap::value_parser!(chrono::DateTime)) - .help("An exclusive end time of metrics."), - ) - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)) - .help("The UUID of the container being queried"), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("page-token") - .long("page-token") - .required(false) - .value_parser(clap::value_parser!(String)) - .help("Token returned by previous call to retrieve the subsequent page"), - ) - .arg( - clap::Arg::new("start-time") - .long("start-time") - .required(false) - .value_parser(clap::value_parser!(chrono::DateTime)) - .help("An inclusive start time of metrics."), - ) - .about("Access metrics data") - } - - pub fn cli_system_policy_view() -> clap::Command { - clap::Command::new("").about("Fetch the top-level IAM policy") - } - - pub fn cli_system_policy_update() -> clap::Command { - clap::Command::new("").about("Update the top-level IAM policy") - } - - pub fn cli_saga_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List sagas") - } - - pub fn cli_saga_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("saga-id") - .long("saga-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a saga") - } - - pub fn cli_silo_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about( - "List silos\n\nLists silos that are discoverable based on the current permissions.", - ) - } - - pub fn cli_silo_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("admin-group-name") - .long("admin-group-name") - .required(false) - .value_parser(clap::value_parser!(String)) - .help( - "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.", - ), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("discoverable") - .long("discoverable") - .required(true) - .value_parser(clap::value_parser!(bool)), - ) - .arg( - clap::Arg::new("identity-mode") - .long("identity-mode") - .required(true) - .value_parser(clap::value_parser!(types::SiloIdentityMode)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create a silo") - } - - pub fn cli_silo_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .about("Fetch a silo\n\nFetch a silo by name.") - } - - pub fn cli_silo_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .about("Delete a silo\n\nDelete a silo by name.") - } - - pub fn cli_silo_identity_provider_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List a silo's IDPs") - } - - pub fn cli_local_idp_user_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .arg( - clap::Arg::new("external-id") - .long("external-id") - .required(true) - .value_parser(clap::value_parser!(types::UserId)) - .help("username used to log in"), - ) - .about( - "Create a user\n\nUsers can only be created in Silos with `provision_type` == \ - `Fixed`. Otherwise, Silo users are just-in-time (JIT) provisioned when a user \ - first logs in using an external Identity Provider.", - ) - } - - pub fn cli_local_idp_user_delete() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .arg( - clap::Arg::new("user-id") - .long("user-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)) - .help("The user's internal id"), - ) - .about("Delete a user") - } - - pub fn cli_local_idp_user_set_password() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .arg( - clap::Arg::new("user-id") - .long("user-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)) - .help("The user's internal id"), - ) - .about( - "Set or invalidate a user's password\n\nPasswords can only be updated for users \ - in Silos with identity mode `LocalOnly`.", - ) - } - - pub fn cli_saml_identity_provider_create() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .arg( - clap::Arg::new("acs-url") - .long("acs-url") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("service provider endpoint where the response will be sent"), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("group-attribute-name") - .long("group-attribute-name") - .required(false) - .value_parser(clap::value_parser!(String)) - .help( - "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.", - ), - ) - .arg( - clap::Arg::new("idp-entity-id") - .long("idp-entity-id") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("idp's entity id"), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("slo-url") - .long("slo-url") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("service provider endpoint where the idp should send log out requests"), - ) - .arg( - clap::Arg::new("sp-client-id") - .long("sp-client-id") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("sp's client id"), - ) - .arg( - clap::Arg::new("technical-contact-email") - .long("technical-contact-email") - .required(true) - .value_parser(clap::value_parser!(String)) - .help("customer's technical contact for saml configuration"), - ) - .about("Create a SAML IDP") - } - - pub fn cli_saml_identity_provider_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .arg( - clap::Arg::new("provider-name") - .long("provider-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The SAML identity provider's name"), - ) - .about("Fetch a SAML IDP") - } - - pub fn cli_silo_policy_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .about("Fetch a silo's IAM policy") - } - - pub fn cli_silo_policy_update() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .about("Update a silo's IAM policy") - } - - pub fn cli_silo_users_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List users in a silo") - } - - pub fn cli_silo_user_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("silo-name") - .long("silo-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The silo's unique name."), - ) - .arg( - clap::Arg::new("user-id") - .long("user-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)) - .help("The user's internal id"), - ) - .about("Fetch a user") - } - - pub fn cli_system_user_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameSortMode)), - ) - .about("List built-in users") - } - - pub fn cli_system_user_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("user-name") - .long("user-name") - .required(true) - .value_parser(clap::value_parser!(types::Name)) - .help("The built-in user's unique name."), - ) - .about("Fetch a built-in user") - } - - pub fn cli_timeseries_schema_get() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .about("List timeseries schema") - } - - pub fn cli_user_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List users") - } - - pub fn cli_disk_list_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about("List disks") - } - - pub fn cli_disk_create_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("size") - .long("size") - .required(true) - .value_parser(clap::value_parser!(types::ByteCount)) - .help("total size of the Disk in bytes"), - ) - .about("Create a disk") - } - - pub fn cli_disk_view_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("disk") - .long("disk") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Fetch a disk") - } - - pub fn cli_disk_delete_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("disk") - .long("disk") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Delete a disk") - } - - pub fn cli_instance_list_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about("List instances") - } - - pub fn cli_instance_create_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("hostname") - .long("hostname") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("memory") - .long("memory") - .required(true) - .value_parser(clap::value_parser!(types::ByteCount)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .arg( - clap::Arg::new("ncpus") - .long("ncpus") - .required(true) - .value_parser(clap::value_parser!(types::InstanceCpuCount)), - ) - .arg( - clap::Arg::new("start") - .long("start") - .required(false) - .value_parser(clap::value_parser!(bool)) - .help("Should this instance be started upon creation; true by default."), - ) - .arg( - clap::Arg::new("user-data") - .long("user-data") - .required(false) - .value_parser(clap::value_parser!(String)) - .help( - "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.", - ), - ) - .about("Create an instance") - } - - pub fn cli_instance_view_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Fetch an instance") - } - - pub fn cli_instance_delete_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Delete an instance") - } - - pub fn cli_instance_disk_list_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about("List an instance's disks") - } - - pub fn cli_instance_disk_attach_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("disk") - .long("disk") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Attach a disk to an instance") - } - - pub fn cli_instance_disk_detach_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("disk") - .long("disk") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Detach a disk from an instance") - } - - pub fn cli_instance_migrate_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("dst-sled-id") - .long("dst-sled-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Migrate an instance") - } - - pub fn cli_instance_reboot_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Reboot an instance") - } - - pub fn cli_instance_serial_console_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("from-start") - .long("from-start") - .required(false) - .value_parser(clap::value_parser!(u64)) - .help( - "Character index in the serial buffer from which to read, counting the \ - bytes output since instance start. If this is not provided, \ - `most_recent` must be provided, and if this *is* provided, `most_recent` \ - must *not* be provided.", - ), - ) - .arg( - clap::Arg::new("max-bytes") - .long("max-bytes") - .required(false) - .value_parser(clap::value_parser!(u64)) - .help( - "Maximum number of bytes of buffered serial console contents to return. \ - If the requested range runs to the end of the available buffer, the data \ - returned will be shorter than `max_bytes`.", - ), - ) - .arg( - clap::Arg::new("most-recent") - .long("most-recent") - .required(false) - .value_parser(clap::value_parser!(u64)) - .help( - "Character index in the serial buffer from which to read, counting \ - *backward* from the most recently buffered data retrieved from the \ - instance. (See note on `from_start` about mutual exclusivity)", - ), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Fetch an instance's serial console") - } - - pub fn cli_instance_serial_console_stream_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Stream an instance's serial console") - } - - pub fn cli_instance_start_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Boot an instance") - } - - pub fn cli_instance_stop_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("instance") - .long("instance") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("project") - .long("project") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Stop an instance") - } - - pub fn cli_organization_list_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about("List organizations") - } - - pub fn cli_organization_create_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create an organization") - } - - pub fn cli_organization_view_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization") - .long("organization") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Fetch an organization") - } - - pub fn cli_organization_update_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization") - .long("organization") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update an organization") - } - - pub fn cli_organization_delete_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization") - .long("organization") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Delete an organization") - } - - pub fn cli_organization_policy_view_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization") - .long("organization") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Fetch an organization's IAM policy") - } - - pub fn cli_organization_policy_update_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization") - .long("organization") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Update an organization's IAM policy") - } - - pub fn cli_project_list_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::NameOrIdSortMode)), - ) - .about("List projects") - } - - pub fn cli_project_create_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("organization") - .long("organization") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(true) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(true) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Create a project") - } - - pub fn cli_project_view_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("project") - .long("project") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Fetch a project") - } - - pub fn cli_project_update_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("project") - .long("project") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("description") - .long("description") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - .arg( - clap::Arg::new("name") - .long("name") - .required(false) - .value_parser(clap::value_parser!(types::Name)), - ) - .about("Update a project") - } - - pub fn cli_project_delete_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("project") - .long("project") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Delete a project") - } - - pub fn cli_project_policy_view_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("project") - .long("project") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Fetch a project's IAM policy") - } - - pub fn cli_project_policy_update_v1() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("project") - .long("project") - .required(true) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .arg( - clap::Arg::new("organization") - .long("organization") - .required(false) - .value_parser(clap::value_parser!(types::NameOrId)), - ) - .about("Update a project's IAM policy") - } - - pub fn cli_system_component_version_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("View version and update status of component tree") - } - - pub fn cli_update_deployments_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List all update deployments") - } - - pub fn cli_update_deployment_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Fetch a system update deployment") - } - - pub fn cli_system_update_refresh() -> clap::Command { - clap::Command::new("").about("Refresh update data") - } - - pub fn cli_system_update_start() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("version") - .long("version") - .required(true) - .value_parser(clap::value_parser!(types::SemverVersion)), - ) - .about("Start system update") - } - - pub fn cli_system_update_stop() -> clap::Command { - clap::Command::new("") - .about("Stop system update\n\nIf there is no update in progress, do nothing.") - } - - pub fn cli_system_update_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("limit") - .long("limit") - .required(false) - .value_parser(clap::value_parser!(std::num::NonZeroU32)) - .help("Maximum number of items returned by a single call"), - ) - .arg( - clap::Arg::new("sort-by") - .long("sort-by") - .required(false) - .value_parser(clap::value_parser!(types::IdSortMode)), - ) - .about("List all updates") - } - - pub fn cli_system_update_view() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("version") - .long("version") - .required(true) - .value_parser(clap::value_parser!(types::SemverVersion)), - ) - .about("View system update") - } - - pub fn cli_system_update_components_list() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("version") - .long("version") - .required(true) - .value_parser(clap::value_parser!(types::SemverVersion)), - ) - .about("View system update component tree") - } - - pub fn cli_system_version() -> clap::Command { - clap::Command::new("").about("View system version and update status") - } -} - -impl Cli { - pub fn new_with_override(client: sdk::Client, over: T) -> Self { - Self { client, over } - } - - pub async fn execute(&self, cmd: CliCommand, matches: &clap::ArgMatches) { - match cmd { - CliCommand::DiskViewById => { - self.execute_disk_view_by_id(matches).await; - } - CliCommand::ImageViewById => { - self.execute_image_view_by_id(matches).await; - } - CliCommand::InstanceViewById => { - self.execute_instance_view_by_id(matches).await; - } - CliCommand::InstanceNetworkInterfaceViewById => { - self.execute_instance_network_interface_view_by_id(matches) - .await; - } - CliCommand::OrganizationViewById => { - self.execute_organization_view_by_id(matches).await; - } - CliCommand::ProjectViewById => { - self.execute_project_view_by_id(matches).await; - } - CliCommand::SnapshotViewById => { - self.execute_snapshot_view_by_id(matches).await; - } - CliCommand::VpcRouterRouteViewById => { - self.execute_vpc_router_route_view_by_id(matches).await; - } - CliCommand::VpcRouterViewById => { - self.execute_vpc_router_view_by_id(matches).await; - } - CliCommand::VpcSubnetViewById => { - self.execute_vpc_subnet_view_by_id(matches).await; - } - CliCommand::VpcViewById => { - self.execute_vpc_view_by_id(matches).await; - } - CliCommand::DeviceAuthRequest => { - self.execute_device_auth_request(matches).await; - } - CliCommand::DeviceAuthConfirm => { - self.execute_device_auth_confirm(matches).await; - } - CliCommand::DeviceAccessToken => { - self.execute_device_access_token(matches).await; - } - CliCommand::GroupList => { - self.execute_group_list(matches).await; - } - CliCommand::LoginSpoof => { - self.execute_login_spoof(matches).await; - } - CliCommand::LoginLocal => { - self.execute_login_local(matches).await; - } - CliCommand::LoginSamlBegin => { - self.execute_login_saml_begin(matches).await; - } - CliCommand::LoginSaml => { - self.execute_login_saml(matches).await; - } - CliCommand::Logout => { - self.execute_logout(matches).await; - } - CliCommand::OrganizationList => { - self.execute_organization_list(matches).await; - } - CliCommand::OrganizationCreate => { - self.execute_organization_create(matches).await; - } - CliCommand::OrganizationView => { - self.execute_organization_view(matches).await; - } - CliCommand::OrganizationUpdate => { - self.execute_organization_update(matches).await; - } - CliCommand::OrganizationDelete => { - self.execute_organization_delete(matches).await; - } - CliCommand::OrganizationPolicyView => { - self.execute_organization_policy_view(matches).await; - } - CliCommand::OrganizationPolicyUpdate => { - self.execute_organization_policy_update(matches).await; - } - CliCommand::ProjectList => { - self.execute_project_list(matches).await; - } - CliCommand::ProjectCreate => { - self.execute_project_create(matches).await; - } - CliCommand::ProjectView => { - self.execute_project_view(matches).await; - } - CliCommand::ProjectUpdate => { - self.execute_project_update(matches).await; - } - CliCommand::ProjectDelete => { - self.execute_project_delete(matches).await; - } - CliCommand::DiskList => { - self.execute_disk_list(matches).await; - } - CliCommand::DiskCreate => { - self.execute_disk_create(matches).await; - } - CliCommand::DiskView => { - self.execute_disk_view(matches).await; - } - CliCommand::DiskDelete => { - self.execute_disk_delete(matches).await; - } - CliCommand::DiskMetricsList => { - self.execute_disk_metrics_list(matches).await; - } - CliCommand::ImageList => { - self.execute_image_list(matches).await; - } - CliCommand::ImageCreate => { - self.execute_image_create(matches).await; - } - CliCommand::ImageView => { - self.execute_image_view(matches).await; - } - CliCommand::ImageDelete => { - self.execute_image_delete(matches).await; - } - CliCommand::InstanceList => { - self.execute_instance_list(matches).await; - } - CliCommand::InstanceCreate => { - self.execute_instance_create(matches).await; - } - CliCommand::InstanceView => { - self.execute_instance_view(matches).await; - } - CliCommand::InstanceDelete => { - self.execute_instance_delete(matches).await; - } - CliCommand::InstanceDiskList => { - self.execute_instance_disk_list(matches).await; - } - CliCommand::InstanceDiskAttach => { - self.execute_instance_disk_attach(matches).await; - } - CliCommand::InstanceDiskDetach => { - self.execute_instance_disk_detach(matches).await; - } - CliCommand::InstanceExternalIpList => { - self.execute_instance_external_ip_list(matches).await; - } - CliCommand::InstanceMigrate => { - self.execute_instance_migrate(matches).await; - } - CliCommand::InstanceNetworkInterfaceList => { - self.execute_instance_network_interface_list(matches).await; - } - CliCommand::InstanceNetworkInterfaceCreate => { - self.execute_instance_network_interface_create(matches) - .await; - } - CliCommand::InstanceNetworkInterfaceView => { - self.execute_instance_network_interface_view(matches).await; - } - CliCommand::InstanceNetworkInterfaceUpdate => { - self.execute_instance_network_interface_update(matches) - .await; - } - CliCommand::InstanceNetworkInterfaceDelete => { - self.execute_instance_network_interface_delete(matches) - .await; - } - CliCommand::InstanceReboot => { - self.execute_instance_reboot(matches).await; - } - CliCommand::InstanceSerialConsole => { - self.execute_instance_serial_console(matches).await; - } - CliCommand::InstanceSerialConsoleStream => { - self.execute_instance_serial_console_stream(matches).await; - } - CliCommand::InstanceStart => { - self.execute_instance_start(matches).await; - } - CliCommand::InstanceStop => { - self.execute_instance_stop(matches).await; - } - CliCommand::ProjectPolicyView => { - self.execute_project_policy_view(matches).await; - } - CliCommand::ProjectPolicyUpdate => { - self.execute_project_policy_update(matches).await; - } - CliCommand::SnapshotList => { - self.execute_snapshot_list(matches).await; - } - CliCommand::SnapshotCreate => { - self.execute_snapshot_create(matches).await; - } - CliCommand::SnapshotView => { - self.execute_snapshot_view(matches).await; - } - CliCommand::SnapshotDelete => { - self.execute_snapshot_delete(matches).await; - } - CliCommand::VpcList => { - self.execute_vpc_list(matches).await; - } - CliCommand::VpcCreate => { - self.execute_vpc_create(matches).await; - } - CliCommand::VpcView => { - self.execute_vpc_view(matches).await; - } - CliCommand::VpcUpdate => { - self.execute_vpc_update(matches).await; - } - CliCommand::VpcDelete => { - self.execute_vpc_delete(matches).await; - } - CliCommand::VpcFirewallRulesView => { - self.execute_vpc_firewall_rules_view(matches).await; - } - CliCommand::VpcFirewallRulesUpdate => { - self.execute_vpc_firewall_rules_update(matches).await; - } - CliCommand::VpcRouterList => { - self.execute_vpc_router_list(matches).await; - } - CliCommand::VpcRouterCreate => { - self.execute_vpc_router_create(matches).await; - } - CliCommand::VpcRouterView => { - self.execute_vpc_router_view(matches).await; - } - CliCommand::VpcRouterUpdate => { - self.execute_vpc_router_update(matches).await; - } - CliCommand::VpcRouterDelete => { - self.execute_vpc_router_delete(matches).await; - } - CliCommand::VpcRouterRouteList => { - self.execute_vpc_router_route_list(matches).await; - } - CliCommand::VpcRouterRouteCreate => { - self.execute_vpc_router_route_create(matches).await; - } - CliCommand::VpcRouterRouteView => { - self.execute_vpc_router_route_view(matches).await; - } - CliCommand::VpcRouterRouteUpdate => { - self.execute_vpc_router_route_update(matches).await; - } - CliCommand::VpcRouterRouteDelete => { - self.execute_vpc_router_route_delete(matches).await; - } - CliCommand::VpcSubnetList => { - self.execute_vpc_subnet_list(matches).await; - } - CliCommand::VpcSubnetCreate => { - self.execute_vpc_subnet_create(matches).await; - } - CliCommand::VpcSubnetView => { - self.execute_vpc_subnet_view(matches).await; - } - CliCommand::VpcSubnetUpdate => { - self.execute_vpc_subnet_update(matches).await; - } - CliCommand::VpcSubnetDelete => { - self.execute_vpc_subnet_delete(matches).await; - } - CliCommand::VpcSubnetListNetworkInterfaces => { - self.execute_vpc_subnet_list_network_interfaces(matches) - .await; - } - CliCommand::PolicyView => { - self.execute_policy_view(matches).await; - } - CliCommand::PolicyUpdate => { - self.execute_policy_update(matches).await; - } - CliCommand::RoleList => { - self.execute_role_list(matches).await; - } - CliCommand::RoleView => { - self.execute_role_view(matches).await; - } - CliCommand::SessionMe => { - self.execute_session_me(matches).await; - } - CliCommand::SessionMeGroups => { - self.execute_session_me_groups(matches).await; - } - CliCommand::SessionSshkeyList => { - self.execute_session_sshkey_list(matches).await; - } - CliCommand::SessionSshkeyCreate => { - self.execute_session_sshkey_create(matches).await; - } - CliCommand::SessionSshkeyView => { - self.execute_session_sshkey_view(matches).await; - } - CliCommand::SessionSshkeyDelete => { - self.execute_session_sshkey_delete(matches).await; - } - CliCommand::SystemImageViewById => { - self.execute_system_image_view_by_id(matches).await; - } - CliCommand::IpPoolViewById => { - self.execute_ip_pool_view_by_id(matches).await; - } - CliCommand::SiloViewById => { - self.execute_silo_view_by_id(matches).await; - } - CliCommand::CertificateList => { - self.execute_certificate_list(matches).await; - } - CliCommand::CertificateCreate => { - self.execute_certificate_create(matches).await; - } - CliCommand::CertificateView => { - self.execute_certificate_view(matches).await; - } - CliCommand::CertificateDelete => { - self.execute_certificate_delete(matches).await; - } - CliCommand::PhysicalDiskList => { - self.execute_physical_disk_list(matches).await; - } - CliCommand::RackList => { - self.execute_rack_list(matches).await; - } - CliCommand::RackView => { - self.execute_rack_view(matches).await; - } - CliCommand::SledList => { - self.execute_sled_list(matches).await; - } - CliCommand::SledView => { - self.execute_sled_view(matches).await; - } - CliCommand::SledPhysicalDiskList => { - self.execute_sled_physical_disk_list(matches).await; - } - CliCommand::SystemImageList => { - self.execute_system_image_list(matches).await; - } - CliCommand::SystemImageCreate => { - self.execute_system_image_create(matches).await; - } - CliCommand::SystemImageView => { - self.execute_system_image_view(matches).await; - } - CliCommand::SystemImageDelete => { - self.execute_system_image_delete(matches).await; - } - CliCommand::IpPoolList => { - self.execute_ip_pool_list(matches).await; - } - CliCommand::IpPoolCreate => { - self.execute_ip_pool_create(matches).await; - } - CliCommand::IpPoolView => { - self.execute_ip_pool_view(matches).await; - } - CliCommand::IpPoolUpdate => { - self.execute_ip_pool_update(matches).await; - } - CliCommand::IpPoolDelete => { - self.execute_ip_pool_delete(matches).await; - } - CliCommand::IpPoolRangeList => { - self.execute_ip_pool_range_list(matches).await; - } - CliCommand::IpPoolRangeAdd => { - self.execute_ip_pool_range_add(matches).await; - } - CliCommand::IpPoolRangeRemove => { - self.execute_ip_pool_range_remove(matches).await; - } - CliCommand::IpPoolServiceView => { - self.execute_ip_pool_service_view(matches).await; - } - CliCommand::IpPoolServiceRangeList => { - self.execute_ip_pool_service_range_list(matches).await; - } - CliCommand::IpPoolServiceRangeAdd => { - self.execute_ip_pool_service_range_add(matches).await; - } - CliCommand::IpPoolServiceRangeRemove => { - self.execute_ip_pool_service_range_remove(matches).await; - } - CliCommand::SystemMetric => { - self.execute_system_metric(matches).await; - } - CliCommand::SystemPolicyView => { - self.execute_system_policy_view(matches).await; - } - CliCommand::SystemPolicyUpdate => { - self.execute_system_policy_update(matches).await; - } - CliCommand::SagaList => { - self.execute_saga_list(matches).await; - } - CliCommand::SagaView => { - self.execute_saga_view(matches).await; - } - CliCommand::SiloList => { - self.execute_silo_list(matches).await; - } - CliCommand::SiloCreate => { - self.execute_silo_create(matches).await; - } - CliCommand::SiloView => { - self.execute_silo_view(matches).await; - } - CliCommand::SiloDelete => { - self.execute_silo_delete(matches).await; - } - CliCommand::SiloIdentityProviderList => { - self.execute_silo_identity_provider_list(matches).await; - } - CliCommand::LocalIdpUserCreate => { - self.execute_local_idp_user_create(matches).await; - } - CliCommand::LocalIdpUserDelete => { - self.execute_local_idp_user_delete(matches).await; - } - CliCommand::LocalIdpUserSetPassword => { - self.execute_local_idp_user_set_password(matches).await; - } - CliCommand::SamlIdentityProviderCreate => { - self.execute_saml_identity_provider_create(matches).await; - } - CliCommand::SamlIdentityProviderView => { - self.execute_saml_identity_provider_view(matches).await; - } - CliCommand::SiloPolicyView => { - self.execute_silo_policy_view(matches).await; - } - CliCommand::SiloPolicyUpdate => { - self.execute_silo_policy_update(matches).await; - } - CliCommand::SiloUsersList => { - self.execute_silo_users_list(matches).await; - } - CliCommand::SiloUserView => { - self.execute_silo_user_view(matches).await; - } - CliCommand::SystemUserList => { - self.execute_system_user_list(matches).await; - } - CliCommand::SystemUserView => { - self.execute_system_user_view(matches).await; - } - CliCommand::TimeseriesSchemaGet => { - self.execute_timeseries_schema_get(matches).await; - } - CliCommand::UserList => { - self.execute_user_list(matches).await; - } - CliCommand::DiskListV1 => { - self.execute_disk_list_v1(matches).await; - } - CliCommand::DiskCreateV1 => { - self.execute_disk_create_v1(matches).await; - } - CliCommand::DiskViewV1 => { - self.execute_disk_view_v1(matches).await; - } - CliCommand::DiskDeleteV1 => { - self.execute_disk_delete_v1(matches).await; - } - CliCommand::InstanceListV1 => { - self.execute_instance_list_v1(matches).await; - } - CliCommand::InstanceCreateV1 => { - self.execute_instance_create_v1(matches).await; - } - CliCommand::InstanceViewV1 => { - self.execute_instance_view_v1(matches).await; - } - CliCommand::InstanceDeleteV1 => { - self.execute_instance_delete_v1(matches).await; - } - CliCommand::InstanceDiskListV1 => { - self.execute_instance_disk_list_v1(matches).await; - } - CliCommand::InstanceDiskAttachV1 => { - self.execute_instance_disk_attach_v1(matches).await; - } - CliCommand::InstanceDiskDetachV1 => { - self.execute_instance_disk_detach_v1(matches).await; - } - CliCommand::InstanceMigrateV1 => { - self.execute_instance_migrate_v1(matches).await; - } - CliCommand::InstanceRebootV1 => { - self.execute_instance_reboot_v1(matches).await; - } - CliCommand::InstanceSerialConsoleV1 => { - self.execute_instance_serial_console_v1(matches).await; - } - CliCommand::InstanceSerialConsoleStreamV1 => { - self.execute_instance_serial_console_stream_v1(matches) - .await; - } - CliCommand::InstanceStartV1 => { - self.execute_instance_start_v1(matches).await; - } - CliCommand::InstanceStopV1 => { - self.execute_instance_stop_v1(matches).await; - } - CliCommand::OrganizationListV1 => { - self.execute_organization_list_v1(matches).await; - } - CliCommand::OrganizationCreateV1 => { - self.execute_organization_create_v1(matches).await; - } - CliCommand::OrganizationViewV1 => { - self.execute_organization_view_v1(matches).await; - } - CliCommand::OrganizationUpdateV1 => { - self.execute_organization_update_v1(matches).await; - } - CliCommand::OrganizationDeleteV1 => { - self.execute_organization_delete_v1(matches).await; - } - CliCommand::OrganizationPolicyViewV1 => { - self.execute_organization_policy_view_v1(matches).await; - } - CliCommand::OrganizationPolicyUpdateV1 => { - self.execute_organization_policy_update_v1(matches).await; - } - CliCommand::ProjectListV1 => { - self.execute_project_list_v1(matches).await; - } - CliCommand::ProjectCreateV1 => { - self.execute_project_create_v1(matches).await; - } - CliCommand::ProjectViewV1 => { - self.execute_project_view_v1(matches).await; - } - CliCommand::ProjectUpdateV1 => { - self.execute_project_update_v1(matches).await; - } - CliCommand::ProjectDeleteV1 => { - self.execute_project_delete_v1(matches).await; - } - CliCommand::ProjectPolicyViewV1 => { - self.execute_project_policy_view_v1(matches).await; - } - CliCommand::ProjectPolicyUpdateV1 => { - self.execute_project_policy_update_v1(matches).await; - } - CliCommand::SystemComponentVersionList => { - self.execute_system_component_version_list(matches).await; - } - CliCommand::UpdateDeploymentsList => { - self.execute_update_deployments_list(matches).await; - } - CliCommand::UpdateDeploymentView => { - self.execute_update_deployment_view(matches).await; - } - CliCommand::SystemUpdateRefresh => { - self.execute_system_update_refresh(matches).await; - } - CliCommand::SystemUpdateStart => { - self.execute_system_update_start(matches).await; - } - CliCommand::SystemUpdateStop => { - self.execute_system_update_stop(matches).await; - } - CliCommand::SystemUpdateList => { - self.execute_system_update_list(matches).await; - } - CliCommand::SystemUpdateView => { - self.execute_system_update_view(matches).await; - } - CliCommand::SystemUpdateComponentsList => { - self.execute_system_update_components_list(matches).await; - } - CliCommand::SystemVersion => { - self.execute_system_version(matches).await; - } - } - } - - pub async fn execute_disk_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_disk_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_image_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.image_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_image_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_instance_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_network_interface_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_network_interface_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_instance_network_interface_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_organization_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_project_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_snapshot_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.snapshot_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_snapshot_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_route_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_route_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_vpc_router_route_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_vpc_router_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_subnet_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_subnet_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_vpc_subnet_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_vpc_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_device_auth_request(&self, matches: &clap::ArgMatches) { - let mut request = self.client.device_auth_request(); - if let Some(value) = matches.get_one::("client-id") { - request = request.body_map(|body| body.client_id(value.clone())) - } - - self.over - .execute_device_auth_request(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - todo!() - } - } - } - - pub async fn execute_device_auth_confirm(&self, matches: &clap::ArgMatches) { - let mut request = self.client.device_auth_confirm(); - if let Some(value) = matches.get_one::("user-code") { - request = request.body_map(|body| body.user_code(value.clone())) - } - - self.over - .execute_device_auth_confirm(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_device_access_token(&self, matches: &clap::ArgMatches) { - let mut request = self.client.device_access_token(); - if let Some(value) = matches.get_one::("client-id") { - request = request.body_map(|body| body.client_id(value.clone())) - } - - if let Some(value) = matches.get_one::("device-code") { - request = request.body_map(|body| body.device_code(value.clone())) - } - - if let Some(value) = matches.get_one::("grant-type") { - request = request.body_map(|body| body.grant_type(value.clone())) - } - - self.over - .execute_device_access_token(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - todo!() - } - } - } - - pub async fn execute_group_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.group_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_group_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_login_spoof(&self, matches: &clap::ArgMatches) { - let mut request = self.client.login_spoof(); - if let Some(value) = matches.get_one::("username") { - request = request.body_map(|body| body.username(value.clone())) - } - - self.over - .execute_login_spoof(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_login_local(&self, matches: &clap::ArgMatches) { - let mut request = self.client.login_local(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("password") { - request = request.body_map(|body| body.password(value.clone())) - } - - if let Some(value) = matches.get_one::("username") { - request = request.body_map(|body| body.username(value.clone())) - } - - self.over - .execute_login_local(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_login_saml_begin(&self, matches: &clap::ArgMatches) { - let mut request = self.client.login_saml_begin(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("provider-name") { - request = request.provider_name(value.clone()); - } - - self.over - .execute_login_saml_begin(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_login_saml(&self, matches: &clap::ArgMatches) { - let mut request = self.client.login_saml(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("provider-name") { - request = request.provider_name(value.clone()); - } - - self.over.execute_login_saml(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_logout(&self, matches: &clap::ArgMatches) { - let mut request = self.client.logout(); - self.over.execute_logout(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_organization_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_create(); - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_organization_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - self.over - .execute_organization_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_organization_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - self.over - .execute_organization_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_policy_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_policy_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - self.over - .execute_organization_policy_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_policy_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_policy_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - self.over - .execute_organization_policy_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_project_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_project_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - self.over - .execute_project_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_project_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - self.over - .execute_project_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_disk_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("size") { - request = request.body_map(|body| body.size(value.clone())) - } - - self.over - .execute_disk_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("disk-name") { - request = request.disk_name(value.clone()); - } - - self.over.execute_disk_view(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("disk-name") { - request = request.disk_name(value.clone()); - } - - self.over - .execute_disk_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_metrics_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_metrics_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("disk-name") { - request = request.disk_name(value.clone()); - } - - if let Some(value) = matches.get_one::("metric-name") { - request = request.metric_name(value.clone()); - } - - if let Some(value) = matches.get_one::>("end-time") { - request = request.end_time(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::>("start-time") - { - request = request.start_time(value.clone()); - } - - self.over - .execute_disk_metrics_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_image_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.image_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_image_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_image_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.image_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_image_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_image_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.image_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("image-name") { - request = request.image_name(value.clone()); - } - - self.over.execute_image_view(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_image_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.image_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("image-name") { - request = request.image_name(value.clone()); - } - - self.over - .execute_image_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_instance_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("hostname") { - request = request.body_map(|body| body.hostname(value.clone())) - } - - if let Some(value) = matches.get_one::("memory") { - request = request.body_map(|body| body.memory(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("ncpus") { - request = request.body_map(|body| body.ncpus(value.clone())) - } - - if let Some(value) = matches.get_one::("start") { - request = request.body_map(|body| body.start(value.clone())) - } - - if let Some(value) = matches.get_one::("user-data") { - request = request.body_map(|body| body.user_data(value.clone())) - } - - self.over - .execute_instance_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - self.over - .execute_instance_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - self.over - .execute_instance_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_disk_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_disk_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_instance_disk_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_disk_attach(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_disk_attach(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_instance_disk_attach(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_disk_detach(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_disk_detach(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_instance_disk_detach(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_external_ip_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_external_ip_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - self.over - .execute_instance_external_ip_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_migrate(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_migrate(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("dst-sled-id") { - request = request.body_map(|body| body.dst_sled_id(value.clone())) - } - - self.over - .execute_instance_migrate(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_network_interface_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_network_interface_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_instance_network_interface_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_network_interface_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_network_interface_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("ip") { - request = request.body_map(|body| body.ip(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("subnet-name") { - request = request.body_map(|body| body.subnet_name(value.clone())) - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.body_map(|body| body.vpc_name(value.clone())) - } - - self.over - .execute_instance_network_interface_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_network_interface_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_network_interface_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("interface-name") { - request = request.interface_name(value.clone()); - } - - self.over - .execute_instance_network_interface_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_network_interface_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_network_interface_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("interface-name") { - request = request.interface_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("primary") { - request = request.body_map(|body| body.primary(value.clone())) - } - - self.over - .execute_instance_network_interface_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_network_interface_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_network_interface_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("interface-name") { - request = request.interface_name(value.clone()); - } - - self.over - .execute_instance_network_interface_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_reboot(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_reboot(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - self.over - .execute_instance_reboot(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_serial_console(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_serial_console(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - if let Some(value) = matches.get_one::("from-start") { - request = request.from_start(value.clone()); - } - - if let Some(value) = matches.get_one::("max-bytes") { - request = request.max_bytes(value.clone()); - } - - if let Some(value) = matches.get_one::("most-recent") { - request = request.most_recent(value.clone()); - } - - self.over - .execute_instance_serial_console(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_serial_console_stream(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_serial_console_stream(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - self.over - .execute_instance_serial_console_stream(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - todo!() - } - } - } - - pub async fn execute_instance_start(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_start(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - self.over - .execute_instance_start(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_stop(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_stop(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("instance-name") { - request = request.instance_name(value.clone()); - } - - self.over - .execute_instance_stop(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_policy_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_policy_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - self.over - .execute_project_policy_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_policy_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_policy_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - self.over - .execute_project_policy_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_snapshot_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.snapshot_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_snapshot_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_snapshot_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.snapshot_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("disk") { - request = request.body_map(|body| body.disk(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_snapshot_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_snapshot_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.snapshot_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("snapshot-name") { - request = request.snapshot_name(value.clone()); - } - - self.over - .execute_snapshot_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_snapshot_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.snapshot_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("snapshot-name") { - request = request.snapshot_name(value.clone()); - } - - self.over - .execute_snapshot_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_vpc_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("dns-name") { - request = request.body_map(|body| body.dns_name(value.clone())) - } - - if let Some(value) = matches.get_one::("ipv6-prefix") { - request = request.body_map(|body| body.ipv6_prefix(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over.execute_vpc_create(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - self.over.execute_vpc_view(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("dns-name") { - request = request.body_map(|body| body.dns_name(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over.execute_vpc_update(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - self.over.execute_vpc_delete(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_firewall_rules_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_firewall_rules_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - self.over - .execute_vpc_firewall_rules_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_firewall_rules_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_firewall_rules_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - self.over - .execute_vpc_firewall_rules_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_vpc_router_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_vpc_router_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("router-name") { - request = request.router_name(value.clone()); - } - - self.over - .execute_vpc_router_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("router-name") { - request = request.router_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_vpc_router_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("router-name") { - request = request.router_name(value.clone()); - } - - self.over - .execute_vpc_router_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_route_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_route_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("router-name") { - request = request.router_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_vpc_router_route_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_route_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_route_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("router-name") { - request = request.router_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_vpc_router_route_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_route_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_route_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("router-name") { - request = request.router_name(value.clone()); - } - - if let Some(value) = matches.get_one::("route-name") { - request = request.route_name(value.clone()); - } - - self.over - .execute_vpc_router_route_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_route_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_route_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("router-name") { - request = request.router_name(value.clone()); - } - - if let Some(value) = matches.get_one::("route-name") { - request = request.route_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_vpc_router_route_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_router_route_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_router_route_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("router-name") { - request = request.router_name(value.clone()); - } - - if let Some(value) = matches.get_one::("route-name") { - request = request.route_name(value.clone()); - } - - self.over - .execute_vpc_router_route_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_subnet_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_subnet_list(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_vpc_subnet_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_subnet_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_subnet_create(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("ipv4-block") { - request = request.body_map(|body| body.ipv4_block(value.clone())) - } - - if let Some(value) = matches.get_one::("ipv6-block") { - request = request.body_map(|body| body.ipv6_block(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_vpc_subnet_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_subnet_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_subnet_view(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("subnet-name") { - request = request.subnet_name(value.clone()); - } - - self.over - .execute_vpc_subnet_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_subnet_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_subnet_update(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("subnet-name") { - request = request.subnet_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_vpc_subnet_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_subnet_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_subnet_delete(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("subnet-name") { - request = request.subnet_name(value.clone()); - } - - self.over - .execute_vpc_subnet_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_vpc_subnet_list_network_interfaces(&self, matches: &clap::ArgMatches) { - let mut request = self.client.vpc_subnet_list_network_interfaces(); - if let Some(value) = matches.get_one::("organization-name") { - request = request.organization_name(value.clone()); - } - - if let Some(value) = matches.get_one::("project-name") { - request = request.project_name(value.clone()); - } - - if let Some(value) = matches.get_one::("vpc-name") { - request = request.vpc_name(value.clone()); - } - - if let Some(value) = matches.get_one::("subnet-name") { - request = request.subnet_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_vpc_subnet_list_network_interfaces(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_policy_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.policy_view(); - self.over - .execute_policy_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_policy_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.policy_update(); - self.over - .execute_policy_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_role_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.role_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - self.over.execute_role_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_role_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.role_view(); - if let Some(value) = matches.get_one::("role-name") { - request = request.role_name(value.clone()); - } - - self.over.execute_role_view(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_session_me(&self, matches: &clap::ArgMatches) { - let mut request = self.client.session_me(); - self.over.execute_session_me(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_session_me_groups(&self, matches: &clap::ArgMatches) { - let mut request = self.client.session_me_groups(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_session_me_groups(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_session_sshkey_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.session_sshkey_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_session_sshkey_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_session_sshkey_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.session_sshkey_create(); - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("public-key") { - request = request.body_map(|body| body.public_key(value.clone())) - } - - self.over - .execute_session_sshkey_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_session_sshkey_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.session_sshkey_view(); - if let Some(value) = matches.get_one::("ssh-key-name") { - request = request.ssh_key_name(value.clone()); - } - - self.over - .execute_session_sshkey_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_session_sshkey_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.session_sshkey_delete(); - if let Some(value) = matches.get_one::("ssh-key-name") { - request = request.ssh_key_name(value.clone()); - } - - self.over - .execute_session_sshkey_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_image_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_image_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_system_image_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_ip_pool_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_view_by_id(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_view_by_id(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_silo_view_by_id(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_certificate_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.certificate_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_certificate_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_certificate_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.certificate_create(); - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("service") { - request = request.body_map(|body| body.service(value.clone())) - } - - self.over - .execute_certificate_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_certificate_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.certificate_view(); - if let Some(value) = matches.get_one::("certificate") { - request = request.certificate(value.clone()); - } - - self.over - .execute_certificate_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_certificate_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.certificate_delete(); - if let Some(value) = matches.get_one::("certificate") { - request = request.certificate(value.clone()); - } - - self.over - .execute_certificate_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_physical_disk_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.physical_disk_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_physical_disk_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_rack_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.rack_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_rack_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_rack_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.rack_view(); - if let Some(value) = matches.get_one::("rack-id") { - request = request.rack_id(value.clone()); - } - - self.over.execute_rack_view(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_sled_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.sled_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_sled_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_sled_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.sled_view(); - if let Some(value) = matches.get_one::("sled-id") { - request = request.sled_id(value.clone()); - } - - self.over.execute_sled_view(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_sled_physical_disk_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.sled_physical_disk_list(); - if let Some(value) = matches.get_one::("sled-id") { - request = request.sled_id(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_sled_physical_disk_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_image_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_image_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_system_image_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_image_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_image_create(); - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_system_image_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_image_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_image_view(); - if let Some(value) = matches.get_one::("image-name") { - request = request.image_name(value.clone()); - } - - self.over - .execute_system_image_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_image_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_image_delete(); - if let Some(value) = matches.get_one::("image-name") { - request = request.image_name(value.clone()); - } - - self.over - .execute_system_image_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_ip_pool_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_create(); - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_ip_pool_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_view(); - if let Some(value) = matches.get_one::("pool-name") { - request = request.pool_name(value.clone()); - } - - self.over - .execute_ip_pool_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_update(); - if let Some(value) = matches.get_one::("pool-name") { - request = request.pool_name(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_ip_pool_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_delete(); - if let Some(value) = matches.get_one::("pool-name") { - request = request.pool_name(value.clone()); - } - - self.over - .execute_ip_pool_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_range_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_range_list(); - if let Some(value) = matches.get_one::("pool-name") { - request = request.pool_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - self.over - .execute_ip_pool_range_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_range_add(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_range_add(); - if let Some(value) = matches.get_one::("pool-name") { - request = request.pool_name(value.clone()); - } - - self.over - .execute_ip_pool_range_add(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_range_remove(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_range_remove(); - if let Some(value) = matches.get_one::("pool-name") { - request = request.pool_name(value.clone()); - } - - self.over - .execute_ip_pool_range_remove(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_service_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_service_view(); - self.over - .execute_ip_pool_service_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_service_range_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_service_range_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - self.over - .execute_ip_pool_service_range_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_service_range_add(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_service_range_add(); - self.over - .execute_ip_pool_service_range_add(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_ip_pool_service_range_remove(&self, matches: &clap::ArgMatches) { - let mut request = self.client.ip_pool_service_range_remove(); - self.over - .execute_ip_pool_service_range_remove(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_metric(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_metric(); - if let Some(value) = matches.get_one::("metric-name") { - request = request.metric_name(value.clone()); - } - - if let Some(value) = matches.get_one::>("end-time") { - request = request.end_time(value.clone()); - } - - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("page-token") { - request = request.page_token(value.clone()); - } - - if let Some(value) = matches.get_one::>("start-time") - { - request = request.start_time(value.clone()); - } - - self.over - .execute_system_metric(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_policy_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_policy_view(); - self.over - .execute_system_policy_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_policy_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_policy_update(); - self.over - .execute_system_policy_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_saga_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.saga_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_saga_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_saga_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.saga_view(); - if let Some(value) = matches.get_one::("saga-id") { - request = request.saga_id(value.clone()); - } - - self.over.execute_saga_view(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_silo_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_create(); - if let Some(value) = matches.get_one::("admin-group-name") { - request = request.body_map(|body| body.admin_group_name(value.clone())) - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("discoverable") { - request = request.body_map(|body| body.discoverable(value.clone())) - } - - if let Some(value) = matches.get_one::("identity-mode") { - request = request.body_map(|body| body.identity_mode(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_silo_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_view(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - self.over.execute_silo_view(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_delete(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - self.over - .execute_silo_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_identity_provider_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_identity_provider_list(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_silo_identity_provider_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_local_idp_user_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.local_idp_user_create(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("external-id") { - request = request.body_map(|body| body.external_id(value.clone())) - } - - self.over - .execute_local_idp_user_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_local_idp_user_delete(&self, matches: &clap::ArgMatches) { - let mut request = self.client.local_idp_user_delete(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("user-id") { - request = request.user_id(value.clone()); - } - - self.over - .execute_local_idp_user_delete(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_local_idp_user_set_password(&self, matches: &clap::ArgMatches) { - let mut request = self.client.local_idp_user_set_password(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("user-id") { - request = request.user_id(value.clone()); - } - - self.over - .execute_local_idp_user_set_password(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_saml_identity_provider_create(&self, matches: &clap::ArgMatches) { - let mut request = self.client.saml_identity_provider_create(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("acs-url") { - request = request.body_map(|body| body.acs_url(value.clone())) - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("group-attribute-name") { - request = request.body_map(|body| body.group_attribute_name(value.clone())) - } - - if let Some(value) = matches.get_one::("idp-entity-id") { - request = request.body_map(|body| body.idp_entity_id(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("slo-url") { - request = request.body_map(|body| body.slo_url(value.clone())) - } - - if let Some(value) = matches.get_one::("sp-client-id") { - request = request.body_map(|body| body.sp_client_id(value.clone())) - } - - if let Some(value) = matches.get_one::("technical-contact-email") { - request = request.body_map(|body| body.technical_contact_email(value.clone())) - } - - self.over - .execute_saml_identity_provider_create(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_saml_identity_provider_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.saml_identity_provider_view(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("provider-name") { - request = request.provider_name(value.clone()); - } - - self.over - .execute_saml_identity_provider_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_policy_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_policy_view(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - self.over - .execute_silo_policy_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_policy_update(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_policy_update(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - self.over - .execute_silo_policy_update(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_users_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_users_list(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_silo_users_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_silo_user_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.silo_user_view(); - if let Some(value) = matches.get_one::("silo-name") { - request = request.silo_name(value.clone()); - } - - if let Some(value) = matches.get_one::("user-id") { - request = request.user_id(value.clone()); - } - - self.over - .execute_silo_user_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_user_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_user_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_system_user_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_user_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_user_view(); - if let Some(value) = matches.get_one::("user-name") { - request = request.user_name(value.clone()); - } - - self.over - .execute_system_user_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_timeseries_schema_get(&self, matches: &clap::ArgMatches) { - let mut request = self.client.timeseries_schema_get(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - self.over - .execute_timeseries_schema_get(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_user_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.user_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over.execute_user_list(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_list_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_list_v1(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_disk_list_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_create_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_create_v1(); - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("size") { - request = request.body_map(|body| body.size(value.clone())) - } - - self.over - .execute_disk_create_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_view_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_view_v1(); - if let Some(value) = matches.get_one::("disk") { - request = request.disk(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_disk_view_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_disk_delete_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.disk_delete_v1(); - if let Some(value) = matches.get_one::("disk") { - request = request.disk(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_disk_delete_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_list_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_list_v1(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_instance_list_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_create_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_create_v1(); - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("hostname") { - request = request.body_map(|body| body.hostname(value.clone())) - } - - if let Some(value) = matches.get_one::("memory") { - request = request.body_map(|body| body.memory(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - if let Some(value) = matches.get_one::("ncpus") { - request = request.body_map(|body| body.ncpus(value.clone())) - } - - if let Some(value) = matches.get_one::("start") { - request = request.body_map(|body| body.start(value.clone())) - } - - if let Some(value) = matches.get_one::("user-data") { - request = request.body_map(|body| body.user_data(value.clone())) - } - - self.over - .execute_instance_create_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_view_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_view_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_instance_view_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_delete_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_delete_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_instance_delete_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_disk_list_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_disk_list_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_instance_disk_list_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_disk_attach_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_disk_attach_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("disk") { - request = request.body_map(|body| body.disk(value.clone())) - } - - self.over - .execute_instance_disk_attach_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_disk_detach_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_disk_detach_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("disk") { - request = request.body_map(|body| body.disk(value.clone())) - } - - self.over - .execute_instance_disk_detach_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_migrate_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_migrate_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("dst-sled-id") { - request = request.body_map(|body| body.dst_sled_id(value.clone())) - } - - self.over - .execute_instance_migrate_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_reboot_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_reboot_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_instance_reboot_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_serial_console_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_serial_console_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("from-start") { - request = request.from_start(value.clone()); - } - - if let Some(value) = matches.get_one::("max-bytes") { - request = request.max_bytes(value.clone()); - } - - if let Some(value) = matches.get_one::("most-recent") { - request = request.most_recent(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_instance_serial_console_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_serial_console_stream_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_serial_console_stream_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_instance_serial_console_stream_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - todo!() - } - } - } - - pub async fn execute_instance_start_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_start_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_instance_start_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_stop_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_stop_v1(); - if let Some(value) = matches.get_one::("instance") { - request = request.instance(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - self.over - .execute_instance_stop_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_list_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_list_v1(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_organization_list_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_create_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_create_v1(); - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_organization_create_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_view_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_view_v1(); - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - self.over - .execute_organization_view_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_update_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_update_v1(); - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_organization_update_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_delete_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_delete_v1(); - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - self.over - .execute_organization_delete_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_policy_view_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_policy_view_v1(); - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - self.over - .execute_organization_policy_view_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_organization_policy_update_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.organization_policy_update_v1(); - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - self.over - .execute_organization_policy_update_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_list_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_list_v1(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_project_list_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_create_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_create_v1(); - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_project_create_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_view_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_view_v1(); - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - self.over - .execute_project_view_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_update_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_update_v1(); - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - if let Some(value) = matches.get_one::("description") { - request = request.body_map(|body| body.description(value.clone())) - } - - if let Some(value) = matches.get_one::("name") { - request = request.body_map(|body| body.name(value.clone())) - } - - self.over - .execute_project_update_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_delete_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_delete_v1(); - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - self.over - .execute_project_delete_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_policy_view_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_policy_view_v1(); - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - self.over - .execute_project_policy_view_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_project_policy_update_v1(&self, matches: &clap::ArgMatches) { - let mut request = self.client.project_policy_update_v1(); - if let Some(value) = matches.get_one::("project") { - request = request.project(value.clone()); - } - - if let Some(value) = matches.get_one::("organization") { - request = request.organization(value.clone()); - } - - self.over - .execute_project_policy_update_v1(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_component_version_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_component_version_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_system_component_version_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_update_deployments_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.update_deployments_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_update_deployments_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_update_deployment_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.update_deployment_view(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - self.over - .execute_update_deployment_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_update_refresh(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_update_refresh(); - self.over - .execute_system_update_refresh(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_update_start(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_update_start(); - if let Some(value) = matches.get_one::("version") { - request = request.body_map(|body| body.version(value.clone())) - } - - self.over - .execute_system_update_start(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_update_stop(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_update_stop(); - self.over - .execute_system_update_stop(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_update_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_update_list(); - if let Some(value) = matches.get_one::("limit") { - request = request.limit(value.clone()); - } - - if let Some(value) = matches.get_one::("sort-by") { - request = request.sort_by(value.clone()); - } - - self.over - .execute_system_update_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_update_view(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_update_view(); - if let Some(value) = matches.get_one::("version") { - request = request.version(value.clone()); - } - - self.over - .execute_system_update_view(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_update_components_list(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_update_components_list(); - if let Some(value) = matches.get_one::("version") { - request = request.version(value.clone()); - } - - self.over - .execute_system_update_components_list(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_system_version(&self, matches: &clap::ArgMatches) { - let mut request = self.client.system_version(); - self.over - .execute_system_version(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } -} - -pub trait CliOverride { - fn execute_disk_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_image_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ImageViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_network_interface_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceNetworkInterfaceViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_snapshot_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SnapshotViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_route_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterRouteViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_subnet_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcSubnetViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_device_auth_request( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DeviceAuthRequest, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_device_auth_confirm( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DeviceAuthConfirm, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_device_access_token( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DeviceAccessToken, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_group_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::GroupList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_login_spoof( - &self, - matches: &clap::ArgMatches, - request: &mut builder::LoginSpoof, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_login_local( - &self, - matches: &clap::ArgMatches, - request: &mut builder::LoginLocal, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_login_saml_begin( - &self, - matches: &clap::ArgMatches, - request: &mut builder::LoginSamlBegin, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_login_saml( - &self, - matches: &clap::ArgMatches, - request: &mut builder::LoginSaml, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_logout( - &self, - matches: &clap::ArgMatches, - request: &mut builder::Logout, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_policy_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationPolicyView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_policy_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationPolicyUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_metrics_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskMetricsList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_image_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ImageList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_image_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ImageCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_image_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ImageView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_image_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ImageDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_disk_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceDiskList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_disk_attach( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceDiskAttach, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_disk_detach( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceDiskDetach, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_external_ip_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceExternalIpList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_migrate( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceMigrate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_network_interface_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceNetworkInterfaceList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_network_interface_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceNetworkInterfaceCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_network_interface_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceNetworkInterfaceView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_network_interface_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceNetworkInterfaceUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_network_interface_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceNetworkInterfaceDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_reboot( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceReboot, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_serial_console( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceSerialConsole, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_serial_console_stream( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceSerialConsoleStream, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_start( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceStart, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_stop( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceStop, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_policy_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectPolicyView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_policy_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectPolicyUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_snapshot_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SnapshotList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_snapshot_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SnapshotCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_snapshot_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SnapshotView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_snapshot_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SnapshotDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_firewall_rules_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcFirewallRulesView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_firewall_rules_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcFirewallRulesUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_route_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterRouteList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_route_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterRouteCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_route_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterRouteView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_route_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterRouteUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_router_route_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcRouterRouteDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_subnet_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcSubnetList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_subnet_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcSubnetCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_subnet_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcSubnetView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_subnet_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcSubnetUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_subnet_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcSubnetDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_vpc_subnet_list_network_interfaces( - &self, - matches: &clap::ArgMatches, - request: &mut builder::VpcSubnetListNetworkInterfaces, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_policy_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::PolicyView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_policy_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::PolicyUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_role_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::RoleList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_role_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::RoleView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_session_me( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SessionMe, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_session_me_groups( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SessionMeGroups, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_session_sshkey_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SessionSshkeyList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_session_sshkey_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SessionSshkeyCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_session_sshkey_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SessionSshkeyView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_session_sshkey_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SessionSshkeyDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_image_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemImageViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_view_by_id( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloViewById, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_certificate_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::CertificateList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_certificate_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::CertificateCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_certificate_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::CertificateView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_certificate_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::CertificateDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_physical_disk_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::PhysicalDiskList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_rack_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::RackList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_rack_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::RackView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_sled_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SledList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_sled_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SledView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_sled_physical_disk_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SledPhysicalDiskList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_image_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemImageList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_image_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemImageCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_image_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemImageView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_image_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemImageDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_range_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolRangeList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_range_add( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolRangeAdd, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_range_remove( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolRangeRemove, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_service_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolServiceView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_service_range_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolServiceRangeList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_service_range_add( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolServiceRangeAdd, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_ip_pool_service_range_remove( - &self, - matches: &clap::ArgMatches, - request: &mut builder::IpPoolServiceRangeRemove, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_metric( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemMetric, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_policy_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemPolicyView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_policy_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemPolicyUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_saga_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SagaList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_saga_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SagaView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_identity_provider_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloIdentityProviderList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_local_idp_user_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::LocalIdpUserCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_local_idp_user_delete( - &self, - matches: &clap::ArgMatches, - request: &mut builder::LocalIdpUserDelete, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_local_idp_user_set_password( - &self, - matches: &clap::ArgMatches, - request: &mut builder::LocalIdpUserSetPassword, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_saml_identity_provider_create( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SamlIdentityProviderCreate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_saml_identity_provider_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SamlIdentityProviderView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_policy_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloPolicyView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_policy_update( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloPolicyUpdate, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_users_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloUsersList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_silo_user_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SiloUserView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_user_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemUserList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_user_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemUserView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_timeseries_schema_get( - &self, - matches: &clap::ArgMatches, - request: &mut builder::TimeseriesSchemaGet, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_user_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::UserList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_list_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskListV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_create_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskCreateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_view_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskViewV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_disk_delete_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::DiskDeleteV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_list_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceListV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_create_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceCreateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_view_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceViewV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_delete_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceDeleteV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_disk_list_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceDiskListV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_disk_attach_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceDiskAttachV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_disk_detach_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceDiskDetachV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_migrate_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceMigrateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_reboot_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceRebootV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_serial_console_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceSerialConsoleV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_serial_console_stream_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceSerialConsoleStreamV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_start_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceStartV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_stop_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceStopV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_list_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationListV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_create_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationCreateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_view_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationViewV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_update_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationUpdateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_delete_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationDeleteV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_policy_view_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationPolicyViewV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_organization_policy_update_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::OrganizationPolicyUpdateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_list_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectListV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_create_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectCreateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_view_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectViewV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_update_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectUpdateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_delete_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectDeleteV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_policy_view_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectPolicyViewV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_project_policy_update_v1( - &self, - matches: &clap::ArgMatches, - request: &mut builder::ProjectPolicyUpdateV1, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_component_version_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemComponentVersionList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_update_deployments_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::UpdateDeploymentsList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_update_deployment_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::UpdateDeploymentView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_update_refresh( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemUpdateRefresh, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_update_start( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemUpdateStart, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_update_stop( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemUpdateStop, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_update_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemUpdateList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_update_view( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemUpdateView, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_update_components_list( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemUpdateComponentsList, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_system_version( - &self, - matches: &clap::ArgMatches, - request: &mut builder::SystemVersion, - ) -> Result<(), String> { - Ok(()) - } -} - -impl CliOverride for () {} - -#[derive(Copy, Clone, Debug)] -pub enum CliCommand { - DiskViewById, - ImageViewById, - InstanceViewById, - InstanceNetworkInterfaceViewById, - OrganizationViewById, - ProjectViewById, - SnapshotViewById, - VpcRouterRouteViewById, - VpcRouterViewById, - VpcSubnetViewById, - VpcViewById, - DeviceAuthRequest, - DeviceAuthConfirm, - DeviceAccessToken, - GroupList, - LoginSpoof, - LoginLocal, - LoginSamlBegin, - LoginSaml, - Logout, - OrganizationList, - OrganizationCreate, - OrganizationView, - OrganizationUpdate, - OrganizationDelete, - OrganizationPolicyView, - OrganizationPolicyUpdate, - ProjectList, - ProjectCreate, - ProjectView, - ProjectUpdate, - ProjectDelete, - DiskList, - DiskCreate, - DiskView, - DiskDelete, - DiskMetricsList, - ImageList, - ImageCreate, - ImageView, - ImageDelete, - InstanceList, - InstanceCreate, - InstanceView, - InstanceDelete, - InstanceDiskList, - InstanceDiskAttach, - InstanceDiskDetach, - InstanceExternalIpList, - InstanceMigrate, - InstanceNetworkInterfaceList, - InstanceNetworkInterfaceCreate, - InstanceNetworkInterfaceView, - InstanceNetworkInterfaceUpdate, - InstanceNetworkInterfaceDelete, - InstanceReboot, - InstanceSerialConsole, - InstanceSerialConsoleStream, - InstanceStart, - InstanceStop, - ProjectPolicyView, - ProjectPolicyUpdate, - SnapshotList, - SnapshotCreate, - SnapshotView, - SnapshotDelete, - VpcList, - VpcCreate, - VpcView, - VpcUpdate, - VpcDelete, - VpcFirewallRulesView, - VpcFirewallRulesUpdate, - VpcRouterList, - VpcRouterCreate, - VpcRouterView, - VpcRouterUpdate, - VpcRouterDelete, - VpcRouterRouteList, - VpcRouterRouteCreate, - VpcRouterRouteView, - VpcRouterRouteUpdate, - VpcRouterRouteDelete, - VpcSubnetList, - VpcSubnetCreate, - VpcSubnetView, - VpcSubnetUpdate, - VpcSubnetDelete, - VpcSubnetListNetworkInterfaces, - PolicyView, - PolicyUpdate, - RoleList, - RoleView, - SessionMe, - SessionMeGroups, - SessionSshkeyList, - SessionSshkeyCreate, - SessionSshkeyView, - SessionSshkeyDelete, - SystemImageViewById, - IpPoolViewById, - SiloViewById, - CertificateList, - CertificateCreate, - CertificateView, - CertificateDelete, - PhysicalDiskList, - RackList, - RackView, - SledList, - SledView, - SledPhysicalDiskList, - SystemImageList, - SystemImageCreate, - SystemImageView, - SystemImageDelete, - IpPoolList, - IpPoolCreate, - IpPoolView, - IpPoolUpdate, - IpPoolDelete, - IpPoolRangeList, - IpPoolRangeAdd, - IpPoolRangeRemove, - IpPoolServiceView, - IpPoolServiceRangeList, - IpPoolServiceRangeAdd, - IpPoolServiceRangeRemove, - SystemMetric, - SystemPolicyView, - SystemPolicyUpdate, - SagaList, - SagaView, - SiloList, - SiloCreate, - SiloView, - SiloDelete, - SiloIdentityProviderList, - LocalIdpUserCreate, - LocalIdpUserDelete, - LocalIdpUserSetPassword, - SamlIdentityProviderCreate, - SamlIdentityProviderView, - SiloPolicyView, - SiloPolicyUpdate, - SiloUsersList, - SiloUserView, - SystemUserList, - SystemUserView, - TimeseriesSchemaGet, - UserList, - DiskListV1, - DiskCreateV1, - DiskViewV1, - DiskDeleteV1, - InstanceListV1, - InstanceCreateV1, - InstanceViewV1, - InstanceDeleteV1, - InstanceDiskListV1, - InstanceDiskAttachV1, - InstanceDiskDetachV1, - InstanceMigrateV1, - InstanceRebootV1, - InstanceSerialConsoleV1, - InstanceSerialConsoleStreamV1, - InstanceStartV1, - InstanceStopV1, - OrganizationListV1, - OrganizationCreateV1, - OrganizationViewV1, - OrganizationUpdateV1, - OrganizationDeleteV1, - OrganizationPolicyViewV1, - OrganizationPolicyUpdateV1, - ProjectListV1, - ProjectCreateV1, - ProjectViewV1, - ProjectUpdateV1, - ProjectDeleteV1, - ProjectPolicyViewV1, - ProjectPolicyUpdateV1, - SystemComponentVersionList, - UpdateDeploymentsList, - UpdateDeploymentView, - SystemUpdateRefresh, - SystemUpdateStart, - SystemUpdateStop, - SystemUpdateList, - SystemUpdateView, - SystemUpdateComponentsList, - SystemVersion, -} - -impl CliCommand { - pub fn iter() -> impl Iterator { - vec![ - CliCommand::DiskViewById, - CliCommand::ImageViewById, - CliCommand::InstanceViewById, - CliCommand::InstanceNetworkInterfaceViewById, - CliCommand::OrganizationViewById, - CliCommand::ProjectViewById, - CliCommand::SnapshotViewById, - CliCommand::VpcRouterRouteViewById, - CliCommand::VpcRouterViewById, - CliCommand::VpcSubnetViewById, - CliCommand::VpcViewById, - CliCommand::DeviceAuthRequest, - CliCommand::DeviceAuthConfirm, - CliCommand::DeviceAccessToken, - CliCommand::GroupList, - CliCommand::LoginSpoof, - CliCommand::LoginLocal, - CliCommand::LoginSamlBegin, - CliCommand::LoginSaml, - CliCommand::Logout, - CliCommand::OrganizationList, - CliCommand::OrganizationCreate, - CliCommand::OrganizationView, - CliCommand::OrganizationUpdate, - CliCommand::OrganizationDelete, - CliCommand::OrganizationPolicyView, - CliCommand::OrganizationPolicyUpdate, - CliCommand::ProjectList, - CliCommand::ProjectCreate, - CliCommand::ProjectView, - CliCommand::ProjectUpdate, - CliCommand::ProjectDelete, - CliCommand::DiskList, - CliCommand::DiskCreate, - CliCommand::DiskView, - CliCommand::DiskDelete, - CliCommand::DiskMetricsList, - CliCommand::ImageList, - CliCommand::ImageCreate, - CliCommand::ImageView, - CliCommand::ImageDelete, - CliCommand::InstanceList, - CliCommand::InstanceCreate, - CliCommand::InstanceView, - CliCommand::InstanceDelete, - CliCommand::InstanceDiskList, - CliCommand::InstanceDiskAttach, - CliCommand::InstanceDiskDetach, - CliCommand::InstanceExternalIpList, - CliCommand::InstanceMigrate, - CliCommand::InstanceNetworkInterfaceList, - CliCommand::InstanceNetworkInterfaceCreate, - CliCommand::InstanceNetworkInterfaceView, - CliCommand::InstanceNetworkInterfaceUpdate, - CliCommand::InstanceNetworkInterfaceDelete, - CliCommand::InstanceReboot, - CliCommand::InstanceSerialConsole, - CliCommand::InstanceSerialConsoleStream, - CliCommand::InstanceStart, - CliCommand::InstanceStop, - CliCommand::ProjectPolicyView, - CliCommand::ProjectPolicyUpdate, - CliCommand::SnapshotList, - CliCommand::SnapshotCreate, - CliCommand::SnapshotView, - CliCommand::SnapshotDelete, - CliCommand::VpcList, - CliCommand::VpcCreate, - CliCommand::VpcView, - CliCommand::VpcUpdate, - CliCommand::VpcDelete, - CliCommand::VpcFirewallRulesView, - CliCommand::VpcFirewallRulesUpdate, - CliCommand::VpcRouterList, - CliCommand::VpcRouterCreate, - CliCommand::VpcRouterView, - CliCommand::VpcRouterUpdate, - CliCommand::VpcRouterDelete, - CliCommand::VpcRouterRouteList, - CliCommand::VpcRouterRouteCreate, - CliCommand::VpcRouterRouteView, - CliCommand::VpcRouterRouteUpdate, - CliCommand::VpcRouterRouteDelete, - CliCommand::VpcSubnetList, - CliCommand::VpcSubnetCreate, - CliCommand::VpcSubnetView, - CliCommand::VpcSubnetUpdate, - CliCommand::VpcSubnetDelete, - CliCommand::VpcSubnetListNetworkInterfaces, - CliCommand::PolicyView, - CliCommand::PolicyUpdate, - CliCommand::RoleList, - CliCommand::RoleView, - CliCommand::SessionMe, - CliCommand::SessionMeGroups, - CliCommand::SessionSshkeyList, - CliCommand::SessionSshkeyCreate, - CliCommand::SessionSshkeyView, - CliCommand::SessionSshkeyDelete, - CliCommand::SystemImageViewById, - CliCommand::IpPoolViewById, - CliCommand::SiloViewById, - CliCommand::CertificateList, - CliCommand::CertificateCreate, - CliCommand::CertificateView, - CliCommand::CertificateDelete, - CliCommand::PhysicalDiskList, - CliCommand::RackList, - CliCommand::RackView, - CliCommand::SledList, - CliCommand::SledView, - CliCommand::SledPhysicalDiskList, - CliCommand::SystemImageList, - CliCommand::SystemImageCreate, - CliCommand::SystemImageView, - CliCommand::SystemImageDelete, - CliCommand::IpPoolList, - CliCommand::IpPoolCreate, - CliCommand::IpPoolView, - CliCommand::IpPoolUpdate, - CliCommand::IpPoolDelete, - CliCommand::IpPoolRangeList, - CliCommand::IpPoolRangeAdd, - CliCommand::IpPoolRangeRemove, - CliCommand::IpPoolServiceView, - CliCommand::IpPoolServiceRangeList, - CliCommand::IpPoolServiceRangeAdd, - CliCommand::IpPoolServiceRangeRemove, - CliCommand::SystemMetric, - CliCommand::SystemPolicyView, - CliCommand::SystemPolicyUpdate, - CliCommand::SagaList, - CliCommand::SagaView, - CliCommand::SiloList, - CliCommand::SiloCreate, - CliCommand::SiloView, - CliCommand::SiloDelete, - CliCommand::SiloIdentityProviderList, - CliCommand::LocalIdpUserCreate, - CliCommand::LocalIdpUserDelete, - CliCommand::LocalIdpUserSetPassword, - CliCommand::SamlIdentityProviderCreate, - CliCommand::SamlIdentityProviderView, - CliCommand::SiloPolicyView, - CliCommand::SiloPolicyUpdate, - CliCommand::SiloUsersList, - CliCommand::SiloUserView, - CliCommand::SystemUserList, - CliCommand::SystemUserView, - CliCommand::TimeseriesSchemaGet, - CliCommand::UserList, - CliCommand::DiskListV1, - CliCommand::DiskCreateV1, - CliCommand::DiskViewV1, - CliCommand::DiskDeleteV1, - CliCommand::InstanceListV1, - CliCommand::InstanceCreateV1, - CliCommand::InstanceViewV1, - CliCommand::InstanceDeleteV1, - CliCommand::InstanceDiskListV1, - CliCommand::InstanceDiskAttachV1, - CliCommand::InstanceDiskDetachV1, - CliCommand::InstanceMigrateV1, - CliCommand::InstanceRebootV1, - CliCommand::InstanceSerialConsoleV1, - CliCommand::InstanceSerialConsoleStreamV1, - CliCommand::InstanceStartV1, - CliCommand::InstanceStopV1, - CliCommand::OrganizationListV1, - CliCommand::OrganizationCreateV1, - CliCommand::OrganizationViewV1, - CliCommand::OrganizationUpdateV1, - CliCommand::OrganizationDeleteV1, - CliCommand::OrganizationPolicyViewV1, - CliCommand::OrganizationPolicyUpdateV1, - CliCommand::ProjectListV1, - CliCommand::ProjectCreateV1, - CliCommand::ProjectViewV1, - CliCommand::ProjectUpdateV1, - CliCommand::ProjectDeleteV1, - CliCommand::ProjectPolicyViewV1, - CliCommand::ProjectPolicyUpdateV1, - CliCommand::SystemComponentVersionList, - CliCommand::UpdateDeploymentsList, - CliCommand::UpdateDeploymentView, - CliCommand::SystemUpdateRefresh, - CliCommand::SystemUpdateStart, - CliCommand::SystemUpdateStop, - CliCommand::SystemUpdateList, - CliCommand::SystemUpdateView, - CliCommand::SystemUpdateComponentsList, - CliCommand::SystemVersion, - ] - .into_iter() - } -} +pub struct Cli < T : CliOverride = () > { client : sdk :: Client , over : T , } impl Cli { pub fn new (client : sdk :: Client) -> Self { Self { client , over : () } } pub fn get_command (cmd : CliCommand) -> clap :: Command { match cmd { CliCommand :: DiskViewById => Self :: cli_disk_view_by_id () , CliCommand :: ImageViewById => Self :: cli_image_view_by_id () , CliCommand :: InstanceViewById => Self :: cli_instance_view_by_id () , CliCommand :: InstanceNetworkInterfaceViewById => Self :: cli_instance_network_interface_view_by_id () , CliCommand :: OrganizationViewById => Self :: cli_organization_view_by_id () , CliCommand :: ProjectViewById => Self :: cli_project_view_by_id () , CliCommand :: SnapshotViewById => Self :: cli_snapshot_view_by_id () , CliCommand :: VpcRouterRouteViewById => Self :: cli_vpc_router_route_view_by_id () , CliCommand :: VpcRouterViewById => Self :: cli_vpc_router_view_by_id () , CliCommand :: VpcSubnetViewById => Self :: cli_vpc_subnet_view_by_id () , CliCommand :: VpcViewById => Self :: cli_vpc_view_by_id () , CliCommand :: DeviceAuthRequest => Self :: cli_device_auth_request () , CliCommand :: DeviceAuthConfirm => Self :: cli_device_auth_confirm () , CliCommand :: DeviceAccessToken => Self :: cli_device_access_token () , CliCommand :: GroupList => Self :: cli_group_list () , CliCommand :: LoginSpoof => Self :: cli_login_spoof () , CliCommand :: LoginLocal => Self :: cli_login_local () , CliCommand :: LoginSamlBegin => Self :: cli_login_saml_begin () , CliCommand :: LoginSaml => Self :: cli_login_saml () , CliCommand :: Logout => Self :: cli_logout () , CliCommand :: OrganizationList => Self :: cli_organization_list () , CliCommand :: OrganizationCreate => Self :: cli_organization_create () , CliCommand :: OrganizationView => Self :: cli_organization_view () , CliCommand :: OrganizationUpdate => Self :: cli_organization_update () , CliCommand :: OrganizationDelete => Self :: cli_organization_delete () , CliCommand :: OrganizationPolicyView => Self :: cli_organization_policy_view () , CliCommand :: OrganizationPolicyUpdate => Self :: cli_organization_policy_update () , CliCommand :: ProjectList => Self :: cli_project_list () , CliCommand :: ProjectCreate => Self :: cli_project_create () , CliCommand :: ProjectView => Self :: cli_project_view () , CliCommand :: ProjectUpdate => Self :: cli_project_update () , CliCommand :: ProjectDelete => Self :: cli_project_delete () , CliCommand :: DiskList => Self :: cli_disk_list () , CliCommand :: DiskCreate => Self :: cli_disk_create () , CliCommand :: DiskView => Self :: cli_disk_view () , CliCommand :: DiskDelete => Self :: cli_disk_delete () , CliCommand :: DiskMetricsList => Self :: cli_disk_metrics_list () , CliCommand :: ImageList => Self :: cli_image_list () , CliCommand :: ImageCreate => Self :: cli_image_create () , CliCommand :: ImageView => Self :: cli_image_view () , CliCommand :: ImageDelete => Self :: cli_image_delete () , CliCommand :: InstanceList => Self :: cli_instance_list () , CliCommand :: InstanceCreate => Self :: cli_instance_create () , CliCommand :: InstanceView => Self :: cli_instance_view () , CliCommand :: InstanceDelete => Self :: cli_instance_delete () , CliCommand :: InstanceDiskList => Self :: cli_instance_disk_list () , CliCommand :: InstanceDiskAttach => Self :: cli_instance_disk_attach () , CliCommand :: InstanceDiskDetach => Self :: cli_instance_disk_detach () , CliCommand :: InstanceExternalIpList => Self :: cli_instance_external_ip_list () , CliCommand :: InstanceMigrate => Self :: cli_instance_migrate () , CliCommand :: InstanceNetworkInterfaceList => Self :: cli_instance_network_interface_list () , CliCommand :: InstanceNetworkInterfaceCreate => Self :: cli_instance_network_interface_create () , CliCommand :: InstanceNetworkInterfaceView => Self :: cli_instance_network_interface_view () , CliCommand :: InstanceNetworkInterfaceUpdate => Self :: cli_instance_network_interface_update () , CliCommand :: InstanceNetworkInterfaceDelete => Self :: cli_instance_network_interface_delete () , CliCommand :: InstanceReboot => Self :: cli_instance_reboot () , CliCommand :: InstanceSerialConsole => Self :: cli_instance_serial_console () , CliCommand :: InstanceSerialConsoleStream => Self :: cli_instance_serial_console_stream () , CliCommand :: InstanceStart => Self :: cli_instance_start () , CliCommand :: InstanceStop => Self :: cli_instance_stop () , CliCommand :: ProjectPolicyView => Self :: cli_project_policy_view () , CliCommand :: ProjectPolicyUpdate => Self :: cli_project_policy_update () , CliCommand :: SnapshotList => Self :: cli_snapshot_list () , CliCommand :: SnapshotCreate => Self :: cli_snapshot_create () , CliCommand :: SnapshotView => Self :: cli_snapshot_view () , CliCommand :: SnapshotDelete => Self :: cli_snapshot_delete () , CliCommand :: VpcList => Self :: cli_vpc_list () , CliCommand :: VpcCreate => Self :: cli_vpc_create () , CliCommand :: VpcView => Self :: cli_vpc_view () , CliCommand :: VpcUpdate => Self :: cli_vpc_update () , CliCommand :: VpcDelete => Self :: cli_vpc_delete () , CliCommand :: VpcFirewallRulesView => Self :: cli_vpc_firewall_rules_view () , CliCommand :: VpcFirewallRulesUpdate => Self :: cli_vpc_firewall_rules_update () , CliCommand :: VpcRouterList => Self :: cli_vpc_router_list () , CliCommand :: VpcRouterCreate => Self :: cli_vpc_router_create () , CliCommand :: VpcRouterView => Self :: cli_vpc_router_view () , CliCommand :: VpcRouterUpdate => Self :: cli_vpc_router_update () , CliCommand :: VpcRouterDelete => Self :: cli_vpc_router_delete () , CliCommand :: VpcRouterRouteList => Self :: cli_vpc_router_route_list () , CliCommand :: VpcRouterRouteCreate => Self :: cli_vpc_router_route_create () , CliCommand :: VpcRouterRouteView => Self :: cli_vpc_router_route_view () , CliCommand :: VpcRouterRouteUpdate => Self :: cli_vpc_router_route_update () , CliCommand :: VpcRouterRouteDelete => Self :: cli_vpc_router_route_delete () , CliCommand :: VpcSubnetList => Self :: cli_vpc_subnet_list () , CliCommand :: VpcSubnetCreate => Self :: cli_vpc_subnet_create () , CliCommand :: VpcSubnetView => Self :: cli_vpc_subnet_view () , CliCommand :: VpcSubnetUpdate => Self :: cli_vpc_subnet_update () , CliCommand :: VpcSubnetDelete => Self :: cli_vpc_subnet_delete () , CliCommand :: VpcSubnetListNetworkInterfaces => Self :: cli_vpc_subnet_list_network_interfaces () , CliCommand :: PolicyView => Self :: cli_policy_view () , CliCommand :: PolicyUpdate => Self :: cli_policy_update () , CliCommand :: RoleList => Self :: cli_role_list () , CliCommand :: RoleView => Self :: cli_role_view () , CliCommand :: SessionMe => Self :: cli_session_me () , CliCommand :: SessionMeGroups => Self :: cli_session_me_groups () , CliCommand :: SessionSshkeyList => Self :: cli_session_sshkey_list () , CliCommand :: SessionSshkeyCreate => Self :: cli_session_sshkey_create () , CliCommand :: SessionSshkeyView => Self :: cli_session_sshkey_view () , CliCommand :: SessionSshkeyDelete => Self :: cli_session_sshkey_delete () , CliCommand :: SystemImageViewById => Self :: cli_system_image_view_by_id () , CliCommand :: IpPoolViewById => Self :: cli_ip_pool_view_by_id () , CliCommand :: SiloViewById => Self :: cli_silo_view_by_id () , CliCommand :: CertificateList => Self :: cli_certificate_list () , CliCommand :: CertificateCreate => Self :: cli_certificate_create () , CliCommand :: CertificateView => Self :: cli_certificate_view () , CliCommand :: CertificateDelete => Self :: cli_certificate_delete () , CliCommand :: PhysicalDiskList => Self :: cli_physical_disk_list () , CliCommand :: RackList => Self :: cli_rack_list () , CliCommand :: RackView => Self :: cli_rack_view () , CliCommand :: SledList => Self :: cli_sled_list () , CliCommand :: SledView => Self :: cli_sled_view () , CliCommand :: SledPhysicalDiskList => Self :: cli_sled_physical_disk_list () , CliCommand :: SystemImageList => Self :: cli_system_image_list () , CliCommand :: SystemImageCreate => Self :: cli_system_image_create () , CliCommand :: SystemImageView => Self :: cli_system_image_view () , CliCommand :: SystemImageDelete => Self :: cli_system_image_delete () , CliCommand :: IpPoolList => Self :: cli_ip_pool_list () , CliCommand :: IpPoolCreate => Self :: cli_ip_pool_create () , CliCommand :: IpPoolView => Self :: cli_ip_pool_view () , CliCommand :: IpPoolUpdate => Self :: cli_ip_pool_update () , CliCommand :: IpPoolDelete => Self :: cli_ip_pool_delete () , CliCommand :: IpPoolRangeList => Self :: cli_ip_pool_range_list () , CliCommand :: IpPoolRangeAdd => Self :: cli_ip_pool_range_add () , CliCommand :: IpPoolRangeRemove => Self :: cli_ip_pool_range_remove () , CliCommand :: IpPoolServiceView => Self :: cli_ip_pool_service_view () , CliCommand :: IpPoolServiceRangeList => Self :: cli_ip_pool_service_range_list () , CliCommand :: IpPoolServiceRangeAdd => Self :: cli_ip_pool_service_range_add () , CliCommand :: IpPoolServiceRangeRemove => Self :: cli_ip_pool_service_range_remove () , CliCommand :: SystemMetric => Self :: cli_system_metric () , CliCommand :: SystemPolicyView => Self :: cli_system_policy_view () , CliCommand :: SystemPolicyUpdate => Self :: cli_system_policy_update () , CliCommand :: SagaList => Self :: cli_saga_list () , CliCommand :: SagaView => Self :: cli_saga_view () , CliCommand :: SiloList => Self :: cli_silo_list () , CliCommand :: SiloCreate => Self :: cli_silo_create () , CliCommand :: SiloView => Self :: cli_silo_view () , CliCommand :: SiloDelete => Self :: cli_silo_delete () , CliCommand :: SiloIdentityProviderList => Self :: cli_silo_identity_provider_list () , CliCommand :: LocalIdpUserCreate => Self :: cli_local_idp_user_create () , CliCommand :: LocalIdpUserDelete => Self :: cli_local_idp_user_delete () , CliCommand :: LocalIdpUserSetPassword => Self :: cli_local_idp_user_set_password () , CliCommand :: SamlIdentityProviderCreate => Self :: cli_saml_identity_provider_create () , CliCommand :: SamlIdentityProviderView => Self :: cli_saml_identity_provider_view () , CliCommand :: SiloPolicyView => Self :: cli_silo_policy_view () , CliCommand :: SiloPolicyUpdate => Self :: cli_silo_policy_update () , CliCommand :: SiloUsersList => Self :: cli_silo_users_list () , CliCommand :: SiloUserView => Self :: cli_silo_user_view () , CliCommand :: SystemUserList => Self :: cli_system_user_list () , CliCommand :: SystemUserView => Self :: cli_system_user_view () , CliCommand :: TimeseriesSchemaGet => Self :: cli_timeseries_schema_get () , CliCommand :: UserList => Self :: cli_user_list () , CliCommand :: DiskListV1 => Self :: cli_disk_list_v1 () , CliCommand :: DiskCreateV1 => Self :: cli_disk_create_v1 () , CliCommand :: DiskViewV1 => Self :: cli_disk_view_v1 () , CliCommand :: DiskDeleteV1 => Self :: cli_disk_delete_v1 () , CliCommand :: InstanceListV1 => Self :: cli_instance_list_v1 () , CliCommand :: InstanceCreateV1 => Self :: cli_instance_create_v1 () , CliCommand :: InstanceViewV1 => Self :: cli_instance_view_v1 () , CliCommand :: InstanceDeleteV1 => Self :: cli_instance_delete_v1 () , CliCommand :: InstanceDiskListV1 => Self :: cli_instance_disk_list_v1 () , CliCommand :: InstanceDiskAttachV1 => Self :: cli_instance_disk_attach_v1 () , CliCommand :: InstanceDiskDetachV1 => Self :: cli_instance_disk_detach_v1 () , CliCommand :: InstanceMigrateV1 => Self :: cli_instance_migrate_v1 () , CliCommand :: InstanceRebootV1 => Self :: cli_instance_reboot_v1 () , CliCommand :: InstanceSerialConsoleV1 => Self :: cli_instance_serial_console_v1 () , CliCommand :: InstanceSerialConsoleStreamV1 => Self :: cli_instance_serial_console_stream_v1 () , CliCommand :: InstanceStartV1 => Self :: cli_instance_start_v1 () , CliCommand :: InstanceStopV1 => Self :: cli_instance_stop_v1 () , CliCommand :: OrganizationListV1 => Self :: cli_organization_list_v1 () , CliCommand :: OrganizationCreateV1 => Self :: cli_organization_create_v1 () , CliCommand :: OrganizationViewV1 => Self :: cli_organization_view_v1 () , CliCommand :: OrganizationUpdateV1 => Self :: cli_organization_update_v1 () , CliCommand :: OrganizationDeleteV1 => Self :: cli_organization_delete_v1 () , CliCommand :: OrganizationPolicyViewV1 => Self :: cli_organization_policy_view_v1 () , CliCommand :: OrganizationPolicyUpdateV1 => Self :: cli_organization_policy_update_v1 () , CliCommand :: ProjectListV1 => Self :: cli_project_list_v1 () , CliCommand :: ProjectCreateV1 => Self :: cli_project_create_v1 () , CliCommand :: ProjectViewV1 => Self :: cli_project_view_v1 () , CliCommand :: ProjectUpdateV1 => Self :: cli_project_update_v1 () , CliCommand :: ProjectDeleteV1 => Self :: cli_project_delete_v1 () , CliCommand :: ProjectPolicyViewV1 => Self :: cli_project_policy_view_v1 () , CliCommand :: ProjectPolicyUpdateV1 => Self :: cli_project_policy_update_v1 () , CliCommand :: SystemComponentVersionList => Self :: cli_system_component_version_list () , CliCommand :: UpdateDeploymentsList => Self :: cli_update_deployments_list () , CliCommand :: UpdateDeploymentView => Self :: cli_update_deployment_view () , CliCommand :: SystemUpdateRefresh => Self :: cli_system_update_refresh () , CliCommand :: SystemUpdateStart => Self :: cli_system_update_start () , CliCommand :: SystemUpdateStop => Self :: cli_system_update_stop () , CliCommand :: SystemUpdateList => Self :: cli_system_update_list () , CliCommand :: SystemUpdateView => Self :: cli_system_update_view () , CliCommand :: SystemUpdateComponentsList => Self :: cli_system_update_components_list () , CliCommand :: SystemVersion => Self :: cli_system_version () , } } pub fn cli_disk_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a disk by id\n\nUse `GET /v1/disks/{disk}` instead") } pub fn cli_image_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch an image by id") } pub fn cli_instance_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch an instance by id") } pub fn cli_instance_network_interface_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a network interface by id") } pub fn cli_organization_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch an organization by id\n\nUse `GET /v1/organizations/{organization}` instead") } pub fn cli_project_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a project by id\n\nUse `GET /v1/projects/{project}` instead") } pub fn cli_snapshot_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a snapshot by id") } pub fn cli_vpc_router_route_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a route by id") } pub fn cli_vpc_router_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Get a router by id") } pub fn cli_vpc_subnet_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a subnet by id") } pub fn cli_vpc_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a VPC") } pub fn cli_device_auth_request () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("client-id") . long ("client-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Start an OAuth 2.0 Device Authorization Grant\n\nThis endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.") } pub fn cli_device_auth_confirm () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("user-code") . long ("user-code") . required (true) . value_parser (clap :: value_parser ! (String))) . about ("Confirm an OAuth 2.0 Device Authorization Grant\n\nThis endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on `/device/token`.") } pub fn cli_device_access_token () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("client-id") . long ("client-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . arg (clap :: Arg :: new ("device-code") . long ("device-code") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("grant-type") . long ("grant-type") . required (true) . value_parser (clap :: value_parser ! (String))) . about ("Request a device access token\n\nThis endpoint should be polled by the client until the user code is verified and the grant is confirmed.") } pub fn cli_group_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List groups") } pub fn cli_login_spoof () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("username") . long ("username") . required (true) . value_parser (clap :: value_parser ! (String))) } pub fn cli_login_local () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("password") . long ("password") . required (true) . value_parser (clap :: value_parser ! (types :: Password))) . arg (clap :: Arg :: new ("username") . long ("username") . required (true) . value_parser (clap :: value_parser ! (types :: UserId))) . about ("Authenticate a user (i.e., log in) via username and password") } pub fn cli_login_saml_begin () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("provider-name") . long ("provider-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Prompt user login\n\nEither display a page asking a user for their credentials, or redirect them to their identity provider.") } pub fn cli_login_saml () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("provider-name") . long ("provider-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Authenticate a user (i.e., log in) via SAML") } pub fn cli_logout () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_organization_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List organizations\n\nUse `GET /v1/organizations` instead") } pub fn cli_organization_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create an organization\n\nUse `POST /v1/organizations` instead") } pub fn cli_organization_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . about ("Fetch an organization\n\nUse `GET /v1/organizations/{organization}` instead") } pub fn cli_organization_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update an organization\n\nUse `PUT /v1/organizations/{organization}` instead") } pub fn cli_organization_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . about ("Delete an organization\n\nUse `DELETE /v1/organizations/{organization}` instead") } pub fn cli_organization_policy_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . about ("Fetch an organization's IAM policy\n\nUse `GET /v1/organizations/{organization}/policy` instead") } pub fn cli_organization_policy_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . about ("Update an organization's IAM policy\n\nUse `PUT /v1/organizations/{organization}/policy` instead") } pub fn cli_project_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List projects\n\nUse `GET /v1/projects` instead") } pub fn cli_project_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a project\n\nUse `POST /v1/projects` instead") } pub fn cli_project_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . about ("Fetch a project\n\nUse `GET /v1/projects/{project}` instead") } pub fn cli_project_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update a project\n\nUse `PUT /v1/projects/{project}` instead") } pub fn cli_project_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . about ("Delete a project\n\nUse `DELETE /v1/projects/{project}` instead") } pub fn cli_disk_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List disks\n\nUse `GET /v1/disks` instead") } pub fn cli_disk_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("size") . long ("size") . required (true) . value_parser (clap :: value_parser ! (types :: ByteCount)) . help ("total size of the Disk in bytes")) . about ("Use `POST /v1/disks` instead") } pub fn cli_disk_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("disk-name") . long ("disk-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch a disk\n\nUse `GET /v1/disks/{disk}` instead") } pub fn cli_disk_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("disk-name") . long ("disk-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Use `DELETE /v1/disks/{disk}` instead") } pub fn cli_disk_metrics_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("disk-name") . long ("disk-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("metric-name") . long ("metric-name") . required (true) . value_parser (clap :: value_parser ! (types :: DiskMetricName))) . arg (clap :: Arg :: new ("end-time") . long ("end-time") . required (false) . value_parser (clap :: value_parser ! (chrono :: DateTime < chrono :: offset :: Utc >)) . help ("An exclusive end time of metrics.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("start-time") . long ("start-time") . required (false) . value_parser (clap :: value_parser ! (chrono :: DateTime < chrono :: offset :: Utc >)) . help ("An inclusive start time of metrics.")) . about ("Fetch disk metrics") } pub fn cli_image_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List images\n\nList images in a project. The images are returned sorted by creation date, with the most recent images appearing first.") } pub fn cli_image_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create an image\n\nCreate a new image in a project.") } pub fn cli_image_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("image-name") . long ("image-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch an image\n\nFetch the details for a specific image in a project.") } pub fn cli_image_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("image-name") . long ("image-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete an image\n\nPermanently delete an image from a project. This operation cannot be undone. Any instances in the project using the image will continue to run, however new instances can not be created with this image.") } pub fn cli_instance_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List instances") } pub fn cli_instance_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("hostname") . long ("hostname") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("memory") . long ("memory") . required (true) . value_parser (clap :: value_parser ! (types :: ByteCount))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("ncpus") . long ("ncpus") . required (true) . value_parser (clap :: value_parser ! (types :: InstanceCpuCount))) . arg (clap :: Arg :: new ("start") . long ("start") . required (false) . value_parser (clap :: value_parser ! (bool)) . help ("Should this instance be started upon creation; true by default.")) . arg (clap :: Arg :: new ("user-data") . long ("user-data") . required (false) . value_parser (clap :: value_parser ! (String)) . help ("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.")) . about ("Create an instance\n\nUse `POST /v1/instances` instead") } pub fn cli_instance_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch an instance\n\nUse `GET /v1/instances/{instance}` instead") } pub fn cli_instance_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete an instance") } pub fn cli_instance_disk_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List an instance's disks\n\nUse `GET /v1/instances/{instance}/disks` instead") } pub fn cli_instance_disk_attach () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Attach a disk to an instance\n\nUse `POST /v1/instances/{instance}/disks/attach` instead") } pub fn cli_instance_disk_detach () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Detach a disk from an instance\n\nUse `POST /v1/disks/{disk}/detach` instead") } pub fn cli_instance_external_ip_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("List external IP addresses") } pub fn cli_instance_migrate () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("dst-sled-id") . long ("dst-sled-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Migrate an instance\n\nUse `POST /v1/instances/{instance}/migrate` instead") } pub fn cli_instance_network_interface_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List network interfaces") } pub fn cli_instance_network_interface_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("ip") . long ("ip") . required (false) . value_parser (clap :: value_parser ! (std :: net :: IpAddr)) . help ("The IP address for the interface. One will be auto-assigned if not provided.")) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("subnet-name") . long ("subnet-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The VPC Subnet in which to create the interface.")) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The VPC in which to create the interface.")) . about ("Create a network interface") } pub fn cli_instance_network_interface_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("interface-name") . long ("interface-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch a network interface") } pub fn cli_instance_network_interface_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("interface-name") . long ("interface-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("primary") . long ("primary") . required (false) . value_parser (clap :: value_parser ! (bool)) . help ("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.")) . about ("Update a network interface") } pub fn cli_instance_network_interface_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("interface-name") . long ("interface-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete a network interface\n\nNote that the primary interface for an instance cannot be deleted if there are any secondary interfaces. A new primary interface must be designated first. The primary interface can be deleted if there are no secondary interfaces.") } pub fn cli_instance_reboot () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Reboot an instance\n\nUse `POST /v1/instances/{instance}/reboot` instead") } pub fn cli_instance_serial_console () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("from-start") . long ("from-start") . required (false) . value_parser (clap :: value_parser ! (u64)) . help ("Character index in the serial buffer from which to read, counting the bytes output since instance start. If this is not provided, `most_recent` must be provided, and if this *is* provided, `most_recent` must *not* be provided.")) . arg (clap :: Arg :: new ("max-bytes") . long ("max-bytes") . required (false) . value_parser (clap :: value_parser ! (u64)) . help ("Maximum number of bytes of buffered serial console contents to return. If the requested range runs to the end of the available buffer, the data returned will be shorter than `max_bytes`.")) . arg (clap :: Arg :: new ("most-recent") . long ("most-recent") . required (false) . value_parser (clap :: value_parser ! (u64)) . help ("Character index in the serial buffer from which to read, counting *backward* from the most recently buffered data retrieved from the instance. (See note on `from_start` about mutual exclusivity)")) . about ("Fetch an instance's serial console\n\nUse `GET /v1/instances/{instance}/serial-console` instead") } pub fn cli_instance_serial_console_stream () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Connect to an instance's serial console\n\nUse `GET /v1/instances/{instance}/serial-console/stream` instead") } pub fn cli_instance_start () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Boot an instance\n\nUse `POST /v1/instances/{instance}/start` instead") } pub fn cli_instance_stop () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("instance-name") . long ("instance-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Halt an instance\n\nUse `POST /v1/instances/{instance}/stop` instead") } pub fn cli_project_policy_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . about ("Fetch a project's IAM policy\n\nUse `GET /v1/projects/{project}/policy` instead") } pub fn cli_project_policy_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . about ("Update a project's IAM policy") } pub fn cli_snapshot_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List snapshots") } pub fn cli_snapshot_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("disk") . long ("disk") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The name of the disk to be snapshotted")) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a snapshot\n\nCreates a point-in-time snapshot from a disk.") } pub fn cli_snapshot_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("snapshot-name") . long ("snapshot-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch a snapshot") } pub fn cli_snapshot_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("snapshot-name") . long ("snapshot-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete a snapshot") } pub fn cli_vpc_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List VPCs") } pub fn cli_vpc_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The organization's unique name.")) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The project's unique name within the organization.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("dns-name") . long ("dns-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("ipv6-prefix") . long ("ipv6-prefix") . required (false) . value_parser (clap :: value_parser ! (types :: Ipv6Net)) . help ("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.")) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a VPC") } pub fn cli_vpc_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch a VPC") } pub fn cli_vpc_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("dns-name") . long ("dns-name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update a VPC") } pub fn cli_vpc_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete a VPC") } pub fn cli_vpc_firewall_rules_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("List firewall rules") } pub fn cli_vpc_firewall_rules_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Replace firewall rules") } pub fn cli_vpc_router_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List routers") } pub fn cli_vpc_router_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a router") } pub fn cli_vpc_router_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("router-name") . long ("router-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Get a router") } pub fn cli_vpc_router_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("router-name") . long ("router-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update a router") } pub fn cli_vpc_router_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("router-name") . long ("router-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete a router") } pub fn cli_vpc_router_route_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("router-name") . long ("router-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List routes\n\nList the routes associated with a router in a particular VPC.") } pub fn cli_vpc_router_route_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("router-name") . long ("router-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a router") } pub fn cli_vpc_router_route_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("router-name") . long ("router-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("route-name") . long ("route-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch a route") } pub fn cli_vpc_router_route_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("router-name") . long ("router-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("route-name") . long ("route-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update a route") } pub fn cli_vpc_router_route_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("router-name") . long ("router-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("route-name") . long ("route-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete a route") } pub fn cli_vpc_subnet_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List subnets") } pub fn cli_vpc_subnet_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("ipv4-block") . long ("ipv4-block") . required (true) . value_parser (clap :: value_parser ! (types :: Ipv4Net)) . help ("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.")) . arg (clap :: Arg :: new ("ipv6-block") . long ("ipv6-block") . required (false) . value_parser (clap :: value_parser ! (types :: Ipv6Net)) . help ("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.")) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a subnet") } pub fn cli_vpc_subnet_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("subnet-name") . long ("subnet-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch a subnet") } pub fn cli_vpc_subnet_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("subnet-name") . long ("subnet-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update a subnet") } pub fn cli_vpc_subnet_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("subnet-name") . long ("subnet-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete a subnet") } pub fn cli_vpc_subnet_list_network_interfaces () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization-name") . long ("organization-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("project-name") . long ("project-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("vpc-name") . long ("vpc-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("subnet-name") . long ("subnet-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List network interfaces") } pub fn cli_policy_view () -> clap :: Command { clap :: Command :: new ("") . about ("Fetch the current silo's IAM policy") } pub fn cli_policy_update () -> clap :: Command { clap :: Command :: new ("") . about ("Update the current silo's IAM policy") } pub fn cli_role_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . about ("List built-in roles") } pub fn cli_role_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("role-name") . long ("role-name") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("The built-in role's unique name.")) . about ("Fetch a built-in role") } pub fn cli_session_me () -> clap :: Command { clap :: Command :: new ("") . about ("Fetch the user associated with the current session") } pub fn cli_session_me_groups () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("Fetch the silo\u{a0}groups the current user belongs to") } pub fn cli_session_sshkey_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List SSH public keys\n\nLists SSH public keys for the currently authenticated user.") } pub fn cli_session_sshkey_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("public-key") . long ("public-key") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("SSH public key, e.g., `\"ssh-ed25519 AAAAC3NzaC...\"`")) . about ("Create an SSH public key\n\nCreate an SSH public key for the currently authenticated user.") } pub fn cli_session_sshkey_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("ssh-key-name") . long ("ssh-key-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch an SSH public key\n\nFetch an SSH public key associated with the currently authenticated user.") } pub fn cli_session_sshkey_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("ssh-key-name") . long ("ssh-key-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete an SSH public key\n\nDelete an SSH public key associated with the currently authenticated user.") } pub fn cli_system_image_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a system-wide image by id") } pub fn cli_ip_pool_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch an IP pool by id") } pub fn cli_silo_view_by_id () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a silo by id") } pub fn cli_certificate_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List system-wide certificates\n\nReturns a list of all the system-wide certificates. System-wide certificates are returned sorted by creation date, with the most recent certificates appearing first.") } pub fn cli_certificate_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("service") . long ("service") . required (true) . value_parser (clap :: value_parser ! (types :: ServiceUsingCertificate)) . help ("The service using this certificate")) . about ("Create a new system-wide x.509 certificate.\n\nThis certificate is automatically used by the Oxide Control plane to serve external connections.") } pub fn cli_certificate_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("certificate") . long ("certificate") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Fetch a certificate\n\nReturns the details of a specific certificate") } pub fn cli_certificate_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("certificate") . long ("certificate") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Delete a certificate\n\nPermanently delete a certificate. This operation cannot be undone.") } pub fn cli_physical_disk_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List physical disks") } pub fn cli_rack_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List racks") } pub fn cli_rack_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("rack-id") . long ("rack-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid)) . help ("The rack's unique ID.")) . about ("Fetch a rack") } pub fn cli_sled_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List sleds") } pub fn cli_sled_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("sled-id") . long ("sled-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid)) . help ("The sled's unique ID.")) . about ("Fetch a sled") } pub fn cli_sled_physical_disk_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("sled-id") . long ("sled-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid)) . help ("The sled's unique ID.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List physical disks attached to sleds") } pub fn cli_system_image_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List system-wide images\n\nReturns a list of all the system-wide images. System-wide images are returned sorted by creation date, with the most recent images appearing first.") } pub fn cli_system_image_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a system-wide image\n\nCreate a new system-wide image. This image can then be used by any user in any silo as a base for instances.") } pub fn cli_system_image_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("image-name") . long ("image-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch a system-wide image\n\nReturns the details of a specific system-wide image.") } pub fn cli_system_image_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("image-name") . long ("image-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete a system-wide image\n\nPermanently delete a system-wide image. This operation cannot be undone. Any instances using the system-wide image will continue to run, however new instances can not be created with this image.") } pub fn cli_ip_pool_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List IP pools") } pub fn cli_ip_pool_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create an IP pool") } pub fn cli_ip_pool_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("pool-name") . long ("pool-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Fetch an IP pool") } pub fn cli_ip_pool_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("pool-name") . long ("pool-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update an IP Pool") } pub fn cli_ip_pool_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("pool-name") . long ("pool-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Delete an IP Pool") } pub fn cli_ip_pool_range_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("pool-name") . long ("pool-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . about ("List ranges for an IP pool\n\nRanges are ordered by their first address.") } pub fn cli_ip_pool_range_add () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("pool-name") . long ("pool-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Add a range to an IP pool") } pub fn cli_ip_pool_range_remove () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("pool-name") . long ("pool-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Remove a range from an IP pool") } pub fn cli_ip_pool_service_view () -> clap :: Command { clap :: Command :: new ("") . about ("Fetch the IP pool used for Oxide services.") } pub fn cli_ip_pool_service_range_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . about ("List ranges for the IP pool used for Oxide services.\n\nRanges are ordered by their first address.") } pub fn cli_ip_pool_service_range_add () -> clap :: Command { clap :: Command :: new ("") . about ("Add a range to an IP pool used for Oxide services.") } pub fn cli_ip_pool_service_range_remove () -> clap :: Command { clap :: Command :: new ("") . about ("Remove a range from an IP pool used for Oxide services.") } pub fn cli_system_metric () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("metric-name") . long ("metric-name") . required (true) . value_parser (clap :: value_parser ! (types :: SystemMetricName))) . arg (clap :: Arg :: new ("end-time") . long ("end-time") . required (false) . value_parser (clap :: value_parser ! (chrono :: DateTime < chrono :: offset :: Utc >)) . help ("An exclusive end time of metrics.")) . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid)) . help ("The UUID of the container being queried")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("page-token") . long ("page-token") . required (false) . value_parser (clap :: value_parser ! (String)) . help ("Token returned by previous call to retrieve the subsequent page")) . arg (clap :: Arg :: new ("start-time") . long ("start-time") . required (false) . value_parser (clap :: value_parser ! (chrono :: DateTime < chrono :: offset :: Utc >)) . help ("An inclusive start time of metrics.")) . about ("Access metrics data") } pub fn cli_system_policy_view () -> clap :: Command { clap :: Command :: new ("") . about ("Fetch the top-level IAM policy") } pub fn cli_system_policy_update () -> clap :: Command { clap :: Command :: new ("") . about ("Update the top-level IAM policy") } pub fn cli_saga_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List sagas") } pub fn cli_saga_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("saga-id") . long ("saga-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a saga") } pub fn cli_silo_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List silos\n\nLists silos that are discoverable based on the current permissions.") } pub fn cli_silo_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("admin-group-name") . long ("admin-group-name") . required (false) . value_parser (clap :: value_parser ! (String)) . help ("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.")) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("discoverable") . long ("discoverable") . required (true) . value_parser (clap :: value_parser ! (bool))) . arg (clap :: Arg :: new ("identity-mode") . long ("identity-mode") . required (true) . value_parser (clap :: value_parser ! (types :: SiloIdentityMode))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a silo") } pub fn cli_silo_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . about ("Fetch a silo\n\nFetch a silo by name.") } pub fn cli_silo_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . about ("Delete a silo\n\nDelete a silo by name.") } pub fn cli_silo_identity_provider_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List a silo's IDPs") } pub fn cli_local_idp_user_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . arg (clap :: Arg :: new ("external-id") . long ("external-id") . required (true) . value_parser (clap :: value_parser ! (types :: UserId)) . help ("username used to log in")) . about ("Create a user\n\nUsers can only be created in Silos with `provision_type` == `Fixed`. Otherwise, Silo users are just-in-time (JIT) provisioned when a user first logs in using an external Identity Provider.") } pub fn cli_local_idp_user_delete () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . arg (clap :: Arg :: new ("user-id") . long ("user-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid)) . help ("The user's internal id")) . about ("Delete a user") } pub fn cli_local_idp_user_set_password () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . arg (clap :: Arg :: new ("user-id") . long ("user-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid)) . help ("The user's internal id")) . about ("Set or invalidate a user's password\n\nPasswords can only be updated for users in Silos with identity mode `LocalOnly`.") } pub fn cli_saml_identity_provider_create () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . arg (clap :: Arg :: new ("acs-url") . long ("acs-url") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("service provider endpoint where the response will be sent")) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("group-attribute-name") . long ("group-attribute-name") . required (false) . value_parser (clap :: value_parser ! (String)) . help ("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.")) . arg (clap :: Arg :: new ("idp-entity-id") . long ("idp-entity-id") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("idp's entity id")) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("slo-url") . long ("slo-url") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("service provider endpoint where the idp should send log out requests")) . arg (clap :: Arg :: new ("sp-client-id") . long ("sp-client-id") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("sp's client id")) . arg (clap :: Arg :: new ("technical-contact-email") . long ("technical-contact-email") . required (true) . value_parser (clap :: value_parser ! (String)) . help ("customer's technical contact for saml configuration")) . about ("Create a SAML IDP") } pub fn cli_saml_identity_provider_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . arg (clap :: Arg :: new ("provider-name") . long ("provider-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The SAML identity provider's name")) . about ("Fetch a SAML IDP") } pub fn cli_silo_policy_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . about ("Fetch a silo's IAM policy") } pub fn cli_silo_policy_update () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . about ("Update a silo's IAM policy") } pub fn cli_silo_users_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List users in a silo") } pub fn cli_silo_user_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("silo-name") . long ("silo-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The silo's unique name.")) . arg (clap :: Arg :: new ("user-id") . long ("user-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid)) . help ("The user's internal id")) . about ("Fetch a user") } pub fn cli_system_user_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameSortMode))) . about ("List built-in users") } pub fn cli_system_user_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("user-name") . long ("user-name") . required (true) . value_parser (clap :: value_parser ! (types :: Name)) . help ("The built-in user's unique name.")) . about ("Fetch a built-in user") } pub fn cli_timeseries_schema_get () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . about ("List timeseries schema") } pub fn cli_user_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List users") } pub fn cli_disk_list_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List disks") } pub fn cli_disk_create_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("size") . long ("size") . required (true) . value_parser (clap :: value_parser ! (types :: ByteCount)) . help ("total size of the Disk in bytes")) . about ("Create a disk") } pub fn cli_disk_view_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("disk") . long ("disk") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Fetch a disk") } pub fn cli_disk_delete_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("disk") . long ("disk") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Delete a disk") } pub fn cli_instance_list_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List instances") } pub fn cli_instance_create_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("hostname") . long ("hostname") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("memory") . long ("memory") . required (true) . value_parser (clap :: value_parser ! (types :: ByteCount))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . arg (clap :: Arg :: new ("ncpus") . long ("ncpus") . required (true) . value_parser (clap :: value_parser ! (types :: InstanceCpuCount))) . arg (clap :: Arg :: new ("start") . long ("start") . required (false) . value_parser (clap :: value_parser ! (bool)) . help ("Should this instance be started upon creation; true by default.")) . arg (clap :: Arg :: new ("user-data") . long ("user-data") . required (false) . value_parser (clap :: value_parser ! (String)) . help ("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.")) . about ("Create an instance") } pub fn cli_instance_view_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Fetch an instance") } pub fn cli_instance_delete_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Delete an instance") } pub fn cli_instance_disk_list_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List an instance's disks") } pub fn cli_instance_disk_attach_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("disk") . long ("disk") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Attach a disk to an instance") } pub fn cli_instance_disk_detach_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("disk") . long ("disk") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Detach a disk from an instance") } pub fn cli_instance_migrate_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("dst-sled-id") . long ("dst-sled-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Migrate an instance") } pub fn cli_instance_reboot_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Reboot an instance") } pub fn cli_instance_serial_console_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("from-start") . long ("from-start") . required (false) . value_parser (clap :: value_parser ! (u64)) . help ("Character index in the serial buffer from which to read, counting the bytes output since instance start. If this is not provided, `most_recent` must be provided, and if this *is* provided, `most_recent` must *not* be provided.")) . arg (clap :: Arg :: new ("max-bytes") . long ("max-bytes") . required (false) . value_parser (clap :: value_parser ! (u64)) . help ("Maximum number of bytes of buffered serial console contents to return. If the requested range runs to the end of the available buffer, the data returned will be shorter than `max_bytes`.")) . arg (clap :: Arg :: new ("most-recent") . long ("most-recent") . required (false) . value_parser (clap :: value_parser ! (u64)) . help ("Character index in the serial buffer from which to read, counting *backward* from the most recently buffered data retrieved from the instance. (See note on `from_start` about mutual exclusivity)")) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Fetch an instance's serial console") } pub fn cli_instance_serial_console_stream_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Stream an instance's serial console") } pub fn cli_instance_start_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Boot an instance") } pub fn cli_instance_stop_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("instance") . long ("instance") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("project") . long ("project") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Stop an instance") } pub fn cli_organization_list_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List organizations") } pub fn cli_organization_create_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create an organization") } pub fn cli_organization_view_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization") . long ("organization") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Fetch an organization") } pub fn cli_organization_update_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization") . long ("organization") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update an organization") } pub fn cli_organization_delete_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization") . long ("organization") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Delete an organization") } pub fn cli_organization_policy_view_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization") . long ("organization") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Fetch an organization's IAM policy") } pub fn cli_organization_policy_update_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization") . long ("organization") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Update an organization's IAM policy") } pub fn cli_project_list_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrIdSortMode))) . about ("List projects") } pub fn cli_project_create_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("organization") . long ("organization") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("description") . long ("description") . required (true) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (true) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Create a project") } pub fn cli_project_view_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("project") . long ("project") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Fetch a project") } pub fn cli_project_update_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("project") . long ("project") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("description") . long ("description") . required (false) . value_parser (clap :: value_parser ! (String))) . arg (clap :: Arg :: new ("name") . long ("name") . required (false) . value_parser (clap :: value_parser ! (types :: Name))) . about ("Update a project") } pub fn cli_project_delete_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("project") . long ("project") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Delete a project") } pub fn cli_project_policy_view_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("project") . long ("project") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Fetch a project's IAM policy") } pub fn cli_project_policy_update_v1 () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("project") . long ("project") . required (true) . value_parser (clap :: value_parser ! (types :: NameOrId))) . arg (clap :: Arg :: new ("organization") . long ("organization") . required (false) . value_parser (clap :: value_parser ! (types :: NameOrId))) . about ("Update a project's IAM policy") } pub fn cli_system_component_version_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("View version and update status of component tree") } pub fn cli_update_deployments_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List all update deployments") } pub fn cli_update_deployment_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Fetch a system update deployment") } pub fn cli_system_update_refresh () -> clap :: Command { clap :: Command :: new ("") . about ("Refresh update data") } pub fn cli_system_update_start () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("version") . long ("version") . required (true) . value_parser (clap :: value_parser ! (types :: SemverVersion))) . about ("Start system update") } pub fn cli_system_update_stop () -> clap :: Command { clap :: Command :: new ("") . about ("Stop system update\n\nIf there is no update in progress, do nothing.") } pub fn cli_system_update_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("limit") . long ("limit") . required (false) . value_parser (clap :: value_parser ! (std :: num :: NonZeroU32)) . help ("Maximum number of items returned by a single call")) . arg (clap :: Arg :: new ("sort-by") . long ("sort-by") . required (false) . value_parser (clap :: value_parser ! (types :: IdSortMode))) . about ("List all updates") } pub fn cli_system_update_view () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("version") . long ("version") . required (true) . value_parser (clap :: value_parser ! (types :: SemverVersion))) . about ("View system update") } pub fn cli_system_update_components_list () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("version") . long ("version") . required (true) . value_parser (clap :: value_parser ! (types :: SemverVersion))) . about ("View system update component tree") } pub fn cli_system_version () -> clap :: Command { clap :: Command :: new ("") . about ("View system version and update status") } } impl < T : CliOverride > Cli < T > { pub fn new_with_override (client : sdk :: Client , over : T ,) -> Self { Self { client , over } } pub async fn execute (& self , cmd : CliCommand , matches : & clap :: ArgMatches ,) { match cmd { CliCommand :: DiskViewById => { self . execute_disk_view_by_id (matches) . await ; } CliCommand :: ImageViewById => { self . execute_image_view_by_id (matches) . await ; } CliCommand :: InstanceViewById => { self . execute_instance_view_by_id (matches) . await ; } CliCommand :: InstanceNetworkInterfaceViewById => { self . execute_instance_network_interface_view_by_id (matches) . await ; } CliCommand :: OrganizationViewById => { self . execute_organization_view_by_id (matches) . await ; } CliCommand :: ProjectViewById => { self . execute_project_view_by_id (matches) . await ; } CliCommand :: SnapshotViewById => { self . execute_snapshot_view_by_id (matches) . await ; } CliCommand :: VpcRouterRouteViewById => { self . execute_vpc_router_route_view_by_id (matches) . await ; } CliCommand :: VpcRouterViewById => { self . execute_vpc_router_view_by_id (matches) . await ; } CliCommand :: VpcSubnetViewById => { self . execute_vpc_subnet_view_by_id (matches) . await ; } CliCommand :: VpcViewById => { self . execute_vpc_view_by_id (matches) . await ; } CliCommand :: DeviceAuthRequest => { self . execute_device_auth_request (matches) . await ; } CliCommand :: DeviceAuthConfirm => { self . execute_device_auth_confirm (matches) . await ; } CliCommand :: DeviceAccessToken => { self . execute_device_access_token (matches) . await ; } CliCommand :: GroupList => { self . execute_group_list (matches) . await ; } CliCommand :: LoginSpoof => { self . execute_login_spoof (matches) . await ; } CliCommand :: LoginLocal => { self . execute_login_local (matches) . await ; } CliCommand :: LoginSamlBegin => { self . execute_login_saml_begin (matches) . await ; } CliCommand :: LoginSaml => { self . execute_login_saml (matches) . await ; } CliCommand :: Logout => { self . execute_logout (matches) . await ; } CliCommand :: OrganizationList => { self . execute_organization_list (matches) . await ; } CliCommand :: OrganizationCreate => { self . execute_organization_create (matches) . await ; } CliCommand :: OrganizationView => { self . execute_organization_view (matches) . await ; } CliCommand :: OrganizationUpdate => { self . execute_organization_update (matches) . await ; } CliCommand :: OrganizationDelete => { self . execute_organization_delete (matches) . await ; } CliCommand :: OrganizationPolicyView => { self . execute_organization_policy_view (matches) . await ; } CliCommand :: OrganizationPolicyUpdate => { self . execute_organization_policy_update (matches) . await ; } CliCommand :: ProjectList => { self . execute_project_list (matches) . await ; } CliCommand :: ProjectCreate => { self . execute_project_create (matches) . await ; } CliCommand :: ProjectView => { self . execute_project_view (matches) . await ; } CliCommand :: ProjectUpdate => { self . execute_project_update (matches) . await ; } CliCommand :: ProjectDelete => { self . execute_project_delete (matches) . await ; } CliCommand :: DiskList => { self . execute_disk_list (matches) . await ; } CliCommand :: DiskCreate => { self . execute_disk_create (matches) . await ; } CliCommand :: DiskView => { self . execute_disk_view (matches) . await ; } CliCommand :: DiskDelete => { self . execute_disk_delete (matches) . await ; } CliCommand :: DiskMetricsList => { self . execute_disk_metrics_list (matches) . await ; } CliCommand :: ImageList => { self . execute_image_list (matches) . await ; } CliCommand :: ImageCreate => { self . execute_image_create (matches) . await ; } CliCommand :: ImageView => { self . execute_image_view (matches) . await ; } CliCommand :: ImageDelete => { self . execute_image_delete (matches) . await ; } CliCommand :: InstanceList => { self . execute_instance_list (matches) . await ; } CliCommand :: InstanceCreate => { self . execute_instance_create (matches) . await ; } CliCommand :: InstanceView => { self . execute_instance_view (matches) . await ; } CliCommand :: InstanceDelete => { self . execute_instance_delete (matches) . await ; } CliCommand :: InstanceDiskList => { self . execute_instance_disk_list (matches) . await ; } CliCommand :: InstanceDiskAttach => { self . execute_instance_disk_attach (matches) . await ; } CliCommand :: InstanceDiskDetach => { self . execute_instance_disk_detach (matches) . await ; } CliCommand :: InstanceExternalIpList => { self . execute_instance_external_ip_list (matches) . await ; } CliCommand :: InstanceMigrate => { self . execute_instance_migrate (matches) . await ; } CliCommand :: InstanceNetworkInterfaceList => { self . execute_instance_network_interface_list (matches) . await ; } CliCommand :: InstanceNetworkInterfaceCreate => { self . execute_instance_network_interface_create (matches) . await ; } CliCommand :: InstanceNetworkInterfaceView => { self . execute_instance_network_interface_view (matches) . await ; } CliCommand :: InstanceNetworkInterfaceUpdate => { self . execute_instance_network_interface_update (matches) . await ; } CliCommand :: InstanceNetworkInterfaceDelete => { self . execute_instance_network_interface_delete (matches) . await ; } CliCommand :: InstanceReboot => { self . execute_instance_reboot (matches) . await ; } CliCommand :: InstanceSerialConsole => { self . execute_instance_serial_console (matches) . await ; } CliCommand :: InstanceSerialConsoleStream => { self . execute_instance_serial_console_stream (matches) . await ; } CliCommand :: InstanceStart => { self . execute_instance_start (matches) . await ; } CliCommand :: InstanceStop => { self . execute_instance_stop (matches) . await ; } CliCommand :: ProjectPolicyView => { self . execute_project_policy_view (matches) . await ; } CliCommand :: ProjectPolicyUpdate => { self . execute_project_policy_update (matches) . await ; } CliCommand :: SnapshotList => { self . execute_snapshot_list (matches) . await ; } CliCommand :: SnapshotCreate => { self . execute_snapshot_create (matches) . await ; } CliCommand :: SnapshotView => { self . execute_snapshot_view (matches) . await ; } CliCommand :: SnapshotDelete => { self . execute_snapshot_delete (matches) . await ; } CliCommand :: VpcList => { self . execute_vpc_list (matches) . await ; } CliCommand :: VpcCreate => { self . execute_vpc_create (matches) . await ; } CliCommand :: VpcView => { self . execute_vpc_view (matches) . await ; } CliCommand :: VpcUpdate => { self . execute_vpc_update (matches) . await ; } CliCommand :: VpcDelete => { self . execute_vpc_delete (matches) . await ; } CliCommand :: VpcFirewallRulesView => { self . execute_vpc_firewall_rules_view (matches) . await ; } CliCommand :: VpcFirewallRulesUpdate => { self . execute_vpc_firewall_rules_update (matches) . await ; } CliCommand :: VpcRouterList => { self . execute_vpc_router_list (matches) . await ; } CliCommand :: VpcRouterCreate => { self . execute_vpc_router_create (matches) . await ; } CliCommand :: VpcRouterView => { self . execute_vpc_router_view (matches) . await ; } CliCommand :: VpcRouterUpdate => { self . execute_vpc_router_update (matches) . await ; } CliCommand :: VpcRouterDelete => { self . execute_vpc_router_delete (matches) . await ; } CliCommand :: VpcRouterRouteList => { self . execute_vpc_router_route_list (matches) . await ; } CliCommand :: VpcRouterRouteCreate => { self . execute_vpc_router_route_create (matches) . await ; } CliCommand :: VpcRouterRouteView => { self . execute_vpc_router_route_view (matches) . await ; } CliCommand :: VpcRouterRouteUpdate => { self . execute_vpc_router_route_update (matches) . await ; } CliCommand :: VpcRouterRouteDelete => { self . execute_vpc_router_route_delete (matches) . await ; } CliCommand :: VpcSubnetList => { self . execute_vpc_subnet_list (matches) . await ; } CliCommand :: VpcSubnetCreate => { self . execute_vpc_subnet_create (matches) . await ; } CliCommand :: VpcSubnetView => { self . execute_vpc_subnet_view (matches) . await ; } CliCommand :: VpcSubnetUpdate => { self . execute_vpc_subnet_update (matches) . await ; } CliCommand :: VpcSubnetDelete => { self . execute_vpc_subnet_delete (matches) . await ; } CliCommand :: VpcSubnetListNetworkInterfaces => { self . execute_vpc_subnet_list_network_interfaces (matches) . await ; } CliCommand :: PolicyView => { self . execute_policy_view (matches) . await ; } CliCommand :: PolicyUpdate => { self . execute_policy_update (matches) . await ; } CliCommand :: RoleList => { self . execute_role_list (matches) . await ; } CliCommand :: RoleView => { self . execute_role_view (matches) . await ; } CliCommand :: SessionMe => { self . execute_session_me (matches) . await ; } CliCommand :: SessionMeGroups => { self . execute_session_me_groups (matches) . await ; } CliCommand :: SessionSshkeyList => { self . execute_session_sshkey_list (matches) . await ; } CliCommand :: SessionSshkeyCreate => { self . execute_session_sshkey_create (matches) . await ; } CliCommand :: SessionSshkeyView => { self . execute_session_sshkey_view (matches) . await ; } CliCommand :: SessionSshkeyDelete => { self . execute_session_sshkey_delete (matches) . await ; } CliCommand :: SystemImageViewById => { self . execute_system_image_view_by_id (matches) . await ; } CliCommand :: IpPoolViewById => { self . execute_ip_pool_view_by_id (matches) . await ; } CliCommand :: SiloViewById => { self . execute_silo_view_by_id (matches) . await ; } CliCommand :: CertificateList => { self . execute_certificate_list (matches) . await ; } CliCommand :: CertificateCreate => { self . execute_certificate_create (matches) . await ; } CliCommand :: CertificateView => { self . execute_certificate_view (matches) . await ; } CliCommand :: CertificateDelete => { self . execute_certificate_delete (matches) . await ; } CliCommand :: PhysicalDiskList => { self . execute_physical_disk_list (matches) . await ; } CliCommand :: RackList => { self . execute_rack_list (matches) . await ; } CliCommand :: RackView => { self . execute_rack_view (matches) . await ; } CliCommand :: SledList => { self . execute_sled_list (matches) . await ; } CliCommand :: SledView => { self . execute_sled_view (matches) . await ; } CliCommand :: SledPhysicalDiskList => { self . execute_sled_physical_disk_list (matches) . await ; } CliCommand :: SystemImageList => { self . execute_system_image_list (matches) . await ; } CliCommand :: SystemImageCreate => { self . execute_system_image_create (matches) . await ; } CliCommand :: SystemImageView => { self . execute_system_image_view (matches) . await ; } CliCommand :: SystemImageDelete => { self . execute_system_image_delete (matches) . await ; } CliCommand :: IpPoolList => { self . execute_ip_pool_list (matches) . await ; } CliCommand :: IpPoolCreate => { self . execute_ip_pool_create (matches) . await ; } CliCommand :: IpPoolView => { self . execute_ip_pool_view (matches) . await ; } CliCommand :: IpPoolUpdate => { self . execute_ip_pool_update (matches) . await ; } CliCommand :: IpPoolDelete => { self . execute_ip_pool_delete (matches) . await ; } CliCommand :: IpPoolRangeList => { self . execute_ip_pool_range_list (matches) . await ; } CliCommand :: IpPoolRangeAdd => { self . execute_ip_pool_range_add (matches) . await ; } CliCommand :: IpPoolRangeRemove => { self . execute_ip_pool_range_remove (matches) . await ; } CliCommand :: IpPoolServiceView => { self . execute_ip_pool_service_view (matches) . await ; } CliCommand :: IpPoolServiceRangeList => { self . execute_ip_pool_service_range_list (matches) . await ; } CliCommand :: IpPoolServiceRangeAdd => { self . execute_ip_pool_service_range_add (matches) . await ; } CliCommand :: IpPoolServiceRangeRemove => { self . execute_ip_pool_service_range_remove (matches) . await ; } CliCommand :: SystemMetric => { self . execute_system_metric (matches) . await ; } CliCommand :: SystemPolicyView => { self . execute_system_policy_view (matches) . await ; } CliCommand :: SystemPolicyUpdate => { self . execute_system_policy_update (matches) . await ; } CliCommand :: SagaList => { self . execute_saga_list (matches) . await ; } CliCommand :: SagaView => { self . execute_saga_view (matches) . await ; } CliCommand :: SiloList => { self . execute_silo_list (matches) . await ; } CliCommand :: SiloCreate => { self . execute_silo_create (matches) . await ; } CliCommand :: SiloView => { self . execute_silo_view (matches) . await ; } CliCommand :: SiloDelete => { self . execute_silo_delete (matches) . await ; } CliCommand :: SiloIdentityProviderList => { self . execute_silo_identity_provider_list (matches) . await ; } CliCommand :: LocalIdpUserCreate => { self . execute_local_idp_user_create (matches) . await ; } CliCommand :: LocalIdpUserDelete => { self . execute_local_idp_user_delete (matches) . await ; } CliCommand :: LocalIdpUserSetPassword => { self . execute_local_idp_user_set_password (matches) . await ; } CliCommand :: SamlIdentityProviderCreate => { self . execute_saml_identity_provider_create (matches) . await ; } CliCommand :: SamlIdentityProviderView => { self . execute_saml_identity_provider_view (matches) . await ; } CliCommand :: SiloPolicyView => { self . execute_silo_policy_view (matches) . await ; } CliCommand :: SiloPolicyUpdate => { self . execute_silo_policy_update (matches) . await ; } CliCommand :: SiloUsersList => { self . execute_silo_users_list (matches) . await ; } CliCommand :: SiloUserView => { self . execute_silo_user_view (matches) . await ; } CliCommand :: SystemUserList => { self . execute_system_user_list (matches) . await ; } CliCommand :: SystemUserView => { self . execute_system_user_view (matches) . await ; } CliCommand :: TimeseriesSchemaGet => { self . execute_timeseries_schema_get (matches) . await ; } CliCommand :: UserList => { self . execute_user_list (matches) . await ; } CliCommand :: DiskListV1 => { self . execute_disk_list_v1 (matches) . await ; } CliCommand :: DiskCreateV1 => { self . execute_disk_create_v1 (matches) . await ; } CliCommand :: DiskViewV1 => { self . execute_disk_view_v1 (matches) . await ; } CliCommand :: DiskDeleteV1 => { self . execute_disk_delete_v1 (matches) . await ; } CliCommand :: InstanceListV1 => { self . execute_instance_list_v1 (matches) . await ; } CliCommand :: InstanceCreateV1 => { self . execute_instance_create_v1 (matches) . await ; } CliCommand :: InstanceViewV1 => { self . execute_instance_view_v1 (matches) . await ; } CliCommand :: InstanceDeleteV1 => { self . execute_instance_delete_v1 (matches) . await ; } CliCommand :: InstanceDiskListV1 => { self . execute_instance_disk_list_v1 (matches) . await ; } CliCommand :: InstanceDiskAttachV1 => { self . execute_instance_disk_attach_v1 (matches) . await ; } CliCommand :: InstanceDiskDetachV1 => { self . execute_instance_disk_detach_v1 (matches) . await ; } CliCommand :: InstanceMigrateV1 => { self . execute_instance_migrate_v1 (matches) . await ; } CliCommand :: InstanceRebootV1 => { self . execute_instance_reboot_v1 (matches) . await ; } CliCommand :: InstanceSerialConsoleV1 => { self . execute_instance_serial_console_v1 (matches) . await ; } CliCommand :: InstanceSerialConsoleStreamV1 => { self . execute_instance_serial_console_stream_v1 (matches) . await ; } CliCommand :: InstanceStartV1 => { self . execute_instance_start_v1 (matches) . await ; } CliCommand :: InstanceStopV1 => { self . execute_instance_stop_v1 (matches) . await ; } CliCommand :: OrganizationListV1 => { self . execute_organization_list_v1 (matches) . await ; } CliCommand :: OrganizationCreateV1 => { self . execute_organization_create_v1 (matches) . await ; } CliCommand :: OrganizationViewV1 => { self . execute_organization_view_v1 (matches) . await ; } CliCommand :: OrganizationUpdateV1 => { self . execute_organization_update_v1 (matches) . await ; } CliCommand :: OrganizationDeleteV1 => { self . execute_organization_delete_v1 (matches) . await ; } CliCommand :: OrganizationPolicyViewV1 => { self . execute_organization_policy_view_v1 (matches) . await ; } CliCommand :: OrganizationPolicyUpdateV1 => { self . execute_organization_policy_update_v1 (matches) . await ; } CliCommand :: ProjectListV1 => { self . execute_project_list_v1 (matches) . await ; } CliCommand :: ProjectCreateV1 => { self . execute_project_create_v1 (matches) . await ; } CliCommand :: ProjectViewV1 => { self . execute_project_view_v1 (matches) . await ; } CliCommand :: ProjectUpdateV1 => { self . execute_project_update_v1 (matches) . await ; } CliCommand :: ProjectDeleteV1 => { self . execute_project_delete_v1 (matches) . await ; } CliCommand :: ProjectPolicyViewV1 => { self . execute_project_policy_view_v1 (matches) . await ; } CliCommand :: ProjectPolicyUpdateV1 => { self . execute_project_policy_update_v1 (matches) . await ; } CliCommand :: SystemComponentVersionList => { self . execute_system_component_version_list (matches) . await ; } CliCommand :: UpdateDeploymentsList => { self . execute_update_deployments_list (matches) . await ; } CliCommand :: UpdateDeploymentView => { self . execute_update_deployment_view (matches) . await ; } CliCommand :: SystemUpdateRefresh => { self . execute_system_update_refresh (matches) . await ; } CliCommand :: SystemUpdateStart => { self . execute_system_update_start (matches) . await ; } CliCommand :: SystemUpdateStop => { self . execute_system_update_stop (matches) . await ; } CliCommand :: SystemUpdateList => { self . execute_system_update_list (matches) . await ; } CliCommand :: SystemUpdateView => { self . execute_system_update_view (matches) . await ; } CliCommand :: SystemUpdateComponentsList => { self . execute_system_update_components_list (matches) . await ; } CliCommand :: SystemVersion => { self . execute_system_version (matches) . await ; } } } pub async fn execute_disk_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_disk_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_image_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . image_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_image_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_instance_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_network_interface_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_network_interface_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_instance_network_interface_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_organization_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_project_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_snapshot_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . snapshot_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_snapshot_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_route_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_route_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_vpc_router_route_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_vpc_router_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_subnet_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_subnet_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_vpc_subnet_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_vpc_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_device_auth_request (& self , matches : & clap :: ArgMatches) { let mut request = self . client . device_auth_request () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("client-id" ,) { request = request . body_map (| body | { body . client_id (value . clone ()) }) } self . over . execute_device_auth_request (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { todo ! () } } } pub async fn execute_device_auth_confirm (& self , matches : & clap :: ArgMatches) { let mut request = self . client . device_auth_confirm () ; if let Some (value) = matches . get_one :: < String > ("user-code" ,) { request = request . body_map (| body | { body . user_code (value . clone ()) }) } self . over . execute_device_auth_confirm (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_device_access_token (& self , matches : & clap :: ArgMatches) { let mut request = self . client . device_access_token () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("client-id" ,) { request = request . body_map (| body | { body . client_id (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("device-code" ,) { request = request . body_map (| body | { body . device_code (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("grant-type" ,) { request = request . body_map (| body | { body . grant_type (value . clone ()) }) } self . over . execute_device_access_token (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { todo ! () } } } pub async fn execute_group_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . group_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_group_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_login_spoof (& self , matches : & clap :: ArgMatches) { let mut request = self . client . login_spoof () ; if let Some (value) = matches . get_one :: < String > ("username" ,) { request = request . body_map (| body | { body . username (value . clone ()) }) } self . over . execute_login_spoof (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_login_local (& self , matches : & clap :: ArgMatches) { let mut request = self . client . login_local () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Password > ("password" ,) { request = request . body_map (| body | { body . password (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: UserId > ("username" ,) { request = request . body_map (| body | { body . username (value . clone ()) }) } self . over . execute_login_local (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_login_saml_begin (& self , matches : & clap :: ArgMatches) { let mut request = self . client . login_saml_begin () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("provider-name") { request = request . provider_name (value . clone ()) ; } self . over . execute_login_saml_begin (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_login_saml (& self , matches : & clap :: ArgMatches) { let mut request = self . client . login_saml () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("provider-name") { request = request . provider_name (value . clone ()) ; } self . over . execute_login_saml (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_logout (& self , matches : & clap :: ArgMatches) { let mut request = self . client . logout () ; self . over . execute_logout (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_organization_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_create () ; if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_organization_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } self . over . execute_organization_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_organization_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } self . over . execute_organization_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_policy_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_policy_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } self . over . execute_organization_policy_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_policy_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_policy_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } self . over . execute_organization_policy_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_project_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_project_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } self . over . execute_project_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_project_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } self . over . execute_project_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_disk_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: ByteCount > ("size" ,) { request = request . body_map (| body | { body . size (value . clone ()) }) } self . over . execute_disk_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("disk-name") { request = request . disk_name (value . clone ()) ; } self . over . execute_disk_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("disk-name") { request = request . disk_name (value . clone ()) ; } self . over . execute_disk_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_metrics_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_metrics_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("disk-name") { request = request . disk_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: DiskMetricName > ("metric-name") { request = request . metric_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < chrono :: DateTime < chrono :: offset :: Utc > > ("end-time") { request = request . end_time (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < chrono :: DateTime < chrono :: offset :: Utc > > ("start-time") { request = request . start_time (value . clone ()) ; } self . over . execute_disk_metrics_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_image_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . image_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_image_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_image_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . image_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_image_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_image_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . image_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("image-name") { request = request . image_name (value . clone ()) ; } self . over . execute_image_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_image_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . image_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("image-name") { request = request . image_name (value . clone ()) ; } self . over . execute_image_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_instance_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("hostname" ,) { request = request . body_map (| body | { body . hostname (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: ByteCount > ("memory" ,) { request = request . body_map (| body | { body . memory (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: InstanceCpuCount > ("ncpus" ,) { request = request . body_map (| body | { body . ncpus (value . clone ()) }) } if let Some (value) = matches . get_one :: < bool > ("start" ,) { request = request . body_map (| body | { body . start (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("user-data" ,) { request = request . body_map (| body | { body . user_data (value . clone ()) }) } self . over . execute_instance_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } self . over . execute_instance_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } self . over . execute_instance_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_disk_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_disk_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_instance_disk_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_disk_attach (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_disk_attach () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_instance_disk_attach (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_disk_detach (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_disk_detach () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_instance_disk_detach (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_external_ip_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_external_ip_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } self . over . execute_instance_external_ip_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_migrate (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_migrate () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < uuid :: Uuid > ("dst-sled-id" ,) { request = request . body_map (| body | { body . dst_sled_id (value . clone ()) }) } self . over . execute_instance_migrate (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_network_interface_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_network_interface_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_instance_network_interface_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_network_interface_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_network_interface_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < std :: net :: IpAddr > ("ip" ,) { request = request . body_map (| body | { body . ip (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("subnet-name" ,) { request = request . body_map (| body | { body . subnet_name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name" ,) { request = request . body_map (| body | { body . vpc_name (value . clone ()) }) } self . over . execute_instance_network_interface_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_network_interface_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_network_interface_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("interface-name") { request = request . interface_name (value . clone ()) ; } self . over . execute_instance_network_interface_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_network_interface_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_network_interface_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("interface-name") { request = request . interface_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < bool > ("primary" ,) { request = request . body_map (| body | { body . primary (value . clone ()) }) } self . over . execute_instance_network_interface_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_network_interface_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_network_interface_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("interface-name") { request = request . interface_name (value . clone ()) ; } self . over . execute_instance_network_interface_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_reboot (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_reboot () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } self . over . execute_instance_reboot (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_serial_console (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_serial_console () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < u64 > ("from-start") { request = request . from_start (value . clone ()) ; } if let Some (value) = matches . get_one :: < u64 > ("max-bytes") { request = request . max_bytes (value . clone ()) ; } if let Some (value) = matches . get_one :: < u64 > ("most-recent") { request = request . most_recent (value . clone ()) ; } self . over . execute_instance_serial_console (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_serial_console_stream (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_serial_console_stream () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } self . over . execute_instance_serial_console_stream (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { todo ! () } } } pub async fn execute_instance_start (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_start () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } self . over . execute_instance_start (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_stop (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_stop () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("instance-name") { request = request . instance_name (value . clone ()) ; } self . over . execute_instance_stop (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_policy_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_policy_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } self . over . execute_project_policy_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_policy_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_policy_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } self . over . execute_project_policy_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_snapshot_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . snapshot_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_snapshot_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_snapshot_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . snapshot_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("disk" ,) { request = request . body_map (| body | { body . disk (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_snapshot_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_snapshot_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . snapshot_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("snapshot-name") { request = request . snapshot_name (value . clone ()) ; } self . over . execute_snapshot_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_snapshot_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . snapshot_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("snapshot-name") { request = request . snapshot_name (value . clone ()) ; } self . over . execute_snapshot_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_vpc_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("dns-name" ,) { request = request . body_map (| body | { body . dns_name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Ipv6Net > ("ipv6-prefix" ,) { request = request . body_map (| body | { body . ipv6_prefix (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_vpc_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } self . over . execute_vpc_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("dns-name" ,) { request = request . body_map (| body | { body . dns_name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_vpc_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } self . over . execute_vpc_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_firewall_rules_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_firewall_rules_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } self . over . execute_vpc_firewall_rules_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_firewall_rules_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_firewall_rules_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } self . over . execute_vpc_firewall_rules_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_vpc_router_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_vpc_router_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("router-name") { request = request . router_name (value . clone ()) ; } self . over . execute_vpc_router_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("router-name") { request = request . router_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_vpc_router_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("router-name") { request = request . router_name (value . clone ()) ; } self . over . execute_vpc_router_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_route_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_route_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("router-name") { request = request . router_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_vpc_router_route_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_route_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_route_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("router-name") { request = request . router_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_vpc_router_route_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_route_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_route_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("router-name") { request = request . router_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("route-name") { request = request . route_name (value . clone ()) ; } self . over . execute_vpc_router_route_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_route_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_route_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("router-name") { request = request . router_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("route-name") { request = request . route_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_vpc_router_route_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_router_route_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_router_route_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("router-name") { request = request . router_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("route-name") { request = request . route_name (value . clone ()) ; } self . over . execute_vpc_router_route_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_subnet_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_subnet_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_vpc_subnet_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_subnet_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_subnet_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Ipv4Net > ("ipv4-block" ,) { request = request . body_map (| body | { body . ipv4_block (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Ipv6Net > ("ipv6-block" ,) { request = request . body_map (| body | { body . ipv6_block (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_vpc_subnet_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_subnet_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_subnet_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("subnet-name") { request = request . subnet_name (value . clone ()) ; } self . over . execute_vpc_subnet_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_subnet_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_subnet_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("subnet-name") { request = request . subnet_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_vpc_subnet_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_subnet_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_subnet_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("subnet-name") { request = request . subnet_name (value . clone ()) ; } self . over . execute_vpc_subnet_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_vpc_subnet_list_network_interfaces (& self , matches : & clap :: ArgMatches) { let mut request = self . client . vpc_subnet_list_network_interfaces () ; if let Some (value) = matches . get_one :: < types :: Name > ("organization-name") { request = request . organization_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("project-name") { request = request . project_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("vpc-name") { request = request . vpc_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("subnet-name") { request = request . subnet_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_vpc_subnet_list_network_interfaces (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_policy_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . policy_view () ; self . over . execute_policy_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_policy_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . policy_update () ; self . over . execute_policy_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_role_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . role_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } self . over . execute_role_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_role_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . role_view () ; if let Some (value) = matches . get_one :: < String > ("role-name") { request = request . role_name (value . clone ()) ; } self . over . execute_role_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_session_me (& self , matches : & clap :: ArgMatches) { let mut request = self . client . session_me () ; self . over . execute_session_me (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_session_me_groups (& self , matches : & clap :: ArgMatches) { let mut request = self . client . session_me_groups () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_session_me_groups (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_session_sshkey_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . session_sshkey_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_session_sshkey_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_session_sshkey_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . session_sshkey_create () ; if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("public-key" ,) { request = request . body_map (| body | { body . public_key (value . clone ()) }) } self . over . execute_session_sshkey_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_session_sshkey_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . session_sshkey_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("ssh-key-name") { request = request . ssh_key_name (value . clone ()) ; } self . over . execute_session_sshkey_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_session_sshkey_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . session_sshkey_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("ssh-key-name") { request = request . ssh_key_name (value . clone ()) ; } self . over . execute_session_sshkey_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_image_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_image_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_system_image_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_ip_pool_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_view_by_id (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_view_by_id () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_silo_view_by_id (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_certificate_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . certificate_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_certificate_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_certificate_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . certificate_create () ; if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: ServiceUsingCertificate > ("service" ,) { request = request . body_map (| body | { body . service (value . clone ()) }) } self . over . execute_certificate_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_certificate_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . certificate_view () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("certificate") { request = request . certificate (value . clone ()) ; } self . over . execute_certificate_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_certificate_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . certificate_delete () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("certificate") { request = request . certificate (value . clone ()) ; } self . over . execute_certificate_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_physical_disk_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . physical_disk_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_physical_disk_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_rack_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . rack_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_rack_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_rack_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . rack_view () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("rack-id") { request = request . rack_id (value . clone ()) ; } self . over . execute_rack_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_sled_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . sled_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_sled_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_sled_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . sled_view () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("sled-id") { request = request . sled_id (value . clone ()) ; } self . over . execute_sled_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_sled_physical_disk_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . sled_physical_disk_list () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("sled-id") { request = request . sled_id (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_sled_physical_disk_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_image_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_image_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_system_image_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_image_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_image_create () ; if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_system_image_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_image_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_image_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("image-name") { request = request . image_name (value . clone ()) ; } self . over . execute_system_image_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_image_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_image_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("image-name") { request = request . image_name (value . clone ()) ; } self . over . execute_system_image_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_ip_pool_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_create () ; if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_ip_pool_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("pool-name") { request = request . pool_name (value . clone ()) ; } self . over . execute_ip_pool_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("pool-name") { request = request . pool_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_ip_pool_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("pool-name") { request = request . pool_name (value . clone ()) ; } self . over . execute_ip_pool_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_range_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_range_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("pool-name") { request = request . pool_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } self . over . execute_ip_pool_range_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_range_add (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_range_add () ; if let Some (value) = matches . get_one :: < types :: Name > ("pool-name") { request = request . pool_name (value . clone ()) ; } self . over . execute_ip_pool_range_add (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_range_remove (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_range_remove () ; if let Some (value) = matches . get_one :: < types :: Name > ("pool-name") { request = request . pool_name (value . clone ()) ; } self . over . execute_ip_pool_range_remove (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_service_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_service_view () ; self . over . execute_ip_pool_service_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_service_range_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_service_range_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } self . over . execute_ip_pool_service_range_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_service_range_add (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_service_range_add () ; self . over . execute_ip_pool_service_range_add (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_ip_pool_service_range_remove (& self , matches : & clap :: ArgMatches) { let mut request = self . client . ip_pool_service_range_remove () ; self . over . execute_ip_pool_service_range_remove (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_metric (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_metric () ; if let Some (value) = matches . get_one :: < types :: SystemMetricName > ("metric-name") { request = request . metric_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < chrono :: DateTime < chrono :: offset :: Utc > > ("end-time") { request = request . end_time (value . clone ()) ; } if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("page-token") { request = request . page_token (value . clone ()) ; } if let Some (value) = matches . get_one :: < chrono :: DateTime < chrono :: offset :: Utc > > ("start-time") { request = request . start_time (value . clone ()) ; } self . over . execute_system_metric (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_policy_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_policy_view () ; self . over . execute_system_policy_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_policy_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_policy_update () ; self . over . execute_system_policy_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_saga_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . saga_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_saga_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_saga_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . saga_view () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("saga-id") { request = request . saga_id (value . clone ()) ; } self . over . execute_saga_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_silo_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_create () ; if let Some (value) = matches . get_one :: < String > ("admin-group-name" ,) { request = request . body_map (| body | { body . admin_group_name (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < bool > ("discoverable" ,) { request = request . body_map (| body | { body . discoverable (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: SiloIdentityMode > ("identity-mode" ,) { request = request . body_map (| body | { body . identity_mode (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_silo_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } self . over . execute_silo_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } self . over . execute_silo_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_identity_provider_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_identity_provider_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_silo_identity_provider_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_local_idp_user_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . local_idp_user_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: UserId > ("external-id" ,) { request = request . body_map (| body | { body . external_id (value . clone ()) }) } self . over . execute_local_idp_user_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_local_idp_user_delete (& self , matches : & clap :: ArgMatches) { let mut request = self . client . local_idp_user_delete () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < uuid :: Uuid > ("user-id") { request = request . user_id (value . clone ()) ; } self . over . execute_local_idp_user_delete (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_local_idp_user_set_password (& self , matches : & clap :: ArgMatches) { let mut request = self . client . local_idp_user_set_password () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < uuid :: Uuid > ("user-id") { request = request . user_id (value . clone ()) ; } self . over . execute_local_idp_user_set_password (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_saml_identity_provider_create (& self , matches : & clap :: ArgMatches) { let mut request = self . client . saml_identity_provider_create () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("acs-url" ,) { request = request . body_map (| body | { body . acs_url (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("group-attribute-name" ,) { request = request . body_map (| body | { body . group_attribute_name (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("idp-entity-id" ,) { request = request . body_map (| body | { body . idp_entity_id (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("slo-url" ,) { request = request . body_map (| body | { body . slo_url (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("sp-client-id" ,) { request = request . body_map (| body | { body . sp_client_id (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("technical-contact-email" ,) { request = request . body_map (| body | { body . technical_contact_email (value . clone ()) }) } self . over . execute_saml_identity_provider_create (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_saml_identity_provider_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . saml_identity_provider_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: Name > ("provider-name") { request = request . provider_name (value . clone ()) ; } self . over . execute_saml_identity_provider_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_policy_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_policy_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } self . over . execute_silo_policy_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_policy_update (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_policy_update () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } self . over . execute_silo_policy_update (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_users_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_users_list () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_silo_users_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_silo_user_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . silo_user_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("silo-name") { request = request . silo_name (value . clone ()) ; } if let Some (value) = matches . get_one :: < uuid :: Uuid > ("user-id") { request = request . user_id (value . clone ()) ; } self . over . execute_silo_user_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_user_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_user_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_system_user_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_user_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_user_view () ; if let Some (value) = matches . get_one :: < types :: Name > ("user-name") { request = request . user_name (value . clone ()) ; } self . over . execute_system_user_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_timeseries_schema_get (& self , matches : & clap :: ArgMatches) { let mut request = self . client . timeseries_schema_get () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } self . over . execute_timeseries_schema_get (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_user_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . user_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_user_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_list_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_list_v1 () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_disk_list_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_create_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_create_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: ByteCount > ("size" ,) { request = request . body_map (| body | { body . size (value . clone ()) }) } self . over . execute_disk_create_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_view_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_view_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("disk") { request = request . disk (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_disk_view_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_disk_delete_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . disk_delete_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("disk") { request = request . disk (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_disk_delete_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_list_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_list_v1 () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_instance_list_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_create_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_create_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("hostname" ,) { request = request . body_map (| body | { body . hostname (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: ByteCount > ("memory" ,) { request = request . body_map (| body | { body . memory (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: InstanceCpuCount > ("ncpus" ,) { request = request . body_map (| body | { body . ncpus (value . clone ()) }) } if let Some (value) = matches . get_one :: < bool > ("start" ,) { request = request . body_map (| body | { body . start (value . clone ()) }) } if let Some (value) = matches . get_one :: < String > ("user-data" ,) { request = request . body_map (| body | { body . user_data (value . clone ()) }) } self . over . execute_instance_create_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_view_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_view_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_instance_view_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_delete_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_delete_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_instance_delete_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_disk_list_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_disk_list_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_instance_disk_list_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_disk_attach_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_disk_attach_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("disk" ,) { request = request . body_map (| body | { body . disk (value . clone ()) }) } self . over . execute_instance_disk_attach_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_disk_detach_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_disk_detach_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("disk" ,) { request = request . body_map (| body | { body . disk (value . clone ()) }) } self . over . execute_instance_disk_detach_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_migrate_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_migrate_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < uuid :: Uuid > ("dst-sled-id" ,) { request = request . body_map (| body | { body . dst_sled_id (value . clone ()) }) } self . over . execute_instance_migrate_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_reboot_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_reboot_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_instance_reboot_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_serial_console_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_serial_console_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < u64 > ("from-start") { request = request . from_start (value . clone ()) ; } if let Some (value) = matches . get_one :: < u64 > ("max-bytes") { request = request . max_bytes (value . clone ()) ; } if let Some (value) = matches . get_one :: < u64 > ("most-recent") { request = request . most_recent (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_instance_serial_console_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_serial_console_stream_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_serial_console_stream_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_instance_serial_console_stream_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { todo ! () } } } pub async fn execute_instance_start_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_start_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_instance_start_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_stop_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_stop_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("instance") { request = request . instance (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } self . over . execute_instance_stop_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_list_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_list_v1 () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_organization_list_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_create_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_create_v1 () ; if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_organization_create_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_view_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_view_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } self . over . execute_organization_view_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_update_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_update_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_organization_update_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_delete_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_delete_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } self . over . execute_organization_delete_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_policy_view_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_policy_view_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } self . over . execute_organization_policy_view_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_organization_policy_update_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . organization_policy_update_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } self . over . execute_organization_policy_update_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_list_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_list_v1 () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrIdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_project_list_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_create_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_create_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_project_create_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_view_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_view_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } self . over . execute_project_view_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_update_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_update_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("description" ,) { request = request . body_map (| body | { body . description (value . clone ()) }) } if let Some (value) = matches . get_one :: < types :: Name > ("name" ,) { request = request . body_map (| body | { body . name (value . clone ()) }) } self . over . execute_project_update_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_delete_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_delete_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } self . over . execute_project_delete_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_policy_view_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_policy_view_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } self . over . execute_project_policy_view_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_project_policy_update_v1 (& self , matches : & clap :: ArgMatches) { let mut request = self . client . project_policy_update_v1 () ; if let Some (value) = matches . get_one :: < types :: NameOrId > ("project") { request = request . project (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: NameOrId > ("organization") { request = request . organization (value . clone ()) ; } self . over . execute_project_policy_update_v1 (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_component_version_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_component_version_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_system_component_version_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_update_deployments_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . update_deployments_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_update_deployments_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_update_deployment_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . update_deployment_view () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } self . over . execute_update_deployment_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_update_refresh (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_update_refresh () ; self . over . execute_system_update_refresh (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_update_start (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_update_start () ; if let Some (value) = matches . get_one :: < types :: SemverVersion > ("version" ,) { request = request . body_map (| body | { body . version (value . clone ()) }) } self . over . execute_system_update_start (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_update_stop (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_update_stop () ; self . over . execute_system_update_stop (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_update_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_update_list () ; if let Some (value) = matches . get_one :: < std :: num :: NonZeroU32 > ("limit") { request = request . limit (value . clone ()) ; } if let Some (value) = matches . get_one :: < types :: IdSortMode > ("sort-by") { request = request . sort_by (value . clone ()) ; } self . over . execute_system_update_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_update_view (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_update_view () ; if let Some (value) = matches . get_one :: < types :: SemverVersion > ("version") { request = request . version (value . clone ()) ; } self . over . execute_system_update_view (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_update_components_list (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_update_components_list () ; if let Some (value) = matches . get_one :: < types :: SemverVersion > ("version") { request = request . version (value . clone ()) ; } self . over . execute_system_update_components_list (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_system_version (& self , matches : & clap :: ArgMatches) { let mut request = self . client . system_version () ; self . over . execute_system_version (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } } pub trait CliOverride { fn execute_disk_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskViewById ,) -> Result < () , String > { Ok (()) } fn execute_image_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: ImageViewById ,) -> Result < () , String > { Ok (()) } fn execute_instance_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceViewById ,) -> Result < () , String > { Ok (()) } fn execute_instance_network_interface_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceNetworkInterfaceViewById ,) -> Result < () , String > { Ok (()) } fn execute_organization_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationViewById ,) -> Result < () , String > { Ok (()) } fn execute_project_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectViewById ,) -> Result < () , String > { Ok (()) } fn execute_snapshot_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: SnapshotViewById ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_route_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterRouteViewById ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterViewById ,) -> Result < () , String > { Ok (()) } fn execute_vpc_subnet_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcSubnetViewById ,) -> Result < () , String > { Ok (()) } fn execute_vpc_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcViewById ,) -> Result < () , String > { Ok (()) } fn execute_device_auth_request (& self , matches : & clap :: ArgMatches , request : & mut builder :: DeviceAuthRequest ,) -> Result < () , String > { Ok (()) } fn execute_device_auth_confirm (& self , matches : & clap :: ArgMatches , request : & mut builder :: DeviceAuthConfirm ,) -> Result < () , String > { Ok (()) } fn execute_device_access_token (& self , matches : & clap :: ArgMatches , request : & mut builder :: DeviceAccessToken ,) -> Result < () , String > { Ok (()) } fn execute_group_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: GroupList ,) -> Result < () , String > { Ok (()) } fn execute_login_spoof (& self , matches : & clap :: ArgMatches , request : & mut builder :: LoginSpoof ,) -> Result < () , String > { Ok (()) } fn execute_login_local (& self , matches : & clap :: ArgMatches , request : & mut builder :: LoginLocal ,) -> Result < () , String > { Ok (()) } fn execute_login_saml_begin (& self , matches : & clap :: ArgMatches , request : & mut builder :: LoginSamlBegin ,) -> Result < () , String > { Ok (()) } fn execute_login_saml (& self , matches : & clap :: ArgMatches , request : & mut builder :: LoginSaml ,) -> Result < () , String > { Ok (()) } fn execute_logout (& self , matches : & clap :: ArgMatches , request : & mut builder :: Logout ,) -> Result < () , String > { Ok (()) } fn execute_organization_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationList ,) -> Result < () , String > { Ok (()) } fn execute_organization_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationCreate ,) -> Result < () , String > { Ok (()) } fn execute_organization_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationView ,) -> Result < () , String > { Ok (()) } fn execute_organization_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationUpdate ,) -> Result < () , String > { Ok (()) } fn execute_organization_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationDelete ,) -> Result < () , String > { Ok (()) } fn execute_organization_policy_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationPolicyView ,) -> Result < () , String > { Ok (()) } fn execute_organization_policy_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationPolicyUpdate ,) -> Result < () , String > { Ok (()) } fn execute_project_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectList ,) -> Result < () , String > { Ok (()) } fn execute_project_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectCreate ,) -> Result < () , String > { Ok (()) } fn execute_project_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectView ,) -> Result < () , String > { Ok (()) } fn execute_project_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectUpdate ,) -> Result < () , String > { Ok (()) } fn execute_project_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectDelete ,) -> Result < () , String > { Ok (()) } fn execute_disk_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskList ,) -> Result < () , String > { Ok (()) } fn execute_disk_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskCreate ,) -> Result < () , String > { Ok (()) } fn execute_disk_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskView ,) -> Result < () , String > { Ok (()) } fn execute_disk_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskDelete ,) -> Result < () , String > { Ok (()) } fn execute_disk_metrics_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskMetricsList ,) -> Result < () , String > { Ok (()) } fn execute_image_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: ImageList ,) -> Result < () , String > { Ok (()) } fn execute_image_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: ImageCreate ,) -> Result < () , String > { Ok (()) } fn execute_image_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: ImageView ,) -> Result < () , String > { Ok (()) } fn execute_image_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: ImageDelete ,) -> Result < () , String > { Ok (()) } fn execute_instance_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceList ,) -> Result < () , String > { Ok (()) } fn execute_instance_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceCreate ,) -> Result < () , String > { Ok (()) } fn execute_instance_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceView ,) -> Result < () , String > { Ok (()) } fn execute_instance_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceDelete ,) -> Result < () , String > { Ok (()) } fn execute_instance_disk_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceDiskList ,) -> Result < () , String > { Ok (()) } fn execute_instance_disk_attach (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceDiskAttach ,) -> Result < () , String > { Ok (()) } fn execute_instance_disk_detach (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceDiskDetach ,) -> Result < () , String > { Ok (()) } fn execute_instance_external_ip_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceExternalIpList ,) -> Result < () , String > { Ok (()) } fn execute_instance_migrate (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceMigrate ,) -> Result < () , String > { Ok (()) } fn execute_instance_network_interface_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceNetworkInterfaceList ,) -> Result < () , String > { Ok (()) } fn execute_instance_network_interface_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceNetworkInterfaceCreate ,) -> Result < () , String > { Ok (()) } fn execute_instance_network_interface_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceNetworkInterfaceView ,) -> Result < () , String > { Ok (()) } fn execute_instance_network_interface_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceNetworkInterfaceUpdate ,) -> Result < () , String > { Ok (()) } fn execute_instance_network_interface_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceNetworkInterfaceDelete ,) -> Result < () , String > { Ok (()) } fn execute_instance_reboot (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceReboot ,) -> Result < () , String > { Ok (()) } fn execute_instance_serial_console (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceSerialConsole ,) -> Result < () , String > { Ok (()) } fn execute_instance_serial_console_stream (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceSerialConsoleStream ,) -> Result < () , String > { Ok (()) } fn execute_instance_start (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceStart ,) -> Result < () , String > { Ok (()) } fn execute_instance_stop (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceStop ,) -> Result < () , String > { Ok (()) } fn execute_project_policy_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectPolicyView ,) -> Result < () , String > { Ok (()) } fn execute_project_policy_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectPolicyUpdate ,) -> Result < () , String > { Ok (()) } fn execute_snapshot_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SnapshotList ,) -> Result < () , String > { Ok (()) } fn execute_snapshot_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: SnapshotCreate ,) -> Result < () , String > { Ok (()) } fn execute_snapshot_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SnapshotView ,) -> Result < () , String > { Ok (()) } fn execute_snapshot_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: SnapshotDelete ,) -> Result < () , String > { Ok (()) } fn execute_vpc_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcList ,) -> Result < () , String > { Ok (()) } fn execute_vpc_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcCreate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcView ,) -> Result < () , String > { Ok (()) } fn execute_vpc_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcUpdate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcDelete ,) -> Result < () , String > { Ok (()) } fn execute_vpc_firewall_rules_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcFirewallRulesView ,) -> Result < () , String > { Ok (()) } fn execute_vpc_firewall_rules_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcFirewallRulesUpdate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterList ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterCreate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterView ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterUpdate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterDelete ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_route_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterRouteList ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_route_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterRouteCreate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_route_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterRouteView ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_route_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterRouteUpdate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_router_route_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcRouterRouteDelete ,) -> Result < () , String > { Ok (()) } fn execute_vpc_subnet_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcSubnetList ,) -> Result < () , String > { Ok (()) } fn execute_vpc_subnet_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcSubnetCreate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_subnet_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcSubnetView ,) -> Result < () , String > { Ok (()) } fn execute_vpc_subnet_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcSubnetUpdate ,) -> Result < () , String > { Ok (()) } fn execute_vpc_subnet_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcSubnetDelete ,) -> Result < () , String > { Ok (()) } fn execute_vpc_subnet_list_network_interfaces (& self , matches : & clap :: ArgMatches , request : & mut builder :: VpcSubnetListNetworkInterfaces ,) -> Result < () , String > { Ok (()) } fn execute_policy_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: PolicyView ,) -> Result < () , String > { Ok (()) } fn execute_policy_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: PolicyUpdate ,) -> Result < () , String > { Ok (()) } fn execute_role_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: RoleList ,) -> Result < () , String > { Ok (()) } fn execute_role_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: RoleView ,) -> Result < () , String > { Ok (()) } fn execute_session_me (& self , matches : & clap :: ArgMatches , request : & mut builder :: SessionMe ,) -> Result < () , String > { Ok (()) } fn execute_session_me_groups (& self , matches : & clap :: ArgMatches , request : & mut builder :: SessionMeGroups ,) -> Result < () , String > { Ok (()) } fn execute_session_sshkey_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SessionSshkeyList ,) -> Result < () , String > { Ok (()) } fn execute_session_sshkey_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: SessionSshkeyCreate ,) -> Result < () , String > { Ok (()) } fn execute_session_sshkey_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SessionSshkeyView ,) -> Result < () , String > { Ok (()) } fn execute_session_sshkey_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: SessionSshkeyDelete ,) -> Result < () , String > { Ok (()) } fn execute_system_image_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemImageViewById ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolViewById ,) -> Result < () , String > { Ok (()) } fn execute_silo_view_by_id (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloViewById ,) -> Result < () , String > { Ok (()) } fn execute_certificate_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: CertificateList ,) -> Result < () , String > { Ok (()) } fn execute_certificate_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: CertificateCreate ,) -> Result < () , String > { Ok (()) } fn execute_certificate_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: CertificateView ,) -> Result < () , String > { Ok (()) } fn execute_certificate_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: CertificateDelete ,) -> Result < () , String > { Ok (()) } fn execute_physical_disk_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: PhysicalDiskList ,) -> Result < () , String > { Ok (()) } fn execute_rack_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: RackList ,) -> Result < () , String > { Ok (()) } fn execute_rack_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: RackView ,) -> Result < () , String > { Ok (()) } fn execute_sled_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SledList ,) -> Result < () , String > { Ok (()) } fn execute_sled_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SledView ,) -> Result < () , String > { Ok (()) } fn execute_sled_physical_disk_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SledPhysicalDiskList ,) -> Result < () , String > { Ok (()) } fn execute_system_image_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemImageList ,) -> Result < () , String > { Ok (()) } fn execute_system_image_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemImageCreate ,) -> Result < () , String > { Ok (()) } fn execute_system_image_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemImageView ,) -> Result < () , String > { Ok (()) } fn execute_system_image_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemImageDelete ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolList ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolCreate ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolView ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolUpdate ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolDelete ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_range_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolRangeList ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_range_add (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolRangeAdd ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_range_remove (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolRangeRemove ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_service_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolServiceView ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_service_range_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolServiceRangeList ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_service_range_add (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolServiceRangeAdd ,) -> Result < () , String > { Ok (()) } fn execute_ip_pool_service_range_remove (& self , matches : & clap :: ArgMatches , request : & mut builder :: IpPoolServiceRangeRemove ,) -> Result < () , String > { Ok (()) } fn execute_system_metric (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemMetric ,) -> Result < () , String > { Ok (()) } fn execute_system_policy_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemPolicyView ,) -> Result < () , String > { Ok (()) } fn execute_system_policy_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemPolicyUpdate ,) -> Result < () , String > { Ok (()) } fn execute_saga_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SagaList ,) -> Result < () , String > { Ok (()) } fn execute_saga_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SagaView ,) -> Result < () , String > { Ok (()) } fn execute_silo_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloList ,) -> Result < () , String > { Ok (()) } fn execute_silo_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloCreate ,) -> Result < () , String > { Ok (()) } fn execute_silo_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloView ,) -> Result < () , String > { Ok (()) } fn execute_silo_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloDelete ,) -> Result < () , String > { Ok (()) } fn execute_silo_identity_provider_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloIdentityProviderList ,) -> Result < () , String > { Ok (()) } fn execute_local_idp_user_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: LocalIdpUserCreate ,) -> Result < () , String > { Ok (()) } fn execute_local_idp_user_delete (& self , matches : & clap :: ArgMatches , request : & mut builder :: LocalIdpUserDelete ,) -> Result < () , String > { Ok (()) } fn execute_local_idp_user_set_password (& self , matches : & clap :: ArgMatches , request : & mut builder :: LocalIdpUserSetPassword ,) -> Result < () , String > { Ok (()) } fn execute_saml_identity_provider_create (& self , matches : & clap :: ArgMatches , request : & mut builder :: SamlIdentityProviderCreate ,) -> Result < () , String > { Ok (()) } fn execute_saml_identity_provider_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SamlIdentityProviderView ,) -> Result < () , String > { Ok (()) } fn execute_silo_policy_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloPolicyView ,) -> Result < () , String > { Ok (()) } fn execute_silo_policy_update (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloPolicyUpdate ,) -> Result < () , String > { Ok (()) } fn execute_silo_users_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloUsersList ,) -> Result < () , String > { Ok (()) } fn execute_silo_user_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SiloUserView ,) -> Result < () , String > { Ok (()) } fn execute_system_user_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemUserList ,) -> Result < () , String > { Ok (()) } fn execute_system_user_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemUserView ,) -> Result < () , String > { Ok (()) } fn execute_timeseries_schema_get (& self , matches : & clap :: ArgMatches , request : & mut builder :: TimeseriesSchemaGet ,) -> Result < () , String > { Ok (()) } fn execute_user_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: UserList ,) -> Result < () , String > { Ok (()) } fn execute_disk_list_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskListV1 ,) -> Result < () , String > { Ok (()) } fn execute_disk_create_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskCreateV1 ,) -> Result < () , String > { Ok (()) } fn execute_disk_view_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskViewV1 ,) -> Result < () , String > { Ok (()) } fn execute_disk_delete_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: DiskDeleteV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_list_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceListV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_create_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceCreateV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_view_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceViewV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_delete_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceDeleteV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_disk_list_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceDiskListV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_disk_attach_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceDiskAttachV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_disk_detach_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceDiskDetachV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_migrate_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceMigrateV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_reboot_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceRebootV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_serial_console_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceSerialConsoleV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_serial_console_stream_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceSerialConsoleStreamV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_start_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceStartV1 ,) -> Result < () , String > { Ok (()) } fn execute_instance_stop_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceStopV1 ,) -> Result < () , String > { Ok (()) } fn execute_organization_list_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationListV1 ,) -> Result < () , String > { Ok (()) } fn execute_organization_create_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationCreateV1 ,) -> Result < () , String > { Ok (()) } fn execute_organization_view_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationViewV1 ,) -> Result < () , String > { Ok (()) } fn execute_organization_update_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationUpdateV1 ,) -> Result < () , String > { Ok (()) } fn execute_organization_delete_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationDeleteV1 ,) -> Result < () , String > { Ok (()) } fn execute_organization_policy_view_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationPolicyViewV1 ,) -> Result < () , String > { Ok (()) } fn execute_organization_policy_update_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: OrganizationPolicyUpdateV1 ,) -> Result < () , String > { Ok (()) } fn execute_project_list_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectListV1 ,) -> Result < () , String > { Ok (()) } fn execute_project_create_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectCreateV1 ,) -> Result < () , String > { Ok (()) } fn execute_project_view_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectViewV1 ,) -> Result < () , String > { Ok (()) } fn execute_project_update_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectUpdateV1 ,) -> Result < () , String > { Ok (()) } fn execute_project_delete_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectDeleteV1 ,) -> Result < () , String > { Ok (()) } fn execute_project_policy_view_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectPolicyViewV1 ,) -> Result < () , String > { Ok (()) } fn execute_project_policy_update_v1 (& self , matches : & clap :: ArgMatches , request : & mut builder :: ProjectPolicyUpdateV1 ,) -> Result < () , String > { Ok (()) } fn execute_system_component_version_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemComponentVersionList ,) -> Result < () , String > { Ok (()) } fn execute_update_deployments_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: UpdateDeploymentsList ,) -> Result < () , String > { Ok (()) } fn execute_update_deployment_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: UpdateDeploymentView ,) -> Result < () , String > { Ok (()) } fn execute_system_update_refresh (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemUpdateRefresh ,) -> Result < () , String > { Ok (()) } fn execute_system_update_start (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemUpdateStart ,) -> Result < () , String > { Ok (()) } fn execute_system_update_stop (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemUpdateStop ,) -> Result < () , String > { Ok (()) } fn execute_system_update_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemUpdateList ,) -> Result < () , String > { Ok (()) } fn execute_system_update_view (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemUpdateView ,) -> Result < () , String > { Ok (()) } fn execute_system_update_components_list (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemUpdateComponentsList ,) -> Result < () , String > { Ok (()) } fn execute_system_version (& self , matches : & clap :: ArgMatches , request : & mut builder :: SystemVersion ,) -> Result < () , String > { Ok (()) } } impl CliOverride for () { } # [derive (Copy , Clone , Debug)] pub enum CliCommand { DiskViewById , ImageViewById , InstanceViewById , InstanceNetworkInterfaceViewById , OrganizationViewById , ProjectViewById , SnapshotViewById , VpcRouterRouteViewById , VpcRouterViewById , VpcSubnetViewById , VpcViewById , DeviceAuthRequest , DeviceAuthConfirm , DeviceAccessToken , GroupList , LoginSpoof , LoginLocal , LoginSamlBegin , LoginSaml , Logout , OrganizationList , OrganizationCreate , OrganizationView , OrganizationUpdate , OrganizationDelete , OrganizationPolicyView , OrganizationPolicyUpdate , ProjectList , ProjectCreate , ProjectView , ProjectUpdate , ProjectDelete , DiskList , DiskCreate , DiskView , DiskDelete , DiskMetricsList , ImageList , ImageCreate , ImageView , ImageDelete , InstanceList , InstanceCreate , InstanceView , InstanceDelete , InstanceDiskList , InstanceDiskAttach , InstanceDiskDetach , InstanceExternalIpList , InstanceMigrate , InstanceNetworkInterfaceList , InstanceNetworkInterfaceCreate , InstanceNetworkInterfaceView , InstanceNetworkInterfaceUpdate , InstanceNetworkInterfaceDelete , InstanceReboot , InstanceSerialConsole , InstanceSerialConsoleStream , InstanceStart , InstanceStop , ProjectPolicyView , ProjectPolicyUpdate , SnapshotList , SnapshotCreate , SnapshotView , SnapshotDelete , VpcList , VpcCreate , VpcView , VpcUpdate , VpcDelete , VpcFirewallRulesView , VpcFirewallRulesUpdate , VpcRouterList , VpcRouterCreate , VpcRouterView , VpcRouterUpdate , VpcRouterDelete , VpcRouterRouteList , VpcRouterRouteCreate , VpcRouterRouteView , VpcRouterRouteUpdate , VpcRouterRouteDelete , VpcSubnetList , VpcSubnetCreate , VpcSubnetView , VpcSubnetUpdate , VpcSubnetDelete , VpcSubnetListNetworkInterfaces , PolicyView , PolicyUpdate , RoleList , RoleView , SessionMe , SessionMeGroups , SessionSshkeyList , SessionSshkeyCreate , SessionSshkeyView , SessionSshkeyDelete , SystemImageViewById , IpPoolViewById , SiloViewById , CertificateList , CertificateCreate , CertificateView , CertificateDelete , PhysicalDiskList , RackList , RackView , SledList , SledView , SledPhysicalDiskList , SystemImageList , SystemImageCreate , SystemImageView , SystemImageDelete , IpPoolList , IpPoolCreate , IpPoolView , IpPoolUpdate , IpPoolDelete , IpPoolRangeList , IpPoolRangeAdd , IpPoolRangeRemove , IpPoolServiceView , IpPoolServiceRangeList , IpPoolServiceRangeAdd , IpPoolServiceRangeRemove , SystemMetric , SystemPolicyView , SystemPolicyUpdate , SagaList , SagaView , SiloList , SiloCreate , SiloView , SiloDelete , SiloIdentityProviderList , LocalIdpUserCreate , LocalIdpUserDelete , LocalIdpUserSetPassword , SamlIdentityProviderCreate , SamlIdentityProviderView , SiloPolicyView , SiloPolicyUpdate , SiloUsersList , SiloUserView , SystemUserList , SystemUserView , TimeseriesSchemaGet , UserList , DiskListV1 , DiskCreateV1 , DiskViewV1 , DiskDeleteV1 , InstanceListV1 , InstanceCreateV1 , InstanceViewV1 , InstanceDeleteV1 , InstanceDiskListV1 , InstanceDiskAttachV1 , InstanceDiskDetachV1 , InstanceMigrateV1 , InstanceRebootV1 , InstanceSerialConsoleV1 , InstanceSerialConsoleStreamV1 , InstanceStartV1 , InstanceStopV1 , OrganizationListV1 , OrganizationCreateV1 , OrganizationViewV1 , OrganizationUpdateV1 , OrganizationDeleteV1 , OrganizationPolicyViewV1 , OrganizationPolicyUpdateV1 , ProjectListV1 , ProjectCreateV1 , ProjectViewV1 , ProjectUpdateV1 , ProjectDeleteV1 , ProjectPolicyViewV1 , ProjectPolicyUpdateV1 , SystemComponentVersionList , UpdateDeploymentsList , UpdateDeploymentView , SystemUpdateRefresh , SystemUpdateStart , SystemUpdateStop , SystemUpdateList , SystemUpdateView , SystemUpdateComponentsList , SystemVersion , } impl CliCommand { pub fn iter () -> impl Iterator < Item = CliCommand > { vec ! [CliCommand :: DiskViewById , CliCommand :: ImageViewById , CliCommand :: InstanceViewById , CliCommand :: InstanceNetworkInterfaceViewById , CliCommand :: OrganizationViewById , CliCommand :: ProjectViewById , CliCommand :: SnapshotViewById , CliCommand :: VpcRouterRouteViewById , CliCommand :: VpcRouterViewById , CliCommand :: VpcSubnetViewById , CliCommand :: VpcViewById , CliCommand :: DeviceAuthRequest , CliCommand :: DeviceAuthConfirm , CliCommand :: DeviceAccessToken , CliCommand :: GroupList , CliCommand :: LoginSpoof , CliCommand :: LoginLocal , CliCommand :: LoginSamlBegin , CliCommand :: LoginSaml , CliCommand :: Logout , CliCommand :: OrganizationList , CliCommand :: OrganizationCreate , CliCommand :: OrganizationView , CliCommand :: OrganizationUpdate , CliCommand :: OrganizationDelete , CliCommand :: OrganizationPolicyView , CliCommand :: OrganizationPolicyUpdate , CliCommand :: ProjectList , CliCommand :: ProjectCreate , CliCommand :: ProjectView , CliCommand :: ProjectUpdate , CliCommand :: ProjectDelete , CliCommand :: DiskList , CliCommand :: DiskCreate , CliCommand :: DiskView , CliCommand :: DiskDelete , CliCommand :: DiskMetricsList , CliCommand :: ImageList , CliCommand :: ImageCreate , CliCommand :: ImageView , CliCommand :: ImageDelete , CliCommand :: InstanceList , CliCommand :: InstanceCreate , CliCommand :: InstanceView , CliCommand :: InstanceDelete , CliCommand :: InstanceDiskList , CliCommand :: InstanceDiskAttach , CliCommand :: InstanceDiskDetach , CliCommand :: InstanceExternalIpList , CliCommand :: InstanceMigrate , CliCommand :: InstanceNetworkInterfaceList , CliCommand :: InstanceNetworkInterfaceCreate , CliCommand :: InstanceNetworkInterfaceView , CliCommand :: InstanceNetworkInterfaceUpdate , CliCommand :: InstanceNetworkInterfaceDelete , CliCommand :: InstanceReboot , CliCommand :: InstanceSerialConsole , CliCommand :: InstanceSerialConsoleStream , CliCommand :: InstanceStart , CliCommand :: InstanceStop , CliCommand :: ProjectPolicyView , CliCommand :: ProjectPolicyUpdate , CliCommand :: SnapshotList , CliCommand :: SnapshotCreate , CliCommand :: SnapshotView , CliCommand :: SnapshotDelete , CliCommand :: VpcList , CliCommand :: VpcCreate , CliCommand :: VpcView , CliCommand :: VpcUpdate , CliCommand :: VpcDelete , CliCommand :: VpcFirewallRulesView , CliCommand :: VpcFirewallRulesUpdate , CliCommand :: VpcRouterList , CliCommand :: VpcRouterCreate , CliCommand :: VpcRouterView , CliCommand :: VpcRouterUpdate , CliCommand :: VpcRouterDelete , CliCommand :: VpcRouterRouteList , CliCommand :: VpcRouterRouteCreate , CliCommand :: VpcRouterRouteView , CliCommand :: VpcRouterRouteUpdate , CliCommand :: VpcRouterRouteDelete , CliCommand :: VpcSubnetList , CliCommand :: VpcSubnetCreate , CliCommand :: VpcSubnetView , CliCommand :: VpcSubnetUpdate , CliCommand :: VpcSubnetDelete , CliCommand :: VpcSubnetListNetworkInterfaces , CliCommand :: PolicyView , CliCommand :: PolicyUpdate , CliCommand :: RoleList , CliCommand :: RoleView , CliCommand :: SessionMe , CliCommand :: SessionMeGroups , CliCommand :: SessionSshkeyList , CliCommand :: SessionSshkeyCreate , CliCommand :: SessionSshkeyView , CliCommand :: SessionSshkeyDelete , CliCommand :: SystemImageViewById , CliCommand :: IpPoolViewById , CliCommand :: SiloViewById , CliCommand :: CertificateList , CliCommand :: CertificateCreate , CliCommand :: CertificateView , CliCommand :: CertificateDelete , CliCommand :: PhysicalDiskList , CliCommand :: RackList , CliCommand :: RackView , CliCommand :: SledList , CliCommand :: SledView , CliCommand :: SledPhysicalDiskList , CliCommand :: SystemImageList , CliCommand :: SystemImageCreate , CliCommand :: SystemImageView , CliCommand :: SystemImageDelete , CliCommand :: IpPoolList , CliCommand :: IpPoolCreate , CliCommand :: IpPoolView , CliCommand :: IpPoolUpdate , CliCommand :: IpPoolDelete , CliCommand :: IpPoolRangeList , CliCommand :: IpPoolRangeAdd , CliCommand :: IpPoolRangeRemove , CliCommand :: IpPoolServiceView , CliCommand :: IpPoolServiceRangeList , CliCommand :: IpPoolServiceRangeAdd , CliCommand :: IpPoolServiceRangeRemove , CliCommand :: SystemMetric , CliCommand :: SystemPolicyView , CliCommand :: SystemPolicyUpdate , CliCommand :: SagaList , CliCommand :: SagaView , CliCommand :: SiloList , CliCommand :: SiloCreate , CliCommand :: SiloView , CliCommand :: SiloDelete , CliCommand :: SiloIdentityProviderList , CliCommand :: LocalIdpUserCreate , CliCommand :: LocalIdpUserDelete , CliCommand :: LocalIdpUserSetPassword , CliCommand :: SamlIdentityProviderCreate , CliCommand :: SamlIdentityProviderView , CliCommand :: SiloPolicyView , CliCommand :: SiloPolicyUpdate , CliCommand :: SiloUsersList , CliCommand :: SiloUserView , CliCommand :: SystemUserList , CliCommand :: SystemUserView , CliCommand :: TimeseriesSchemaGet , CliCommand :: UserList , CliCommand :: DiskListV1 , CliCommand :: DiskCreateV1 , CliCommand :: DiskViewV1 , CliCommand :: DiskDeleteV1 , CliCommand :: InstanceListV1 , CliCommand :: InstanceCreateV1 , CliCommand :: InstanceViewV1 , CliCommand :: InstanceDeleteV1 , CliCommand :: InstanceDiskListV1 , CliCommand :: InstanceDiskAttachV1 , CliCommand :: InstanceDiskDetachV1 , CliCommand :: InstanceMigrateV1 , CliCommand :: InstanceRebootV1 , CliCommand :: InstanceSerialConsoleV1 , CliCommand :: InstanceSerialConsoleStreamV1 , CliCommand :: InstanceStartV1 , CliCommand :: InstanceStopV1 , CliCommand :: OrganizationListV1 , CliCommand :: OrganizationCreateV1 , CliCommand :: OrganizationViewV1 , CliCommand :: OrganizationUpdateV1 , CliCommand :: OrganizationDeleteV1 , CliCommand :: OrganizationPolicyViewV1 , CliCommand :: OrganizationPolicyUpdateV1 , CliCommand :: ProjectListV1 , CliCommand :: ProjectCreateV1 , CliCommand :: ProjectViewV1 , CliCommand :: ProjectUpdateV1 , CliCommand :: ProjectDeleteV1 , CliCommand :: ProjectPolicyViewV1 , CliCommand :: ProjectPolicyUpdateV1 , CliCommand :: SystemComponentVersionList , CliCommand :: UpdateDeploymentsList , CliCommand :: UpdateDeploymentView , CliCommand :: SystemUpdateRefresh , CliCommand :: SystemUpdateStart , CliCommand :: SystemUpdateStop , CliCommand :: SystemUpdateList , CliCommand :: SystemUpdateView , CliCommand :: SystemUpdateComponentsList , CliCommand :: SystemVersion ,] . into_iter () } } \ No newline at end of file diff --git a/progenitor-impl/tests/output/nexus-positional.out b/progenitor-impl/tests/output/nexus-positional.out index 352fbdae..3de78cc8 100644 --- a/progenitor-impl/tests/output/nexus-positional.out +++ b/progenitor-impl/tests/output/nexus-positional.out @@ -14,13 +14,11 @@ pub mod types { pub revision: i64, pub serial: String, } - impl From<&Baseboard> for Baseboard { fn from(value: &Baseboard) -> Self { value.clone() } } - ///A type storing a range over `T`. /// ///This type supports ranges similar to the `RangeTo`, `Range` and @@ -40,13 +38,11 @@ pub mod types { #[serde(rename = "range_from")] RangeFrom { start: f64 }, } - impl From<&BinRangedouble> for BinRangedouble { fn from(value: &BinRangedouble) -> Self { value.clone() } } - ///A type storing a range over `T`. /// ///This type supports ranges similar to the `RangeTo`, `Range` and @@ -66,13 +62,11 @@ pub mod types { #[serde(rename = "range_from")] RangeFrom { start: i64 }, } - impl From<&BinRangeint64> for BinRangeint64 { fn from(value: &BinRangeint64) -> Self { value.clone() } } - ///Type storing bin edges and a count of samples within it. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Bindouble { @@ -81,13 +75,11 @@ pub mod types { ///The range of the support covered by this bin. pub range: BinRangedouble, } - impl From<&Bindouble> for Bindouble { fn from(value: &Bindouble) -> Self { value.clone() } } - ///Type storing bin edges and a count of samples within it. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Binint64 { @@ -96,13 +88,11 @@ pub mod types { ///The range of the support covered by this bin. pub range: BinRangeint64, } - impl From<&Binint64> for Binint64 { fn from(value: &Binint64) -> Self { value.clone() } } - #[derive(Clone, Debug, Serialize)] pub struct BlockSize(i64); impl std::ops::Deref for BlockSize { @@ -111,19 +101,16 @@ pub mod types { &self.0 } } - impl From for i64 { fn from(value: BlockSize) -> Self { value.0 } } - impl From<&BlockSize> for BlockSize { fn from(value: &BlockSize) -> Self { value.clone() } } - impl std::convert::TryFrom for BlockSize { type Error = &'static str; fn try_from(value: i64) -> Result { @@ -134,7 +121,6 @@ pub mod types { } } } - impl<'de> serde::Deserialize<'de> for BlockSize { fn deserialize(deserializer: D) -> Result where @@ -144,7 +130,6 @@ pub mod types { .map_err(|e| ::custom(e.to_string())) } } - ///A count of bytes, typically used either for memory or storage capacity /// ///The maximum supported byte count is [`i64::MAX`]. This makes it @@ -160,59 +145,50 @@ pub mod types { &self.0 } } - impl From for u64 { fn from(value: ByteCount) -> Self { value.0 } } - impl From<&ByteCount> for ByteCount { fn from(value: &ByteCount) -> Self { value.clone() } } - impl From for ByteCount { fn from(value: u64) -> Self { Self(value) } } - impl std::str::FromStr for ByteCount { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for ByteCount { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ByteCount { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ByteCount { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for ByteCount { fn to_string(&self) -> String { self.0.to_string() } } - ///Client view of a [`Certificate`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Certificate { @@ -228,13 +204,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Certificate> for Certificate { fn from(value: &Certificate) -> Self { value.clone() } } - ///Create-time parameters for a /// [`Certificate`](crate::external_api::views::Certificate) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -248,13 +222,11 @@ pub mod types { ///The service using this certificate pub service: ServiceUsingCertificate, } - impl From<&CertificateCreate> for CertificateCreate { fn from(value: &CertificateCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct CertificateResultsPage { @@ -264,13 +236,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&CertificateResultsPage> for CertificateResultsPage { fn from(value: &CertificateResultsPage) -> Self { value.clone() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -284,13 +254,11 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&ComponentUpdate> for ComponentUpdate { fn from(value: &ComponentUpdate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ComponentUpdateResultsPage { @@ -300,39 +268,33 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ComponentUpdateResultsPage> for ComponentUpdateResultsPage { fn from(value: &ComponentUpdateResultsPage) -> Self { value.clone() } } - ///A cumulative or counter data type. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cumulativedouble { pub start_time: chrono::DateTime, pub value: f64, } - impl From<&Cumulativedouble> for Cumulativedouble { fn from(value: &Cumulativedouble) -> Self { value.clone() } } - ///A cumulative or counter data type. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cumulativeint64 { pub start_time: chrono::DateTime, pub value: i64, } - impl From<&Cumulativeint64> for Cumulativeint64 { fn from(value: &Cumulativeint64) -> Self { value.clone() } } - ///A `Datum` is a single sampled data point from a metric. #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "datum")] @@ -356,61 +318,51 @@ pub mod types { #[serde(rename = "histogram_f64")] HistogramF64(Histogramdouble), } - impl From<&Datum> for Datum { fn from(value: &Datum) -> Self { value.clone() } } - impl From for Datum { fn from(value: bool) -> Self { Self::Bool(value) } } - impl From for Datum { fn from(value: i64) -> Self { Self::I64(value) } } - impl From for Datum { fn from(value: f64) -> Self { Self::F64(value) } } - impl From> for Datum { fn from(value: Vec) -> Self { Self::Bytes(value) } } - impl From for Datum { fn from(value: Cumulativeint64) -> Self { Self::CumulativeI64(value) } } - impl From for Datum { fn from(value: Cumulativedouble) -> Self { Self::CumulativeF64(value) } } - impl From for Datum { fn from(value: Histogramint64) -> Self { Self::HistogramI64(value) } } - impl From for Datum { fn from(value: Histogramdouble) -> Self { Self::HistogramF64(value) } } - ///The type of an individual datum of a metric. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum DatumType { @@ -433,13 +385,11 @@ pub mod types { #[serde(rename = "histogram_f64")] HistogramF64, } - impl From<&DatumType> for DatumType { fn from(value: &DatumType) -> Self { value.clone() } } - impl ToString for DatumType { fn to_string(&self) -> String { match *self { @@ -455,7 +405,6 @@ pub mod types { } } } - impl std::str::FromStr for DatumType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -473,28 +422,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for DatumType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for DatumType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for DatumType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DerEncodedKeyPair { ///request signing private key (base64 encoded der file) @@ -502,61 +447,51 @@ pub mod types { ///request signing public certificate (base64 encoded der file) pub public_cert: String, } - impl From<&DerEncodedKeyPair> for DerEncodedKeyPair { fn from(value: &DerEncodedKeyPair) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAccessTokenRequest { pub client_id: uuid::Uuid, pub device_code: String, pub grant_type: String, } - impl From<&DeviceAccessTokenRequest> for DeviceAccessTokenRequest { fn from(value: &DeviceAccessTokenRequest) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAuthRequest { pub client_id: uuid::Uuid, } - impl From<&DeviceAuthRequest> for DeviceAuthRequest { fn from(value: &DeviceAuthRequest) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DeviceAuthVerify { pub user_code: String, } - impl From<&DeviceAuthVerify> for DeviceAuthVerify { fn from(value: &DeviceAuthVerify) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type", content = "value")] pub enum Digest { #[serde(rename = "sha256")] Sha256(String), } - impl From<&Digest> for Digest { fn from(value: &Digest) -> Self { value.clone() } } - ///Client view of a [`Disk`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Disk { @@ -580,13 +515,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Disk> for Disk { fn from(value: &Disk) -> Self { value.clone() } } - ///Create-time parameters for a /// [`Disk`](omicron_common::api::external::Disk) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -598,13 +531,11 @@ pub mod types { ///total size of the Disk in bytes pub size: ByteCount, } - impl From<&DiskCreate> for DiskCreate { fn from(value: &DiskCreate) -> Self { value.clone() } } - ///TODO-v1: Delete this Parameters for the /// [`Disk`](omicron_common::api::external::Disk) to be attached or detached /// to an instance @@ -612,13 +543,11 @@ pub mod types { pub struct DiskIdentifier { pub name: Name, } - impl From<&DiskIdentifier> for DiskIdentifier { fn from(value: &DiskIdentifier) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum DiskMetricName { #[serde(rename = "activated")] @@ -634,13 +563,11 @@ pub mod types { #[serde(rename = "write_bytes")] WriteBytes, } - impl From<&DiskMetricName> for DiskMetricName { fn from(value: &DiskMetricName) -> Self { value.clone() } } - impl ToString for DiskMetricName { fn to_string(&self) -> String { match *self { @@ -653,7 +580,6 @@ pub mod types { } } } - impl std::str::FromStr for DiskMetricName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -668,39 +594,33 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for DiskMetricName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for DiskMetricName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for DiskMetricName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskPath { pub disk: NameOrId, } - impl From<&DiskPath> for DiskPath { fn from(value: &DiskPath) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskResultsPage { @@ -710,13 +630,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&DiskResultsPage> for DiskResultsPage { fn from(value: &DiskResultsPage) -> Self { value.clone() } } - ///Different sources for a disk #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] @@ -738,13 +656,11 @@ pub mod types { #[serde(rename = "global_image")] GlobalImage { image_id: uuid::Uuid }, } - impl From<&DiskSource> for DiskSource { fn from(value: &DiskSource) -> Self { value.clone() } } - ///State of a Disk (primarily: attached or not) #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "state", content = "instance")] @@ -767,13 +683,11 @@ pub mod types { #[serde(rename = "faulted")] Faulted, } - impl From<&DiskState> for DiskState { fn from(value: &DiskState) -> Self { value.clone() } } - ///OS image distribution #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Distribution { @@ -782,13 +696,11 @@ pub mod types { ///The version of the distribution (e.g. "3.10" or "18.04") pub version: String, } - impl From<&Distribution> for Distribution { fn from(value: &Distribution) -> Self { value.clone() } } - ///Error information from a response. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { @@ -797,25 +709,21 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ExternalIp { pub ip: std::net::IpAddr, pub kind: IpKind, } - impl From<&ExternalIp> for ExternalIp { fn from(value: &ExternalIp) -> Self { value.clone() } } - ///Parameters for creating an external IP address for instances. #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] @@ -829,13 +737,11 @@ pub mod types { pool_name: Option, }, } - impl From<&ExternalIpCreate> for ExternalIpCreate { fn from(value: &ExternalIpCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ExternalIpResultsPage { @@ -845,13 +751,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ExternalIpResultsPage> for ExternalIpResultsPage { fn from(value: &ExternalIpResultsPage) -> Self { value.clone() } } - ///The name and type information for a field of a timeseries schema. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct FieldSchema { @@ -859,13 +763,11 @@ pub mod types { pub source: FieldSource, pub ty: FieldType, } - impl From<&FieldSchema> for FieldSchema { fn from(value: &FieldSchema) -> Self { value.clone() } } - ///The source from which a field is derived, the target or metric. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FieldSource { @@ -874,13 +776,11 @@ pub mod types { #[serde(rename = "metric")] Metric, } - impl From<&FieldSource> for FieldSource { fn from(value: &FieldSource) -> Self { value.clone() } } - impl ToString for FieldSource { fn to_string(&self) -> String { match *self { @@ -889,7 +789,6 @@ pub mod types { } } } - impl std::str::FromStr for FieldSource { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -900,28 +799,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FieldSource { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FieldSource { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FieldSource { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///The `FieldType` identifies the data type of a target or metric field. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FieldType { @@ -936,13 +831,11 @@ pub mod types { #[serde(rename = "bool")] Bool, } - impl From<&FieldType> for FieldType { fn from(value: &FieldType) -> Self { value.clone() } } - impl ToString for FieldType { fn to_string(&self) -> String { match *self { @@ -954,7 +847,6 @@ pub mod types { } } } - impl std::str::FromStr for FieldType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -968,28 +860,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FieldType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FieldType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FieldType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum FleetRole { #[serde(rename = "admin")] @@ -999,13 +887,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&FleetRole> for FleetRole { fn from(value: &FleetRole) -> Self { value.clone() } } - impl ToString for FleetRole { fn to_string(&self) -> String { match *self { @@ -1015,7 +901,6 @@ pub mod types { } } } - impl std::str::FromStr for FleetRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1027,28 +912,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for FleetRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for FleetRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for FleetRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -1060,13 +941,11 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&FleetRolePolicy> for FleetRolePolicy { fn from(value: &FleetRolePolicy) -> Self { value.clone() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -1079,13 +958,11 @@ pub mod types { pub identity_type: IdentityType, pub role_name: FleetRole, } - impl From<&FleetRoleRoleAssignment> for FleetRoleRoleAssignment { fn from(value: &FleetRoleRoleAssignment) -> Self { value.clone() } } - ///Client view of global Images #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImage { @@ -1114,13 +991,11 @@ pub mod types { ///Image version pub version: String, } - impl From<&GlobalImage> for GlobalImage { fn from(value: &GlobalImage) -> Self { value.clone() } } - ///Create-time parameters for an /// [`GlobalImage`](crate::external_api::views::GlobalImage) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -1134,13 +1009,11 @@ pub mod types { ///The source of the image's contents. pub source: ImageSource, } - impl From<&GlobalImageCreate> for GlobalImageCreate { fn from(value: &GlobalImageCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GlobalImageResultsPage { @@ -1150,13 +1023,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&GlobalImageResultsPage> for GlobalImageResultsPage { fn from(value: &GlobalImageResultsPage) -> Self { value.clone() } } - ///Client view of a [`Group`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Group { @@ -1166,13 +1037,11 @@ pub mod types { ///Uuid of the silo to which this group belongs pub silo_id: uuid::Uuid, } - impl From<&Group> for Group { fn from(value: &Group) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GroupResultsPage { @@ -1182,13 +1051,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&GroupResultsPage> for GroupResultsPage { fn from(value: &GroupResultsPage) -> Self { value.clone() } } - ///A simple type for managing a histogram metric. /// ///A histogram maintains the count of any number of samples, over a set of @@ -1237,13 +1104,11 @@ pub mod types { pub n_samples: u64, pub start_time: chrono::DateTime, } - impl From<&Histogramdouble> for Histogramdouble { fn from(value: &Histogramdouble) -> Self { value.clone() } } - ///A simple type for managing a histogram metric. /// ///A histogram maintains the count of any number of samples, over a set of @@ -1292,13 +1157,11 @@ pub mod types { pub n_samples: u64, pub start_time: chrono::DateTime, } - impl From<&Histogramint64> for Histogramint64 { fn from(value: &Histogramint64) -> Self { value.clone() } } - ///Supported set of sort modes for scanning by id only. /// ///Currently, we only support scanning in ascending order. @@ -1308,13 +1171,11 @@ pub mod types { #[serde(rename = "id_ascending")] IdAscending, } - impl From<&IdSortMode> for IdSortMode { fn from(value: &IdSortMode) -> Self { value.clone() } } - impl ToString for IdSortMode { fn to_string(&self) -> String { match *self { @@ -1322,7 +1183,6 @@ pub mod types { } } } - impl std::str::FromStr for IdSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1332,28 +1192,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of an [`IdentityProvider`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProvider { @@ -1370,13 +1226,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&IdentityProvider> for IdentityProvider { fn from(value: &IdentityProvider) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProviderResultsPage { @@ -1386,26 +1240,22 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IdentityProviderResultsPage> for IdentityProviderResultsPage { fn from(value: &IdentityProviderResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdentityProviderType { ///SAML identity provider #[serde(rename = "saml")] Saml, } - impl From<&IdentityProviderType> for IdentityProviderType { fn from(value: &IdentityProviderType) -> Self { value.clone() } } - impl ToString for IdentityProviderType { fn to_string(&self) -> String { match *self { @@ -1413,7 +1263,6 @@ pub mod types { } } } - impl std::str::FromStr for IdentityProviderType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1423,28 +1272,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdentityProviderType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdentityProviderType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdentityProviderType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Describes what kind of identity is described by an id #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IdentityType { @@ -1453,13 +1298,11 @@ pub mod types { #[serde(rename = "silo_group")] SiloGroup, } - impl From<&IdentityType> for IdentityType { fn from(value: &IdentityType) -> Self { value.clone() } } - impl ToString for IdentityType { fn to_string(&self) -> String { match *self { @@ -1468,7 +1311,6 @@ pub mod types { } } } - impl std::str::FromStr for IdentityType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1479,28 +1321,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IdentityType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IdentityType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IdentityType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum IdpMetadataSource { @@ -1509,13 +1347,11 @@ pub mod types { #[serde(rename = "base64_encoded_xml")] Base64EncodedXml { data: String }, } - impl From<&IdpMetadataSource> for IdpMetadataSource { fn from(value: &IdpMetadataSource) -> Self { value.clone() } } - ///Client view of project Images #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Image { @@ -1545,13 +1381,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub version: Option, } - impl From<&Image> for Image { fn from(value: &Image) -> Self { value.clone() } } - ///Create-time parameters for an /// [`Image`](crate::external_api::views::Image) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -1563,13 +1397,11 @@ pub mod types { ///The source of the image's contents. pub source: ImageSource, } - impl From<&ImageCreate> for ImageCreate { fn from(value: &ImageCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ImageResultsPage { @@ -1579,13 +1411,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ImageResultsPage> for ImageResultsPage { fn from(value: &ImageResultsPage) -> Self { value.clone() } } - ///The source of the underlying image. #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] @@ -1597,13 +1427,11 @@ pub mod types { #[serde(rename = "you_can_boot_anything_as_long_as_its_alpine")] YouCanBootAnythingAsLongAsItsAlpine, } - impl From<&ImageSource> for ImageSource { fn from(value: &ImageSource) -> Self { value.clone() } } - ///Client view of an [`Instance`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Instance { @@ -1628,13 +1456,11 @@ pub mod types { pub time_modified: chrono::DateTime, pub time_run_state_updated: chrono::DateTime, } - impl From<&Instance> for Instance { fn from(value: &Instance) -> Self { value.clone() } } - ///The number of CPUs in an Instance #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceCpuCount(pub u16); @@ -1644,59 +1470,50 @@ pub mod types { &self.0 } } - impl From for u16 { fn from(value: InstanceCpuCount) -> Self { value.0 } } - impl From<&InstanceCpuCount> for InstanceCpuCount { fn from(value: &InstanceCpuCount) -> Self { value.clone() } } - impl From for InstanceCpuCount { fn from(value: u16) -> Self { Self(value) } } - impl std::str::FromStr for InstanceCpuCount { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for InstanceCpuCount { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceCpuCount { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceCpuCount { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for InstanceCpuCount { fn to_string(&self) -> String { self.0.to_string() } } - ///Create-time parameters for an /// [`Instance`](omicron_common::api::external::Instance) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -1729,13 +1546,11 @@ pub mod types { #[serde(default)] pub user_data: String, } - impl From<&InstanceCreate> for InstanceCreate { fn from(value: &InstanceCreate) -> Self { value.clone() } } - ///Describe the instance's disks at creation time #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] @@ -1757,26 +1572,22 @@ pub mod types { name: Name, }, } - impl From<&InstanceDiskAttachment> for InstanceDiskAttachment { fn from(value: &InstanceDiskAttachment) -> Self { value.clone() } } - ///Migration parameters for an /// [`Instance`](omicron_common::api::external::Instance) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrate { pub dst_sled_id: uuid::Uuid, } - impl From<&InstanceMigrate> for InstanceMigrate { fn from(value: &InstanceMigrate) -> Self { value.clone() } } - ///Describes an attachment of a `NetworkInterface` to an `Instance`, at the /// time the instance is created. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -1793,19 +1604,16 @@ pub mod types { #[serde(rename = "none")] None, } - impl From<&InstanceNetworkInterfaceAttachment> for InstanceNetworkInterfaceAttachment { fn from(value: &InstanceNetworkInterfaceAttachment) -> Self { value.clone() } } - impl From> for InstanceNetworkInterfaceAttachment { fn from(value: Vec) -> Self { Self::Create(value) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceResultsPage { @@ -1815,13 +1623,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&InstanceResultsPage> for InstanceResultsPage { fn from(value: &InstanceResultsPage) -> Self { value.clone() } } - ///Contents of an Instance's serial console buffer. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceSerialConsoleData { @@ -1833,13 +1639,11 @@ pub mod types { /// a subsequent request) of the last byte returned in `data`. pub last_byte_offset: u64, } - impl From<&InstanceSerialConsoleData> for InstanceSerialConsoleData { fn from(value: &InstanceSerialConsoleData) -> Self { value.clone() } } - ///Running state of an Instance (primarily: booted or stopped) /// ///This typically reflects whether it's starting, running, stopping, or @@ -1881,13 +1685,11 @@ pub mod types { #[serde(rename = "destroyed")] Destroyed, } - impl From<&InstanceState> for InstanceState { fn from(value: &InstanceState) -> Self { value.clone() } } - impl ToString for InstanceState { fn to_string(&self) -> String { match *self { @@ -1904,7 +1706,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1923,28 +1724,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///The kind of an external IP address for an instance #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum IpKind { @@ -1953,13 +1750,11 @@ pub mod types { #[serde(rename = "floating")] Floating, } - impl From<&IpKind> for IpKind { fn from(value: &IpKind) -> Self { value.clone() } } - impl ToString for IpKind { fn to_string(&self) -> String { match *self { @@ -1968,7 +1763,6 @@ pub mod types { } } } - impl std::str::FromStr for IpKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -1979,41 +1773,35 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IpKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IpKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IpKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum IpNet { V4(Ipv4Net), V6(Ipv6Net), } - impl From<&IpNet> for IpNet { fn from(value: &IpNet) -> Self { value.clone() } } - impl std::str::FromStr for IpNet { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2026,28 +1814,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for IpNet { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for IpNet { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for IpNet { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for IpNet { fn to_string(&self) -> String { match self { @@ -2056,19 +1840,16 @@ pub mod types { } } } - impl From for IpNet { fn from(value: Ipv4Net) -> Self { Self::V4(value) } } - impl From for IpNet { fn from(value: Ipv6Net) -> Self { Self::V6(value) } } - ///Identity-related metadata that's included in nearly all public API /// objects #[derive(Clone, Debug, Deserialize, Serialize)] @@ -2084,13 +1865,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&IpPool> for IpPool { fn from(value: &IpPool) -> Self { value.clone() } } - ///Create-time parameters for an IP Pool. /// ///See [`IpPool`](crate::external_api::views::IpPool) @@ -2099,26 +1878,22 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&IpPoolCreate> for IpPoolCreate { fn from(value: &IpPoolCreate) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolRange { pub id: uuid::Uuid, pub range: IpRange, pub time_created: chrono::DateTime, } - impl From<&IpPoolRange> for IpPoolRange { fn from(value: &IpPoolRange) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolRangeResultsPage { @@ -2128,13 +1903,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IpPoolRangeResultsPage> for IpPoolRangeResultsPage { fn from(value: &IpPoolRangeResultsPage) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolResultsPage { @@ -2144,13 +1917,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&IpPoolResultsPage> for IpPoolResultsPage { fn from(value: &IpPoolResultsPage) -> Self { value.clone() } } - ///Parameters for updating an IP Pool #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IpPoolUpdate { @@ -2159,38 +1930,32 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&IpPoolUpdate> for IpPoolUpdate { fn from(value: &IpPoolUpdate) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum IpRange { V4(Ipv4Range), V6(Ipv6Range), } - impl From<&IpRange> for IpRange { fn from(value: &IpRange) -> Self { value.clone() } } - impl From for IpRange { fn from(value: Ipv4Range) -> Self { Self::V4(value) } } - impl From for IpRange { fn from(value: Ipv6Range) -> Self { Self::V6(value) } } - ///An IPv4 subnet, including prefix and subnet mask #[derive(Clone, Debug, Serialize)] pub struct Ipv4Net(String); @@ -2200,19 +1965,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Ipv4Net) -> Self { value.0 } } - impl From<&Ipv4Net> for Ipv4Net { fn from(value: &Ipv4Net) -> Self { value.clone() } } - impl std::str::FromStr for Ipv4Net { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2220,28 +1982,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Ipv4Net { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Ipv4Net { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Ipv4Net { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Ipv4Net { fn deserialize(deserializer: D) -> Result where @@ -2252,7 +2010,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A non-decreasing IPv4 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. @@ -2261,13 +2018,11 @@ pub mod types { pub first: std::net::Ipv4Addr, pub last: std::net::Ipv4Addr, } - impl From<&Ipv4Range> for Ipv4Range { fn from(value: &Ipv4Range) -> Self { value.clone() } } - ///An IPv6 subnet, including prefix and subnet mask #[derive(Clone, Debug, Serialize)] pub struct Ipv6Net(String); @@ -2277,19 +2032,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Ipv6Net) -> Self { value.0 } } - impl From<&Ipv6Net> for Ipv6Net { fn from(value: &Ipv6Net) -> Self { value.clone() } } - impl std::str::FromStr for Ipv6Net { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2297,28 +2049,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Ipv6Net { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Ipv6Net { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Ipv6Net { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Ipv6Net { fn deserialize(deserializer: D) -> Result where @@ -2329,7 +2077,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A non-decreasing IPv6 address range, inclusive of both ends. /// ///The first address must be less than or equal to the last address. @@ -2338,13 +2085,11 @@ pub mod types { pub first: std::net::Ipv6Addr, pub last: std::net::Ipv6Addr, } - impl From<&Ipv6Range> for Ipv6Range { fn from(value: &Ipv6Range) -> Self { value.clone() } } - ///An inclusive-inclusive range of IP ports. The second port may be omitted /// to represent a single port #[derive(Clone, Debug, Serialize)] @@ -2355,19 +2100,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: L4PortRange) -> Self { value.0 } } - impl From<&L4PortRange> for L4PortRange { fn from(value: &L4PortRange) -> Self { value.clone() } } - impl std::str::FromStr for L4PortRange { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2387,28 +2129,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for L4PortRange { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for L4PortRange { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for L4PortRange { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for L4PortRange { fn deserialize(deserializer: D) -> Result where @@ -2419,7 +2157,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A Media Access Control address, in EUI-48 format #[derive(Clone, Debug, Serialize)] pub struct MacAddr(String); @@ -2429,19 +2166,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: MacAddr) -> Self { value.0 } } - impl From<&MacAddr> for MacAddr { fn from(value: &MacAddr) -> Self { value.clone() } } - impl std::str::FromStr for MacAddr { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2461,28 +2195,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for MacAddr { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for MacAddr { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for MacAddr { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for MacAddr { fn deserialize(deserializer: D) -> Result where @@ -2493,20 +2223,17 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A `Measurement` is a timestamped datum from a single metric #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Measurement { pub datum: Datum, pub timestamp: chrono::DateTime, } - impl From<&Measurement> for Measurement { fn from(value: &Measurement) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct MeasurementResultsPage { @@ -2516,13 +2243,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&MeasurementResultsPage> for MeasurementResultsPage { fn from(value: &MeasurementResultsPage) -> Self { value.clone() } } - ///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. @@ -2534,19 +2259,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Name) -> Self { value.0 } } - impl From<&Name> for Name { fn from(value: &Name) -> Self { value.clone() } } - impl std::str::FromStr for Name { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2557,28 +2279,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Name { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Name { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Name { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Name { fn deserialize(deserializer: D) -> Result where @@ -2589,20 +2307,17 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum NameOrId { Id(uuid::Uuid), Name(Name), } - impl From<&NameOrId> for NameOrId { fn from(value: &NameOrId) -> Self { value.clone() } } - impl std::str::FromStr for NameOrId { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2615,28 +2330,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameOrId { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameOrId { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameOrId { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for NameOrId { fn to_string(&self) -> String { match self { @@ -2645,19 +2356,16 @@ pub mod types { } } } - impl From for NameOrId { fn from(value: uuid::Uuid) -> Self { Self::Id(value) } } - impl From for NameOrId { fn from(value: Name) -> Self { Self::Name(value) } } - ///Supported set of sort modes for scanning by name or id #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum NameOrIdSortMode { @@ -2671,13 +2379,11 @@ pub mod types { #[serde(rename = "id_ascending")] IdAscending, } - impl From<&NameOrIdSortMode> for NameOrIdSortMode { fn from(value: &NameOrIdSortMode) -> Self { value.clone() } } - impl ToString for NameOrIdSortMode { fn to_string(&self) -> String { match *self { @@ -2687,7 +2393,6 @@ pub mod types { } } } - impl std::str::FromStr for NameOrIdSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2699,28 +2404,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameOrIdSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameOrIdSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameOrIdSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Supported set of sort modes for scanning by name only /// ///Currently, we only support scanning in ascending order. @@ -2730,13 +2431,11 @@ pub mod types { #[serde(rename = "name_ascending")] NameAscending, } - impl From<&NameSortMode> for NameSortMode { fn from(value: &NameSortMode) -> Self { value.clone() } } - impl ToString for NameSortMode { fn to_string(&self) -> String { match *self { @@ -2744,7 +2443,6 @@ pub mod types { } } } - impl std::str::FromStr for NameSortMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -2754,28 +2452,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for NameSortMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for NameSortMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for NameSortMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A `NetworkInterface` represents a virtual network interface device. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterface { @@ -2803,13 +2497,11 @@ pub mod types { ///The VPC to which the interface belongs. pub vpc_id: uuid::Uuid, } - impl From<&NetworkInterface> for NetworkInterface { fn from(value: &NetworkInterface) -> Self { value.clone() } } - ///Create-time parameters for a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -2825,13 +2517,11 @@ pub mod types { ///The VPC in which to create the interface. pub vpc_name: Name, } - impl From<&NetworkInterfaceCreate> for NetworkInterfaceCreate { fn from(value: &NetworkInterfaceCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceResultsPage { @@ -2841,13 +2531,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&NetworkInterfaceResultsPage> for NetworkInterfaceResultsPage { fn from(value: &NetworkInterfaceResultsPage) -> Self { value.clone() } } - ///Parameters for updating a /// [`NetworkInterface`](omicron_common::api::external::NetworkInterface). /// @@ -2873,13 +2561,11 @@ pub mod types { #[serde(default)] pub primary: bool, } - impl From<&NetworkInterfaceUpdate> for NetworkInterfaceUpdate { fn from(value: &NetworkInterfaceUpdate) -> Self { value.clone() } } - ///Unique name for a saga [`Node`] /// ///Each node requires a string name that's unique within its DAG. The name @@ -2894,38 +2580,32 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: NodeName) -> Self { value.0 } } - impl From<&NodeName> for NodeName { fn from(value: &NodeName) -> Self { value.clone() } } - impl From for NodeName { fn from(value: String) -> Self { Self(value) } } - impl std::str::FromStr for NodeName { type Err = std::convert::Infallible; fn from_str(value: &str) -> Result { Ok(Self(value.to_string())) } } - impl ToString for NodeName { fn to_string(&self) -> String { self.0.to_string() } } - ///Client view of an [`Organization`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Organization { @@ -2940,13 +2620,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Organization> for Organization { fn from(value: &Organization) -> Self { value.clone() } } - ///Create-time parameters for an /// [`Organization`](crate::external_api::views::Organization) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -2954,13 +2632,11 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&OrganizationCreate> for OrganizationCreate { fn from(value: &OrganizationCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct OrganizationResultsPage { @@ -2970,13 +2646,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&OrganizationResultsPage> for OrganizationResultsPage { fn from(value: &OrganizationResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum OrganizationRole { #[serde(rename = "admin")] @@ -2986,13 +2660,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&OrganizationRole> for OrganizationRole { fn from(value: &OrganizationRole) -> Self { value.clone() } } - impl ToString for OrganizationRole { fn to_string(&self) -> String { match *self { @@ -3002,7 +2674,6 @@ pub mod types { } } } - impl std::str::FromStr for OrganizationRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3014,28 +2685,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for OrganizationRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for OrganizationRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for OrganizationRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -3047,13 +2714,11 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&OrganizationRolePolicy> for OrganizationRolePolicy { fn from(value: &OrganizationRolePolicy) -> Self { value.clone() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -3066,13 +2731,11 @@ pub mod types { pub identity_type: IdentityType, pub role_name: OrganizationRole, } - impl From<&OrganizationRoleRoleAssignment> for OrganizationRoleRoleAssignment { fn from(value: &OrganizationRoleRoleAssignment) -> Self { value.clone() } } - ///Updateable properties of an /// [`Organization`](crate::external_api::views::Organization) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3082,13 +2745,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&OrganizationUpdate> for OrganizationUpdate { fn from(value: &OrganizationUpdate) -> Self { value.clone() } } - ///Passwords may be subject to additional constraints. #[derive(Clone, Debug, Serialize)] pub struct Password(String); @@ -3098,19 +2759,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: Password) -> Self { value.0 } } - impl From<&Password> for Password { fn from(value: &Password) -> Self { value.clone() } } - impl std::str::FromStr for Password { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3120,28 +2778,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for Password { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Password { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Password { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for Password { fn deserialize(deserializer: D) -> Result where @@ -3152,7 +2806,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///Client view of a [`PhysicalDisk`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhysicalDisk { @@ -3170,13 +2823,11 @@ pub mod types { pub time_modified: chrono::DateTime, pub vendor: String, } - impl From<&PhysicalDisk> for PhysicalDisk { fn from(value: &PhysicalDisk) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct PhysicalDiskResultsPage { @@ -3186,13 +2837,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&PhysicalDiskResultsPage> for PhysicalDiskResultsPage { fn from(value: &PhysicalDiskResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum PhysicalDiskType { #[serde(rename = "internal")] @@ -3200,13 +2849,11 @@ pub mod types { #[serde(rename = "external")] External, } - impl From<&PhysicalDiskType> for PhysicalDiskType { fn from(value: &PhysicalDiskType) -> Self { value.clone() } } - impl ToString for PhysicalDiskType { fn to_string(&self) -> String { match *self { @@ -3215,7 +2862,6 @@ pub mod types { } } } - impl std::str::FromStr for PhysicalDiskType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3226,28 +2872,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for PhysicalDiskType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for PhysicalDiskType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for PhysicalDiskType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Project`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Project { @@ -3263,13 +2905,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Project> for Project { fn from(value: &Project) -> Self { value.clone() } } - ///Create-time parameters for a /// [`Project`](crate::external_api::views::Project) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3277,13 +2917,11 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&ProjectCreate> for ProjectCreate { fn from(value: &ProjectCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProjectResultsPage { @@ -3293,13 +2931,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&ProjectResultsPage> for ProjectResultsPage { fn from(value: &ProjectResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum ProjectRole { #[serde(rename = "admin")] @@ -3309,13 +2945,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&ProjectRole> for ProjectRole { fn from(value: &ProjectRole) -> Self { value.clone() } } - impl ToString for ProjectRole { fn to_string(&self) -> String { match *self { @@ -3325,7 +2959,6 @@ pub mod types { } } } - impl std::str::FromStr for ProjectRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3337,28 +2970,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for ProjectRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ProjectRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ProjectRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -3370,13 +2999,11 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&ProjectRolePolicy> for ProjectRolePolicy { fn from(value: &ProjectRolePolicy) -> Self { value.clone() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -3389,13 +3016,11 @@ pub mod types { pub identity_type: IdentityType, pub role_name: ProjectRole, } - impl From<&ProjectRoleRoleAssignment> for ProjectRoleRoleAssignment { fn from(value: &ProjectRoleRoleAssignment) -> Self { value.clone() } } - ///Updateable properties of a /// [`Project`](crate::external_api::views::Project) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3405,13 +3030,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&ProjectUpdate> for ProjectUpdate { fn from(value: &ProjectUpdate) -> Self { value.clone() } } - ///Client view of an [`Rack`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Rack { @@ -3422,13 +3045,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Rack> for Rack { fn from(value: &Rack) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RackResultsPage { @@ -3438,26 +3059,22 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RackResultsPage> for RackResultsPage { fn from(value: &RackResultsPage) -> Self { value.clone() } } - ///Client view of a [`Role`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Role { pub description: String, pub name: RoleName, } - impl From<&Role> for Role { fn from(value: &Role) -> Self { value.clone() } } - ///Role names consist of two string components separated by dot ("."). #[derive(Clone, Debug, Serialize)] pub struct RoleName(String); @@ -3467,19 +3084,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: RoleName) -> Self { value.0 } } - impl From<&RoleName> for RoleName { fn from(value: &RoleName) -> Self { value.clone() } } - impl std::str::FromStr for RoleName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3496,28 +3110,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for RoleName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for RoleName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for RoleName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for RoleName { fn deserialize(deserializer: D) -> Result where @@ -3528,7 +3138,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RoleResultsPage { @@ -3538,13 +3147,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RoleResultsPage> for RoleResultsPage { fn from(value: &RoleResultsPage) -> Self { value.clone() } } - ///A `RouteDestination` is used to match traffic with a routing rule, on /// the destination of that traffic. /// @@ -3567,25 +3174,21 @@ pub mod types { #[serde(rename = "subnet")] Subnet(Name), } - impl From<&RouteDestination> for RouteDestination { fn from(value: &RouteDestination) -> Self { value.clone() } } - impl From for RouteDestination { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for RouteDestination { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///A `RouteTarget` describes the possible locations that traffic matching a /// route destination can be sent. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3607,19 +3210,16 @@ pub mod types { #[serde(rename = "internet_gateway")] InternetGateway(Name), } - impl From<&RouteTarget> for RouteTarget { fn from(value: &RouteTarget) -> Self { value.clone() } } - impl From for RouteTarget { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - ///A route defines a rule that governs where traffic should be sent based /// on its destination. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3641,13 +3241,11 @@ pub mod types { ///The VPC Router to which the route belongs. pub vpc_router_id: uuid::Uuid, } - impl From<&RouterRoute> for RouterRoute { fn from(value: &RouterRoute) -> Self { value.clone() } } - ///Create-time parameters for a [`RouterRoute`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteCreateParams { @@ -3656,13 +3254,11 @@ pub mod types { pub name: Name, pub target: RouteTarget, } - impl From<&RouterRouteCreateParams> for RouterRouteCreateParams { fn from(value: &RouterRouteCreateParams) -> Self { value.clone() } } - ///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. @@ -3692,13 +3288,11 @@ pub mod types { #[serde(rename = "custom")] Custom, } - impl From<&RouterRouteKind> for RouterRouteKind { fn from(value: &RouterRouteKind) -> Self { value.clone() } } - impl ToString for RouterRouteKind { fn to_string(&self) -> String { match *self { @@ -3709,7 +3303,6 @@ pub mod types { } } } - impl std::str::FromStr for RouterRouteKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3722,28 +3315,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for RouterRouteKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for RouterRouteKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for RouterRouteKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteResultsPage { @@ -3753,13 +3342,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&RouterRouteResultsPage> for RouterRouteResultsPage { fn from(value: &RouterRouteResultsPage) -> Self { value.clone() } } - ///Updateable properties of a [`RouterRoute`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct RouterRouteUpdateParams { @@ -3770,25 +3357,21 @@ pub mod types { pub name: Option, pub target: RouteTarget, } - impl From<&RouterRouteUpdateParams> for RouterRouteUpdateParams { fn from(value: &RouterRouteUpdateParams) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Saga { pub id: uuid::Uuid, pub state: SagaState, } - impl From<&Saga> for Saga { fn from(value: &Saga) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "error")] pub enum SagaErrorInfo { @@ -3803,13 +3386,11 @@ pub mod types { #[serde(rename = "subsaga_create_failed")] SubsagaCreateFailed { message: String }, } - impl From<&SagaErrorInfo> for SagaErrorInfo { fn from(value: &SagaErrorInfo) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SagaResultsPage { @@ -3819,13 +3400,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SagaResultsPage> for SagaResultsPage { fn from(value: &SagaResultsPage) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "state")] pub enum SagaState { @@ -3839,13 +3418,11 @@ pub mod types { error_node_name: NodeName, }, } - impl From<&SagaState> for SagaState { fn from(value: &SagaState) -> Self { value.clone() } } - ///Identity-related metadata that's included in nearly all public API /// objects #[derive(Clone, Debug, Deserialize, Serialize)] @@ -3875,13 +3452,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&SamlIdentityProvider> for SamlIdentityProvider { fn from(value: &SamlIdentityProvider) -> Self { value.clone() } } - ///Create-time identity-related parameters #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SamlIdentityProviderCreate { @@ -3908,13 +3483,11 @@ pub mod types { ///customer's technical contact for saml configuration pub technical_contact_email: String, } - impl From<&SamlIdentityProviderCreate> for SamlIdentityProviderCreate { fn from(value: &SamlIdentityProviderCreate) -> Self { value.clone() } } - #[derive(Clone, Debug, Serialize)] pub struct SemverVersion(String); impl std::ops::Deref for SemverVersion { @@ -3923,19 +3496,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: SemverVersion) -> Self { value.0 } } - impl From<&SemverVersion> for SemverVersion { fn from(value: &SemverVersion) -> Self { value.clone() } } - impl std::str::FromStr for SemverVersion { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -3949,28 +3519,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for SemverVersion { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SemverVersion { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SemverVersion { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for SemverVersion { fn deserialize(deserializer: D) -> Result where @@ -3981,7 +3547,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///The service intended to use this certificate. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum ServiceUsingCertificate { @@ -3989,13 +3554,11 @@ pub mod types { #[serde(rename = "external_api")] ExternalApi, } - impl From<&ServiceUsingCertificate> for ServiceUsingCertificate { fn from(value: &ServiceUsingCertificate) -> Self { value.clone() } } - impl ToString for ServiceUsingCertificate { fn to_string(&self) -> String { match *self { @@ -4003,7 +3566,6 @@ pub mod types { } } } - impl std::str::FromStr for ServiceUsingCertificate { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4013,28 +3575,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for ServiceUsingCertificate { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a ['Silo'] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Silo { @@ -4054,13 +3612,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Silo> for Silo { fn from(value: &Silo) -> Self { value.clone() } } - ///Create-time parameters for a [`Silo`](crate::external_api::views::Silo) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloCreate { @@ -4079,13 +3635,11 @@ pub mod types { pub identity_mode: SiloIdentityMode, pub name: Name, } - impl From<&SiloCreate> for SiloCreate { fn from(value: &SiloCreate) -> Self { value.clone() } } - ///Describes how identities are managed and users are authenticated in this /// Silo #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] @@ -4101,13 +3655,11 @@ pub mod types { #[serde(rename = "local_only")] LocalOnly, } - impl From<&SiloIdentityMode> for SiloIdentityMode { fn from(value: &SiloIdentityMode) -> Self { value.clone() } } - impl ToString for SiloIdentityMode { fn to_string(&self) -> String { match *self { @@ -4116,7 +3668,6 @@ pub mod types { } } } - impl std::str::FromStr for SiloIdentityMode { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4127,28 +3678,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SiloIdentityMode { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SiloIdentityMode { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SiloIdentityMode { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SiloResultsPage { @@ -4158,13 +3705,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SiloResultsPage> for SiloResultsPage { fn from(value: &SiloResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SiloRole { #[serde(rename = "admin")] @@ -4174,13 +3719,11 @@ pub mod types { #[serde(rename = "viewer")] Viewer, } - impl From<&SiloRole> for SiloRole { fn from(value: &SiloRole) -> Self { value.clone() } } - impl ToString for SiloRole { fn to_string(&self) -> String { match *self { @@ -4190,7 +3733,6 @@ pub mod types { } } } - impl std::str::FromStr for SiloRole { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4202,28 +3744,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SiloRole { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SiloRole { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SiloRole { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`Policy`], which describes how this resource may be /// accessed /// @@ -4235,13 +3773,11 @@ pub mod types { ///Roles directly assigned on this resource pub role_assignments: Vec, } - impl From<&SiloRolePolicy> for SiloRolePolicy { fn from(value: &SiloRolePolicy) -> Self { value.clone() } } - ///Describes the assignment of a particular role on a particular resource /// to a particular identity (user, group, etc.) /// @@ -4254,13 +3790,11 @@ pub mod types { pub identity_type: IdentityType, pub role_name: SiloRole, } - impl From<&SiloRoleRoleAssignment> for SiloRoleRoleAssignment { fn from(value: &SiloRoleRoleAssignment) -> Self { value.clone() } } - ///Client view of a [`Sled`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Sled { @@ -4273,13 +3807,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Sled> for Sled { fn from(value: &Sled) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SledResultsPage { @@ -4289,13 +3821,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SledResultsPage> for SledResultsPage { fn from(value: &SledResultsPage) -> Self { value.clone() } } - ///Client view of a Snapshot #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Snapshot { @@ -4314,13 +3844,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Snapshot> for Snapshot { fn from(value: &Snapshot) -> Self { value.clone() } } - ///Create-time parameters for a /// [`Snapshot`](crate::external_api::views::Snapshot) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4330,13 +3858,11 @@ pub mod types { pub disk: Name, pub name: Name, } - impl From<&SnapshotCreate> for SnapshotCreate { fn from(value: &SnapshotCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SnapshotResultsPage { @@ -4346,13 +3872,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SnapshotResultsPage> for SnapshotResultsPage { fn from(value: &SnapshotResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SnapshotState { #[serde(rename = "creating")] @@ -4364,13 +3888,11 @@ pub mod types { #[serde(rename = "destroyed")] Destroyed, } - impl From<&SnapshotState> for SnapshotState { fn from(value: &SnapshotState) -> Self { value.clone() } } - impl ToString for SnapshotState { fn to_string(&self) -> String { match *self { @@ -4381,7 +3903,6 @@ pub mod types { } } } - impl std::str::FromStr for SnapshotState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4394,39 +3915,33 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SnapshotState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SnapshotState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SnapshotState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SpoofLoginBody { pub username: String, } - impl From<&SpoofLoginBody> for SpoofLoginBody { fn from(value: &SpoofLoginBody) -> Self { value.clone() } } - ///Client view of a [`SshKey`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKey { @@ -4445,13 +3960,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&SshKey> for SshKey { fn from(value: &SshKey) -> Self { value.clone() } } - ///Create-time parameters for an /// [`SshKey`](crate::external_api::views::SshKey) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4461,13 +3974,11 @@ pub mod types { ///SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` pub public_key: String, } - impl From<&SshKeyCreate> for SshKeyCreate { fn from(value: &SshKeyCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SshKeyResultsPage { @@ -4477,13 +3988,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SshKeyResultsPage> for SshKeyResultsPage { fn from(value: &SshKeyResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum SystemMetricName { #[serde(rename = "virtual_disk_space_provisioned")] @@ -4493,13 +4002,11 @@ pub mod types { #[serde(rename = "ram_provisioned")] RamProvisioned, } - impl From<&SystemMetricName> for SystemMetricName { fn from(value: &SystemMetricName) -> Self { value.clone() } } - impl ToString for SystemMetricName { fn to_string(&self) -> String { match *self { @@ -4509,7 +4016,6 @@ pub mod types { } } } - impl std::str::FromStr for SystemMetricName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4521,28 +4027,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for SystemMetricName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for SystemMetricName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for SystemMetricName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4555,13 +4057,11 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&SystemUpdate> for SystemUpdate { fn from(value: &SystemUpdate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdateResultsPage { @@ -4571,36 +4071,30 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&SystemUpdateResultsPage> for SystemUpdateResultsPage { fn from(value: &SystemUpdateResultsPage) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemUpdateStart { pub version: SemverVersion, } - impl From<&SystemUpdateStart> for SystemUpdateStart { fn from(value: &SystemUpdateStart) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct SystemVersion { pub status: UpdateStatus, pub version_range: VersionRange, } - impl From<&SystemVersion> for SystemVersion { fn from(value: &SystemVersion) -> Self { value.clone() } } - ///Names are constructed by concatenating the target and metric names with /// ':'. Target and metric names must be lowercase alphanumeric characters /// with '_' separating words. @@ -4612,19 +4106,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: TimeseriesName) -> Self { value.0 } } - impl From<&TimeseriesName> for TimeseriesName { fn from(value: &TimeseriesName) -> Self { value.clone() } } - impl std::str::FromStr for TimeseriesName { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4640,28 +4131,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for TimeseriesName { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for TimeseriesName { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for TimeseriesName { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for TimeseriesName { fn deserialize(deserializer: D) -> Result where @@ -4672,7 +4159,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///The schema for a timeseries. /// ///This includes the name of the timeseries, as well as the datum type of @@ -4684,13 +4170,11 @@ pub mod types { pub field_schema: Vec, pub timeseries_name: TimeseriesName, } - impl From<&TimeseriesSchema> for TimeseriesSchema { fn from(value: &TimeseriesSchema) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct TimeseriesSchemaResultsPage { @@ -4700,13 +4184,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&TimeseriesSchemaResultsPage> for TimeseriesSchemaResultsPage { fn from(value: &TimeseriesSchemaResultsPage) -> Self { value.clone() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4720,13 +4202,11 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&UpdateDeployment> for UpdateDeployment { fn from(value: &UpdateDeployment) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateDeploymentResultsPage { @@ -4736,13 +4216,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UpdateDeploymentResultsPage> for UpdateDeploymentResultsPage { fn from(value: &UpdateDeploymentResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] #[serde(tag = "status")] pub enum UpdateStatus { @@ -4751,13 +4229,11 @@ pub mod types { #[serde(rename = "steady")] Steady, } - impl From<&UpdateStatus> for UpdateStatus { fn from(value: &UpdateStatus) -> Self { value.clone() } } - impl ToString for UpdateStatus { fn to_string(&self) -> String { match *self { @@ -4766,7 +4242,6 @@ pub mod types { } } } - impl std::str::FromStr for UpdateStatus { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4777,28 +4252,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for UpdateStatus { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UpdateStatus { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UpdateStatus { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Identity-related metadata that's included in "asset" public API objects /// (which generally have no name or description) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -4815,13 +4286,11 @@ pub mod types { pub time_modified: chrono::DateTime, pub version: SemverVersion, } - impl From<&UpdateableComponent> for UpdateableComponent { fn from(value: &UpdateableComponent) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UpdateableComponentResultsPage { @@ -4831,13 +4300,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UpdateableComponentResultsPage> for UpdateableComponentResultsPage { fn from(value: &UpdateableComponentResultsPage) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum UpdateableComponentType { #[serde(rename = "bootloader_for_rot")] @@ -4865,13 +4332,11 @@ pub mod types { #[serde(rename = "host_omicron")] HostOmicron, } - impl From<&UpdateableComponentType> for UpdateableComponentType { fn from(value: &UpdateableComponentType) -> Self { value.clone() } } - impl ToString for UpdateableComponentType { fn to_string(&self) -> String { match *self { @@ -4890,7 +4355,6 @@ pub mod types { } } } - impl std::str::FromStr for UpdateableComponentType { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -4911,28 +4375,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for UpdateableComponentType { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UpdateableComponentType { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UpdateableComponentType { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///Client view of a [`User`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct User { @@ -4942,13 +4402,11 @@ pub mod types { ///Uuid of the silo to which this user belongs pub silo_id: uuid::Uuid, } - impl From<&User> for User { fn from(value: &User) -> Self { value.clone() } } - ///Client view of a [`UserBuiltin`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserBuiltin { @@ -4963,13 +4421,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&UserBuiltin> for UserBuiltin { fn from(value: &UserBuiltin) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserBuiltinResultsPage { @@ -4979,13 +4435,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UserBuiltinResultsPage> for UserBuiltinResultsPage { fn from(value: &UserBuiltinResultsPage) -> Self { value.clone() } } - ///Create-time parameters for a [`User`](crate::external_api::views::User) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserCreate { @@ -4994,13 +4448,11 @@ pub mod types { ///password used to log in pub password: UserPassword, } - impl From<&UserCreate> for UserCreate { fn from(value: &UserCreate) -> Self { value.clone() } } - ///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. @@ -5012,19 +4464,16 @@ pub mod types { &self.0 } } - impl From for String { fn from(value: UserId) -> Self { value.0 } } - impl From<&UserId> for UserId { fn from(value: &UserId) -> Self { value.clone() } } - impl std::str::FromStr for UserId { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5035,28 +4484,24 @@ pub mod types { Ok(Self(value.to_string())) } } - impl std::convert::TryFrom<&str> for UserId { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for UserId { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for UserId { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - impl<'de> serde::Deserialize<'de> for UserId { fn deserialize(deserializer: D) -> Result where @@ -5067,7 +4512,6 @@ pub mod types { .map_err(|e: &'static str| ::custom(e.to_string())) } } - ///Parameters for setting a user's password #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "user_password_value", content = "details")] @@ -5078,19 +4522,16 @@ pub mod types { #[serde(rename = "invalid_password")] InvalidPassword, } - impl From<&UserPassword> for UserPassword { fn from(value: &UserPassword) -> Self { value.clone() } } - impl From for UserPassword { fn from(value: Password) -> Self { Self::Password(value) } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UserResultsPage { @@ -5100,38 +4541,32 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&UserResultsPage> for UserResultsPage { fn from(value: &UserResultsPage) -> Self { value.clone() } } - ///Credentials for local user login #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UsernamePasswordCredentials { pub password: Password, pub username: UserId, } - impl From<&UsernamePasswordCredentials> for UsernamePasswordCredentials { fn from(value: &UsernamePasswordCredentials) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VersionRange { pub high: SemverVersion, pub low: SemverVersion, } - impl From<&VersionRange> for VersionRange { fn from(value: &VersionRange) -> Self { value.clone() } } - ///Client view of a [`Vpc`] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Vpc { @@ -5154,13 +4589,11 @@ pub mod types { ///timestamp when this resource was last modified pub time_modified: chrono::DateTime, } - impl From<&Vpc> for Vpc { fn from(value: &Vpc) -> Self { value.clone() } } - ///Create-time parameters for a [`Vpc`](crate::external_api::views::Vpc) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcCreate { @@ -5176,13 +4609,11 @@ pub mod types { pub ipv6_prefix: Option, pub name: Name, } - impl From<&VpcCreate> for VpcCreate { fn from(value: &VpcCreate) -> Self { value.clone() } } - ///A single rule in a VPC firewall #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRule { @@ -5211,13 +4642,11 @@ pub mod types { ///the VPC to which this rule belongs pub vpc_id: uuid::Uuid, } - impl From<&VpcFirewallRule> for VpcFirewallRule { fn from(value: &VpcFirewallRule) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleAction { #[serde(rename = "allow")] @@ -5225,13 +4654,11 @@ pub mod types { #[serde(rename = "deny")] Deny, } - impl From<&VpcFirewallRuleAction> for VpcFirewallRuleAction { fn from(value: &VpcFirewallRuleAction) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleAction { fn to_string(&self) -> String { match *self { @@ -5240,7 +4667,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleAction { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5251,28 +4677,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleAction { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleDirection { #[serde(rename = "inbound")] @@ -5280,13 +4702,11 @@ pub mod types { #[serde(rename = "outbound")] Outbound, } - impl From<&VpcFirewallRuleDirection> for VpcFirewallRuleDirection { fn from(value: &VpcFirewallRuleDirection) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleDirection { fn to_string(&self) -> String { match *self { @@ -5295,7 +4715,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleDirection { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5306,28 +4725,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleDirection { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///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. @@ -5344,13 +4759,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub protocols: Option>, } - impl From<&VpcFirewallRuleFilter> for VpcFirewallRuleFilter { fn from(value: &VpcFirewallRuleFilter) -> Self { value.clone() } } - ///The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis /// of its source or destination host. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5372,25 +4785,21 @@ pub mod types { #[serde(rename = "ip_net")] IpNet(IpNet), } - impl From<&VpcFirewallRuleHostFilter> for VpcFirewallRuleHostFilter { fn from(value: &VpcFirewallRuleHostFilter) -> Self { value.clone() } } - impl From for VpcFirewallRuleHostFilter { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for VpcFirewallRuleHostFilter { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///The protocols that may be specified in a firewall rule's filter #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleProtocol { @@ -5401,13 +4810,11 @@ pub mod types { #[serde(rename = "ICMP")] Icmp, } - impl From<&VpcFirewallRuleProtocol> for VpcFirewallRuleProtocol { fn from(value: &VpcFirewallRuleProtocol) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleProtocol { fn to_string(&self) -> String { match *self { @@ -5417,7 +4824,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleProtocol { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5429,28 +4835,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleProtocol { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcFirewallRuleStatus { #[serde(rename = "disabled")] @@ -5458,13 +4860,11 @@ pub mod types { #[serde(rename = "enabled")] Enabled, } - impl From<&VpcFirewallRuleStatus> for VpcFirewallRuleStatus { fn from(value: &VpcFirewallRuleStatus) -> Self { value.clone() } } - impl ToString for VpcFirewallRuleStatus { fn to_string(&self) -> String { match *self { @@ -5473,7 +4873,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcFirewallRuleStatus { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5484,28 +4883,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcFirewallRuleStatus { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A `VpcFirewallRuleTarget` is used to specify the set of [`Instance`]s to /// which a firewall rule applies. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5527,25 +4922,21 @@ pub mod types { #[serde(rename = "ip_net")] IpNet(IpNet), } - impl From<&VpcFirewallRuleTarget> for VpcFirewallRuleTarget { fn from(value: &VpcFirewallRuleTarget) -> Self { value.clone() } } - impl From for VpcFirewallRuleTarget { fn from(value: std::net::IpAddr) -> Self { Self::Ip(value) } } - impl From for VpcFirewallRuleTarget { fn from(value: IpNet) -> Self { Self::IpNet(value) } } - ///A single rule in a VPC firewall #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRuleUpdate { @@ -5566,13 +4957,11 @@ pub mod types { ///list of sets of instances that the rule applies to pub targets: Vec, } - impl From<&VpcFirewallRuleUpdate> for VpcFirewallRuleUpdate { fn from(value: &VpcFirewallRuleUpdate) -> Self { value.clone() } } - ///Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules /// are implicitly created along with a Vpc, so there is no explicit /// creation. @@ -5580,25 +4969,21 @@ pub mod types { pub struct VpcFirewallRuleUpdateParams { pub rules: Vec, } - impl From<&VpcFirewallRuleUpdateParams> for VpcFirewallRuleUpdateParams { fn from(value: &VpcFirewallRuleUpdateParams) -> Self { value.clone() } } - ///Collection of a Vpc's firewall rules #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcFirewallRules { pub rules: Vec, } - impl From<&VpcFirewallRules> for VpcFirewallRules { fn from(value: &VpcFirewallRules) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcResultsPage { @@ -5608,13 +4993,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcResultsPage> for VpcResultsPage { fn from(value: &VpcResultsPage) -> Self { value.clone() } } - ///A VPC router defines a series of rules that indicate where traffic /// should be sent depending on its destination. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5633,13 +5016,11 @@ pub mod types { ///The VPC to which the router belongs. pub vpc_id: uuid::Uuid, } - impl From<&VpcRouter> for VpcRouter { fn from(value: &VpcRouter) -> Self { value.clone() } } - ///Create-time parameters for a /// [`VpcRouter`](crate::external_api::views::VpcRouter) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5647,13 +5028,11 @@ pub mod types { pub description: String, pub name: Name, } - impl From<&VpcRouterCreate> for VpcRouterCreate { fn from(value: &VpcRouterCreate) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum VpcRouterKind { #[serde(rename = "system")] @@ -5661,13 +5040,11 @@ pub mod types { #[serde(rename = "custom")] Custom, } - impl From<&VpcRouterKind> for VpcRouterKind { fn from(value: &VpcRouterKind) -> Self { value.clone() } } - impl ToString for VpcRouterKind { fn to_string(&self) -> String { match *self { @@ -5676,7 +5053,6 @@ pub mod types { } } } - impl std::str::FromStr for VpcRouterKind { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -5687,28 +5063,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for VpcRouterKind { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for VpcRouterKind { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for VpcRouterKind { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcRouterResultsPage { @@ -5718,13 +5090,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcRouterResultsPage> for VpcRouterResultsPage { fn from(value: &VpcRouterResultsPage) -> Self { value.clone() } } - ///Updateable properties of a /// [`VpcRouter`](crate::external_api::views::VpcRouter) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5734,13 +5104,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcRouterUpdate> for VpcRouterUpdate { fn from(value: &VpcRouterUpdate) -> Self { value.clone() } } - ///A VPC subnet represents a logical grouping for instances that allows /// network traffic between them, within a IPv4 subnetwork or optionall an /// IPv6 subnetwork. @@ -5763,13 +5131,11 @@ pub mod types { ///The VPC to which the subnet belongs. pub vpc_id: uuid::Uuid, } - impl From<&VpcSubnet> for VpcSubnet { fn from(value: &VpcSubnet) -> Self { value.clone() } } - ///Create-time parameters for a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5790,13 +5156,11 @@ pub mod types { pub ipv6_block: Option, pub name: Name, } - impl From<&VpcSubnetCreate> for VpcSubnetCreate { fn from(value: &VpcSubnetCreate) -> Self { value.clone() } } - ///A single page of results #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcSubnetResultsPage { @@ -5806,13 +5170,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub next_page: Option, } - impl From<&VpcSubnetResultsPage> for VpcSubnetResultsPage { fn from(value: &VpcSubnetResultsPage) -> Self { value.clone() } } - ///Updateable properties of a /// [`VpcSubnet`](crate::external_api::views::VpcSubnet) #[derive(Clone, Debug, Deserialize, Serialize)] @@ -5822,13 +5184,11 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcSubnetUpdate> for VpcSubnetUpdate { fn from(value: &VpcSubnetUpdate) -> Self { value.clone() } } - ///Updateable properties of a [`Vpc`](crate::external_api::views::Vpc) #[derive(Clone, Debug, Deserialize, Serialize)] pub struct VpcUpdate { @@ -5839,25 +5199,21 @@ pub mod types { #[serde(default, skip_serializing_if = "Option::is_none")] pub name: Option, } - impl From<&VpcUpdate> for VpcUpdate { fn from(value: &VpcUpdate) -> Self { value.clone() } } - pub mod defaults { pub(super) fn default_bool() -> bool { V } - pub(super) fn instance_create_network_interfaces( ) -> super::InstanceNetworkInterfaceAttachment { super::InstanceNetworkInterfaceAttachment::Default } } } - #[derive(Clone, Debug)] ///Client for Oxide Region API /// @@ -5868,7 +5224,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -5884,7 +5239,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -5897,17 +5251,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -5916,7 +5267,6 @@ impl Client { "0.0.1" } } - impl Client { ///Fetch a disk by id /// @@ -5946,7 +5296,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an image by id /// ///Sends a `GET` request to `/by-id/images/{id}` @@ -5973,7 +5322,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an instance by id /// ///Sends a `GET` request to `/by-id/instances/{id}` @@ -6000,7 +5348,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a network interface by id /// ///Sends a `GET` request to `/by-id/network-interfaces/{id}` @@ -6027,7 +5374,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an organization by id /// ///Use `GET /v1/organizations/{organization}` instead @@ -6056,7 +5402,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a project by id /// ///Use `GET /v1/projects/{project}` instead @@ -6085,7 +5430,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a snapshot by id /// ///Sends a `GET` request to `/by-id/snapshots/{id}` @@ -6112,7 +5456,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a route by id /// ///Sends a `GET` request to `/by-id/vpc-router-routes/{id}` @@ -6139,7 +5482,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Get a router by id /// ///Sends a `GET` request to `/by-id/vpc-routers/{id}` @@ -6166,7 +5508,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a subnet by id /// ///Sends a `GET` request to `/by-id/vpc-subnets/{id}` @@ -6193,7 +5534,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a VPC /// ///Sends a `GET` request to `/by-id/vpcs/{id}` @@ -6220,7 +5560,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Start an OAuth 2.0 Device Authorization Grant /// ///This endpoint is designed to be accessed from an *unauthenticated* API @@ -6241,7 +5580,6 @@ impl Client { _ => Err(Error::ErrorResponse(ResponseValue::stream(response))), } } - ///Confirm an OAuth 2.0 Device Authorization Grant /// ///This endpoint is designed to be accessed by the user agent (browser), @@ -6269,7 +5607,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Request a device access token /// ///This endpoint should be polled by the client until the user code is @@ -6289,7 +5626,6 @@ impl Client { _ => Err(Error::ErrorResponse(ResponseValue::stream(response))), } } - ///List groups /// ///Sends a `GET` request to `/groups` @@ -6310,15 +5646,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -6333,7 +5666,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List groups as a Stream /// ///Sends repeated `GET` requests to `/groups` until there are no more @@ -6375,7 +5707,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Sends a `POST` request to `/login` pub async fn login_spoof<'a>( &'a self, @@ -6396,7 +5727,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Authenticate a user (i.e., log in) via username and password /// ///Sends a `POST` request to `/login/{silo_name}/local` @@ -6424,7 +5754,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Prompt user login /// ///Either display a page asking a user for their credentials, or redirect @@ -6456,7 +5785,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Authenticate a user (i.e., log in) via SAML /// ///Sends a `POST` request to `/login/{silo_name}/saml/{provider_name}` @@ -6494,7 +5822,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `POST` request to `/logout` pub async fn logout<'a>(&'a self) -> Result, Error> { let url = format!("{}/logout", self.baseurl,); @@ -6512,7 +5839,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List organizations /// ///Use `GET /v1/organizations` instead @@ -6535,15 +5861,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -6558,7 +5881,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List organizations as a Stream /// ///Use `GET /v1/organizations` instead @@ -6603,7 +5925,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create an organization /// ///Use `POST /v1/organizations` instead @@ -6628,7 +5949,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an organization /// ///Use `GET /v1/organizations/{organization}` instead @@ -6660,7 +5980,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update an organization /// ///Use `PUT /v1/organizations/{organization}` instead @@ -6694,7 +6013,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete an organization /// ///Use `DELETE /v1/organizations/{organization}` instead @@ -6726,7 +6044,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an organization's IAM policy /// ///Use `GET /v1/organizations/{organization}/policy` instead @@ -6758,7 +6075,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update an organization's IAM policy /// ///Use `PUT /v1/organizations/{organization}/policy` instead @@ -6792,7 +6108,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List projects /// ///Use `GET /v1/projects` instead @@ -6821,15 +6136,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -6844,7 +6156,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List projects as a Stream /// ///Use `GET /v1/projects` instead @@ -6891,7 +6202,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a project /// ///Use `POST /v1/projects` instead @@ -6925,7 +6235,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a project /// ///Use `GET /v1/projects/{project}` instead @@ -6961,7 +6270,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a project /// ///Use `PUT /v1/projects/{project}` instead @@ -6999,7 +6307,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a project /// ///Use `DELETE /v1/projects/{project}` instead @@ -7035,7 +6342,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List disks /// ///Use `GET /v1/disks` instead @@ -7068,15 +6374,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -7091,7 +6394,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List disks as a Stream /// ///Use `GET /v1/disks` instead @@ -7146,7 +6448,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Use `POST /v1/disks` instead /// ///Sends a `POST` request to @@ -7182,7 +6483,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a disk /// ///Use `GET /v1/disks/{disk}` instead @@ -7217,7 +6517,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Use `DELETE /v1/disks/{disk}` instead /// ///Sends a `DELETE` request to @@ -7250,7 +6549,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch disk metrics /// ///Sends a `GET` request to @@ -7290,19 +6588,15 @@ impl Client { if let Some(v) = &end_time { query.push(("end_time", v.to_string())); } - if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &start_time { query.push(("start_time", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -7317,7 +6611,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch disk metrics as a Stream /// ///Sends repeated `GET` requests to @@ -7389,7 +6682,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///List images /// ///List images in a project. The images are returned sorted by creation @@ -7423,15 +6715,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -7446,7 +6735,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List images as a Stream /// ///List images in a project. The images are returned sorted by creation @@ -7502,7 +6790,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create an image /// ///Create a new image in a project. @@ -7540,7 +6827,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an image /// ///Fetch the details for a specific image in a project. @@ -7575,7 +6861,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete an image /// ///Permanently delete an image from a project. This operation cannot be @@ -7612,7 +6897,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List instances /// ///Sends a `GET` request to @@ -7643,15 +6927,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -7666,7 +6947,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List instances as a Stream /// ///Sends repeated `GET` requests to @@ -7720,7 +7000,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create an instance /// ///Use `POST /v1/instances` instead @@ -7758,7 +7037,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an instance /// ///Use `GET /v1/instances/{instance}` instead @@ -7793,7 +7071,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete an instance /// ///Sends a `DELETE` request to @@ -7826,7 +7103,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List an instance's disks /// ///Use `GET /v1/instances/{instance}/disks` instead @@ -7863,15 +7139,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -7886,7 +7159,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List an instance's disks as a Stream /// ///Use `GET /v1/instances/{instance}/disks` instead @@ -7951,7 +7223,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Attach a disk to an instance /// ///Use `POST /v1/instances/{instance}/disks/attach` instead @@ -7987,7 +7258,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Detach a disk from an instance /// ///Use `POST /v1/disks/{disk}/detach` instead @@ -8023,7 +7293,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List external IP addresses /// ///Sends a `GET` request to @@ -8056,7 +7325,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Migrate an instance /// ///Use `POST /v1/instances/{instance}/migrate` instead @@ -8092,7 +7360,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List network interfaces /// ///Sends a `GET` request to @@ -8127,15 +7394,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -8150,7 +7414,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List network interfaces as a Stream /// ///Sends repeated `GET` requests to @@ -8214,7 +7477,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a network interface /// ///Sends a `POST` request to @@ -8248,7 +7510,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a network interface /// ///Sends a `GET` request to @@ -8283,7 +7544,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a network interface /// ///Sends a `PUT` request to @@ -8319,7 +7579,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a network interface /// ///Note that the primary interface for an instance cannot be deleted if @@ -8359,7 +7618,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Reboot an instance /// ///Use `POST /v1/instances/{instance}/reboot` instead @@ -8394,7 +7652,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an instance's serial console /// ///Use `GET /v1/instances/{instance}/serial-console` instead @@ -8438,15 +7695,12 @@ impl Client { if let Some(v) = &from_start { query.push(("from_start", v.to_string())); } - if let Some(v) = &max_bytes { query.push(("max_bytes", v.to_string())); } - if let Some(v) = &most_recent { query.push(("most_recent", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -8461,7 +7715,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Connect to an instance's serial console /// ///Use `GET /v1/instances/{instance}/serial-console/stream` instead @@ -8504,7 +7757,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Boot an instance /// ///Use `POST /v1/instances/{instance}/start` instead @@ -8539,7 +7791,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Halt an instance /// ///Use `POST /v1/instances/{instance}/stop` instead @@ -8574,7 +7825,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a project's IAM policy /// ///Use `GET /v1/projects/{project}/policy` instead @@ -8610,7 +7860,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a project's IAM policy /// ///Sends a `PUT` request to @@ -8646,7 +7895,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List snapshots /// ///Sends a `GET` request to @@ -8677,15 +7925,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -8700,7 +7945,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List snapshots as a Stream /// ///Sends repeated `GET` requests to @@ -8754,7 +7998,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a snapshot /// ///Creates a point-in-time snapshot from a disk. @@ -8792,7 +8035,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a snapshot /// ///Sends a `GET` request to @@ -8825,7 +8067,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a snapshot /// ///Sends a `DELETE` request to @@ -8858,7 +8099,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List VPCs /// ///Sends a `GET` request to @@ -8889,15 +8129,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -8912,7 +8149,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List VPCs as a Stream /// ///Sends repeated `GET` requests to @@ -8965,7 +8201,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a VPC /// ///Sends a `POST` request to @@ -9001,7 +8236,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a VPC /// ///Sends a `GET` request to @@ -9034,7 +8268,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a VPC /// ///Sends a `PUT` request to @@ -9068,7 +8301,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a VPC /// ///Sends a `DELETE` request to @@ -9101,7 +8333,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List firewall rules /// ///Sends a `GET` request to @@ -9134,7 +8365,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Replace firewall rules /// ///Sends a `PUT` request to @@ -9168,7 +8398,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List routers /// ///Sends a `GET` request to @@ -9203,15 +8432,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -9226,7 +8452,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List routers as a Stream /// ///Sends repeated `GET` requests to @@ -9290,7 +8515,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a router /// ///Sends a `POST` request to @@ -9324,7 +8548,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Get a router /// ///Sends a `GET` request to @@ -9359,7 +8582,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a router /// ///Sends a `PUT` request to @@ -9395,7 +8617,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a router /// ///Sends a `DELETE` request to @@ -9430,7 +8651,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List routes /// ///List the routes associated with a router in a particular VPC. @@ -9470,15 +8690,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -9493,7 +8710,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List routes as a Stream /// ///List the routes associated with a router in a particular VPC. @@ -9564,7 +8780,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a router /// ///Sends a `POST` request to @@ -9600,7 +8815,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a route /// ///Sends a `GET` request to @@ -9637,7 +8851,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a route /// ///Sends a `PUT` request to @@ -9675,7 +8888,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a route /// ///Sends a `DELETE` request to @@ -9712,7 +8924,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List subnets /// ///Sends a `GET` request to @@ -9747,15 +8958,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -9770,7 +8978,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List subnets as a Stream /// ///Sends repeated `GET` requests to @@ -9834,7 +9041,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a subnet /// ///Sends a `POST` request to @@ -9868,7 +9074,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a subnet /// ///Sends a `GET` request to @@ -9903,7 +9108,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a subnet /// ///Sends a `PUT` request to @@ -9939,7 +9143,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a subnet /// ///Sends a `DELETE` request to @@ -9974,7 +9177,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List network interfaces /// ///Sends a `GET` request to @@ -10012,15 +9214,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -10035,7 +9234,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List network interfaces as a Stream /// ///Sends repeated `GET` requests to @@ -10104,7 +9302,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Fetch the current silo's IAM policy /// ///Sends a `GET` request to `/policy` @@ -10126,7 +9323,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update the current silo's IAM policy /// ///Sends a `PUT` request to `/policy` @@ -10149,7 +9345,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List built-in roles /// ///Sends a `GET` request to `/roles` @@ -10168,11 +9363,9 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -10187,7 +9380,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List built-in roles as a Stream /// ///Sends repeated `GET` requests to `/roles` until there are no more @@ -10227,7 +9419,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Fetch a built-in role /// ///Sends a `GET` request to `/roles/{role_name}` @@ -10257,7 +9448,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch the user associated with the current session /// ///Sends a `GET` request to `/session/me` @@ -10279,7 +9469,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch the silo groups the current user belongs to /// ///Sends a `GET` request to `/session/me/groups` @@ -10300,15 +9489,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -10323,7 +9509,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch the silo groups the current user belongs to as a Stream /// ///Sends repeated `GET` requests to `/session/me/groups` until there are no @@ -10365,7 +9550,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///List SSH public keys /// ///Lists SSH public keys for the currently authenticated user. @@ -10388,15 +9572,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -10411,7 +9592,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List SSH public keys as a Stream /// ///Lists SSH public keys for the currently authenticated user. @@ -10455,7 +9635,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create an SSH public key /// ///Create an SSH public key for the currently authenticated user. @@ -10480,7 +9659,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an SSH public key /// ///Fetch an SSH public key associated with the currently authenticated @@ -10510,7 +9688,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete an SSH public key /// ///Delete an SSH public key associated with the currently authenticated @@ -10540,7 +9717,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a system-wide image by id /// ///Sends a `GET` request to `/system/by-id/images/{id}` @@ -10567,7 +9743,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an IP pool by id /// ///Sends a `GET` request to `/system/by-id/ip-pools/{id}` @@ -10594,7 +9769,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a silo by id /// ///Sends a `GET` request to `/system/by-id/silos/{id}` @@ -10621,7 +9795,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List system-wide certificates /// ///Returns a list of all the system-wide certificates. System-wide @@ -10646,15 +9819,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -10669,7 +9839,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List system-wide certificates as a Stream /// ///Returns a list of all the system-wide certificates. System-wide @@ -10716,7 +9885,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a new system-wide x.509 certificate /// ///This certificate is automatically used by the Oxide Control plane to @@ -10742,7 +9910,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a certificate /// ///Returns the details of a specific certificate @@ -10771,7 +9938,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a certificate /// ///Permanently delete a certificate. This operation cannot be undone. @@ -10800,7 +9966,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List physical disks /// ///Sends a `GET` request to `/system/hardware/disks` @@ -10821,15 +9986,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -10844,7 +10006,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List physical disks as a Stream /// ///Sends repeated `GET` requests to `/system/hardware/disks` until there @@ -10887,7 +10048,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///List racks /// ///Sends a `GET` request to `/system/hardware/racks` @@ -10908,15 +10068,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -10931,7 +10088,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List racks as a Stream /// ///Sends repeated `GET` requests to `/system/hardware/racks` until there @@ -10973,7 +10129,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Fetch a rack /// ///Sends a `GET` request to `/system/hardware/racks/{rack_id}` @@ -11003,7 +10158,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List sleds /// ///Sends a `GET` request to `/system/hardware/sleds` @@ -11024,15 +10178,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -11047,7 +10198,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List sleds as a Stream /// ///Sends repeated `GET` requests to `/system/hardware/sleds` until there @@ -11089,7 +10239,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Fetch a sled /// ///Sends a `GET` request to `/system/hardware/sleds/{sled_id}` @@ -11119,7 +10268,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List physical disks attached to sleds /// ///Sends a `GET` request to `/system/hardware/sleds/{sled_id}/disks` @@ -11146,15 +10294,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -11169,7 +10314,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List physical disks attached to sleds as a Stream /// ///Sends repeated `GET` requests to @@ -11215,7 +10359,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///List system-wide images /// ///Returns a list of all the system-wide images. System-wide images are @@ -11240,15 +10383,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -11263,7 +10403,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List system-wide images as a Stream /// ///Returns a list of all the system-wide images. System-wide images are @@ -11310,7 +10449,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a system-wide image /// ///Create a new system-wide image. This image can then be used by any user @@ -11336,7 +10474,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a system-wide image /// ///Returns the details of a specific system-wide image. @@ -11365,7 +10502,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a system-wide image /// ///Permanently delete a system-wide image. This operation cannot be undone. @@ -11396,7 +10532,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List IP pools /// ///Sends a `GET` request to `/system/ip-pools` @@ -11417,15 +10552,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -11440,7 +10572,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List IP pools as a Stream /// ///Sends repeated `GET` requests to `/system/ip-pools` until there are no @@ -11482,7 +10613,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create an IP pool /// ///Sends a `POST` request to `/system/ip-pools` @@ -11505,7 +10635,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an IP pool /// ///Sends a `GET` request to `/system/ip-pools/{pool_name}` @@ -11532,7 +10661,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update an IP Pool /// ///Sends a `PUT` request to `/system/ip-pools/{pool_name}` @@ -11560,7 +10688,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete an IP Pool /// ///Sends a `DELETE` request to `/system/ip-pools/{pool_name}` @@ -11587,7 +10714,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List ranges for an IP pool /// ///Ranges are ordered by their first address. @@ -11614,11 +10740,9 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -11633,7 +10757,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List ranges for an IP pool as a Stream /// ///Ranges are ordered by their first address. @@ -11678,7 +10801,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Add a range to an IP pool /// ///Sends a `POST` request to `/system/ip-pools/{pool_name}/ranges/add` @@ -11706,7 +10828,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Remove a range from an IP pool /// ///Sends a `POST` request to `/system/ip-pools/{pool_name}/ranges/remove` @@ -11734,7 +10855,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch the IP pool used for Oxide services /// ///Sends a `GET` request to `/system/ip-pools-service` @@ -11756,7 +10876,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List ranges for the IP pool used for Oxide services /// ///Ranges are ordered by their first address. @@ -11777,11 +10896,9 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -11796,7 +10913,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List ranges for the IP pool used for Oxide services as a Stream /// ///Ranges are ordered by their first address. @@ -11839,7 +10955,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Add a range to an IP pool used for Oxide services /// ///Sends a `POST` request to `/system/ip-pools-service/ranges/add` @@ -11862,7 +10977,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Remove a range from an IP pool used for Oxide services /// ///Sends a `POST` request to `/system/ip-pools-service/ranges/remove` @@ -11885,7 +10999,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Access metrics data /// ///Sends a `GET` request to `/system/metrics/{metric_name}` @@ -11916,20 +11029,16 @@ impl Client { if let Some(v) = &end_time { query.push(("end_time", v.to_string())); } - query.push(("id", id.to_string())); if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &start_time { query.push(("start_time", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -11944,7 +11053,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch the top-level IAM policy /// ///Sends a `GET` request to `/system/policy` @@ -11966,7 +11074,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update the top-level IAM policy /// ///Sends a `PUT` request to `/system/policy` @@ -11989,7 +11096,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List sagas /// ///Sends a `GET` request to `/system/sagas` @@ -12010,15 +11116,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -12033,7 +11136,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List sagas as a Stream /// ///Sends repeated `GET` requests to `/system/sagas` until there are no more @@ -12075,7 +11177,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Fetch a saga /// ///Sends a `GET` request to `/system/sagas/{saga_id}` @@ -12102,7 +11203,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List silos /// ///Lists silos that are discoverable based on the current permissions. @@ -12125,15 +11225,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -12148,7 +11245,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List silos as a Stream /// ///Lists silos that are discoverable based on the current permissions. @@ -12192,7 +11288,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a silo /// ///Sends a `POST` request to `/system/silos` @@ -12215,7 +11310,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a silo /// ///Fetch a silo by name. @@ -12247,7 +11341,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a silo /// ///Delete a silo by name. @@ -12279,7 +11372,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List a silo's IDPs /// ///Sends a `GET` request to `/system/silos/{silo_name}/identity-providers` @@ -12306,15 +11398,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -12329,7 +11418,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List a silo's IDPs as a Stream /// ///Sends repeated `GET` requests to @@ -12375,7 +11463,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a user /// ///Users can only be created in Silos with `provision_type` == `Fixed`. @@ -12412,7 +11499,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a user /// ///Sends a `DELETE` request to @@ -12446,7 +11532,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Set or invalidate a user's password /// ///Passwords can only be updated for users in Silos with identity mode @@ -12486,7 +11571,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Create a SAML IDP /// ///Sends a `POST` request to @@ -12519,7 +11603,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a SAML IDP /// ///Sends a `GET` request to @@ -12553,7 +11636,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a silo's IAM policy /// ///Sends a `GET` request to `/system/silos/{silo_name}/policy` @@ -12583,7 +11665,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a silo's IAM policy /// ///Sends a `PUT` request to `/system/silos/{silo_name}/policy` @@ -12615,7 +11696,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List users in a silo /// ///Sends a `GET` request to `/system/silos/{silo_name}/users/all` @@ -12642,15 +11722,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -12665,7 +11742,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List users in a silo as a Stream /// ///Sends repeated `GET` requests to `/system/silos/{silo_name}/users/all` @@ -12709,7 +11785,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Fetch a user /// ///Sends a `GET` request to `/system/silos/{silo_name}/users/id/{user_id}` @@ -12742,7 +11817,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List built-in users /// ///Sends a `GET` request to `/system/user` @@ -12763,15 +11837,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -12786,7 +11857,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List built-in users as a Stream /// ///Sends repeated `GET` requests to `/system/user` until there are no more @@ -12829,7 +11899,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Fetch a built-in user /// ///Sends a `GET` request to `/system/user/{user_name}` @@ -12859,7 +11928,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List timeseries schema /// ///Sends a `GET` request to `/timeseries/schema` @@ -12878,11 +11946,9 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -12897,7 +11963,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List timeseries schema as a Stream /// ///Sends repeated `GET` requests to `/timeseries/schema` until there are no @@ -12938,7 +12003,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///List users /// ///Sends a `GET` request to `/users` @@ -12959,15 +12023,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -12982,7 +12043,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List users as a Stream /// ///Sends repeated `GET` requests to `/users` until there are no more @@ -13024,7 +12084,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///List disks /// ///Sends a `GET` request to `/v1/disks` @@ -13049,23 +12108,18 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13080,7 +12134,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List disks as a Stream /// ///Sends repeated `GET` requests to `/v1/disks` until there are no more @@ -13126,7 +12179,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a disk /// ///Sends a `POST` request to `/v1/disks` @@ -13141,7 +12193,6 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - query.push(("project", project.to_string())); let request = self.client.post(url).json(&body).query(&query).build()?; let result = self.client.execute(request).await; @@ -13157,7 +12208,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a disk /// ///Sends a `GET` request to `/v1/disks/{disk}` @@ -13176,11 +12226,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13195,7 +12243,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a disk /// ///Sends a `DELETE` request to `/v1/disks/{disk}` @@ -13214,11 +12261,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.delete(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13233,7 +12278,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List instances /// ///Sends a `GET` request to `/v1/instances` @@ -13258,23 +12302,18 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13289,7 +12328,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List instances as a Stream /// ///Sends repeated `GET` requests to `/v1/instances` until there are no more @@ -13336,7 +12374,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create an instance /// ///Sends a `POST` request to `/v1/instances` @@ -13351,7 +12388,6 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - query.push(("project", project.to_string())); let request = self.client.post(url).json(&body).query(&query).build()?; let result = self.client.execute(request).await; @@ -13367,7 +12403,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an instance /// ///Sends a `GET` request to `/v1/instances/{instance}` @@ -13386,11 +12421,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13405,7 +12438,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete an instance /// ///Sends a `DELETE` request to `/v1/instances/{instance}` @@ -13424,11 +12456,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.delete(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13443,7 +12473,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List an instance's disks /// ///Sends a `GET` request to `/v1/instances/{instance}/disks` @@ -13474,23 +12503,18 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13505,7 +12529,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List an instance's disks as a Stream /// ///Sends repeated `GET` requests to `/v1/instances/{instance}/disks` until @@ -13560,7 +12583,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Attach a disk to an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/disks/attach` @@ -13580,11 +12602,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.post(url).json(&body).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13599,7 +12619,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Detach a disk from an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/disks/detach` @@ -13619,11 +12638,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.post(url).json(&body).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13638,7 +12655,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Migrate an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/migrate` @@ -13658,11 +12674,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.post(url).json(&body).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13677,7 +12691,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Reboot an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/reboot` @@ -13696,11 +12709,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.post(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13715,7 +12726,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an instance's serial console /// ///Sends a `GET` request to `/v1/instances/{instance}/serial-console` @@ -13753,23 +12763,18 @@ impl Client { if let Some(v) = &from_start { query.push(("from_start", v.to_string())); } - if let Some(v) = &max_bytes { query.push(("max_bytes", v.to_string())); } - if let Some(v) = &most_recent { query.push(("most_recent", v.to_string())); } - if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13784,7 +12789,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Stream an instance's serial console /// ///Sends a `GET` request to @@ -13804,11 +12808,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self .client .get(url) @@ -13832,7 +12834,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Boot an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/start` @@ -13851,11 +12852,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.post(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13870,7 +12869,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Stop an instance /// ///Sends a `POST` request to `/v1/instances/{instance}/stop` @@ -13889,11 +12887,9 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &project { query.push(("project", v.to_string())); } - let request = self.client.post(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13908,7 +12904,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List organizations /// ///Sends a `GET` request to `/v1/organizations` @@ -13929,15 +12924,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -13952,7 +12944,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List organizations as a Stream /// ///Sends repeated `GET` requests to `/v1/organizations` until there are no @@ -13995,7 +12986,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create an organization /// ///Sends a `POST` request to `/v1/organizations` @@ -14018,7 +13008,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an organization /// ///Sends a `GET` request to `/v1/organizations/{organization}` @@ -14045,7 +13034,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update an organization /// ///Sends a `PUT` request to `/v1/organizations/{organization}` @@ -14073,7 +13061,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete an organization /// ///Sends a `DELETE` request to `/v1/organizations/{organization}` @@ -14100,7 +13087,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch an organization's IAM policy /// ///Sends a `GET` request to `/v1/organizations/{organization}/policy` @@ -14127,7 +13113,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update an organization's IAM policy /// ///Sends a `PUT` request to `/v1/organizations/{organization}/policy` @@ -14155,7 +13140,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List projects /// ///Sends a `GET` request to `/v1/projects` @@ -14178,19 +13162,15 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &organization { query.push(("organization", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14205,7 +13185,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List projects as a Stream /// ///Sends repeated `GET` requests to `/v1/projects` until there are no more @@ -14249,7 +13228,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Create a project /// ///Sends a `POST` request to `/v1/projects` @@ -14275,7 +13253,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a project /// ///Sends a `GET` request to `/v1/projects/{project}` @@ -14293,7 +13270,6 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14308,7 +13284,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a project /// ///Sends a `PUT` request to `/v1/projects/{project}` @@ -14327,7 +13302,6 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - let request = self.client.put(url).json(&body).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14342,7 +13316,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Delete a project /// ///Sends a `DELETE` request to `/v1/projects/{project}` @@ -14360,7 +13333,6 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - let request = self.client.delete(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14375,7 +13347,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Fetch a project's IAM policy /// ///Sends a `GET` request to `/v1/projects/{project}/policy` @@ -14393,7 +13364,6 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14408,7 +13378,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Update a project's IAM policy /// ///Sends a `PUT` request to `/v1/projects/{project}/policy` @@ -14427,7 +13396,6 @@ impl Client { if let Some(v) = &organization { query.push(("organization", v.to_string())); } - let request = self.client.put(url).json(&body).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14442,7 +13410,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///View version and update status of component tree /// ///Sends a `GET` request to `/v1/system/update/components` @@ -14463,15 +13430,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14486,7 +13450,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///View version and update status of component tree as a Stream /// ///Sends repeated `GET` requests to `/v1/system/update/components` until @@ -14529,7 +13492,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///List all update deployments /// ///Sends a `GET` request to `/v1/system/update/deployments` @@ -14550,15 +13512,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14573,7 +13532,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List all update deployments as a Stream /// ///Sends repeated `GET` requests to `/v1/system/update/deployments` until @@ -14616,7 +13574,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///Fetch a system update deployment /// ///Sends a `GET` request to `/v1/system/update/deployments/{id}` @@ -14643,7 +13600,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Refresh update data /// ///Sends a `POST` request to `/v1/system/update/refresh` @@ -14665,7 +13621,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Start system update /// ///Sends a `POST` request to `/v1/system/update/start` @@ -14688,7 +13643,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Stop system update /// ///If there is no update in progress, do nothing. @@ -14712,7 +13666,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List all updates /// ///Sends a `GET` request to `/v1/system/update/updates` @@ -14733,15 +13686,12 @@ impl Client { if let Some(v) = &limit { query.push(("limit", v.to_string())); } - if let Some(v) = &page_token { query.push(("page_token", v.to_string())); } - if let Some(v) = &sort_by { query.push(("sort_by", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -14756,7 +13706,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///List all updates as a Stream /// ///Sends repeated `GET` requests to `/v1/system/update/updates` until there @@ -14799,7 +13748,6 @@ impl Client { .try_flatten_stream() .boxed() } - ///View system update /// ///Sends a `GET` request to `/v1/system/update/updates/{version}` @@ -14826,7 +13774,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///View system update component tree /// ///Sends a `GET` request to @@ -14854,7 +13801,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///View system version and update status /// ///Sends a `GET` request to `/v1/system/update/version` @@ -14877,7 +13823,6 @@ impl Client { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/param-overrides-builder-tagged.out b/progenitor-impl/tests/output/param-overrides-builder-tagged.out index 99fd7227..9e6965b3 100644 --- a/progenitor-impl/tests/output/param-overrides-builder-tagged.out +++ b/progenitor-impl/tests/output/param-overrides-builder-tagged.out @@ -8,7 +8,6 @@ pub mod types { #[allow(unused_imports)] use std::convert::TryFrom; } - #[derive(Clone, Debug)] ///Client for Parameter override test /// @@ -19,7 +18,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -35,7 +33,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -48,17 +45,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -67,7 +61,6 @@ impl Client { "v1" } } - impl Client { ///Gets a key /// @@ -89,7 +82,6 @@ impl Client { builder::KeyGet::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -105,7 +97,6 @@ pub mod builder { key: Result, String>, unique_key: Result, String>, } - impl<'a> KeyGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -114,7 +105,6 @@ pub mod builder { unique_key: Ok(None), } } - pub fn key(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -125,7 +115,6 @@ pub mod builder { .map_err(|_| "conversion to `bool` for key failed".to_string()); self } - pub fn unique_key(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -136,7 +125,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for unique_key failed".to_string()); self } - ///Sends a `GET` request to `/key` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -164,7 +152,6 @@ pub mod builder { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/param-overrides-builder.out b/progenitor-impl/tests/output/param-overrides-builder.out index cfd115a3..a1544434 100644 --- a/progenitor-impl/tests/output/param-overrides-builder.out +++ b/progenitor-impl/tests/output/param-overrides-builder.out @@ -8,7 +8,6 @@ pub mod types { #[allow(unused_imports)] use std::convert::TryFrom; } - #[derive(Clone, Debug)] ///Client for Parameter override test /// @@ -19,7 +18,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -35,7 +33,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -48,17 +45,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -67,7 +61,6 @@ impl Client { "v1" } } - impl Client { ///Gets a key /// @@ -89,7 +82,6 @@ impl Client { builder::KeyGet::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -105,7 +97,6 @@ pub mod builder { key: Result, String>, unique_key: Result, String>, } - impl<'a> KeyGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -114,7 +105,6 @@ pub mod builder { unique_key: Ok(None), } } - pub fn key(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -125,7 +115,6 @@ pub mod builder { .map_err(|_| "conversion to `bool` for key failed".to_string()); self } - pub fn unique_key(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -136,7 +125,6 @@ pub mod builder { .map_err(|_| "conversion to `String` for unique_key failed".to_string()); self } - ///Sends a `GET` request to `/key` pub async fn send(self) -> Result, Error<()>> { let Self { @@ -164,7 +152,6 @@ pub mod builder { } } } - pub mod prelude { pub use self::super::Client; } diff --git a/progenitor-impl/tests/output/param-overrides-cli.out b/progenitor-impl/tests/output/param-overrides-cli.out index 0595ca7d..ee8799f9 100644 --- a/progenitor-impl/tests/output/param-overrides-cli.out +++ b/progenitor-impl/tests/output/param-overrides-cli.out @@ -1,93 +1 @@ -pub struct Cli { - client: sdk::Client, - over: T, -} - -impl Cli { - pub fn new(client: sdk::Client) -> Self { - Self { client, over: () } - } - - pub fn get_command(cmd: CliCommand) -> clap::Command { - match cmd { - CliCommand::KeyGet => Self::cli_key_get(), - } - } - - pub fn cli_key_get() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("key") - .long("key") - .required(false) - .value_parser(clap::value_parser!(bool)) - .help("The same key parameter that overlaps with the path level parameter"), - ) - .arg( - clap::Arg::new("unique-key") - .long("unique-key") - .required(false) - .value_parser(clap::value_parser!(String)) - .help("A key parameter that will not be overridden by the path spec"), - ) - } -} - -impl Cli { - pub fn new_with_override(client: sdk::Client, over: T) -> Self { - Self { client, over } - } - - pub async fn execute(&self, cmd: CliCommand, matches: &clap::ArgMatches) { - match cmd { - CliCommand::KeyGet => { - self.execute_key_get(matches).await; - } - } - } - - pub async fn execute_key_get(&self, matches: &clap::ArgMatches) { - let mut request = self.client.key_get(); - if let Some(value) = matches.get_one::("key") { - request = request.key(value.clone()); - } - - if let Some(value) = matches.get_one::("unique-key") { - request = request.unique_key(value.clone()); - } - - self.over.execute_key_get(matches, &mut request).unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("success\n{:#?}", r) - } - } - } -} - -pub trait CliOverride { - fn execute_key_get( - &self, - matches: &clap::ArgMatches, - request: &mut builder::KeyGet, - ) -> Result<(), String> { - Ok(()) - } -} - -impl CliOverride for () {} - -#[derive(Copy, Clone, Debug)] -pub enum CliCommand { - KeyGet, -} - -impl CliCommand { - pub fn iter() -> impl Iterator { - vec![CliCommand::KeyGet].into_iter() - } -} +pub struct Cli < T : CliOverride = () > { client : sdk :: Client , over : T , } impl Cli { pub fn new (client : sdk :: Client) -> Self { Self { client , over : () } } pub fn get_command (cmd : CliCommand) -> clap :: Command { match cmd { CliCommand :: KeyGet => Self :: cli_key_get () , } } pub fn cli_key_get () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("key") . long ("key") . required (false) . value_parser (clap :: value_parser ! (bool)) . help ("The same key parameter that overlaps with the path level parameter")) . arg (clap :: Arg :: new ("unique-key") . long ("unique-key") . required (false) . value_parser (clap :: value_parser ! (String)) . help ("A key parameter that will not be overridden by the path spec")) } } impl < T : CliOverride > Cli < T > { pub fn new_with_override (client : sdk :: Client , over : T ,) -> Self { Self { client , over } } pub async fn execute (& self , cmd : CliCommand , matches : & clap :: ArgMatches ,) { match cmd { CliCommand :: KeyGet => { self . execute_key_get (matches) . await ; } } } pub async fn execute_key_get (& self , matches : & clap :: ArgMatches) { let mut request = self . client . key_get () ; if let Some (value) = matches . get_one :: < bool > ("key") { request = request . key (value . clone ()) ; } if let Some (value) = matches . get_one :: < String > ("unique-key") { request = request . unique_key (value . clone ()) ; } self . over . execute_key_get (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("success\n{:#?}" , r) } } } } pub trait CliOverride { fn execute_key_get (& self , matches : & clap :: ArgMatches , request : & mut builder :: KeyGet ,) -> Result < () , String > { Ok (()) } } impl CliOverride for () { } # [derive (Copy , Clone , Debug)] pub enum CliCommand { KeyGet , } impl CliCommand { pub fn iter () -> impl Iterator < Item = CliCommand > { vec ! [CliCommand :: KeyGet ,] . into_iter () } } \ No newline at end of file diff --git a/progenitor-impl/tests/output/param-overrides-positional.out b/progenitor-impl/tests/output/param-overrides-positional.out index f267620a..b01b867b 100644 --- a/progenitor-impl/tests/output/param-overrides-positional.out +++ b/progenitor-impl/tests/output/param-overrides-positional.out @@ -8,7 +8,6 @@ pub mod types { #[allow(unused_imports)] use std::convert::TryFrom; } - #[derive(Clone, Debug)] ///Client for Parameter override test /// @@ -19,7 +18,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -35,7 +33,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -48,17 +45,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -67,7 +61,6 @@ impl Client { "v1" } } - impl Client { ///Gets a key /// @@ -88,11 +81,9 @@ impl Client { if let Some(v) = &key { query.push(("key", v.to_string())); } - if let Some(v) = &unique_key { query.push(("uniqueKey", v.to_string())); } - let request = self.client.get(url).query(&query).build()?; let result = self.client.execute(request).await; let response = result?; @@ -102,7 +93,6 @@ impl Client { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/propolis-server-builder-tagged.out b/progenitor-impl/tests/output/propolis-server-builder-tagged.out index baccd471..000c9707 100644 --- a/progenitor-impl/tests/output/propolis-server-builder-tagged.out +++ b/progenitor-impl/tests/output/propolis-server-builder-tagged.out @@ -26,38 +26,32 @@ pub mod types { pub root_cert_pem: Option, pub target: Vec, } - impl From<&CrucibleOpts> for CrucibleOpts { fn from(value: &CrucibleOpts) -> Self { value.clone() } } - impl CrucibleOpts { pub fn builder() -> builder::CrucibleOpts { builder::CrucibleOpts::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskAttachment { pub disk_id: uuid::Uuid, pub generation_id: u64, pub state: DiskAttachmentState, } - impl From<&DiskAttachment> for DiskAttachment { fn from(value: &DiskAttachment) -> Self { value.clone() } } - impl DiskAttachment { pub fn builder() -> builder::DiskAttachment { builder::DiskAttachment::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub enum DiskAttachmentState { Detached, @@ -65,19 +59,16 @@ pub mod types { Faulted, Attached(uuid::Uuid), } - impl From<&DiskAttachmentState> for DiskAttachmentState { fn from(value: &DiskAttachmentState) -> Self { value.clone() } } - impl From for DiskAttachmentState { fn from(value: uuid::Uuid) -> Self { Self::Attached(value) } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskRequest { pub device: String, @@ -87,19 +78,16 @@ pub mod types { pub slot: Slot, pub volume_construction_request: VolumeConstructionRequest, } - impl From<&DiskRequest> for DiskRequest { fn from(value: &DiskRequest) -> Self { value.clone() } } - impl DiskRequest { pub fn builder() -> builder::DiskRequest { builder::DiskRequest::default() } } - ///Error information from a response. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { @@ -108,19 +96,16 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } - impl Error { pub fn builder() -> builder::Error { builder::Error::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Instance { pub disks: Vec, @@ -128,19 +113,16 @@ pub mod types { pub properties: InstanceProperties, pub state: InstanceState, } - impl From<&Instance> for Instance { fn from(value: &Instance) -> Self { value.clone() } } - impl Instance { pub fn builder() -> builder::Instance { builder::Instance::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceEnsureRequest { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -153,124 +135,103 @@ pub mod types { pub nics: Vec, pub properties: InstanceProperties, } - impl From<&InstanceEnsureRequest> for InstanceEnsureRequest { fn from(value: &InstanceEnsureRequest) -> Self { value.clone() } } - impl InstanceEnsureRequest { pub fn builder() -> builder::InstanceEnsureRequest { builder::InstanceEnsureRequest::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceEnsureResponse { #[serde(default, skip_serializing_if = "Option::is_none")] pub migrate: Option, } - impl From<&InstanceEnsureResponse> for InstanceEnsureResponse { fn from(value: &InstanceEnsureResponse) -> Self { value.clone() } } - impl InstanceEnsureResponse { pub fn builder() -> builder::InstanceEnsureResponse { builder::InstanceEnsureResponse::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceGetResponse { pub instance: Instance, } - impl From<&InstanceGetResponse> for InstanceGetResponse { fn from(value: &InstanceGetResponse) -> Self { value.clone() } } - impl InstanceGetResponse { pub fn builder() -> builder::InstanceGetResponse { builder::InstanceGetResponse::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateInitiateRequest { pub migration_id: uuid::Uuid, pub src_addr: String, pub src_uuid: uuid::Uuid, } - impl From<&InstanceMigrateInitiateRequest> for InstanceMigrateInitiateRequest { fn from(value: &InstanceMigrateInitiateRequest) -> Self { value.clone() } } - impl InstanceMigrateInitiateRequest { pub fn builder() -> builder::InstanceMigrateInitiateRequest { builder::InstanceMigrateInitiateRequest::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateInitiateResponse { pub migration_id: uuid::Uuid, } - impl From<&InstanceMigrateInitiateResponse> for InstanceMigrateInitiateResponse { fn from(value: &InstanceMigrateInitiateResponse) -> Self { value.clone() } } - impl InstanceMigrateInitiateResponse { pub fn builder() -> builder::InstanceMigrateInitiateResponse { builder::InstanceMigrateInitiateResponse::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateStatusRequest { pub migration_id: uuid::Uuid, } - impl From<&InstanceMigrateStatusRequest> for InstanceMigrateStatusRequest { fn from(value: &InstanceMigrateStatusRequest) -> Self { value.clone() } } - impl InstanceMigrateStatusRequest { pub fn builder() -> builder::InstanceMigrateStatusRequest { builder::InstanceMigrateStatusRequest::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateStatusResponse { pub state: MigrationState, } - impl From<&InstanceMigrateStatusResponse> for InstanceMigrateStatusResponse { fn from(value: &InstanceMigrateStatusResponse) -> Self { value.clone() } } - impl InstanceMigrateStatusResponse { pub fn builder() -> builder::InstanceMigrateStatusResponse { builder::InstanceMigrateStatusResponse::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceProperties { ///ID of the bootrom used to initialize this Instance. @@ -288,19 +249,16 @@ pub mod types { ///Number of vCPUs to be allocated to the Instance. pub vcpus: u8, } - impl From<&InstanceProperties> for InstanceProperties { fn from(value: &InstanceProperties) -> Self { value.clone() } } - impl InstanceProperties { pub fn builder() -> builder::InstanceProperties { builder::InstanceProperties::default() } } - ///Current state of an Instance. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceState { @@ -315,13 +273,11 @@ pub mod types { Failed, Destroyed, } - impl From<&InstanceState> for InstanceState { fn from(value: &InstanceState) -> Self { value.clone() } } - impl ToString for InstanceState { fn to_string(&self) -> String { match *self { @@ -338,7 +294,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -357,63 +312,53 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceStateMonitorRequest { pub gen: u64, } - impl From<&InstanceStateMonitorRequest> for InstanceStateMonitorRequest { fn from(value: &InstanceStateMonitorRequest) -> Self { value.clone() } } - impl InstanceStateMonitorRequest { pub fn builder() -> builder::InstanceStateMonitorRequest { builder::InstanceStateMonitorRequest::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceStateMonitorResponse { pub gen: u64, pub state: InstanceState, } - impl From<&InstanceStateMonitorResponse> for InstanceStateMonitorResponse { fn from(value: &InstanceStateMonitorResponse) -> Self { value.clone() } } - impl InstanceStateMonitorResponse { pub fn builder() -> builder::InstanceStateMonitorResponse { builder::InstanceStateMonitorResponse::default() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceStateRequested { Run, @@ -421,13 +366,11 @@ pub mod types { Reboot, MigrateStart, } - impl From<&InstanceStateRequested> for InstanceStateRequested { fn from(value: &InstanceStateRequested) -> Self { value.clone() } } - impl ToString for InstanceStateRequested { fn to_string(&self) -> String { match *self { @@ -438,7 +381,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceStateRequested { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -451,28 +393,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceStateRequested { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceStateRequested { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceStateRequested { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum MigrationState { Sync, @@ -486,13 +424,11 @@ pub mod types { Finish, Error, } - impl From<&MigrationState> for MigrationState { fn from(value: &MigrationState) -> Self { value.clone() } } - impl ToString for MigrationState { fn to_string(&self) -> String { match *self { @@ -509,7 +445,6 @@ pub mod types { } } } - impl std::str::FromStr for MigrationState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -528,83 +463,70 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for MigrationState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for MigrationState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for MigrationState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterface { pub attachment: NetworkInterfaceAttachmentState, pub name: String, } - impl From<&NetworkInterface> for NetworkInterface { fn from(value: &NetworkInterface) -> Self { value.clone() } } - impl NetworkInterface { pub fn builder() -> builder::NetworkInterface { builder::NetworkInterface::default() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub enum NetworkInterfaceAttachmentState { Detached, Faulted, Attached(Slot), } - impl From<&NetworkInterfaceAttachmentState> for NetworkInterfaceAttachmentState { fn from(value: &NetworkInterfaceAttachmentState) -> Self { value.clone() } } - impl From for NetworkInterfaceAttachmentState { fn from(value: Slot) -> Self { Self::Attached(value) } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceRequest { pub name: String, pub slot: Slot, } - impl From<&NetworkInterfaceRequest> for NetworkInterfaceRequest { fn from(value: &NetworkInterfaceRequest) -> Self { value.clone() } } - impl NetworkInterfaceRequest { pub fn builder() -> builder::NetworkInterfaceRequest { builder::NetworkInterfaceRequest::default() } } - ///A stable index which is translated by Propolis into a PCI BDF, visible /// to the guest. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -615,59 +537,50 @@ pub mod types { &self.0 } } - impl From for u8 { fn from(value: Slot) -> Self { value.0 } } - impl From<&Slot> for Slot { fn from(value: &Slot) -> Self { value.clone() } } - impl From for Slot { fn from(value: u8) -> Self { Self(value) } } - impl std::str::FromStr for Slot { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for Slot { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Slot { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Slot { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for Slot { fn to_string(&self) -> String { self.0.to_string() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum VolumeConstructionRequest { @@ -698,13 +611,11 @@ pub mod types { path: String, }, } - impl From<&VolumeConstructionRequest> for VolumeConstructionRequest { fn from(value: &VolumeConstructionRequest) -> Self { value.clone() } } - pub mod builder { #[derive(Clone, Debug)] pub struct CrucibleOpts { @@ -719,7 +630,6 @@ pub mod types { root_cert_pem: Result, String>, target: Result, String>, } - impl Default for CrucibleOpts { fn default() -> Self { Self { @@ -736,7 +646,6 @@ pub mod types { } } } - impl CrucibleOpts { pub fn cert_pem(mut self, value: T) -> Self where @@ -839,7 +748,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::CrucibleOpts { type Error = String; fn try_from(value: CrucibleOpts) -> Result { @@ -857,7 +765,6 @@ pub mod types { }) } } - impl From for CrucibleOpts { fn from(value: super::CrucibleOpts) -> Self { Self { @@ -874,14 +781,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskAttachment { disk_id: Result, generation_id: Result, state: Result, } - impl Default for DiskAttachment { fn default() -> Self { Self { @@ -891,7 +796,6 @@ pub mod types { } } } - impl DiskAttachment { pub fn disk_id(mut self, value: T) -> Self where @@ -924,7 +828,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskAttachment { type Error = String; fn try_from(value: DiskAttachment) -> Result { @@ -935,7 +838,6 @@ pub mod types { }) } } - impl From for DiskAttachment { fn from(value: super::DiskAttachment) -> Self { Self { @@ -945,7 +847,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskRequest { device: Result, @@ -955,7 +856,6 @@ pub mod types { slot: Result, volume_construction_request: Result, } - impl Default for DiskRequest { fn default() -> Self { Self { @@ -970,7 +870,6 @@ pub mod types { } } } - impl DiskRequest { pub fn device(mut self, value: T) -> Self where @@ -1036,7 +935,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskRequest { type Error = String; fn try_from(value: DiskRequest) -> Result { @@ -1050,7 +948,6 @@ pub mod types { }) } } - impl From for DiskRequest { fn from(value: super::DiskRequest) -> Self { Self { @@ -1063,14 +960,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Error { error_code: Result, String>, message: Result, request_id: Result, } - impl Default for Error { fn default() -> Self { Self { @@ -1080,7 +975,6 @@ pub mod types { } } } - impl Error { pub fn error_code(mut self, value: T) -> Self where @@ -1113,7 +1007,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Error { type Error = String; fn try_from(value: Error) -> Result { @@ -1124,7 +1017,6 @@ pub mod types { }) } } - impl From for Error { fn from(value: super::Error) -> Self { Self { @@ -1134,7 +1026,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Instance { disks: Result, String>, @@ -1142,7 +1033,6 @@ pub mod types { properties: Result, state: Result, } - impl Default for Instance { fn default() -> Self { Self { @@ -1153,7 +1043,6 @@ pub mod types { } } } - impl Instance { pub fn disks(mut self, value: T) -> Self where @@ -1196,7 +1085,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Instance { type Error = String; fn try_from(value: Instance) -> Result { @@ -1208,7 +1096,6 @@ pub mod types { }) } } - impl From for Instance { fn from(value: super::Instance) -> Self { Self { @@ -1219,7 +1106,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceEnsureRequest { cloud_init_bytes: Result, String>, @@ -1228,7 +1114,6 @@ pub mod types { nics: Result, String>, properties: Result, } - impl Default for InstanceEnsureRequest { fn default() -> Self { Self { @@ -1240,7 +1125,6 @@ pub mod types { } } } - impl InstanceEnsureRequest { pub fn cloud_init_bytes(mut self, value: T) -> Self where @@ -1296,7 +1180,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceEnsureRequest { type Error = String; fn try_from(value: InstanceEnsureRequest) -> Result { @@ -1309,7 +1192,6 @@ pub mod types { }) } } - impl From for InstanceEnsureRequest { fn from(value: super::InstanceEnsureRequest) -> Self { Self { @@ -1321,12 +1203,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceEnsureResponse { migrate: Result, String>, } - impl Default for InstanceEnsureResponse { fn default() -> Self { Self { @@ -1334,7 +1214,6 @@ pub mod types { } } } - impl InstanceEnsureResponse { pub fn migrate(mut self, value: T) -> Self where @@ -1347,7 +1226,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceEnsureResponse { type Error = String; fn try_from(value: InstanceEnsureResponse) -> Result { @@ -1356,7 +1234,6 @@ pub mod types { }) } } - impl From for InstanceEnsureResponse { fn from(value: super::InstanceEnsureResponse) -> Self { Self { @@ -1364,12 +1241,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceGetResponse { instance: Result, } - impl Default for InstanceGetResponse { fn default() -> Self { Self { @@ -1377,7 +1252,6 @@ pub mod types { } } } - impl InstanceGetResponse { pub fn instance(mut self, value: T) -> Self where @@ -1390,7 +1264,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceGetResponse { type Error = String; fn try_from(value: InstanceGetResponse) -> Result { @@ -1399,7 +1272,6 @@ pub mod types { }) } } - impl From for InstanceGetResponse { fn from(value: super::InstanceGetResponse) -> Self { Self { @@ -1407,14 +1279,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrateInitiateRequest { migration_id: Result, src_addr: Result, src_uuid: Result, } - impl Default for InstanceMigrateInitiateRequest { fn default() -> Self { Self { @@ -1424,7 +1294,6 @@ pub mod types { } } } - impl InstanceMigrateInitiateRequest { pub fn migration_id(mut self, value: T) -> Self where @@ -1457,7 +1326,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrateInitiateRequest { @@ -1470,7 +1338,6 @@ pub mod types { }) } } - impl From for InstanceMigrateInitiateRequest { fn from(value: super::InstanceMigrateInitiateRequest) -> Self { Self { @@ -1480,12 +1347,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrateInitiateResponse { migration_id: Result, } - impl Default for InstanceMigrateInitiateResponse { fn default() -> Self { Self { @@ -1493,7 +1358,6 @@ pub mod types { } } } - impl InstanceMigrateInitiateResponse { pub fn migration_id(mut self, value: T) -> Self where @@ -1506,7 +1370,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrateInitiateResponse { @@ -1517,7 +1380,6 @@ pub mod types { }) } } - impl From for InstanceMigrateInitiateResponse { fn from(value: super::InstanceMigrateInitiateResponse) -> Self { Self { @@ -1525,12 +1387,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrateStatusRequest { migration_id: Result, } - impl Default for InstanceMigrateStatusRequest { fn default() -> Self { Self { @@ -1538,7 +1398,6 @@ pub mod types { } } } - impl InstanceMigrateStatusRequest { pub fn migration_id(mut self, value: T) -> Self where @@ -1551,7 +1410,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrateStatusRequest { type Error = String; fn try_from(value: InstanceMigrateStatusRequest) -> Result { @@ -1560,7 +1418,6 @@ pub mod types { }) } } - impl From for InstanceMigrateStatusRequest { fn from(value: super::InstanceMigrateStatusRequest) -> Self { Self { @@ -1568,12 +1425,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrateStatusResponse { state: Result, } - impl Default for InstanceMigrateStatusResponse { fn default() -> Self { Self { @@ -1581,7 +1436,6 @@ pub mod types { } } } - impl InstanceMigrateStatusResponse { pub fn state(mut self, value: T) -> Self where @@ -1594,7 +1448,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrateStatusResponse { type Error = String; fn try_from(value: InstanceMigrateStatusResponse) -> Result { @@ -1603,7 +1456,6 @@ pub mod types { }) } } - impl From for InstanceMigrateStatusResponse { fn from(value: super::InstanceMigrateStatusResponse) -> Self { Self { @@ -1611,7 +1463,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceProperties { bootrom_id: Result, @@ -1622,7 +1473,6 @@ pub mod types { name: Result, vcpus: Result, } - impl Default for InstanceProperties { fn default() -> Self { Self { @@ -1636,7 +1486,6 @@ pub mod types { } } } - impl InstanceProperties { pub fn bootrom_id(mut self, value: T) -> Self where @@ -1709,7 +1558,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceProperties { type Error = String; fn try_from(value: InstanceProperties) -> Result { @@ -1724,7 +1572,6 @@ pub mod types { }) } } - impl From for InstanceProperties { fn from(value: super::InstanceProperties) -> Self { Self { @@ -1738,12 +1585,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceStateMonitorRequest { gen: Result, } - impl Default for InstanceStateMonitorRequest { fn default() -> Self { Self { @@ -1751,7 +1596,6 @@ pub mod types { } } } - impl InstanceStateMonitorRequest { pub fn gen(mut self, value: T) -> Self where @@ -1764,26 +1608,22 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceStateMonitorRequest { type Error = String; fn try_from(value: InstanceStateMonitorRequest) -> Result { Ok(Self { gen: value.gen? }) } } - impl From for InstanceStateMonitorRequest { fn from(value: super::InstanceStateMonitorRequest) -> Self { Self { gen: Ok(value.gen) } } } - #[derive(Clone, Debug)] pub struct InstanceStateMonitorResponse { gen: Result, state: Result, } - impl Default for InstanceStateMonitorResponse { fn default() -> Self { Self { @@ -1792,7 +1632,6 @@ pub mod types { } } } - impl InstanceStateMonitorResponse { pub fn gen(mut self, value: T) -> Self where @@ -1815,7 +1654,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceStateMonitorResponse { type Error = String; fn try_from(value: InstanceStateMonitorResponse) -> Result { @@ -1825,7 +1663,6 @@ pub mod types { }) } } - impl From for InstanceStateMonitorResponse { fn from(value: super::InstanceStateMonitorResponse) -> Self { Self { @@ -1834,13 +1671,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterface { attachment: Result, name: Result, } - impl Default for NetworkInterface { fn default() -> Self { Self { @@ -1849,7 +1684,6 @@ pub mod types { } } } - impl NetworkInterface { pub fn attachment(mut self, value: T) -> Self where @@ -1872,7 +1706,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterface { type Error = String; fn try_from(value: NetworkInterface) -> Result { @@ -1882,7 +1715,6 @@ pub mod types { }) } } - impl From for NetworkInterface { fn from(value: super::NetworkInterface) -> Self { Self { @@ -1891,13 +1723,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterfaceRequest { name: Result, slot: Result, } - impl Default for NetworkInterfaceRequest { fn default() -> Self { Self { @@ -1906,7 +1736,6 @@ pub mod types { } } } - impl NetworkInterfaceRequest { pub fn name(mut self, value: T) -> Self where @@ -1929,7 +1758,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterfaceRequest { type Error = String; fn try_from(value: NetworkInterfaceRequest) -> Result { @@ -1939,7 +1767,6 @@ pub mod types { }) } } - impl From for NetworkInterfaceRequest { fn from(value: super::NetworkInterfaceRequest) -> Self { Self { @@ -1950,7 +1777,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] ///Client for Oxide Propolis Server API /// @@ -1961,7 +1787,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -1977,7 +1802,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -1990,17 +1814,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -2009,7 +1830,6 @@ impl Client { "0.0.1" } } - impl Client { ///Sends a `GET` request to `/instance` /// @@ -2021,7 +1841,6 @@ impl Client { pub fn instance_get(&self) -> builder::InstanceGet { builder::InstanceGet::new(self) } - ///Sends a `PUT` request to `/instance` /// ///```ignore @@ -2033,7 +1852,6 @@ impl Client { pub fn instance_ensure(&self) -> builder::InstanceEnsure { builder::InstanceEnsure::new(self) } - ///Issue a snapshot request to a crucible backend /// ///Sends a `POST` request to `/instance/disk/{id}/snapshot/{snapshot_id}` @@ -2050,7 +1868,6 @@ impl Client { ) -> builder::InstanceIssueCrucibleSnapshotRequest { builder::InstanceIssueCrucibleSnapshotRequest::new(self) } - ///Sends a `GET` request to `/instance/migrate/status` /// ///```ignore @@ -2062,7 +1879,6 @@ impl Client { pub fn instance_migrate_status(&self) -> builder::InstanceMigrateStatus { builder::InstanceMigrateStatus::new(self) } - ///Sends a `GET` request to `/instance/serial` /// ///```ignore @@ -2073,7 +1889,6 @@ impl Client { pub fn instance_serial(&self) -> builder::InstanceSerial { builder::InstanceSerial::new(self) } - ///Sends a `PUT` request to `/instance/state` /// ///```ignore @@ -2085,7 +1900,6 @@ impl Client { pub fn instance_state_put(&self) -> builder::InstanceStatePut { builder::InstanceStatePut::new(self) } - ///Sends a `GET` request to `/instance/state-monitor` /// ///```ignore @@ -2098,7 +1912,6 @@ impl Client { builder::InstanceStateMonitor::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -2112,12 +1925,10 @@ pub mod builder { pub struct InstanceGet<'a> { client: &'a super::Client, } - impl<'a> InstanceGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/instance` pub async fn send( self, @@ -2139,7 +1950,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_ensure`] /// ///[`Client::instance_ensure`]: super::Client::instance_ensure @@ -2148,7 +1958,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> InstanceEnsure<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2156,7 +1965,6 @@ pub mod builder { body: Ok(types::builder::InstanceEnsureRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2167,7 +1975,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceEnsureRequest` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2177,7 +1984,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/instance` pub async fn send( self, @@ -2202,7 +2008,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_issue_crucible_snapshot_request`] /// ///[`Client::instance_issue_crucible_snapshot_request`]: super::Client::instance_issue_crucible_snapshot_request @@ -2212,7 +2017,6 @@ pub mod builder { id: Result, snapshot_id: Result, } - impl<'a> InstanceIssueCrucibleSnapshotRequest<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2221,7 +2025,6 @@ pub mod builder { snapshot_id: Err("snapshot_id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2231,7 +2034,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - pub fn snapshot_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2241,7 +2043,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for snapshot_id failed".to_string()); self } - ///Sends a `POST` request to /// `/instance/disk/{id}/snapshot/{snapshot_id}` pub async fn send(self) -> Result, Error> { @@ -2273,7 +2074,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_migrate_status`] /// ///[`Client::instance_migrate_status`]: super::Client::instance_migrate_status @@ -2282,7 +2082,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> InstanceMigrateStatus<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2290,7 +2089,6 @@ pub mod builder { body: Ok(types::builder::InstanceMigrateStatusRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2300,7 +2098,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2310,7 +2107,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `GET` request to `/instance/migrate/status` pub async fn send( self, @@ -2336,7 +2132,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_serial`] /// ///[`Client::instance_serial`]: super::Client::instance_serial @@ -2344,12 +2139,10 @@ pub mod builder { pub struct InstanceSerial<'a> { client: &'a super::Client, } - impl<'a> InstanceSerial<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/instance/serial` pub async fn send( self, @@ -2379,7 +2172,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_state_put`] /// ///[`Client::instance_state_put`]: super::Client::instance_state_put @@ -2388,7 +2180,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> InstanceStatePut<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2396,7 +2187,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2406,7 +2196,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceStateRequested` for body failed".to_string()); self } - ///Sends a `PUT` request to `/instance/state` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -2427,7 +2216,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_state_monitor`] /// ///[`Client::instance_state_monitor`]: super::Client::instance_state_monitor @@ -2436,7 +2224,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> InstanceStateMonitor<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2444,7 +2231,6 @@ pub mod builder { body: Ok(types::builder::InstanceStateMonitorRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2454,7 +2240,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2464,7 +2249,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `GET` request to `/instance/state-monitor` pub async fn send( self, @@ -2491,7 +2275,6 @@ pub mod builder { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/propolis-server-builder.out b/progenitor-impl/tests/output/propolis-server-builder.out index 6786c137..4fb27c51 100644 --- a/progenitor-impl/tests/output/propolis-server-builder.out +++ b/progenitor-impl/tests/output/propolis-server-builder.out @@ -26,38 +26,32 @@ pub mod types { pub root_cert_pem: Option, pub target: Vec, } - impl From<&CrucibleOpts> for CrucibleOpts { fn from(value: &CrucibleOpts) -> Self { value.clone() } } - impl CrucibleOpts { pub fn builder() -> builder::CrucibleOpts { builder::CrucibleOpts::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct DiskAttachment { pub disk_id: uuid::Uuid, pub generation_id: u64, pub state: DiskAttachmentState, } - impl From<&DiskAttachment> for DiskAttachment { fn from(value: &DiskAttachment) -> Self { value.clone() } } - impl DiskAttachment { pub fn builder() -> builder::DiskAttachment { builder::DiskAttachment::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub enum DiskAttachmentState { Detached, @@ -65,19 +59,16 @@ pub mod types { Faulted, Attached(uuid::Uuid), } - impl From<&DiskAttachmentState> for DiskAttachmentState { fn from(value: &DiskAttachmentState) -> Self { value.clone() } } - impl From for DiskAttachmentState { fn from(value: uuid::Uuid) -> Self { Self::Attached(value) } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct DiskRequest { pub device: String, @@ -87,19 +78,16 @@ pub mod types { pub slot: Slot, pub volume_construction_request: VolumeConstructionRequest, } - impl From<&DiskRequest> for DiskRequest { fn from(value: &DiskRequest) -> Self { value.clone() } } - impl DiskRequest { pub fn builder() -> builder::DiskRequest { builder::DiskRequest::default() } } - ///Error information from a response. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Error { @@ -108,19 +96,16 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } - impl Error { pub fn builder() -> builder::Error { builder::Error::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct Instance { pub disks: Vec, @@ -128,19 +113,16 @@ pub mod types { pub properties: InstanceProperties, pub state: InstanceState, } - impl From<&Instance> for Instance { fn from(value: &Instance) -> Self { value.clone() } } - impl Instance { pub fn builder() -> builder::Instance { builder::Instance::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceEnsureRequest { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -153,124 +135,103 @@ pub mod types { pub nics: Vec, pub properties: InstanceProperties, } - impl From<&InstanceEnsureRequest> for InstanceEnsureRequest { fn from(value: &InstanceEnsureRequest) -> Self { value.clone() } } - impl InstanceEnsureRequest { pub fn builder() -> builder::InstanceEnsureRequest { builder::InstanceEnsureRequest::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceEnsureResponse { #[serde(default, skip_serializing_if = "Option::is_none")] pub migrate: Option, } - impl From<&InstanceEnsureResponse> for InstanceEnsureResponse { fn from(value: &InstanceEnsureResponse) -> Self { value.clone() } } - impl InstanceEnsureResponse { pub fn builder() -> builder::InstanceEnsureResponse { builder::InstanceEnsureResponse::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceGetResponse { pub instance: Instance, } - impl From<&InstanceGetResponse> for InstanceGetResponse { fn from(value: &InstanceGetResponse) -> Self { value.clone() } } - impl InstanceGetResponse { pub fn builder() -> builder::InstanceGetResponse { builder::InstanceGetResponse::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceMigrateInitiateRequest { pub migration_id: uuid::Uuid, pub src_addr: String, pub src_uuid: uuid::Uuid, } - impl From<&InstanceMigrateInitiateRequest> for InstanceMigrateInitiateRequest { fn from(value: &InstanceMigrateInitiateRequest) -> Self { value.clone() } } - impl InstanceMigrateInitiateRequest { pub fn builder() -> builder::InstanceMigrateInitiateRequest { builder::InstanceMigrateInitiateRequest::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceMigrateInitiateResponse { pub migration_id: uuid::Uuid, } - impl From<&InstanceMigrateInitiateResponse> for InstanceMigrateInitiateResponse { fn from(value: &InstanceMigrateInitiateResponse) -> Self { value.clone() } } - impl InstanceMigrateInitiateResponse { pub fn builder() -> builder::InstanceMigrateInitiateResponse { builder::InstanceMigrateInitiateResponse::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceMigrateStatusRequest { pub migration_id: uuid::Uuid, } - impl From<&InstanceMigrateStatusRequest> for InstanceMigrateStatusRequest { fn from(value: &InstanceMigrateStatusRequest) -> Self { value.clone() } } - impl InstanceMigrateStatusRequest { pub fn builder() -> builder::InstanceMigrateStatusRequest { builder::InstanceMigrateStatusRequest::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceMigrateStatusResponse { pub state: MigrationState, } - impl From<&InstanceMigrateStatusResponse> for InstanceMigrateStatusResponse { fn from(value: &InstanceMigrateStatusResponse) -> Self { value.clone() } } - impl InstanceMigrateStatusResponse { pub fn builder() -> builder::InstanceMigrateStatusResponse { builder::InstanceMigrateStatusResponse::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceProperties { ///ID of the bootrom used to initialize this Instance. @@ -288,19 +249,16 @@ pub mod types { ///Number of vCPUs to be allocated to the Instance. pub vcpus: u8, } - impl From<&InstanceProperties> for InstanceProperties { fn from(value: &InstanceProperties) -> Self { value.clone() } } - impl InstanceProperties { pub fn builder() -> builder::InstanceProperties { builder::InstanceProperties::default() } } - ///Current state of an Instance. #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, @@ -317,13 +275,11 @@ pub mod types { Failed, Destroyed, } - impl From<&InstanceState> for InstanceState { fn from(value: &InstanceState) -> Self { value.clone() } } - impl ToString for InstanceState { fn to_string(&self) -> String { match *self { @@ -340,7 +296,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -359,63 +314,53 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceStateMonitorRequest { pub gen: u64, } - impl From<&InstanceStateMonitorRequest> for InstanceStateMonitorRequest { fn from(value: &InstanceStateMonitorRequest) -> Self { value.clone() } } - impl InstanceStateMonitorRequest { pub fn builder() -> builder::InstanceStateMonitorRequest { builder::InstanceStateMonitorRequest::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct InstanceStateMonitorResponse { pub gen: u64, pub state: InstanceState, } - impl From<&InstanceStateMonitorResponse> for InstanceStateMonitorResponse { fn from(value: &InstanceStateMonitorResponse) -> Self { value.clone() } } - impl InstanceStateMonitorResponse { pub fn builder() -> builder::InstanceStateMonitorResponse { builder::InstanceStateMonitorResponse::default() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -425,13 +370,11 @@ pub mod types { Reboot, MigrateStart, } - impl From<&InstanceStateRequested> for InstanceStateRequested { fn from(value: &InstanceStateRequested) -> Self { value.clone() } } - impl ToString for InstanceStateRequested { fn to_string(&self) -> String { match *self { @@ -442,7 +385,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceStateRequested { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -455,28 +397,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceStateRequested { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceStateRequested { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceStateRequested { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive( Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize, )] @@ -492,13 +430,11 @@ pub mod types { Finish, Error, } - impl From<&MigrationState> for MigrationState { fn from(value: &MigrationState) -> Self { value.clone() } } - impl ToString for MigrationState { fn to_string(&self) -> String { match *self { @@ -515,7 +451,6 @@ pub mod types { } } } - impl std::str::FromStr for MigrationState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -534,83 +469,70 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for MigrationState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for MigrationState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for MigrationState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct NetworkInterface { pub attachment: NetworkInterfaceAttachmentState, pub name: String, } - impl From<&NetworkInterface> for NetworkInterface { fn from(value: &NetworkInterface) -> Self { value.clone() } } - impl NetworkInterface { pub fn builder() -> builder::NetworkInterface { builder::NetworkInterface::default() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub enum NetworkInterfaceAttachmentState { Detached, Faulted, Attached(Slot), } - impl From<&NetworkInterfaceAttachmentState> for NetworkInterfaceAttachmentState { fn from(value: &NetworkInterfaceAttachmentState) -> Self { value.clone() } } - impl From for NetworkInterfaceAttachmentState { fn from(value: Slot) -> Self { Self::Attached(value) } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] pub struct NetworkInterfaceRequest { pub name: String, pub slot: Slot, } - impl From<&NetworkInterfaceRequest> for NetworkInterfaceRequest { fn from(value: &NetworkInterfaceRequest) -> Self { value.clone() } } - impl NetworkInterfaceRequest { pub fn builder() -> builder::NetworkInterfaceRequest { builder::NetworkInterfaceRequest::default() } } - ///A stable index which is translated by Propolis into a PCI BDF, visible /// to the guest. #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] @@ -621,59 +543,50 @@ pub mod types { &self.0 } } - impl From for u8 { fn from(value: Slot) -> Self { value.0 } } - impl From<&Slot> for Slot { fn from(value: &Slot) -> Self { value.clone() } } - impl From for Slot { fn from(value: u8) -> Self { Self(value) } } - impl std::str::FromStr for Slot { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for Slot { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Slot { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Slot { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for Slot { fn to_string(&self) -> String { self.0.to_string() } } - #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] #[serde(tag = "type")] pub enum VolumeConstructionRequest { @@ -704,13 +617,11 @@ pub mod types { path: String, }, } - impl From<&VolumeConstructionRequest> for VolumeConstructionRequest { fn from(value: &VolumeConstructionRequest) -> Self { value.clone() } } - pub mod builder { #[derive(Clone, Debug)] pub struct CrucibleOpts { @@ -725,7 +636,6 @@ pub mod types { root_cert_pem: Result, String>, target: Result, String>, } - impl Default for CrucibleOpts { fn default() -> Self { Self { @@ -742,7 +652,6 @@ pub mod types { } } } - impl CrucibleOpts { pub fn cert_pem(mut self, value: T) -> Self where @@ -845,7 +754,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::CrucibleOpts { type Error = String; fn try_from(value: CrucibleOpts) -> Result { @@ -863,7 +771,6 @@ pub mod types { }) } } - impl From for CrucibleOpts { fn from(value: super::CrucibleOpts) -> Self { Self { @@ -880,14 +787,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskAttachment { disk_id: Result, generation_id: Result, state: Result, } - impl Default for DiskAttachment { fn default() -> Self { Self { @@ -897,7 +802,6 @@ pub mod types { } } } - impl DiskAttachment { pub fn disk_id(mut self, value: T) -> Self where @@ -930,7 +834,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskAttachment { type Error = String; fn try_from(value: DiskAttachment) -> Result { @@ -941,7 +844,6 @@ pub mod types { }) } } - impl From for DiskAttachment { fn from(value: super::DiskAttachment) -> Self { Self { @@ -951,7 +853,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct DiskRequest { device: Result, @@ -961,7 +862,6 @@ pub mod types { slot: Result, volume_construction_request: Result, } - impl Default for DiskRequest { fn default() -> Self { Self { @@ -976,7 +876,6 @@ pub mod types { } } } - impl DiskRequest { pub fn device(mut self, value: T) -> Self where @@ -1042,7 +941,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::DiskRequest { type Error = String; fn try_from(value: DiskRequest) -> Result { @@ -1056,7 +954,6 @@ pub mod types { }) } } - impl From for DiskRequest { fn from(value: super::DiskRequest) -> Self { Self { @@ -1069,14 +966,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Error { error_code: Result, String>, message: Result, request_id: Result, } - impl Default for Error { fn default() -> Self { Self { @@ -1086,7 +981,6 @@ pub mod types { } } } - impl Error { pub fn error_code(mut self, value: T) -> Self where @@ -1119,7 +1013,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Error { type Error = String; fn try_from(value: Error) -> Result { @@ -1130,7 +1023,6 @@ pub mod types { }) } } - impl From for Error { fn from(value: super::Error) -> Self { Self { @@ -1140,7 +1032,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Instance { disks: Result, String>, @@ -1148,7 +1039,6 @@ pub mod types { properties: Result, state: Result, } - impl Default for Instance { fn default() -> Self { Self { @@ -1159,7 +1049,6 @@ pub mod types { } } } - impl Instance { pub fn disks(mut self, value: T) -> Self where @@ -1202,7 +1091,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Instance { type Error = String; fn try_from(value: Instance) -> Result { @@ -1214,7 +1102,6 @@ pub mod types { }) } } - impl From for Instance { fn from(value: super::Instance) -> Self { Self { @@ -1225,7 +1112,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceEnsureRequest { cloud_init_bytes: Result, String>, @@ -1234,7 +1120,6 @@ pub mod types { nics: Result, String>, properties: Result, } - impl Default for InstanceEnsureRequest { fn default() -> Self { Self { @@ -1246,7 +1131,6 @@ pub mod types { } } } - impl InstanceEnsureRequest { pub fn cloud_init_bytes(mut self, value: T) -> Self where @@ -1302,7 +1186,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceEnsureRequest { type Error = String; fn try_from(value: InstanceEnsureRequest) -> Result { @@ -1315,7 +1198,6 @@ pub mod types { }) } } - impl From for InstanceEnsureRequest { fn from(value: super::InstanceEnsureRequest) -> Self { Self { @@ -1327,12 +1209,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceEnsureResponse { migrate: Result, String>, } - impl Default for InstanceEnsureResponse { fn default() -> Self { Self { @@ -1340,7 +1220,6 @@ pub mod types { } } } - impl InstanceEnsureResponse { pub fn migrate(mut self, value: T) -> Self where @@ -1353,7 +1232,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceEnsureResponse { type Error = String; fn try_from(value: InstanceEnsureResponse) -> Result { @@ -1362,7 +1240,6 @@ pub mod types { }) } } - impl From for InstanceEnsureResponse { fn from(value: super::InstanceEnsureResponse) -> Self { Self { @@ -1370,12 +1247,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceGetResponse { instance: Result, } - impl Default for InstanceGetResponse { fn default() -> Self { Self { @@ -1383,7 +1258,6 @@ pub mod types { } } } - impl InstanceGetResponse { pub fn instance(mut self, value: T) -> Self where @@ -1396,7 +1270,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceGetResponse { type Error = String; fn try_from(value: InstanceGetResponse) -> Result { @@ -1405,7 +1278,6 @@ pub mod types { }) } } - impl From for InstanceGetResponse { fn from(value: super::InstanceGetResponse) -> Self { Self { @@ -1413,14 +1285,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrateInitiateRequest { migration_id: Result, src_addr: Result, src_uuid: Result, } - impl Default for InstanceMigrateInitiateRequest { fn default() -> Self { Self { @@ -1430,7 +1300,6 @@ pub mod types { } } } - impl InstanceMigrateInitiateRequest { pub fn migration_id(mut self, value: T) -> Self where @@ -1463,7 +1332,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrateInitiateRequest { @@ -1476,7 +1344,6 @@ pub mod types { }) } } - impl From for InstanceMigrateInitiateRequest { fn from(value: super::InstanceMigrateInitiateRequest) -> Self { Self { @@ -1486,12 +1353,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrateInitiateResponse { migration_id: Result, } - impl Default for InstanceMigrateInitiateResponse { fn default() -> Self { Self { @@ -1499,7 +1364,6 @@ pub mod types { } } } - impl InstanceMigrateInitiateResponse { pub fn migration_id(mut self, value: T) -> Self where @@ -1512,7 +1376,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrateInitiateResponse { @@ -1523,7 +1386,6 @@ pub mod types { }) } } - impl From for InstanceMigrateInitiateResponse { fn from(value: super::InstanceMigrateInitiateResponse) -> Self { Self { @@ -1531,12 +1393,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrateStatusRequest { migration_id: Result, } - impl Default for InstanceMigrateStatusRequest { fn default() -> Self { Self { @@ -1544,7 +1404,6 @@ pub mod types { } } } - impl InstanceMigrateStatusRequest { pub fn migration_id(mut self, value: T) -> Self where @@ -1557,7 +1416,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrateStatusRequest { type Error = String; fn try_from(value: InstanceMigrateStatusRequest) -> Result { @@ -1566,7 +1424,6 @@ pub mod types { }) } } - impl From for InstanceMigrateStatusRequest { fn from(value: super::InstanceMigrateStatusRequest) -> Self { Self { @@ -1574,12 +1431,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceMigrateStatusResponse { state: Result, } - impl Default for InstanceMigrateStatusResponse { fn default() -> Self { Self { @@ -1587,7 +1442,6 @@ pub mod types { } } } - impl InstanceMigrateStatusResponse { pub fn state(mut self, value: T) -> Self where @@ -1600,7 +1454,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceMigrateStatusResponse { type Error = String; fn try_from(value: InstanceMigrateStatusResponse) -> Result { @@ -1609,7 +1462,6 @@ pub mod types { }) } } - impl From for InstanceMigrateStatusResponse { fn from(value: super::InstanceMigrateStatusResponse) -> Self { Self { @@ -1617,7 +1469,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceProperties { bootrom_id: Result, @@ -1628,7 +1479,6 @@ pub mod types { name: Result, vcpus: Result, } - impl Default for InstanceProperties { fn default() -> Self { Self { @@ -1642,7 +1492,6 @@ pub mod types { } } } - impl InstanceProperties { pub fn bootrom_id(mut self, value: T) -> Self where @@ -1715,7 +1564,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceProperties { type Error = String; fn try_from(value: InstanceProperties) -> Result { @@ -1730,7 +1578,6 @@ pub mod types { }) } } - impl From for InstanceProperties { fn from(value: super::InstanceProperties) -> Self { Self { @@ -1744,12 +1591,10 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct InstanceStateMonitorRequest { gen: Result, } - impl Default for InstanceStateMonitorRequest { fn default() -> Self { Self { @@ -1757,7 +1602,6 @@ pub mod types { } } } - impl InstanceStateMonitorRequest { pub fn gen(mut self, value: T) -> Self where @@ -1770,26 +1614,22 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceStateMonitorRequest { type Error = String; fn try_from(value: InstanceStateMonitorRequest) -> Result { Ok(Self { gen: value.gen? }) } } - impl From for InstanceStateMonitorRequest { fn from(value: super::InstanceStateMonitorRequest) -> Self { Self { gen: Ok(value.gen) } } } - #[derive(Clone, Debug)] pub struct InstanceStateMonitorResponse { gen: Result, state: Result, } - impl Default for InstanceStateMonitorResponse { fn default() -> Self { Self { @@ -1798,7 +1638,6 @@ pub mod types { } } } - impl InstanceStateMonitorResponse { pub fn gen(mut self, value: T) -> Self where @@ -1821,7 +1660,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::InstanceStateMonitorResponse { type Error = String; fn try_from(value: InstanceStateMonitorResponse) -> Result { @@ -1831,7 +1669,6 @@ pub mod types { }) } } - impl From for InstanceStateMonitorResponse { fn from(value: super::InstanceStateMonitorResponse) -> Self { Self { @@ -1840,13 +1677,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterface { attachment: Result, name: Result, } - impl Default for NetworkInterface { fn default() -> Self { Self { @@ -1855,7 +1690,6 @@ pub mod types { } } } - impl NetworkInterface { pub fn attachment(mut self, value: T) -> Self where @@ -1878,7 +1712,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterface { type Error = String; fn try_from(value: NetworkInterface) -> Result { @@ -1888,7 +1721,6 @@ pub mod types { }) } } - impl From for NetworkInterface { fn from(value: super::NetworkInterface) -> Self { Self { @@ -1897,13 +1729,11 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct NetworkInterfaceRequest { name: Result, slot: Result, } - impl Default for NetworkInterfaceRequest { fn default() -> Self { Self { @@ -1912,7 +1742,6 @@ pub mod types { } } } - impl NetworkInterfaceRequest { pub fn name(mut self, value: T) -> Self where @@ -1935,7 +1764,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::NetworkInterfaceRequest { type Error = String; fn try_from(value: NetworkInterfaceRequest) -> Result { @@ -1945,7 +1773,6 @@ pub mod types { }) } } - impl From for NetworkInterfaceRequest { fn from(value: super::NetworkInterfaceRequest) -> Self { Self { @@ -1956,7 +1783,6 @@ pub mod types { } } } - #[derive(Clone, Debug)] ///Client for Oxide Propolis Server API /// @@ -1967,7 +1793,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -1983,7 +1808,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -1996,17 +1820,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -2015,7 +1836,6 @@ impl Client { "0.0.1" } } - impl Client { ///Sends a `GET` request to `/instance` /// @@ -2027,7 +1847,6 @@ impl Client { pub fn instance_get(&self) -> builder::InstanceGet { builder::InstanceGet::new(self) } - ///Sends a `PUT` request to `/instance` /// ///```ignore @@ -2039,7 +1858,6 @@ impl Client { pub fn instance_ensure(&self) -> builder::InstanceEnsure { builder::InstanceEnsure::new(self) } - ///Issue a snapshot request to a crucible backend /// ///Sends a `POST` request to `/instance/disk/{id}/snapshot/{snapshot_id}` @@ -2056,7 +1874,6 @@ impl Client { ) -> builder::InstanceIssueCrucibleSnapshotRequest { builder::InstanceIssueCrucibleSnapshotRequest::new(self) } - ///Sends a `GET` request to `/instance/migrate/status` /// ///```ignore @@ -2068,7 +1885,6 @@ impl Client { pub fn instance_migrate_status(&self) -> builder::InstanceMigrateStatus { builder::InstanceMigrateStatus::new(self) } - ///Sends a `GET` request to `/instance/serial` /// ///```ignore @@ -2079,7 +1895,6 @@ impl Client { pub fn instance_serial(&self) -> builder::InstanceSerial { builder::InstanceSerial::new(self) } - ///Sends a `PUT` request to `/instance/state` /// ///```ignore @@ -2091,7 +1906,6 @@ impl Client { pub fn instance_state_put(&self) -> builder::InstanceStatePut { builder::InstanceStatePut::new(self) } - ///Sends a `GET` request to `/instance/state-monitor` /// ///```ignore @@ -2104,7 +1918,6 @@ impl Client { builder::InstanceStateMonitor::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -2118,12 +1931,10 @@ pub mod builder { pub struct InstanceGet<'a> { client: &'a super::Client, } - impl<'a> InstanceGet<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/instance` pub async fn send( self, @@ -2145,7 +1956,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_ensure`] /// ///[`Client::instance_ensure`]: super::Client::instance_ensure @@ -2154,7 +1964,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> InstanceEnsure<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2162,7 +1971,6 @@ pub mod builder { body: Ok(types::builder::InstanceEnsureRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2173,7 +1981,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceEnsureRequest` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2183,7 +1990,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `PUT` request to `/instance` pub async fn send( self, @@ -2208,7 +2014,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_issue_crucible_snapshot_request`] /// ///[`Client::instance_issue_crucible_snapshot_request`]: super::Client::instance_issue_crucible_snapshot_request @@ -2218,7 +2023,6 @@ pub mod builder { id: Result, snapshot_id: Result, } - impl<'a> InstanceIssueCrucibleSnapshotRequest<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2227,7 +2031,6 @@ pub mod builder { snapshot_id: Err("snapshot_id was not initialized".to_string()), } } - pub fn id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2237,7 +2040,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for id failed".to_string()); self } - pub fn snapshot_id(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2247,7 +2049,6 @@ pub mod builder { .map_err(|_| "conversion to `uuid :: Uuid` for snapshot_id failed".to_string()); self } - ///Sends a `POST` request to /// `/instance/disk/{id}/snapshot/{snapshot_id}` pub async fn send(self) -> Result, Error> { @@ -2279,7 +2080,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_migrate_status`] /// ///[`Client::instance_migrate_status`]: super::Client::instance_migrate_status @@ -2288,7 +2088,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> InstanceMigrateStatus<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2296,7 +2095,6 @@ pub mod builder { body: Ok(types::builder::InstanceMigrateStatusRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2306,7 +2104,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2316,7 +2113,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `GET` request to `/instance/migrate/status` pub async fn send( self, @@ -2342,7 +2138,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_serial`] /// ///[`Client::instance_serial`]: super::Client::instance_serial @@ -2350,12 +2145,10 @@ pub mod builder { pub struct InstanceSerial<'a> { client: &'a super::Client, } - impl<'a> InstanceSerial<'a> { pub fn new(client: &'a super::Client) -> Self { Self { client } } - ///Sends a `GET` request to `/instance/serial` pub async fn send( self, @@ -2385,7 +2178,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_state_put`] /// ///[`Client::instance_state_put`]: super::Client::instance_state_put @@ -2394,7 +2186,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> InstanceStatePut<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2402,7 +2193,6 @@ pub mod builder { body: Err("body was not initialized".to_string()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2412,7 +2202,6 @@ pub mod builder { .map_err(|_| "conversion to `InstanceStateRequested` for body failed".to_string()); self } - ///Sends a `PUT` request to `/instance/state` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -2433,7 +2222,6 @@ pub mod builder { } } } - ///Builder for [`Client::instance_state_monitor`] /// ///[`Client::instance_state_monitor`]: super::Client::instance_state_monitor @@ -2442,7 +2230,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> InstanceStateMonitor<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -2450,7 +2237,6 @@ pub mod builder { body: Ok(types::builder::InstanceStateMonitorRequest::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -2460,7 +2246,6 @@ pub mod builder { }); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -2470,7 +2255,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `GET` request to `/instance/state-monitor` pub async fn send( self, @@ -2497,7 +2281,6 @@ pub mod builder { } } } - pub mod prelude { pub use self::super::Client; } diff --git a/progenitor-impl/tests/output/propolis-server-cli.out b/progenitor-impl/tests/output/propolis-server-cli.out index 1fa60228..c0977316 100644 --- a/progenitor-impl/tests/output/propolis-server-cli.out +++ b/progenitor-impl/tests/output/propolis-server-cli.out @@ -1,334 +1 @@ -pub struct Cli { - client: sdk::Client, - over: T, -} - -impl Cli { - pub fn new(client: sdk::Client) -> Self { - Self { client, over: () } - } - - pub fn get_command(cmd: CliCommand) -> clap::Command { - match cmd { - CliCommand::InstanceGet => Self::cli_instance_get(), - CliCommand::InstanceEnsure => Self::cli_instance_ensure(), - CliCommand::InstanceIssueCrucibleSnapshotRequest => { - Self::cli_instance_issue_crucible_snapshot_request() - } - CliCommand::InstanceMigrateStatus => Self::cli_instance_migrate_status(), - CliCommand::InstanceSerial => Self::cli_instance_serial(), - CliCommand::InstanceStatePut => Self::cli_instance_state_put(), - CliCommand::InstanceStateMonitor => Self::cli_instance_state_monitor(), - } - } - - pub fn cli_instance_get() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_instance_ensure() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("cloud-init-bytes") - .long("cloud-init-bytes") - .required(false) - .value_parser(clap::value_parser!(String)), - ) - } - - pub fn cli_instance_issue_crucible_snapshot_request() -> clap::Command { - clap::Command::new("") - .arg( - clap::Arg::new("id") - .long("id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .arg( - clap::Arg::new("snapshot-id") - .long("snapshot-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - .about("Issue a snapshot request to a crucible backend") - } - - pub fn cli_instance_migrate_status() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("migration-id") - .long("migration-id") - .required(true) - .value_parser(clap::value_parser!(uuid::Uuid)), - ) - } - - pub fn cli_instance_serial() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_instance_state_put() -> clap::Command { - clap::Command::new("") - } - - pub fn cli_instance_state_monitor() -> clap::Command { - clap::Command::new("").arg( - clap::Arg::new("gen") - .long("gen") - .required(true) - .value_parser(clap::value_parser!(u64)), - ) - } -} - -impl Cli { - pub fn new_with_override(client: sdk::Client, over: T) -> Self { - Self { client, over } - } - - pub async fn execute(&self, cmd: CliCommand, matches: &clap::ArgMatches) { - match cmd { - CliCommand::InstanceGet => { - self.execute_instance_get(matches).await; - } - CliCommand::InstanceEnsure => { - self.execute_instance_ensure(matches).await; - } - CliCommand::InstanceIssueCrucibleSnapshotRequest => { - self.execute_instance_issue_crucible_snapshot_request(matches) - .await; - } - CliCommand::InstanceMigrateStatus => { - self.execute_instance_migrate_status(matches).await; - } - CliCommand::InstanceSerial => { - self.execute_instance_serial(matches).await; - } - CliCommand::InstanceStatePut => { - self.execute_instance_state_put(matches).await; - } - CliCommand::InstanceStateMonitor => { - self.execute_instance_state_monitor(matches).await; - } - } - } - - pub async fn execute_instance_get(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_get(); - self.over - .execute_instance_get(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_ensure(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_ensure(); - if let Some(value) = matches.get_one::("cloud-init-bytes") { - request = request.body_map(|body| body.cloud_init_bytes(value.clone())) - } - - self.over - .execute_instance_ensure(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_issue_crucible_snapshot_request( - &self, - matches: &clap::ArgMatches, - ) { - let mut request = self.client.instance_issue_crucible_snapshot_request(); - if let Some(value) = matches.get_one::("id") { - request = request.id(value.clone()); - } - - if let Some(value) = matches.get_one::("snapshot-id") { - request = request.snapshot_id(value.clone()); - } - - self.over - .execute_instance_issue_crucible_snapshot_request(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_migrate_status(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_migrate_status(); - if let Some(value) = matches.get_one::("migration-id") { - request = request.body_map(|body| body.migration_id(value.clone())) - } - - self.over - .execute_instance_migrate_status(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_serial(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_serial(); - self.over - .execute_instance_serial(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - todo!() - } - Err(r) => { - todo!() - } - } - } - - pub async fn execute_instance_state_put(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_state_put(); - self.over - .execute_instance_state_put(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } - - pub async fn execute_instance_state_monitor(&self, matches: &clap::ArgMatches) { - let mut request = self.client.instance_state_monitor(); - if let Some(value) = matches.get_one::("gen") { - request = request.body_map(|body| body.gen(value.clone())) - } - - self.over - .execute_instance_state_monitor(matches, &mut request) - .unwrap(); - let result = request.send().await; - match result { - Ok(r) => { - println!("success\n{:#?}", r) - } - Err(r) => { - println!("error\n{:#?}", r) - } - } - } -} - -pub trait CliOverride { - fn execute_instance_get( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceGet, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_ensure( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceEnsure, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_issue_crucible_snapshot_request( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceIssueCrucibleSnapshotRequest, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_migrate_status( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceMigrateStatus, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_serial( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceSerial, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_state_put( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceStatePut, - ) -> Result<(), String> { - Ok(()) - } - - fn execute_instance_state_monitor( - &self, - matches: &clap::ArgMatches, - request: &mut builder::InstanceStateMonitor, - ) -> Result<(), String> { - Ok(()) - } -} - -impl CliOverride for () {} - -#[derive(Copy, Clone, Debug)] -pub enum CliCommand { - InstanceGet, - InstanceEnsure, - InstanceIssueCrucibleSnapshotRequest, - InstanceMigrateStatus, - InstanceSerial, - InstanceStatePut, - InstanceStateMonitor, -} - -impl CliCommand { - pub fn iter() -> impl Iterator { - vec![ - CliCommand::InstanceGet, - CliCommand::InstanceEnsure, - CliCommand::InstanceIssueCrucibleSnapshotRequest, - CliCommand::InstanceMigrateStatus, - CliCommand::InstanceSerial, - CliCommand::InstanceStatePut, - CliCommand::InstanceStateMonitor, - ] - .into_iter() - } -} +pub struct Cli < T : CliOverride = () > { client : sdk :: Client , over : T , } impl Cli { pub fn new (client : sdk :: Client) -> Self { Self { client , over : () } } pub fn get_command (cmd : CliCommand) -> clap :: Command { match cmd { CliCommand :: InstanceGet => Self :: cli_instance_get () , CliCommand :: InstanceEnsure => Self :: cli_instance_ensure () , CliCommand :: InstanceIssueCrucibleSnapshotRequest => Self :: cli_instance_issue_crucible_snapshot_request () , CliCommand :: InstanceMigrateStatus => Self :: cli_instance_migrate_status () , CliCommand :: InstanceSerial => Self :: cli_instance_serial () , CliCommand :: InstanceStatePut => Self :: cli_instance_state_put () , CliCommand :: InstanceStateMonitor => Self :: cli_instance_state_monitor () , } } pub fn cli_instance_get () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_instance_ensure () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("cloud-init-bytes") . long ("cloud-init-bytes") . required (false) . value_parser (clap :: value_parser ! (String))) } pub fn cli_instance_issue_crucible_snapshot_request () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("id") . long ("id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . arg (clap :: Arg :: new ("snapshot-id") . long ("snapshot-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) . about ("Issue a snapshot request to a crucible backend") } pub fn cli_instance_migrate_status () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("migration-id") . long ("migration-id") . required (true) . value_parser (clap :: value_parser ! (uuid :: Uuid))) } pub fn cli_instance_serial () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_instance_state_put () -> clap :: Command { clap :: Command :: new ("") } pub fn cli_instance_state_monitor () -> clap :: Command { clap :: Command :: new ("") . arg (clap :: Arg :: new ("gen") . long ("gen") . required (true) . value_parser (clap :: value_parser ! (u64))) } } impl < T : CliOverride > Cli < T > { pub fn new_with_override (client : sdk :: Client , over : T ,) -> Self { Self { client , over } } pub async fn execute (& self , cmd : CliCommand , matches : & clap :: ArgMatches ,) { match cmd { CliCommand :: InstanceGet => { self . execute_instance_get (matches) . await ; } CliCommand :: InstanceEnsure => { self . execute_instance_ensure (matches) . await ; } CliCommand :: InstanceIssueCrucibleSnapshotRequest => { self . execute_instance_issue_crucible_snapshot_request (matches) . await ; } CliCommand :: InstanceMigrateStatus => { self . execute_instance_migrate_status (matches) . await ; } CliCommand :: InstanceSerial => { self . execute_instance_serial (matches) . await ; } CliCommand :: InstanceStatePut => { self . execute_instance_state_put (matches) . await ; } CliCommand :: InstanceStateMonitor => { self . execute_instance_state_monitor (matches) . await ; } } } pub async fn execute_instance_get (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_get () ; self . over . execute_instance_get (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_ensure (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_ensure () ; if let Some (value) = matches . get_one :: < String > ("cloud-init-bytes" ,) { request = request . body_map (| body | { body . cloud_init_bytes (value . clone ()) }) } self . over . execute_instance_ensure (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_issue_crucible_snapshot_request (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_issue_crucible_snapshot_request () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("id") { request = request . id (value . clone ()) ; } if let Some (value) = matches . get_one :: < uuid :: Uuid > ("snapshot-id") { request = request . snapshot_id (value . clone ()) ; } self . over . execute_instance_issue_crucible_snapshot_request (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_migrate_status (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_migrate_status () ; if let Some (value) = matches . get_one :: < uuid :: Uuid > ("migration-id" ,) { request = request . body_map (| body | { body . migration_id (value . clone ()) }) } self . over . execute_instance_migrate_status (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_serial (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_serial () ; self . over . execute_instance_serial (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { todo ! () } Err (r) => { todo ! () } } } pub async fn execute_instance_state_put (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_state_put () ; self . over . execute_instance_state_put (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } pub async fn execute_instance_state_monitor (& self , matches : & clap :: ArgMatches) { let mut request = self . client . instance_state_monitor () ; if let Some (value) = matches . get_one :: < u64 > ("gen" ,) { request = request . body_map (| body | { body . gen (value . clone ()) }) } self . over . execute_instance_state_monitor (matches , & mut request) . unwrap () ; let result = request . send () . await ; match result { Ok (r) => { println ! ("success\n{:#?}" , r) } Err (r) => { println ! ("error\n{:#?}" , r) } } } } pub trait CliOverride { fn execute_instance_get (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceGet ,) -> Result < () , String > { Ok (()) } fn execute_instance_ensure (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceEnsure ,) -> Result < () , String > { Ok (()) } fn execute_instance_issue_crucible_snapshot_request (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceIssueCrucibleSnapshotRequest ,) -> Result < () , String > { Ok (()) } fn execute_instance_migrate_status (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceMigrateStatus ,) -> Result < () , String > { Ok (()) } fn execute_instance_serial (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceSerial ,) -> Result < () , String > { Ok (()) } fn execute_instance_state_put (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceStatePut ,) -> Result < () , String > { Ok (()) } fn execute_instance_state_monitor (& self , matches : & clap :: ArgMatches , request : & mut builder :: InstanceStateMonitor ,) -> Result < () , String > { Ok (()) } } impl CliOverride for () { } # [derive (Copy , Clone , Debug)] pub enum CliCommand { InstanceGet , InstanceEnsure , InstanceIssueCrucibleSnapshotRequest , InstanceMigrateStatus , InstanceSerial , InstanceStatePut , InstanceStateMonitor , } impl CliCommand { pub fn iter () -> impl Iterator < Item = CliCommand > { vec ! [CliCommand :: InstanceGet , CliCommand :: InstanceEnsure , CliCommand :: InstanceIssueCrucibleSnapshotRequest , CliCommand :: InstanceMigrateStatus , CliCommand :: InstanceSerial , CliCommand :: InstanceStatePut , CliCommand :: InstanceStateMonitor ,] . into_iter () } } \ No newline at end of file diff --git a/progenitor-impl/tests/output/propolis-server-positional.out b/progenitor-impl/tests/output/propolis-server-positional.out index 5c341b1a..2f5315fa 100644 --- a/progenitor-impl/tests/output/propolis-server-positional.out +++ b/progenitor-impl/tests/output/propolis-server-positional.out @@ -26,26 +26,22 @@ pub mod types { pub root_cert_pem: Option, pub target: Vec, } - impl From<&CrucibleOpts> for CrucibleOpts { fn from(value: &CrucibleOpts) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskAttachment { pub disk_id: uuid::Uuid, pub generation_id: u64, pub state: DiskAttachmentState, } - impl From<&DiskAttachment> for DiskAttachment { fn from(value: &DiskAttachment) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub enum DiskAttachmentState { Detached, @@ -53,19 +49,16 @@ pub mod types { Faulted, Attached(uuid::Uuid), } - impl From<&DiskAttachmentState> for DiskAttachmentState { fn from(value: &DiskAttachmentState) -> Self { value.clone() } } - impl From for DiskAttachmentState { fn from(value: uuid::Uuid) -> Self { Self::Attached(value) } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct DiskRequest { pub device: String, @@ -75,13 +68,11 @@ pub mod types { pub slot: Slot, pub volume_construction_request: VolumeConstructionRequest, } - impl From<&DiskRequest> for DiskRequest { fn from(value: &DiskRequest) -> Self { value.clone() } } - ///Error information from a response. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { @@ -90,13 +81,11 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Instance { pub disks: Vec, @@ -104,13 +93,11 @@ pub mod types { pub properties: InstanceProperties, pub state: InstanceState, } - impl From<&Instance> for Instance { fn from(value: &Instance) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceEnsureRequest { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -123,82 +110,68 @@ pub mod types { pub nics: Vec, pub properties: InstanceProperties, } - impl From<&InstanceEnsureRequest> for InstanceEnsureRequest { fn from(value: &InstanceEnsureRequest) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceEnsureResponse { #[serde(default, skip_serializing_if = "Option::is_none")] pub migrate: Option, } - impl From<&InstanceEnsureResponse> for InstanceEnsureResponse { fn from(value: &InstanceEnsureResponse) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceGetResponse { pub instance: Instance, } - impl From<&InstanceGetResponse> for InstanceGetResponse { fn from(value: &InstanceGetResponse) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateInitiateRequest { pub migration_id: uuid::Uuid, pub src_addr: String, pub src_uuid: uuid::Uuid, } - impl From<&InstanceMigrateInitiateRequest> for InstanceMigrateInitiateRequest { fn from(value: &InstanceMigrateInitiateRequest) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateInitiateResponse { pub migration_id: uuid::Uuid, } - impl From<&InstanceMigrateInitiateResponse> for InstanceMigrateInitiateResponse { fn from(value: &InstanceMigrateInitiateResponse) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateStatusRequest { pub migration_id: uuid::Uuid, } - impl From<&InstanceMigrateStatusRequest> for InstanceMigrateStatusRequest { fn from(value: &InstanceMigrateStatusRequest) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceMigrateStatusResponse { pub state: MigrationState, } - impl From<&InstanceMigrateStatusResponse> for InstanceMigrateStatusResponse { fn from(value: &InstanceMigrateStatusResponse) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceProperties { ///ID of the bootrom used to initialize this Instance. @@ -216,13 +189,11 @@ pub mod types { ///Number of vCPUs to be allocated to the Instance. pub vcpus: u8, } - impl From<&InstanceProperties> for InstanceProperties { fn from(value: &InstanceProperties) -> Self { value.clone() } } - ///Current state of an Instance. #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceState { @@ -237,13 +208,11 @@ pub mod types { Failed, Destroyed, } - impl From<&InstanceState> for InstanceState { fn from(value: &InstanceState) -> Self { value.clone() } } - impl ToString for InstanceState { fn to_string(&self) -> String { match *self { @@ -260,7 +229,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -279,51 +247,43 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceStateMonitorRequest { pub gen: u64, } - impl From<&InstanceStateMonitorRequest> for InstanceStateMonitorRequest { fn from(value: &InstanceStateMonitorRequest) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct InstanceStateMonitorResponse { pub gen: u64, pub state: InstanceState, } - impl From<&InstanceStateMonitorResponse> for InstanceStateMonitorResponse { fn from(value: &InstanceStateMonitorResponse) -> Self { value.clone() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum InstanceStateRequested { Run, @@ -331,13 +291,11 @@ pub mod types { Reboot, MigrateStart, } - impl From<&InstanceStateRequested> for InstanceStateRequested { fn from(value: &InstanceStateRequested) -> Self { value.clone() } } - impl ToString for InstanceStateRequested { fn to_string(&self) -> String { match *self { @@ -348,7 +306,6 @@ pub mod types { } } } - impl std::str::FromStr for InstanceStateRequested { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -361,28 +318,24 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for InstanceStateRequested { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for InstanceStateRequested { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for InstanceStateRequested { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] pub enum MigrationState { Sync, @@ -396,13 +349,11 @@ pub mod types { Finish, Error, } - impl From<&MigrationState> for MigrationState { fn from(value: &MigrationState) -> Self { value.clone() } } - impl ToString for MigrationState { fn to_string(&self) -> String { match *self { @@ -419,7 +370,6 @@ pub mod types { } } } - impl std::str::FromStr for MigrationState { type Err = &'static str; fn from_str(value: &str) -> Result { @@ -438,71 +388,60 @@ pub mod types { } } } - impl std::convert::TryFrom<&str> for MigrationState { type Error = &'static str; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for MigrationState { type Error = &'static str; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for MigrationState { type Error = &'static str; fn try_from(value: String) -> Result { value.parse() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterface { pub attachment: NetworkInterfaceAttachmentState, pub name: String, } - impl From<&NetworkInterface> for NetworkInterface { fn from(value: &NetworkInterface) -> Self { value.clone() } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub enum NetworkInterfaceAttachmentState { Detached, Faulted, Attached(Slot), } - impl From<&NetworkInterfaceAttachmentState> for NetworkInterfaceAttachmentState { fn from(value: &NetworkInterfaceAttachmentState) -> Self { value.clone() } } - impl From for NetworkInterfaceAttachmentState { fn from(value: Slot) -> Self { Self::Attached(value) } } - #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NetworkInterfaceRequest { pub name: String, pub slot: Slot, } - impl From<&NetworkInterfaceRequest> for NetworkInterfaceRequest { fn from(value: &NetworkInterfaceRequest) -> Self { value.clone() } } - ///A stable index which is translated by Propolis into a PCI BDF, visible /// to the guest. #[derive(Clone, Debug, Deserialize, Serialize)] @@ -513,59 +452,50 @@ pub mod types { &self.0 } } - impl From for u8 { fn from(value: Slot) -> Self { value.0 } } - impl From<&Slot> for Slot { fn from(value: &Slot) -> Self { value.clone() } } - impl From for Slot { fn from(value: u8) -> Self { Self(value) } } - impl std::str::FromStr for Slot { type Err = ::Err; fn from_str(value: &str) -> Result { Ok(Self(value.parse()?)) } } - impl std::convert::TryFrom<&str> for Slot { type Error = ::Err; fn try_from(value: &str) -> Result { value.parse() } } - impl std::convert::TryFrom<&String> for Slot { type Error = ::Err; fn try_from(value: &String) -> Result { value.parse() } } - impl std::convert::TryFrom for Slot { type Error = ::Err; fn try_from(value: String) -> Result { value.parse() } } - impl ToString for Slot { fn to_string(&self) -> String { self.0.to_string() } } - #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(tag = "type")] pub enum VolumeConstructionRequest { @@ -596,14 +526,12 @@ pub mod types { path: String, }, } - impl From<&VolumeConstructionRequest> for VolumeConstructionRequest { fn from(value: &VolumeConstructionRequest) -> Self { value.clone() } } } - #[derive(Clone, Debug)] ///Client for Oxide Propolis Server API /// @@ -614,7 +542,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -630,7 +557,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -643,17 +569,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -662,7 +585,6 @@ impl Client { "0.0.1" } } - impl Client { ///Sends a `GET` request to `/instance` pub async fn instance_get<'a>( @@ -683,7 +605,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `PUT` request to `/instance` pub async fn instance_ensure<'a>( &'a self, @@ -704,7 +625,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Issue a snapshot request to a crucible backend /// ///Sends a `POST` request to `/instance/disk/{id}/snapshot/{snapshot_id}` @@ -733,7 +653,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/instance/migrate/status` pub async fn instance_migrate_status<'a>( &'a self, @@ -754,7 +673,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/instance/serial` pub async fn instance_serial<'a>( &'a self, @@ -782,7 +700,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `PUT` request to `/instance/state` pub async fn instance_state_put<'a>( &'a self, @@ -803,7 +720,6 @@ impl Client { _ => Err(Error::UnexpectedResponse(response)), } } - ///Sends a `GET` request to `/instance/state-monitor` pub async fn instance_state_monitor<'a>( &'a self, @@ -825,7 +741,6 @@ impl Client { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/test_default_params_builder.out b/progenitor-impl/tests/output/test_default_params_builder.out index 9b81b931..d75bf0be 100644 --- a/progenitor-impl/tests/output/test_default_params_builder.out +++ b/progenitor-impl/tests/output/test_default_params_builder.out @@ -17,19 +17,16 @@ pub mod types { #[serde(default)] pub yes: bool, } - impl From<&BodyWithDefaults> for BodyWithDefaults { fn from(value: &BodyWithDefaults) -> Self { value.clone() } } - impl BodyWithDefaults { pub fn builder() -> builder::BodyWithDefaults { builder::BodyWithDefaults::default() } } - ///Error information from a response. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { @@ -38,19 +35,16 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } - impl Error { pub fn builder() -> builder::Error { builder::Error::default() } } - pub mod builder { #[derive(Clone, Debug)] pub struct BodyWithDefaults { @@ -59,7 +53,6 @@ pub mod types { something: Result, String>, yes: Result, } - impl Default for BodyWithDefaults { fn default() -> Self { Self { @@ -70,7 +63,6 @@ pub mod types { } } } - impl BodyWithDefaults { pub fn forty_two(mut self, value: T) -> Self where @@ -113,7 +105,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::BodyWithDefaults { type Error = String; fn try_from(value: BodyWithDefaults) -> Result { @@ -125,7 +116,6 @@ pub mod types { }) } } - impl From for BodyWithDefaults { fn from(value: super::BodyWithDefaults) -> Self { Self { @@ -136,14 +126,12 @@ pub mod types { } } } - #[derive(Clone, Debug)] pub struct Error { error_code: Result, String>, message: Result, request_id: Result, } - impl Default for Error { fn default() -> Self { Self { @@ -153,7 +141,6 @@ pub mod types { } } } - impl Error { pub fn error_code(mut self, value: T) -> Self where @@ -186,7 +173,6 @@ pub mod types { self } } - impl std::convert::TryFrom for super::Error { type Error = String; fn try_from(value: Error) -> Result { @@ -197,7 +183,6 @@ pub mod types { }) } } - impl From for Error { fn from(value: super::Error) -> Self { Self { @@ -208,7 +193,6 @@ pub mod types { } } } - pub mod defaults { pub(super) fn default_u64() -> T where @@ -217,13 +201,11 @@ pub mod types { { T::try_from(V).unwrap() } - pub(super) fn body_with_defaults_something() -> Option { Some(true) } } } - #[derive(Clone, Debug)] ///Client for pagination-demo /// @@ -232,7 +214,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -248,7 +229,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -261,17 +241,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -280,7 +257,6 @@ impl Client { "9000" } } - impl Client { ///Sends a `POST` request to `/` /// @@ -294,7 +270,6 @@ impl Client { builder::DefaultParams::new(self) } } - pub mod builder { use super::types; #[allow(unused_imports)] @@ -309,7 +284,6 @@ pub mod builder { client: &'a super::Client, body: Result, } - impl<'a> DefaultParams<'a> { pub fn new(client: &'a super::Client) -> Self { Self { @@ -317,7 +291,6 @@ pub mod builder { body: Ok(types::builder::BodyWithDefaults::default()), } } - pub fn body(mut self, value: V) -> Self where V: std::convert::TryInto, @@ -328,7 +301,6 @@ pub mod builder { .map_err(|_| "conversion to `BodyWithDefaults` for body failed".to_string()); self } - pub fn body_map(mut self, f: F) -> Self where F: std::ops::FnOnce( @@ -338,7 +310,6 @@ pub mod builder { self.body = self.body.map(f); self } - ///Sends a `POST` request to `/` pub async fn send(self) -> Result, Error> { let Self { client, body } = self; @@ -356,7 +327,6 @@ pub mod builder { } } } - pub mod prelude { pub use self::super::Client; } diff --git a/progenitor-impl/tests/output/test_default_params_positional.out b/progenitor-impl/tests/output/test_default_params_positional.out index d2214f98..f66b77d1 100644 --- a/progenitor-impl/tests/output/test_default_params_positional.out +++ b/progenitor-impl/tests/output/test_default_params_positional.out @@ -17,13 +17,11 @@ pub mod types { #[serde(default)] pub yes: bool, } - impl From<&BodyWithDefaults> for BodyWithDefaults { fn from(value: &BodyWithDefaults) -> Self { value.clone() } } - ///Error information from a response. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Error { @@ -32,13 +30,11 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } - pub mod defaults { pub(super) fn default_u64() -> T where @@ -47,13 +43,11 @@ pub mod types { { T::try_from(V).unwrap() } - pub(super) fn body_with_defaults_something() -> Option { Some(true) } } } - #[derive(Clone, Debug)] ///Client for pagination-demo /// @@ -62,7 +56,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -78,7 +71,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -91,17 +83,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -110,7 +99,6 @@ impl Client { "9000" } } - impl Client { ///Sends a `POST` request to `/` pub async fn default_params<'a>( @@ -127,7 +115,6 @@ impl Client { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/test_freeform_response.out b/progenitor-impl/tests/output/test_freeform_response.out index 8b1bc283..6f3f87f5 100644 --- a/progenitor-impl/tests/output/test_freeform_response.out +++ b/progenitor-impl/tests/output/test_freeform_response.out @@ -15,14 +15,12 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } } - #[derive(Clone, Debug)] ///Client for pagination-demo /// @@ -31,7 +29,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -47,7 +44,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -60,17 +56,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -79,7 +72,6 @@ impl Client { "9000" } } - impl Client { ///Sends a `GET` request to `/` pub async fn freeform_response<'a>( @@ -95,7 +87,6 @@ impl Client { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/output/test_renamed_parameters.out b/progenitor-impl/tests/output/test_renamed_parameters.out index de59f25f..ea4bb8a0 100644 --- a/progenitor-impl/tests/output/test_renamed_parameters.out +++ b/progenitor-impl/tests/output/test_renamed_parameters.out @@ -15,14 +15,12 @@ pub mod types { pub message: String, pub request_id: String, } - impl From<&Error> for Error { fn from(value: &Error) -> Self { value.clone() } } } - #[derive(Clone, Debug)] ///Client for pagination-demo /// @@ -31,7 +29,6 @@ pub struct Client { pub(crate) baseurl: String, pub(crate) client: reqwest::Client, } - impl Client { /// Create a new client. /// @@ -47,7 +44,6 @@ impl Client { .unwrap(); Self::new_with_client(baseurl, client) } - /// Construct a new client with an existing `reqwest::Client`, /// allowing more control over its configuration. /// @@ -60,17 +56,14 @@ impl Client { client, } } - /// Get the base URL to which requests are made. pub fn baseurl(&self) -> &String { &self.baseurl } - /// Get the internal `reqwest::Client` used to make requests. pub fn client(&self) -> &reqwest::Client { &self.client } - /// Get the version of this API. /// /// This string is pulled directly from the source OpenAPI @@ -79,7 +72,6 @@ impl Client { "9000" } } - impl Client { ///Sends a `GET` request to `/{ref}/{type}/{trait}` pub async fn renamed_parameters<'a>( @@ -117,7 +109,6 @@ impl Client { } } } - pub mod prelude { pub use super::Client; } diff --git a/progenitor-impl/tests/test_output.rs b/progenitor-impl/tests/test_output.rs index 82391693..51d56092 100644 --- a/progenitor-impl/tests/test_output.rs +++ b/progenitor-impl/tests/test_output.rs @@ -26,6 +26,16 @@ where } } +fn generate_formatted(generator: &mut Generator, spec: &OpenAPI) -> String { + let content = generator.generate_tokens(&spec).unwrap(); + let rustfmt_config = rustfmt_wrapper::config::Config { + normalize_doc_attributes: Some(true), + wrap_comments: Some(true), + ..Default::default() + }; + rustfmt_wrapper::rustfmt_config(rustfmt_config, content).unwrap() +} + #[track_caller] fn verify_apis(openapi_file: &str) { let mut in_path = PathBuf::from("../sample_openapi"); @@ -36,7 +46,7 @@ fn verify_apis(openapi_file: &str) { // Positional generation. let mut generator = Generator::default(); - let output = generator.generate_text_normalize_comments(&spec).unwrap(); + let output = generate_formatted(&mut generator, &spec); expectorate::assert_contents( format!("tests/output/{}-positional.out", openapi_stem), &output, @@ -61,7 +71,7 @@ fn verify_apis(openapi_file: &str) { [TypeImpl::Display].into_iter(), ), ); - let output = generator.generate_text_normalize_comments(&spec).unwrap(); + let output = generate_formatted(&mut generator, &spec); expectorate::assert_contents( format!("tests/output/{}-builder.out", openapi_stem), &output, @@ -73,7 +83,7 @@ fn verify_apis(openapi_file: &str) { .with_interface(InterfaceStyle::Builder) .with_tag(TagStyle::Separate), ); - let output = generator.generate_text_normalize_comments(&spec).unwrap(); + let output = generate_formatted(&mut generator, &spec); expectorate::assert_contents( format!("tests/output/{}-builder-tagged.out", openapi_stem), &output, diff --git a/progenitor-impl/tests/test_specific.rs b/progenitor-impl/tests/test_specific.rs index 5f794dc1..24644353 100644 --- a/progenitor-impl/tests/test_specific.rs +++ b/progenitor-impl/tests/test_specific.rs @@ -13,6 +13,16 @@ use progenitor_impl::{GenerationSettings, Generator, InterfaceStyle}; use schemars::JsonSchema; use serde::Deserialize; +fn generate_formatted(generator: &mut Generator, spec: &OpenAPI) -> String { + let content = generator.generate_tokens(&spec).unwrap(); + let rustfmt_config = rustfmt_wrapper::config::Config { + normalize_doc_attributes: Some(true), + wrap_comments: Some(true), + ..Default::default() + }; + rustfmt_wrapper::rustfmt_config(rustfmt_config, content).unwrap() +} + #[allow(dead_code)] #[derive(Deserialize, JsonSchema)] struct CursedPath { @@ -65,7 +75,7 @@ fn test_renamed_parameters() { let spec = serde_json::from_str::(out).unwrap(); let mut generator = Generator::default(); - let output = generator.generate_text_normalize_comments(&spec).unwrap(); + let output = generate_formatted(&mut generator, &spec); expectorate::assert_contents( format!("tests/output/{}.out", "test_renamed_parameters"), &output, @@ -98,7 +108,7 @@ fn test_freeform_response() { let spec = serde_json::from_str::(out).unwrap(); let mut generator = Generator::default(); - let output = generator.generate_text_normalize_comments(&spec).unwrap(); + let output = generate_formatted(&mut generator, &spec); expectorate::assert_contents( format!("tests/output/{}.out", "test_freeform_response"), &output, @@ -152,7 +162,7 @@ fn test_default_params() { let spec = serde_json::from_str::(out).unwrap(); let mut generator = Generator::default(); - let output = generator.generate_text_normalize_comments(&spec).unwrap(); + let output = generate_formatted(&mut generator, &spec); expectorate::assert_contents( format!("tests/output/{}.out", "test_default_params_positional"), &output, @@ -161,7 +171,7 @@ fn test_default_params() { let mut generator = Generator::new( GenerationSettings::default().with_interface(InterfaceStyle::Builder), ); - let output = generator.generate_text_normalize_comments(&spec).unwrap(); + let output = generate_formatted(&mut generator, &spec); expectorate::assert_contents( format!("tests/output/{}.out", "test_default_params_builder"), &output, diff --git a/progenitor/Cargo.toml b/progenitor/Cargo.toml index 2b2e84df..d20122cf 100644 --- a/progenitor/Cargo.toml +++ b/progenitor/Cargo.toml @@ -16,6 +16,7 @@ progenitor-impl = { version = "0.2.1-dev", path = "../progenitor-impl" } progenitor-macro = { version = "0.2.1-dev", path = "../progenitor-macro" } anyhow = "1.0" openapiv3 = "1.0.0" +rustfmt-wrapper = "0.2.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_yaml = "0.9" diff --git a/progenitor/src/main.rs b/progenitor/src/main.rs index 6e1397c5..4b6f7b27 100644 --- a/progenitor/src/main.rs +++ b/progenitor/src/main.rs @@ -84,6 +84,15 @@ impl From for TagStyle { } } +fn reformat_code(input: String) -> String { + let config = rustfmt_wrapper::config::Config { + normalize_doc_attributes: Some(true), + wrap_comments: Some(true), + ..Default::default() + }; + rustfmt_wrapper::rustfmt_config(config, input).unwrap() +} + fn save

(p: P, data: &str) -> Result<()> where P: AsRef, @@ -179,6 +188,8 @@ fn main() -> Result<()> { } else { api_code }; + let lib_code = reformat_code(lib_code); + let mut librs = src.clone(); librs.push("lib.rs"); save(librs, lib_code.as_str())?;